LALApps 10.1.0.1-eeff03c
xtefitstoframe.c File Reference

This code is designed to convert an (R)XTE FITS data file into a frame file. More...

Prototypes

int main (int argc, char *argv[])
 The main function of xtefitstoframe.c. More...
 
int ReadUserVars (int argc, char *argv[], UserInput_t *uvar, CHAR *clargs)
 Read in input user arguments. More...
 
int XLALReadFITSFile (FITSData **fitsfiledata, CHAR *filepath)
 This function reads in data from a FITS file and returns a FITSdata data structure. More...
 
int XLALReadFITSHeader (FITSHeader *header, fitsfile *fptr)
 Reads in the FITS file first extension header information. More...
 
int XLALReadFITSGTI (GTIData **gti, fitsfile *fptr)
 Read in GTI (good time interval) table from FITS file. More...
 
int XLALReadFITSArrayData (XTEUINT4Array **array, fitsfile *fptr, FITSHeader *header, int col)
 
int XLALReadFITSEventData (XTECHARArray **event, fitsfile *fptr, FITSHeader *header, int col)
 
int XLALReadFITSTimeStamps (BarycentricData **stamps, fitsfile *fptr)
 Reads in FITS file first extension header timestamps information. More...
 
int XLALConvertTDDES (XTETDDESParams **params, char *tddes)
 Extracts PCA config, energy range and sampling parameters from tddes2 DDL string. More...
 
int removechar (CHAR *p, CHAR ch)
 Removes a character from a string. More...
 
int XLALArrayDataToXTEUINT4TimeSeries (XTEUINT4TimeSeries **ts, XTEUINT4Vector *array, BarycentricData *stamps, REAL8 dt)
 Converts a FITS file data structure containing science array (binned) data into a timeseries. More...
 
int XLALEventDataToXTEUINT4TimeSeries (XTEUINT4TimeSeries **ts, XTECHARVector *event, BarycentricData *stamps, REAL8 dt)
 Converts a FITS event data file to a binned timeseries. More...
 
int XLALEventDataToXTEUINT4TimeSeriesArray (XTEUINT4TimeSeriesArray **ts, FITSData *fits, REAL8 dt)
 Converts a FITS event data file to a binned timeseries. More...
 
int XLALArrayDataToXTEUINT4TimeSeriesArray (XTEUINT4TimeSeriesArray **ts, FITSData *fits, REAL8 dt)
 Converts a FITS array data file to a binned timeseries. More...
 
int XLALApplyGTIToXTEUINT4TimeSeries (XTEUINT4TimeSeries **ts, GTIData *gti)
 Sets timeseries samples NOT in the GTI table as undefined and zeros the corresponding data. More...
 
int XLALApplyGTIToXTEUINT4TimeSeriesArray (XTEUINT4TimeSeriesArray **ts, GTIData *gti)
 Sets timeseries array samples NOT in the GTI table as undefined and zeros the corresponding data. More...
 
int XLALReduceBarycentricData (BarycentricData **stamps)
 Reduces the number of barycentric timestamps from a FITS data structure. More...
 
int XLALBarycenterXTEUINT4TimeSeries (XTEUINT4TimeSeries **ts, BarycentricData *stamps, GTIData *gti)
 This function barycenters an XTEUINT4TimeSeries using a set of barycentric timestamps. More...
 
int XLALBarycenterXTEUINT4TimeSeriesArray (XTEUINT4TimeSeriesArray **ts, BarycentricData *stamps)
 This function barycenters an XTEUINT4TimeSeriesArray using a set of barycentric timestamps. More...
 
int XLALXTEUINT4TimeSeriesArrayToFrames (XTEUINT4TimeSeriesArray *ts, CHAR *outputdir)
 This function outputs an XTEUINT4TimeSeriesArray to a frame file or files. More...
 
int XLALXTEUINT4TimeSeriesArrayToGTI (GTIData **gti, XTEUINT4TimeSeriesArray *ts)
 This function outputs an XTEUINT4TimeSeriesArray to a frame file or files. More...
 
