|
VIRCAM Pipeline 2.3.12
|
Functions | |
| int | vircam_illum (casu_fits **images, cpl_table **mstds, cpl_propertylist **pl, int nimages, char *filt, cpl_table *phottab, int nbsize, cpl_table **illcor, float *illcor_rms, int *status) |
| Work out the illumination correction. | |
| int | vircam_destripe (casu_fits *in, casu_mask *inbpm, int *status) |
| Remove stripes from the background of an image. | |
| int | vircam_genbpm (casu_fits **flatlist, int nflatlist, float lthr, float hthr, cpl_array **bpm_array, int *nbad, float *badfrac, int *status) |
| Generate a bad pixel mask from a list of dome flats. | |
| int | vircam_genlincur (double **fdata, int nimages, double *exps, double mindit, casu_tfits *chantab, int norder, cpl_table **lchantab, double **lindata, int *status) |
| Generate a linearity curve for each readout channel in a list of images. | |
| int | vircam_lincor (casu_fits *infile, casu_tfits *lchantab, int kconst, int ndit, int *status) |
| Apply linearity curves to data. | |
| int | vircam_grout (casu_tfits *intab, cpl_frameset *input_cats, cpl_frameset *input_confs, casu_tfits **outtab, int *status) |
| Correct input tile catalogues. | |
| int | vircam_interleave (casu_fits **infiles, int ninputs, casu_fits **inconfs, int nconfs, int nsteps, cpl_propertylist **p, cpl_image **outimage, cpl_image **outconf, int *status) |
| Interleave a set of microstepped observations. | |
| int | vircam_mosaic (cpl_frameset *infiles, cpl_frameset *inconf, int interp, int skyflag, float skywish_in, const char *expkey, int conflim, casu_fits **out, casu_fits **outc, int *status) |
| Create a vircam mosaic. | |
| int | vircam_tilesky (casu_fits **inlist, int nfiles, casu_mask *mask, casu_fits **skyout, int *status) |
| Work sky estimate from an input tile series. | |
These are the main processing routines. Most of these also have a test recipe described on the test recipe page.
| int vircam_destripe | ( | casu_fits * | in, |
| casu_mask * | inbpm, | ||
| int * | status | ||
| ) |
Remove stripes from the background of an image.
| in | The input image. This is corrected in-situ. |
| inbpm | The input image bad pixel mask. |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
Definition at line 87 of file vircam/vircam_destripe.c.
References casu_fits_get_ehu(), casu_fits_get_image(), casu_mask_get_data(), casu_medmad(), casu_medmadcut(), and casu_qmedsig().
| int vircam_genbpm | ( | casu_fits ** | flatlist, |
| int | nflatlist, | ||
| float | lthr, | ||
| float | hthr, | ||
| cpl_array ** | bpm_array, | ||
| int * | nbad, | ||
| float * | badfrac, | ||
| int * | status | ||
| ) |
Generate a bad pixel mask from a list of dome flats.
| flatlist | The list of input dark corrected dome flat images. |
| nflatlist | The number of input images |
| lthr | The low rejection threshold in units of sigma |
| hthr | The high rejection threshold in units of sigma |
| bpm_array | The output bad pixel mask |
| nbad | The number of bad pixels found |
| badfrac | The fraction of pixels in the map that are bad |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | If everything is ok |
| CASU_FATAL | The flat combination failed |
Definition at line 93 of file vircam_genbpm.c.
References casu_fits_get_image(), casu_getnpts(), casu_imcombine(), casu_medmad(), and casu_medsig().
| int vircam_genlincur | ( | double ** | fdata, |
| int | nimages, | ||
| double * | exps, | ||
| double | mindit, | ||
| casu_tfits * | chantab, | ||
| int | norder, | ||
| cpl_table ** | lchantab, | ||
| double ** | lindata, | ||
| int * | status | ||
| ) |
Generate a linearity curve for each readout channel in a list of images.
| fdata | A 2d array of medians for each flat. The first index is the image number. The second index is the channel number. |
| nimages | The number of input images |
| exps | An array of exposure times for the input images |
| mindit | The reset/readout time |
| chantab | The input channel table |
| norder | The order of the fit. This will equal to the number of coefficients in the output table as according to the mathematic description of the algorithm, the zeroth coefficient is always zero. |
| lchantab | The output channel table with new linearity coefficients |
| lindata | An array of the linearised values of 'fdata' |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
| CASU_WARN | if one or more channels have a failed fit |
| CASU_FATAL | if the channel table is invalid. |
Definition at line 118 of file vircam_genlincur.c.
References casu_tfits_get_table(), vircam_chan_fill(), vircam_chan_free(), vircam_polyfit(), and vircam_solve_gauss().
| int vircam_grout | ( | casu_tfits * | intab, |
| cpl_frameset * | input_cats, | ||
| cpl_frameset * | input_confs, | ||
| casu_tfits ** | outtab, | ||
| int * | status | ||
| ) |
Correct input tile catalogues.
| intab | The input tile catalogue |
| input_cats | The catalogues for the input pawprints that formed the tile |
| input_confs | The confidence maps for the input pawprints that formed the tile |
| outtab | The output tile catalogue |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
| CASU_FATAL | if image data fails to load |
Definition at line 108 of file vircam_grout.c.
References casu_fits_get_image(), casu_fits_load(), casu_med(), casu_tfits_duplicate(), casu_tfits_get_ehu(), casu_tfits_get_table(), and casu_xytoxy_list().
| int vircam_illum | ( | casu_fits ** | images, |
| cpl_table ** | mstds, | ||
| cpl_propertylist ** | pl, | ||
| int | nimages, | ||
| char * | filt, | ||
| cpl_table * | phottab, | ||
| int | nbsize, | ||
| cpl_table ** | illcor, | ||
| float * | illcor_rms, | ||
| int * | status | ||
| ) |
Work out the illumination correction.
| images | The input data images |
| mstds | The input matched standards catalogues (one for each image) |
| pl | The list of extension header propertylists (one for each image catalogue) |
| nimages | The number of images in the input lists |
| filt | The filter for the observations |
| phottab | The photometric calibration table for VIRCAM |
| nbsize | The size of the side of a cell in pixels |
| illcor | The illumination correction table for this detector |
| illcor_rms | The RMS of the illumination correction |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
| CASU_WARN | if there weren't any photometric standards or all the objects in the catalogue failed. |
| CASU_FATAL | if there is a problem with the photometric calibration table |
Definition at line 1406 of file vircam_utils.c.
References casu_fits_get_ehu(), casu_fits_get_fullname(), casu_fits_get_image(), casu_fits_get_phu(), casu_medmad(), casu_medmadcut(), casu_medsig(), vircam_illcor_newtab(), vircam_pfits_get_airmass(), and vircam_pfits_get_exptime().
Referenced by vircam_jmp_illum().
| int vircam_interleave | ( | casu_fits ** | infiles, |
| int | ninputs, | ||
| casu_fits ** | inconfs, | ||
| int | nconfs, | ||
| int | nsteps, | ||
| cpl_propertylist ** | p, | ||
| cpl_image ** | outimage, | ||
| cpl_image ** | outconf, | ||
| int * | status | ||
| ) |
Interleave a set of microstepped observations.
| infiles | The list of input microstepped observation images. Their extension propertylists need to have: ESO DRS XOFFMICRO (the microstep offset in X), ESO DRS YOFFMICRO (the microstep offset in Y) and ESO DRS BACKMED (the background median). These have to be added by the calling routine. |
| ninputs | The number of input observation images |
| inconfs | The list of input confidence maps. If the list is NULL or has a size of zero, then no output confidence map will be created. If the list has a size that is less than the size of the input files list, then only the first one will be used (i.e. each input image has the same confidence map). If the list has the same number as the input images then all of the listed confidence maps will be used to form the output confidence map. |
| nconfs | The number of input confidence maps |
| nsteps | The number of steps in the microstep pattern, e.g. for a 3x3 microstep pattern, this should be set to 3. |
| p | A propertylist that will be used for the output image. This will be the header for the first image in the input image frameset (infiles) with appropriate modifications to the WCS. |
| outimage | The output interleaved image |
| outconf | The output confidence map |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
| CASU_FATAL | if a failure occurs in either accessing input data or the input image list has not images in it. |
Definition at line 117 of file vircam/vircam_interleave.c.
References casu_crpixshift(), casu_fits_get_ehu(), casu_fits_get_image(), casu_fits_get_phu(), casu_prov(), casu_rescalecd(), and vircam_timestamp().
Referenced by vircam_jmp_interleave().
| int vircam_lincor | ( | casu_fits * | infile, |
| casu_tfits * | lchantab, | ||
| int | kconst, | ||
| int | ndit, | ||
| int * | status | ||
| ) |
Apply linearity curves to data.
| infile | The input image. This should probably be a series of dome flat exposures of a stable light source with varying exposure times. |
| lchantab | The linearity channel table |
| kconst | If this is set, then the value of k is constant for the image. This is true (for example) if the reset time equals the read time. |
| ndit | Set to the number of co-adds there are in the input data. |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
| CASU_FATAL | if the data array can't be mapped for the input image or the linearity channel table is invalid. |
Definition at line 382 of file vircam_genlincur.c.
References casu_fits_get_ehu(), casu_fits_get_fullname(), casu_fits_get_image(), casu_tfits_get_filename(), casu_tfits_get_table(), vircam_chan_d2r(), vircam_chan_fill(), vircam_chan_free(), vircam_chan_r2a(), vircam_pfits_get_ditdelay(), vircam_pfits_get_exptime(), and vircam_pfits_get_mindit().
| int vircam_mosaic | ( | cpl_frameset * | infiles, |
| cpl_frameset * | inconf, | ||
| int | interp, | ||
| int | skyflag, | ||
| float | skywish_in, | ||
| const char * | expkey, | ||
| int | conflim, | ||
| casu_fits ** | out, | ||
| casu_fits ** | outc, | ||
| int * | status | ||
| ) |
Create a vircam mosaic.
| infiles | A frameset with the input stacks |
| inconf | A frameset with the input confidence maps |
| interp | The interpolation algorithm: 0 => nearest neighbour, 1 => bilinear interpolation |
| skyflag | A flag for how you want the sky. 0 => don't adjust the input skies at all, 1 => set the background sky to the value of skywish_in, 2 => set the background sky to the average background for each input image |
| expkey | The FITS keyword for the exposure time |
| conflim | A lower limit to be placed on the input confidence. Pixels with confidence below this limit will be ignored. |
| out | The output mosaic |
| outc | The output confidence map |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
| CASU_FATAL | if there was some error detected in the input images |
Definition at line 167 of file vircam_mosaic.c.
References casu_fits_delete(), casu_fits_get_ehu(), casu_fits_load(), casu_fits_wrap(), and casu_qmedsig().
| int vircam_tilesky | ( | casu_fits ** | inlist, |
| int | nfiles, | ||
| casu_mask * | mask, | ||
| casu_fits ** | skyout, | ||
| int * | status | ||
| ) |
Work sky estimate from an input tile series.
| inlist | The input images from the tile |
| nfiles | The number of images in the jitter series |
| mask | The bad pixel mask derived from the confidence map. |
| skyout | The output sky map |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
| CASU_FATAL | if something went wrong. An error message will appear. |
Definition at line 94 of file vircam_sky.c.
References casu_fits_get_image(), casu_fits_get_phu(), casu_fits_wrap(), casu_imcombine(), casu_inpaint(), casu_mask_get_data(), casu_mask_get_size_x(), casu_mask_get_size_y(), vircam_pfits_get_jitteri(), and vircam_pfits_get_njsteps().