00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PM_DETREND_DB_H
00023 #define PM_DETREND_DB_H
00024
00025 typedef enum {
00026 PM_DETREND_TYPE_MASK,
00027 PM_DETREND_TYPE_BIAS,
00028 PM_DETREND_TYPE_DARK,
00029 PM_DETREND_TYPE_FLAT,
00030 PM_DETREND_TYPE_FLAT_CORRECTION,
00031 PM_DETREND_TYPE_FRINGE_IMAGE,
00032 PM_DETREND_TYPE_FRINGE_TABLE,
00033 PM_DETREND_TYPE_BACKGROUND,
00034 } pmDetrendType;
00035
00036 typedef struct
00037 {
00038 char *camera;
00039 psTime time;
00040 pmDetrendType type;
00041 char *filter;
00042 float exptime;
00043 float airmass;
00044 }
00045 pmDetrendSelectOptions;
00046
00047 typedef struct
00048 {
00049 char *detID;
00050 pmFPALevel level;
00051 }
00052 pmDetrendSelectResults;
00053
00054 typedef struct
00055 {
00056 char *detID;
00057 char *classID;
00058 }
00059 pmDetrendFileOptions;
00060
00061 psString pmDetrendTypeToString (pmDetrendType type);
00062
00063 pmDetrendSelectOptions *pmDetrendSelectOptionsAlloc(char *camera, psTime time, pmDetrendType type);
00064 pmDetrendSelectResults *pmDetrendSelectResultsAlloc();
00065 pmDetrendSelectResults *pmDetrendSelect (pmDetrendSelectOptions *options);
00066 char *pmDetrendFile (char *detID, char *classID);
00067
00068
00069 typedef struct
00070 {
00071 int stdin;
00072 int stdout;
00073 int stderr;
00074 }
00075 psPipe;
00076
00077 typedef struct
00078 {
00079 char *data;
00080 int nAlloc;
00081 int nReset;
00082 int nBlock;
00083 int n;
00084 }
00085 psIOBuffer;
00086
00087
00088 psIOBuffer *psIOBufferAlloc (int nBuffer);
00089 bool psIOBufferFlush (psIOBuffer *buffer);
00090 int psIOBufferRead (psIOBuffer *buffer, int fd);
00091 int psIOBufferReadEmpty (psIOBuffer *buffer, int maxRetries, int fd);
00092
00093
00094 psPipe *psPipeAlloc ();
00095 psPipe *psPipeOpen (char *command);
00096 bool psPipeClose (psPipe *pipe);
00097
00098 # endif