int XLALCreateXTEUINT4TimeSeries (XTEUINT4TimeSeries **x, INT8 N)
 Allocates memory for a XTEUINT4TimeSeries. More...
 
int XLALCreateXTEUINT4TimeSeriesArray (XTEUINT4TimeSeriesArray **x, INT8 N)
 
int XLALCreateBarycentricData (BarycentricData **stamps, INT8 N)
 Allocates memory for a barycentric timestamps structure. More...
 
int XLALCreateGTIData (GTIData **gti, INT8 N)
 Allocates memory for a GTI structure. More...
 
int XLALFreeGTIData (GTIData *gti)
 Frees memory for a GTI structure. More...
 
int XLALFreeFITSData (FITSData *x)
 Frees a FITS data structure. More...
 
int XLALFreeXTEUINT4TimeSeries (XTEUINT4TimeSeries *ts)
 Frees an XTEUINT4TimeSeries data structure. More...
 
int XLALFreeXTEUINT4TimeSeriesArray (XTEUINT4TimeSeriesArray *ts)
 Frees an XTEUINT4TimeSeriesArray data structure. More...
 
int XLALReallocXTEUINT4TimeSeries (XTEUINT4TimeSeries **ts, INT8 N)
 Resizes an XTEUINT4TimeSeries data structure. More...
 
int XLALFreeBarycentricData (BarycentricData *stamps)
 Allocates memory for a barycentric timestamps structure. More...
 
int XLALReadFITSArrayData (XTEUINT4Array **array, fitsfile *fptr, FITSHeader *header, INT4 colidx)
 Reads in array mode data from a FITS file. More...
 
int XLALReadFITSEventData (XTECHARArray **event, fitsfile *fptr, FITSHeader *header, INT4 colidx)
 Reads in event mode data from a FITS file. More...
 

Detailed Description

This code is designed to convert an (R)XTE FITS data file into a frame file.

Author
C.Messenger

It reads in either individually time-tagged photons or pre-binned photon counts. If the input file has been pre-processed such that it also contains barycentric time information then the user can specify that the output timeseries be barycentered. The final timeseries is output in frame file format.

Definition in file xtefitstoframe.c.

Go to the source code of this file.

Data Structures

struct  BarycentricData
 A structure for storing vectors of detector and barycentric frame timestamps A pre-barycentered FITS file contains an original set of detector frame timestamps (not always uniformly spaced) and a corresponding set of barycentric timestamps. More...
 
struct  GTIData
 The good time interval data read from a FITS file. More...
 
struct  XTETDDESParams
 A structure to store TDDES2 DDL data. More...
 
struct  FITSHeader
 A structure containing all of the relavent information extracted from the header of an (R)XTE FITS PCA file. More...
 
struct  XTECHARVector
 A structure containing event information from a single channel found in an (R)XTE FITS file. More...
 
struct  XTECHARArray
 A structure containing a vector of event data information. More...
 
struct  XTEUINT4Vector
 A structure containing array data information from a single channel found in an (R)XTE FITS file. More...
 
struct  XTEUINT4Array
 A structure containing a vector of array data information. More...
 
struct  FITSData
 A structure containing all of the relavent information extracted from a single (R)XTE FITS PCA file. More...
 
struct  XTEUINT4TimeSeries
 A structure for storing a timeseries of unsigned integers for XTE data. More...
 
struct  XTEUINT4TimeSeriesArray
 A structure for storing an array of integer timeseries for XTE data. More...
 
struct  UserInput_t
 A structure that stores user input variables.
 

Macros

#define MAX_DT   0.000976562 /* the maximum sample time we will use (equiv max freq 512 Hz) */
 
#define MIN_DT   0.000244140625 /* the minimum sample time we will use (equiv max freq 2048 Hz) */
 
#define GPSMINUSTAI   441417609 /* IMPORTANT, DO NOT TOUCH = difference between GPS and TAI in seconds on January 1, 1994, at 00:00:28 */
 
