|
VIRCAM Pipeline
2.3.10
|
These miscellaneous utilitiy routines. More...
Functions | |
| int | casu_compare_tags (const cpl_frame *frame1, const cpl_frame *frame2) |
| Compare input tags. More... | |
| cpl_frameset * | casu_frameset_subgroup (cpl_frameset *frameset, cpl_size *labels, cpl_size nlab, const char *tag) |
| Extract a frameset from another frameset. More... | |
| cpl_frame * | casu_frameset_subgroup_1 (cpl_frameset *frameset, cpl_size *labels, cpl_size nlab, const char *tag) |
| Extract a frame of a given label from a frameset. More... | |
| long | casu_getnpts (cpl_image *in) |
| Get the number of pixels in a 2d image. More... | |
| void | casu_prov (cpl_propertylist *p, casu_fits **inlist, int n, int isextn) |
| Write provenance keywords. More... | |
| void | casu_sort (float **a, int n, int m) |
| Sort a 2d array by the first column and co-sort the rest. More... | |
| void | casu_merge_propertylists (cpl_propertylist *p1, cpl_propertylist *p2) |
| Merge two propertylists. More... | |
| void | casu_dummy_property (cpl_propertylist *p) |
| Set dummy property keyword. More... | |
| void | casu_rename_property (cpl_propertylist *p, const char *oldname, char *newname) |
| Rename a property in a given propertylist. More... | |
| cpl_image * | casu_dummy_image (casu_fits *model) |
| Create a dummy image of zeros based on a model. More... | |
| cpl_table * | casu_dummy_catalogue (int type) |
| Create a dummy catalogue of a given type with no rows. More... | |
| int | casu_is_dummy (cpl_propertylist *p) |
| See if the header of an image or table says its a dummy. More... | |
| void | casu_overexp (casu_fits **fitslist, int *n, int ndit, float lthr, float hthr, int ditch, float *minv, float *maxv, float *avev) |
| Remove over- or under-exposed images from a list. More... | |
| int | casu_compare_dims (cpl_image *im1, cpl_image *im2) |
| Compare dimensions of two 2d images. More... | |
| int | casu_gaincor_calc (cpl_frame *frame, int *n, float **cors, int *status) |
| Work out gain corrections. More... | |
| void | casu_timestamp (char *out, int n) |
| Create a timestamp string. More... | |
| int | casu_catpars (cpl_frame *indx, char **catpath, char **catname) |
| Find the name of the standard catalogue and its location. More... | |
| int | casu_fndmatch (float x, float y, float *xlist, float *ylist, int nlist, float err) |
| Match the x,y coordinates of an object to one from a list. More... | |
| int | casu_findcol (cpl_propertylist *p, const char *col) |
| Find from catalogue header which are x,y columns. More... | |
| int | casu_night_from_dateobs (char *dateobs) |
| Use the dateobs value to work out the night of an observation. More... | |
| void | casu_propertylist_update_float (cpl_propertylist *plist, const char *name, float val) |
| void | casu_propertylist_update_double (cpl_propertylist *plist, const char *name, double val) |
These miscellaneous utilitiy routines.
| int casu_catpars | ( | cpl_frame * | indx, |
| char ** | catpath, | ||
| char ** | catname | ||
| ) |
Find the name of the standard catalogue and its location.
| indx | The frame for the index FITS file |
| catpath | The full path to the catalgoue FITS files |
| catname | The name of the catalogue |
| CASU_OK | if everything is ok |
| CASU_WARN | if the catalogue isn't identified in the header |
| CASU_FATAL | if the index file is missing or if there is missing header info |
Definition at line 899 of file casu_utils.c.
| int casu_compare_dims | ( | cpl_image * | im1, |
| cpl_image * | im2 | ||
| ) |
Compare dimensions of two 2d images.
| im1 | The first image |
| im2 | The second image |
| CASU_OK | If the dimensions are the same |
| CASU_FATAL | If the dimensions are different |
Definition at line 713 of file casu_utils.c.
Referenced by casu_darkcor(), and casu_flatcor().
| int casu_compare_tags | ( | const cpl_frame * | frame1, |
| const cpl_frame * | frame2 | ||
| ) |
Compare input tags.
| frame1 | The first frame |
| frame2 | The second frame |
| 0 | if frame1 != frame2 |
| 1 | if frame1 == frame2 |
| -1 | if either frame is missing its tag |
Definition at line 96 of file casu_utils.c.
| cpl_table* casu_dummy_catalogue | ( | int | type | ) |
Create a dummy catalogue of a given type with no rows.
| type | The type of catalogue to create |
Definition at line 570 of file casu_utils.c.
References imcore_tabinit().
Referenced by vircam_jmp_save_catalogue().
| cpl_image* casu_dummy_image | ( | casu_fits * | model | ) |
Create a dummy image of zeros based on a model.
| model | The model on which the new image will be based. |
Definition at line 533 of file casu_utils.c.
References casu_fits_get_image().
Referenced by casu_pawsky_mask(), casu_pawsky_mask_pre(), casu_pawsky_minus(), casu_simplesky_mask(), vircam_jmp_dither_images(), and vircam_jmp_interleave().
| void casu_dummy_property | ( | cpl_propertylist * | p | ) |
Set dummy property keyword.
| p | The input propertylist |
Definition at line 445 of file casu_utils.c.
Referenced by casu_pawsky_mask(), casu_pawsky_mask_pre(), casu_pawsky_minus(), casu_simplesky_mask(), and vircam_jmp_save_illum().
| int casu_findcol | ( | cpl_propertylist * | p, |
| const char * | col | ||
| ) |
Find from catalogue header which are x,y columns.
| p | The input propertylist for the table |
| col | The column you want to find |
Definition at line 1050 of file casu_utils.c.
Referenced by casu_platesol().
| int casu_fndmatch | ( | float | x, |
| float | y, | ||
| float * | xlist, | ||
| float * | ylist, | ||
| int | nlist, | ||
| float | err | ||
| ) |
Match the x,y coordinates of an object to one from a list.
| x | The X coordinate of the object |
| y | The Y coordinate of the object |
| xlist | The list of catalogue X coordinates |
| ylist | The list of catalogue Y coordinates |
| nlist | The number of entries in the lists |
| err | The maximum error radius for a match |
Definition at line 982 of file casu_utils.c.
Referenced by casu_matchstds(), and casu_matchxy().
| cpl_frameset* casu_frameset_subgroup | ( | cpl_frameset * | frameset, |
| cpl_size * | labels, | ||
| cpl_size | nlab, | ||
| const char * | tag | ||
| ) |
Extract a frameset from another frameset.
| frameset | The input frameset |
| labels | The labels for the input frameset |
| nlab | The number of labels for the input frameset |
| tag | The tag for the frames in the output frameset |
Definition at line 149 of file casu_utils.c.
Referenced by casu_frameset_subgroup_1().
| cpl_frame* casu_frameset_subgroup_1 | ( | cpl_frameset * | frameset, |
| cpl_size * | labels, | ||
| cpl_size | nlab, | ||
| const char * | tag | ||
| ) |
Extract a frame of a given label from a frameset.
| frameset | The input frameset |
| labels | The labels for the input frameset |
| nlab | The number of labels for the input frameset |
| tag | The tag for the frames in the output frameset |
Definition at line 206 of file casu_utils.c.
References casu_frameset_subgroup().
Referenced by casu_mask_define().
| int casu_gaincor_calc | ( | cpl_frame * | frame, |
| int * | n, | ||
| float ** | cors, | ||
| int * | status | ||
| ) |
Work out gain corrections.
| frame | The input twilight frame |
| n | The number of image extensions |
| cors | An array of output corrections |
| status | The input/output status variable |
| CASU_OK | if everything is ok |
Definition at line 757 of file casu_utils.c.
| long casu_getnpts | ( | cpl_image * | in | ) |
Get the number of pixels in a 2d image.
| in | The input image |
Definition at line 243 of file casu_utils.c.
Referenced by casu_genbpm(), casu_imcombine(), vircam_genbpm(), and vircam_jmp_interleave().
| int casu_is_dummy | ( | cpl_propertylist * | p | ) |
See if the header of an image or table says its a dummy.
| p | The input propertylist |
Definition at line 598 of file casu_utils.c.
| void casu_merge_propertylists | ( | cpl_propertylist * | p1, |
| cpl_propertylist * | p2 | ||
| ) |
Merge two propertylists.
| p1 | The first propertylist |
| p2 | The second propertylist |
Definition at line 399 of file casu_utils.c.
Referenced by vircam_jmp_save_illum(), and vircam_jmp_skycor().
| int casu_night_from_dateobs | ( | char * | dateobs | ) |
Use the dateobs value to work out the night of an observation.
| dateobs | The value of DATE-OBS for the observation |
Definition at line 1088 of file casu_utils.c.
| void casu_overexp | ( | casu_fits ** | fitslist, |
| int * | n, | ||
| int | ndit, | ||
| float | lthr, | ||
| float | hthr, | ||
| int | ditch, | ||
| float * | minv, | ||
| float * | maxv, | ||
| float * | avev | ||
| ) |
Remove over- or under-exposed images from a list.
| fitslist | The input fits list. This will be replaced by another list that has the rejected images removed. |
| n | The number of fits images in the input list. This will be changed if any of these get rejected. |
| ndit | The number of coadds |
| lthr | The lower threshold for underexposed images |
| hthr | The upper threshold for overexposed images |
| ditch | If set, then the bad casu_fits image descriptors will be explicitly deleted. |
| minv | Output value with the lowest flux in the sample |
| maxv | Output value with the highest flux in the sample |
| avev | Output value with the average flux in the sample |
Definition at line 652 of file casu_utils.c.
References casu_fits_delete(), and casu_fits_get_image().
| void casu_propertylist_update_double | ( | cpl_propertylist * | plist, |
| const char * | name, | ||
| double | val | ||
| ) |
| plist | The input propertylist |
| name | The name of the property to be updated |
| val | The value of the property |
Definition at line 1212 of file casu_utils.c.
Referenced by casu_platesol().
| void casu_propertylist_update_float | ( | cpl_propertylist * | plist, |
| const char * | name, | ||
| float | val | ||
| ) |
| plist | The input propertylist |
| name | The name of the property to be updated |
| val | The value of the property |
Definition at line 1163 of file casu_utils.c.
Referenced by casu_imcore().
| void casu_prov | ( | cpl_propertylist * | p, |
| casu_fits ** | inlist, | ||
| int | n, | ||
| int | isextn | ||
| ) |
Write provenance keywords.
| p | The combined image propertylist |
| inlist | The list of images that went into ifile. |
| n | The number of images in the input list |
| isextn | Set if this is an extension rather than the primary |
Definition at line 287 of file casu_utils.c.
References casu_fits_get_filename(), and casu_fits_get_fullname().
Referenced by casu_imcombine(), casu_imdither(), casu_imstack(), casu_pawsky_minus(), and vircam_interleave().
| void casu_rename_property | ( | cpl_propertylist * | p, |
| const char * | oldname, | ||
| char * | newname | ||
| ) |
Rename a property in a given propertylist.
| p | The input propertylist for the table |
| oldname | The old property name |
| newname | The new property name |
Definition at line 485 of file casu_utils.c.
Referenced by casu_tabwcs().
| void casu_sort | ( | float ** | a, |
| int | n, | ||
| int | m | ||
| ) |
Sort a 2d array by the first column and co-sort the rest.
| a | The input 2d array (a[m][n]) |
| n | The number of rows in the array |
| m | The number of columns in the array |
Definition at line 349 of file casu_utils.c.
| void casu_timestamp | ( | char * | out, |
| int | n | ||
| ) |
Create a timestamp string.
| 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 849 of file casu_utils.c.
Referenced by casu_imdither().