|
VIRCAM Pipeline
2.3.12
|
These are utility routines of various types. More...
Functions | |
| const char * | vircam_get_license (void) |
| void | vircam_exten_range (int inexten, const cpl_frame *fr, int *out1, int *out2) |
| void | vircam_madfit (int npts, float *xdata, float *ydata, float *intercept, float *slope) |
| void | vircam_linfit (int npts, double *xdata, double *ydata, double *intercept, double *slope, double *sig) |
| int | vircam_solve_gauss (double **a, double *b, int m) |
| int | vircam_polyfit (const cpl_array *xarray, const cpl_array *yarray, int ncoefs, int ilim, int niter, float lclip, float hclip, cpl_array **polycf, double *sigfit) |
| void | vircam_difference_image (cpl_image *master, cpl_image *prog, unsigned char *bpm, cpl_table *chantab, int ncells, int oper, float *global_diff, float *global_rms, cpl_image **diffim, cpl_table **diffimstats) |
| cpl_table * | vircam_create_diffimg_stats (int nrows) |
| int * | vircam_dummy_confidence (long n) |
| int | vircam_is_dummy (cpl_propertylist *p) |
| cpl_table * | vircam_illcor_newtab (int nrows) |
| void | vircam_timestamp (char *out, int n) |
| int | vircam_check_crval (cpl_propertylist *phu, cpl_propertylist *ehu) |
| void | vircam_copywcs (cpl_propertylist *p1, cpl_propertylist *p2) |
| void | vircam_cull (cpl_frameset *in, float lthr, float hthr, int ndit, int jst, int jfn, cpl_array **mins, cpl_array **maxs, cpl_array **aves, cpl_frameset **out, int *status) |
These are utility routines of various types.
| int vircam_check_crval | ( | cpl_propertylist * | phu, |
| cpl_propertylist * | ehu | ||
| ) |
| phu | The primary header propertylist |
| ehu | The extension header propertylist |
| CASU_OK | if everything is ok |
| CASU_FATAL | if no values of CRVAL are in the extension or no values of RA,DEC are available in the primary |
Definition at line 1148 of file vircam_utils.c.
References vircam_pfits_get_crval1(), vircam_pfits_get_crval2(), vircam_pfits_get_dec(), and vircam_pfits_get_ra().
| void vircam_copywcs | ( | cpl_propertylist * | p1, |
| cpl_propertylist * | p2 | ||
| ) |
| p1 | The first input propertylist. This is the source of the WCS |
| p2 | The second input propertylist. The WCS will be copied to this |
Definition at line 1207 of file vircam_utils.c.
| cpl_table* vircam_create_diffimg_stats | ( | int | nrows | ) |
| nrows | The number of rows for the table |
Definition at line 960 of file vircam_utils.c.
Referenced by vircam_difference_image().
| void vircam_cull | ( | cpl_frameset * | in, |
| float | lthr, | ||
| float | hthr, | ||
| int | ndit, | ||
| int | jst, | ||
| int | jfn, | ||
| cpl_array ** | mins, | ||
| cpl_array ** | maxs, | ||
| cpl_array ** | aves, | ||
| cpl_frameset ** | out, | ||
| int * | status | ||
| ) |
| in | The input frameset |
| lthr | The lower threshold |
| hthr | The upper threshold |
| ndit | The number of DITs in the exposure |
| jst | The first extension to be tested |
| jfn | The last extension to be tested |
| mins | An array of minimum flux values for each extension |
| maxs | An array of maximum flux values for each extension |
| aves | An array of average flux values for each extension |
| out | The output frameset with frames to be kept |
| status | An output status. 0 -> all ok, 1 -> only one extension is being used and that particular detector is dead, 2-> all of the images in the nominated detector are outside of the flux thresholds. The nominated detector is either (1) the first live detector in the case where we user looking at multiple detectors, or (2) the only detector in the case where we're only looking at 1. |
Definition at line 1258 of file vircam_utils.c.
References vircam_pfits_get_detlive().
| void vircam_difference_image | ( | cpl_image * | master, |
| cpl_image * | prog, | ||
| unsigned char * | bpm, | ||
| cpl_table * | chantab, | ||
| int | ncells, | ||
| int | oper, | ||
| float * | global_diff, | ||
| float * | global_rms, | ||
| cpl_image ** | diffim, | ||
| cpl_table ** | diffimstats | ||
| ) |
| master | The master calibration image |
| prog | The new mean image |
| bpm | Input bad pixel mask |
| chantab | The channel table for the detector |
| ncells | The number of cells per channel |
| oper | The operation to be performed:
|
| global_diff | The median difference over the whole difference image |
| global_rms | The rms difference over the whole difference image |
| diffim | The output difference/ratio image |
| diffimstats | The output difference/ratio image statistics table |
Definition at line 762 of file vircam_utils.c.
References casu_meansig(), casu_medmad(), and vircam_create_diffimg_stats().
| int* vircam_dummy_confidence | ( | long | n | ) |
| n | The number of pixels |
Definition at line 1006 of file vircam_utils.c.
| void vircam_exten_range | ( | int | inexten, |
| const cpl_frame * | fr, | ||
| int * | out1, | ||
| int * | out2 | ||
| ) |
| inexten | Input image extension from the recipe invocation |
| fr | An input frame used to test whether the requested frame(s) exist or not |
| out1 | Lower part of extension range (-1 if there is an error) |
| out2 | Upper part of extension range (-1 if there is an error) |
Definition at line 165 of file vircam_utils.c.
| const char* vircam_get_license | ( | void | ) |
Definition at line 116 of file vircam_utils.c.
| cpl_table* vircam_illcor_newtab | ( | int | nrows | ) |
| nrows | The number of rows in the table |
Definition at line 1064 of file vircam_utils.c.
Referenced by vircam_jmp_save_illum().
| int vircam_is_dummy | ( | cpl_propertylist * | p | ) |
| p | The input propertylist |
Definition at line 1033 of file vircam_utils.c.
| void vircam_linfit | ( | int | npts, |
| double * | xdata, | ||
| double * | ydata, | ||
| double * | intercept, | ||
| double * | slope, | ||
| double * | sig | ||
| ) |
| npts | The number of data points |
| xdata | The X data |
| ydata | The Y data |
| intercept | The fitted intercept |
| slope | The fitted slope |
| sig | The fit error |
Definition at line 382 of file vircam_utils.c.
| void vircam_madfit | ( | int | npts, |
| float * | xdata, | ||
| float * | ydata, | ||
| float * | intercept, | ||
| float * | slope | ||
| ) |
| npts | The number of data points |
| xdata | The X data |
| ydata | The Y data |
| intercept | The fitted intercept |
| slope | The fitted slope |
Definition at line 239 of file vircam_utils.c.
| int vircam_polyfit | ( | const cpl_array * | xarray, |
| const cpl_array * | yarray, | ||
| int | ncoefs, | ||
| int | ilim, | ||
| int | niter, | ||
| float | lclip, | ||
| float | hclip, | ||
| cpl_array ** | polycf, | ||
| double * | sigfit | ||
| ) |
| xarray | The independent variable array |
| yarray | The dependent variable array |
| ncoefs | The requested polynomial order plus 1. |
| ilim | The number of low order coefficients not to fit. |
| niter | The number of iterations |
| lclip | The number of sigma for the lower clipping threshold |
| hclip | The number of sigma for the upper clipping threshold |
| polycf | The returned array of polynomial coefficients. |
| sigfit | The total error of the fit |
| CASU_OK | If everything went OK |
| CASU_FATAL | If there was some sort of error |
Definition at line 571 of file vircam_utils.c.
References vircam_solve_gauss().
Referenced by vircam_genlincur().
| int vircam_solve_gauss | ( | double ** | a, |
| double * | b, | ||
| int | m | ||
| ) |
| a | The matrix part of the system (a[m][m]) |
| b | The vector part of the system (b[m]). The output fit coefficients overwrite the input values in this vector. |
| m | The size of the vectors |
| CASU_OK | If everything went OK |
| CASU_FATAL | If matrix a has a zero determinant |
Definition at line 456 of file vircam_utils.c.
Referenced by vircam_genlincur(), and vircam_polyfit().
| void vircam_timestamp | ( | char * | out, |
| int | n | ||
| ) |
| out | The output string. It should be at least 25 characters long. NB: if it isn't at least 25 characters long (and provided you haven't done something stupid like pass in a value of n which is larger than the size of the string) then the output value will truncated to n characters |
| n | The maximum size of the string. |
Definition at line 1102 of file vircam_utils.c.
Referenced by vircam_interleave().