#define TIMESTAMPDELTAT   1 /* the spacing used when reducing the number of event time stamps (seconds) */
 
#define MAXTIMESTAMPDELTAT   256 /* the maximum allowed spacing timestamp spacing for barycentering (seconds) */
 
#define APIDLENGTH   5 /* the length of APID HEX strings */
 
#define STRINGLENGTH   256 /* the length of general string */
 
#define LONGSTRINGLENGTH   1024 /* the length of general string */
 
#define NAPID   6 /* the number of valid APIDs we can currently read */
 
#define NUSELESSDATAMODE   5 /* the number of useless data modes we know of */
 
#define MINFRAMELENGTH   10 /* the minimum duration of output frame file in seconds */
 
#define ARRAY   0 /* data type codes */
 
#define EVENT   1 /* data type codes */
 
#define NPCU   5 /* the number of PCUs on XTE */
 
#define MAXZEROCOUNT   1000 /* the maximum number of consecutive zeros alowed in the data */
 
#define XTEFITSTOFRAMEC_ENULL   1
 
#define XTEFITSTOFRAMEC_ESYS   2
 
#define XTEFITSTOFRAMEC_EINPUT   3
 
#define XTEFITSTOFRAMEC_EMEM   4
 
#define XTEFITSTOFRAMEC_ENONULL   5
 
#define XTEFITSTOFRAMEC_EXLAL   6
 
#define XTEFITSTOFRAMEC_MSGENULL   "Arguments contained an unexpected null pointer"
 
#define XTEFITSTOFRAMEC_MSGESYS   "System call failed (probably file IO)"
 
#define XTEFITSTOFRAMEC_MSGEINPUT   "Invalid input"
 
#define XTEFITSTOFRAMEC_MSGEMEM   "Out of memory. Bad."
 
#define XTEFITSTOFRAMEC_MSGENONULL   "Output pointer is non-NULL"
 
#define XTEFITSTOFRAMEC_MSGEXLAL   "XLALFunction-call failed"
 

Variables

int vrbflg
 defined in lal/lib/std/LALError.c More...
 
char string_OBJECT [] = "OBJECT"
 
char string_RA_PNT [] = "RA_PNT"
 
char string_DEC_PNT [] = "DEC_PNT"
 
char string_OBS_ID [] = "OBS_ID"
 
char string_TFIELDS [] = "TFIELDS"
 
char string_NAXIS1 [] = "NAXIS1"
 
char string_TIMEZERO [] = "TIMEZERO"
 
char string_DELTAT [] = "DELTAT"
 
char string_DATAMODE [] = "DATAMODE"
 
char string_2LLD [] = "2LLD"
 
char string_HDUCLAS1 [] = "HDUCLAS1"
 
char string_TDDES2 [] = "TDDES2"
 
char string_TIMEDEL [] = "TIMEDEL"
 
char string_TTYPE1 [] = "TTYPE1"
 
const charAPID [6] = {"FS37","FS3b","FS3f","FS4f","XENO","FS46"}
 
const char xtechannelname [16] = "X1"
 
const charUSELESSDATAMODE [5] = {"D_1US_0_249_1024_64S_F","D_1US_0_249_128_1S_F","D_1US_0_249_128_1S_2LLD_F","CB","GoodXenon"}
 

Macro Definition Documentation

◆ MAX_DT

#define MAX_DT   0.000976562 /* the maximum sample time we will use (equiv max freq 512 Hz) */

Definition at line 62 of file xtefitstoframe.c.

◆ MIN_DT

#define MIN_DT   0.000244140625 /* the minimum sample time we will use (equiv max freq 2048 Hz) */

Definition at line 63 of file xtefitstoframe.c.

◆ GPSMINUSTAI

#define GPSMINUSTAI   441417609 /* IMPORTANT, DO NOT TOUCH = difference between GPS and TAI in seconds on January 1, 1994, at 00:00:28 */

Definition at line 64 of file xtefitstoframe.c.

◆ TIMESTAMPDELTAT

#define TIMESTAMPDELTAT   1 /* the spacing used when reducing the number of event time stamps (seconds) */

Definition at line 65 of file xtefitstoframe.c.

◆ MAXTIMESTAMPDELTAT

#define MAXTIMESTAMPDELTAT   256 /* the maximum allowed spacing timestamp spacing for barycentering (seconds) */

Definition at line 66 of file xtefitstoframe.c.

◆ APIDLENGTH

#define APIDLENGTH   5 /* the length of APID HEX strings */

Definition at line 67 of file xtefitstoframe.c.

◆ STRINGLENGTH

#define STRINGLENGTH   256 /* the length of general string */

Definition at line 68 of file xtefitstoframe.c.

◆ LONGSTRINGLENGTH

#define LONGSTRINGLENGTH   1024 /* the length of general string */

Definition at line 69 of file xtefitstoframe.c.

◆ NAPID

#define NAPID   6 /* the number of valid APIDs we can currently read */

Definition at line 70 of file xtefitstoframe.c.

◆ NUSELESSDATAMODE

#define NUSELESSDATAMODE   5 /* the number of useless data modes we know of */

Definition at line 71 of file xtefitstoframe.c.

◆ MINFRAMELENGTH

#define MINFRAMELENGTH   10 /* the minimum duration of output frame file in seconds */

Definition at line 72 of file xtefitstoframe.c.

◆ ARRAY

#define ARRAY   0 /* data type codes */

Definition at line 73 of file xtefitstoframe.c.

◆ EVENT

#define EVENT   1 /* data type codes */

Definition at line 74 of file xtefitstoframe.c.

◆ NPCU

#define NPCU   5 /* the number of PCUs on XTE */

Definition at line 75 of file xtefitstoframe.c.

◆ MAXZEROCOUNT

#define MAXZEROCOUNT   1000 /* the maximum number of consecutive zeros alowed in the data */

Definition at line 76 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_ENULL

#define XTEFITSTOFRAMEC_ENULL   1

Definition at line 80 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_ESYS

#define XTEFITSTOFRAMEC_ESYS   2

Definition at line 81 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_EINPUT

#define XTEFITSTOFRAMEC_EINPUT   3

Definition at line 82 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_EMEM

#define XTEFITSTOFRAMEC_EMEM   4

Definition at line 83 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_ENONULL

#define XTEFITSTOFRAMEC_ENONULL   5

Definition at line 84 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_EXLAL

#define XTEFITSTOFRAMEC_EXLAL   6

Definition at line 85 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_MSGENULL

#define XTEFITSTOFRAMEC_MSGENULL   "Arguments contained an unexpected null pointer"

Definition at line 86 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_MSGESYS

#define XTEFITSTOFRAMEC_MSGESYS   "System call failed (probably file IO)"

Definition at line 87 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_MSGEINPUT

#define XTEFITSTOFRAMEC_MSGEINPUT   "Invalid input"

Definition at line 88 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_MSGEMEM

#define XTEFITSTOFRAMEC_MSGEMEM   "Out of memory. Bad."

Definition at line 89 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_MSGENONULL

#define XTEFITSTOFRAMEC_MSGENONULL   "Output pointer is non-NULL"

Definition at line 90 of file xtefitstoframe.c.

◆ XTEFITSTOFRAMEC_MSGEXLAL

#define XTEFITSTOFRAMEC_MSGEXLAL   "XLALFunction-call failed"

Definition at line 91 of file xtefitstoframe.c.

Function Documentation

◆ main()

int main ( int  argc,
char argv[] 
)

The main function of xtefitstoframe.c.

Here we read in a single XTE FITS file containing PCA data, generate a timeseries, barycenter the data if requested, and output as a frame file.

Definition at line 350 of file xtefitstoframe.c.

◆ ReadUserVars()

int ReadUserVars ( int  argc,
char argv[],
UserInput_t uvar,
CHAR clargs 
)

Read in input user arguments.

Definition at line 486 of file xtefitstoframe.c.

◆ XLALReadFITSFile()

int XLALReadFITSFile ( FITSData **  fitsfiledata,
char filename 
)

This function reads in data from a FITS file and returns a FITSdata data structure.

Parameters
[out]fitsfiledataFITS file null data structure
[in]filenamefull path to input FITS file

Definition at line 520 of file xtefitstoframe.c.

◆ XLALReadFITSHeader()

int XLALReadFITSHeader ( FITSHeader header,
fitsfile *  fptr 
)

Reads in the FITS file first extension header information.

The first extension Header HDU1 (2 from the beginning) contains keywords which provide a complete and detailed description of the contents of the first extension. For convenience, it also contains some of the same information as the primary header.

Parameters
[out]headerThe FITS file header structure
[in]fptrfitsfile file pointer

Definition at line 776 of file xtefitstoframe.c.

◆ XLALReadFITSGTI()

int XLALReadFITSGTI ( GTIData **  gti,
fitsfile *  fptr 
)

Read in GTI (good time interval) table from FITS file.

The second extension HDU2 (3 from the beginning) lists the standard good time intervals, i.e. the start and stop times of all the potentially useable data in the file.

Parameters
[out]gtiGood time interval data structure
[in]fptrfitsfile file pointer

Definition at line 664 of file xtefitstoframe.c.

◆ XLALReadFITSArrayData() [1/2]

int XLALReadFITSArrayData ( XTEUINT4Array **  array,
fitsfile *  fptr,
FITSHeader header,
int  col 
)

◆ XLALReadFITSEventData() [1/2]

int XLALReadFITSEventData ( XTECHARArray **  event,
fitsfile *  fptr,
FITSHeader header,
int  col 
)

◆ XLALReadFITSTimeStamps()

int XLALReadFITSTimeStamps ( BarycentricData **  stamps,
fitsfile *  fptr 
)

Reads in FITS file first extension header timestamps information.

It also reads in barycentric timestamps if they are present.

Parameters
[out]stampsthe detector and barycenter timestamps
[in]fptra FITS file pointer

Definition at line 1154 of file xtefitstoframe.c.

◆ XLALConvertTDDES()

int XLALConvertTDDES ( XTETDDESParams **  params,
char tddes 
)

Extracts PCA config, energy range and sampling parameters from tddes2 DDL string.

It's not pretty but it does the job.

Parameters
[out]paramsa null TDDES parameter structure
[in]tddesa TDDES DDL string

Definition at line 1580 of file xtefitstoframe.c.

◆ removechar()

int removechar ( CHAR p,
CHAR  ch 
)

Removes a character from a string.

Parameters
p[in/out] string to edit
[in]chcharacter to remove

Definition at line 1122 of file xtefitstoframe.c.

◆ XLALArrayDataToXTEUINT4TimeSeries()

int XLALArrayDataToXTEUINT4TimeSeries ( XTEUINT4TimeSeries **  ts,
XTEUINT4Vector array,
BarycentricData stamps,
REAL8  dt 
)

Converts a FITS file data structure containing science array (binned) data into a timeseries.

Using the detector timestamps data we convert the FITS data into a continuous binned timeseries.

Parameters
[out]tsa null timeseries
[in]arraya FITSdata structure
[in]stampstimestamps data
[in]dtthe sampling time

Definition at line 2161 of file xtefitstoframe.c.

◆ XLALEventDataToXTEUINT4TimeSeries()

int XLALEventDataToXTEUINT4TimeSeries ( XTEUINT4TimeSeries **  ts,
XTECHARVector event,
BarycentricData stamps,
REAL8  dt 
)

Converts a FITS event data file to a binned timeseries.

Using the detector timestamps data we convert the FITS data into a continuous binned timeseries.

Parameters
[out]tsa NULL timeseries
[in]eventa FITSdata structure
[in]stampstimestamps data
[in]dtthe sampling time

Definition at line 1974 of file xtefitstoframe.c.

◆ XLALEventDataToXTEUINT4TimeSeriesArray()

int XLALEventDataToXTEUINT4TimeSeriesArray ( XTEUINT4TimeSeriesArray **  ts,
FITSData fits,
REAL8  dt 
)

Converts a FITS event data file to a binned timeseries.

This function acts as a wrapper for XLALEventDataToXTEUINT4TimeSeries which deals with single timeseries. We enforce that each timeseries has the same start, end, and sampling time for consistency.

Parameters
[out]tsa NULL timeseries
fitsin] a FITSHeader structure
[in]dtthe desired sampling time

Definition at line 1871 of file xtefitstoframe.c.

◆ XLALArrayDataToXTEUINT4TimeSeriesArray()

int XLALArrayDataToXTEUINT4TimeSeriesArray ( XTEUINT4TimeSeriesArray **  ts,
FITSData fits,
REAL8  dt 
)

Converts a FITS array data file to a binned timeseries.

This function acts as a wrapper for XLALArrayDataToXTEUINT4TimeSeries which deals with single timeseries. We enforce that each timeseries has the same start, end, and sampling time for consistency.

Parameters
[out]tsa NULL timeseries
fitsin] a FITSHeader structure
[in]dtthe desired sampling time

Definition at line 2057 of file xtefitstoframe.c.

◆ XLALApplyGTIToXTEUINT4TimeSeries()

int XLALApplyGTIToXTEUINT4TimeSeries ( XTEUINT4TimeSeries **  ts,
GTIData gti 
)

Sets timeseries samples NOT in the GTI table as undefined and zeros the corresponding data.

Parameters
ts[in/out] the timeseries
[in]gtia GTIData structure containing GTI information

Definition at line 2492 of file xtefitstoframe.c.

◆ XLALApplyGTIToXTEUINT4TimeSeriesArray()

int XLALApplyGTIToXTEUINT4TimeSeriesArray ( XTEUINT4TimeSeriesArray **  ts,
GTIData gti 
)

Sets timeseries array samples NOT in the GTI table as undefined and zeros the corresponding data.

This is a wrapper for XLALApplyGTIToXTEUINT4TimeSeries.

Parameters
ts[in/out] the timeseries
[in]gtia GTIdata structure containing GTI information

Definition at line 2456 of file xtefitstoframe.c.

◆ XLALReduceBarycentricData()

int XLALReduceBarycentricData ( BarycentricData **  stamps)

Reduces the number of barycentric timestamps from a FITS data structure.

We do this because we don't need fast sampling in time to perform accurate barycentering. For event data there will be a timestamp for every event which means a lot of timestamps. Here we reduce the number to one timestamp per TIMESTAMPDELTAT seconds.

Parameters
stamps[in/out] barycentered null timestamps vector

Definition at line 2636 of file xtefitstoframe.c.

◆ XLALBarycenterXTEUINT4TimeSeries()

int XLALBarycenterXTEUINT4TimeSeries ( XTEUINT4TimeSeries **  ts,
BarycentricData stamps,
GTIData gti 
)

This function barycenters an XTEUINT4TimeSeries using a set of barycentric timestamps.

The input detector frame timeseries is replaced with the output barycentered timeseries.

Parameters
ts[in/out] timeseries
[in]stampsvector of pairs of detector/barycentered timestamps
[in]gtiGTI data

Definition at line 3225 of file xtefitstoframe.c.

◆ XLALBarycenterXTEUINT4TimeSeriesArray()

int XLALBarycenterXTEUINT4TimeSeriesArray ( XTEUINT4TimeSeriesArray **  ts,
BarycentricData stamps 
)

This function barycenters an XTEUINT4TimeSeriesArray using a set of barycentric timestamps.

This is a wrapper for XLALBarycenterXTEUINT4TimeSeries.

Parameters
ts[in/out] timeseries
[in]stampsvector of pairs of detector/barycentered timestamps

Definition at line 3166 of file xtefitstoframe.c.

◆ XLALXTEUINT4TimeSeriesArrayToFrames()

int XLALXTEUINT4TimeSeriesArrayToFrames ( XTEUINT4TimeSeriesArray ts,
CHAR outputdir 
)

This function outputs an XTEUINT4TimeSeriesArray to a frame file or files.

It creates a frame channel for each seperate timeseries extracted from the FITS file. It creates multiple frames if there are gaps in the data.

Parameters
[in]tsthe input xte timeseries array
[in]outputdirthe output directory name

Definition at line 2987 of file xtefitstoframe.c.

◆ XLALXTEUINT4TimeSeriesArrayToGTI()

int XLALXTEUINT4TimeSeriesArrayToGTI ( GTIData **  gti,
XTEUINT4TimeSeriesArray ts 
)

This function outputs an XTEUINT4TimeSeriesArray to a frame file or files.

Parameters
[out]gtithe output GTI table
[in]tsthe timeseries array

Definition at line 2830 of file xtefitstoframe.c.

◆ XLALCreateXTEUINT4TimeSeries()

int XLALCreateXTEUINT4TimeSeries ( XTEUINT4TimeSeries **  x,
INT8  N 
)

Allocates memory for a XTEUINT4TimeSeries.

Parameters
[out]xa null timeseries
[in]Nthe desired number of elements in the timeseries

Definition at line 2270 of file xtefitstoframe.c.

◆ XLALCreateXTEUINT4TimeSeriesArray()

int XLALCreateXTEUINT4TimeSeriesArray ( XTEUINT4TimeSeriesArray **  x,
INT8  N 
)

◆ XLALCreateBarycentricData()

int XLALCreateBarycentricData ( BarycentricData **  stamps,
INT8  N 
)

Allocates memory for a barycentric timestamps structure.

Parameters
[out]stampsa null timeseries
[in]Nthe desired number of elements in the timeseries

Definition at line 2768 of file xtefitstoframe.c.

◆ XLALCreateGTIData()

int XLALCreateGTIData ( GTIData **  gti,
INT8  N 
)

Allocates memory for a GTI structure.

Parameters
[out]gtia null timeseries
[in]Nthe desired number of elements in the timeseries

Definition at line 2705 of file xtefitstoframe.c.

◆ XLALFreeGTIData()

int XLALFreeGTIData ( GTIData gti)

Frees memory for a GTI structure.

Parameters
[out]gtia null timeseries

Definition at line 2744 of file xtefitstoframe.c.

◆ XLALFreeFITSData()

int XLALFreeFITSData ( FITSData x)

Frees a FITS data structure.

Parameters
x[in/out] a FITS data structure

Definition at line 2309 of file xtefitstoframe.c.

◆ XLALFreeXTEUINT4TimeSeries()

int XLALFreeXTEUINT4TimeSeries ( XTEUINT4TimeSeries ts)

Frees an XTEUINT4TimeSeries data structure.

Parameters
ts[in/out] a timeseries

Definition at line 2430 of file xtefitstoframe.c.

◆ XLALFreeXTEUINT4TimeSeriesArray()

int XLALFreeXTEUINT4TimeSeriesArray ( XTEUINT4TimeSeriesArray ts)

Frees an XTEUINT4TimeSeriesArray data structure.

Parameters
ts[in/out] a timeseries

Definition at line 2392 of file xtefitstoframe.c.

◆ XLALReallocXTEUINT4TimeSeries()

int XLALReallocXTEUINT4TimeSeries ( XTEUINT4TimeSeries **  ts,
INT8  N 
)

Resizes an XTEUINT4TimeSeries data structure.

Parameters
ts[in/out] the timeseries
[in]Nthe new length

Definition at line 2602 of file xtefitstoframe.c.

◆ XLALFreeBarycentricData()

int XLALFreeBarycentricData ( BarycentricData stamps)

Allocates memory for a barycentric timestamps structure.

Parameters
[out]stampsa null timeseries

Definition at line 2807 of file xtefitstoframe.c.

◆ XLALReadFITSArrayData() [2/2]

int XLALReadFITSArrayData ( XTEUINT4Array **  array,
fitsfile *  fptr,
FITSHeader header,
INT4  colidx 
)

Reads in array mode data from a FITS file.

Science array mode data is binned data and so contains photon counts.

Parameters
[out]arraythe output data vector
[in]fptra fitsfile file pointer
[in]headera fitsfile header
[in]colidxthe column to be read

Definition at line 1312 of file xtefitstoframe.c.

◆ XLALReadFITSEventData() [2/2]

int XLALReadFITSEventData ( XTECHARArray **  event,
fitsfile *  fptr,
FITSHeader header,
INT4  colidx 
)

Reads in event mode data from a FITS file.

The information regarding each event is stored in groups of nbytes. The first char in each group defined whether the event is real. We read in all information (real and non-real events). We group all energies together her so we only have a single channel

Parameters
[out]eventThe FITSdata structure
[in]fptra fitsfile file pointer
[in]headerthe fits file header
[in]colidxthe column to be read

Definition at line 1470 of file xtefitstoframe.c.

Variable Documentation

◆ vrbflg

int vrbflg
extern

defined in lal/lib/std/LALError.c

◆ string_OBJECT

char string_OBJECT[] = "OBJECT"

Definition at line 279 of file xtefitstoframe.c.

◆ string_RA_PNT

char string_RA_PNT[] = "RA_PNT"

Definition at line 280 of file xtefitstoframe.c.

◆ string_DEC_PNT

char string_DEC_PNT[] = "DEC_PNT"

Definition at line 281 of file xtefitstoframe.c.

◆ string_OBS_ID

char string_OBS_ID[] = "OBS_ID"

Definition at line 282 of file xtefitstoframe.c.

◆ string_TFIELDS

char string_TFIELDS[] = "TFIELDS"

Definition at line 283 of file xtefitstoframe.c.

◆ string_NAXIS1

char string_NAXIS1[] = "NAXIS1"

Definition at line 284 of file xtefitstoframe.c.

◆ string_TIMEZERO

char string_TIMEZERO[] = "TIMEZERO"

Definition at line 285 of file xtefitstoframe.c.

◆ string_DELTAT

char string_DELTAT[] = "DELTAT"

Definition at line 286 of file xtefitstoframe.c.

◆ string_DATAMODE

char string_DATAMODE[] = "DATAMODE"

Definition at line 287 of file xtefitstoframe.c.

◆ string_2LLD

char string_2LLD[] = "2LLD"

Definition at line 288 of file xtefitstoframe.c.

◆ string_HDUCLAS1

char string_HDUCLAS1[] = "HDUCLAS1"

Definition at line 289 of file xtefitstoframe.c.

◆ string_TDDES2

char string_TDDES2[] = "TDDES2"

Definition at line 290 of file xtefitstoframe.c.

◆ string_TIMEDEL

char string_TIMEDEL[] = "TIMEDEL"

Definition at line 291 of file xtefitstoframe.c.

◆ string_TTYPE1

char string_TTYPE1[] = "TTYPE1"

Definition at line 292 of file xtefitstoframe.c.

◆ APID

const char* APID[6] = {"FS37","FS3b","FS3f","FS4f","XENO","FS46"}

Definition at line 294 of file xtefitstoframe.c.

◆ xtechannelname

const char xtechannelname[16] = "X1"

Definition at line 296 of file xtefitstoframe.c.

◆ USELESSDATAMODE

const char* USELESSDATAMODE[5] = {"D_1US_0_249_1024_64S_F","D_1US_0_249_128_1S_F","D_1US_0_249_128_1S_2LLD_F","CB","GoodXenon"}

Definition at line 299 of file xtefitstoframe.c.