VIRCAM Pipeline
1.3.3
|
int | vircam_darkcor (vir_fits *infile, vir_fits *darksrc, float darkscl, int *status) |
Correct input data for dark current. | |
int | vircam_defringe (vir_fits **infiles, int nimages, vir_fits **fringes, int nfringes, vir_mask *mask, int nbsize, int *status) |
Correct input data to remove fringes. | |
int | vircam_destripe (vir_fits *in, vir_mask *inbpm, int *status) |
Remove stripes from the background of an image. | |
int | vircam_flatcor (vir_fits *infile, vir_fits *flatsrc, int *status) |
Correct input data for flat field response. | |
int | vircam_gaincor (vir_fits *infile, float gainscl, int *status) |
Gain correct input data frame. | |
int | vircam_genbpm (vir_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, vir_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 (vir_fits *infile, vir_tfits *lchantab, int kconst, int ndit, int *status) |
Apply linearity curves to data. | |
int | vircam_getstds (cpl_propertylist *plist, int cache, char *path, char *catname, cpl_table **stds, int *status) |
Get a table of standard stars that appear on an image from a catalogue. | |
int | vircam_grout (vir_tfits *intab, cpl_frameset *input_cats, cpl_frameset *input_confs, vir_tfits **outtab, int *status) |
Correct input tile catalogues. | |
int | vircam_imcombine (vir_fits **fset, int nfits, int combtype, int scaletype, int xrej, float thresh, cpl_image **outimage, unsigned char **rejmask, unsigned char **rejplus, cpl_propertylist **drs, int *status) |
Stack images into a mean or median image with rejection. | |
int | vircam_imcore (vir_fits *infile, vir_fits *conf, int ipix, float threshold, int icrowd, float rcore, int nbsize, int cattyp, float filtfwhm, vir_tfits **outtab, int *status) |
Generate object catalogues from input images. | |
int | vircam_imdither (vir_fits **inf, vir_fits **inconf, int nimages, int nconfs, float lthr, float hthr, cpl_propertylist **p, cpl_image **out, cpl_image **outc, int *status) |
Dither a set of jittered observations. | |
int | vircam_imstack (vir_fits **inf, vir_fits **inconf, vir_tfits **cats, int nimages, int nconfs, float lthr, float hthr, int method, int seeing, vir_fits **out, vir_fits **outc, int *status) |
Stack images into a mean image using WCS info. | |
int | vircam_inpaint (vir_fits *in, int nbsize, int *status) |
Inpaint pixels or patches in a map. | |
int | vircam_interleave (vir_fits **infiles, int ninputs, vir_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_matchxy (cpl_table *progtab, cpl_table *template, float srad, float *xoffset, float *yoffset, int *nm, cpl_table **outtab, int *status) |
Match two lists of x,y coordinates from two tables to find the cartesian offset between them. | |
int | vircam_matchstds (cpl_table *objtab, cpl_table *stdstab, float srad, cpl_table **outtab, int *status) |
Match object and standard star tables by their xy coordinates. | |
int | vircam_mkconf (cpl_image *flat, char *flatfile, vir_mask *bpm, cpl_image **outconf, cpl_propertylist **drs, int *status) |
Create a confidence map. | |
int | vircam_nditcor (vir_fits *infile, int ndit, int *status) |
Correct input data for dark current. | |
int | vircam_nebuliser (vir_fits *infile, vir_fits *inconf, int medfilt, int linfilt, int niter, int axis, int twod, int takeout_sky, int norm, int wantback, float signeg, float sigpos, vir_fits **backmap, int *status) |
Remove small scale background variations. | |
int | vircam_opm (vir_fits *infile, vir_fits *conf, int ipix, float threshold, int nbsize, float filtfwhm, int niter, int *status) |
Generate an object mask from an input image. | |
int | vircam_photcal (vir_fits **images, cpl_table **mstds, cpl_propertylist **pl, int nimages, char *filt, cpl_table *phottab, int *status) |
Work out the photometric zeropoint. | |
int | vircam_illum (vir_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_platesol (cpl_propertylist *plist, cpl_propertylist *tlist, cpl_table *matchedstds, int nconst, int shiftan, int *status) |
Work out a WCS for an image. | |
int | vircam_pawsky_mask (vir_fits **inlist, int nfiles, vir_fits *conf, vir_mask *mask, vir_fits **skyout, int niter, int ipix, float thresh, int nbsize, float smkern, int *status) |
Work out a masked sky estimate from an input jitter series. | |
int | vircam_pawsky_mask_pre (vir_fits **inlist, int nfiles, vir_fits *conf, vir_mask *mask, vir_fits *objmask, int nbsize, vir_fits **skyout, int *status) |
Work out a masked sky estimate from an input jitter series. | |
int | vircam_tilesky (vir_fits **inlist, int nfiles, vir_mask *mask, vir_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_darkcor | ( | vir_fits * | infile, |
vir_fits * | darksrc, | ||
float | darkscl, | ||
int * | status | ||
) |
Correct input data for dark current.
infile | The input data image (overwritten by result). |
darksrc | The input dark image |
darkscl | The dark scaling factor |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_WARN | if the output property list is NULL. |
VIR_FATAL | if image data fails to load |
Definition at line 85 of file vircam/vircam_darkcor.c.
References vircam_compare_dims(), vircam_fits_get_ehu(), vircam_fits_get_fullname(), and vircam_fits_get_image().
int vircam_defringe | ( | vir_fits ** | infiles, |
int | nimages, | ||
vir_fits ** | fringes, | ||
int | nfringes, | ||
vir_mask * | mask, | ||
int | nbsize, | ||
int * | status | ||
) |
Correct input data to remove fringes.
infiles | The input data images (overwritten by result). |
nimages | The number of input images |
fringes | The input fringe frames |
nfringes | The number of input fringe frames |
mask | The bad pixel mask |
nbsize | The size of each cell for the background modelling |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
Definition at line 107 of file vircam/vircam_defringe.c.
References vircam_fits_get_ehu(), vircam_fits_get_fullname(), vircam_fits_get_image(), vircam_mask_get_data(), and vircam_medmad().
int vircam_destripe | ( | vir_fits * | in, |
vir_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. |
VIR_OK | if everything is ok |
Definition at line 85 of file vircam/vircam_destripe.c.
References vircam_dostat(), vircam_fits_get_ehu(), vircam_fits_get_image(), vircam_mask_get_data(), vircam_medmad(), vircam_medmadcut(), and vircam_qmedsig().
int vircam_flatcor | ( | vir_fits * | infile, |
vir_fits * | flatsrc, | ||
int * | status | ||
) |
Correct input data for flat field response.
infile | The input data image (overwritten by result). |
flatsrc | The input flat image |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_WARN | if there is a zero divide or if the output property list is NULL. |
VIR_FATAL | if image data fails to load |
Definition at line 79 of file vircam/vircam_flatcor.c.
References vircam_compare_dims(), vircam_fits_get_ehu(), vircam_fits_get_fullname(), and vircam_fits_get_image().
int vircam_gaincor | ( | vir_fits * | infile, |
float | gainscl, | ||
int * | status | ||
) |
Gain correct input data frame.
infile | The input data image (overwritten by result). |
gainscl | The input scale factor |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_WARN | if the scale factor is zero |
VIR_FATAL | if image data fails to load |
Definition at line 77 of file vircam/vircam_gaincor.c.
References vircam_fits_get_ehu(), and vircam_fits_get_image().
int vircam_genbpm | ( | vir_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. |
VIR_OK | If everything is ok |
VIR_FATAL | The flat combination failed |
Definition at line 92 of file vircam_genbpm.c.
References vircam_fits_get_image(), vircam_getnpts(), vircam_imcombine(), vircam_medmad(), and vircam_medsig().
int vircam_genlincur | ( | double ** | fdata, |
int | nimages, | ||
double * | exps, | ||
double | mindit, | ||
vir_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. |
VIR_OK | if everything is ok |
VIR_WARN | if one or more channels have a failed fit |
VIR_FATAL | if the channel table is invalid. |
Definition at line 117 of file vircam_genlincur.c.
References vircam_chan_fill(), vircam_chan_free(), vircam_polyfit(), vircam_solve_gauss(), and vircam_tfits_get_table().
int vircam_getstds | ( | cpl_propertylist * | plist, |
int | cache, | ||
char * | path, | ||
char * | catname, | ||
cpl_table ** | stds, | ||
int * | status | ||
) |
Get a table of standard stars that appear on an image from a catalogue.
plist | The input propertylist for the image in question |
cache | If set, then we can cache results which should result in faster access for several observations of the same region |
path | The full path to the catalogue FITS files. |
catname | The name of the input catalogue. This is just used for labelling purposes |
stds | The output table of standards |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_WARN | if the output standards table has no rows in it |
VIR_FATAL | if a failure occurs in either accessing or extracting the standard data. |
Definition at line 112 of file vircam/vircam_getstds.c.
References vircam_coverage(), and vircam_radectoxy().
Referenced by vircam_jmp_illum(), and vircam_jmp_matched_stds().
int vircam_grout | ( | vir_tfits * | intab, |
cpl_frameset * | input_cats, | ||
cpl_frameset * | input_confs, | ||
vir_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. |
VIR_OK | if everything is ok |
VIR_FATAL | if image data fails to load |
Definition at line 108 of file vircam_grout.c.
References seeing(), vircam_fits_get_image(), vircam_fits_load(), vircam_med(), vircam_tfits_duplicate(), vircam_tfits_get_ehu(), vircam_tfits_get_table(), and vircam_xytoxy_list().
int vircam_illum | ( | vir_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. |
VIR_OK | if everything is ok |
VIR_WARN | if there weren't any photometric standards or all the objects in the catalogue failed. |
VIR_FATAL | if there is a problem with the photometric calibration table |
Definition at line 880 of file vircam_photcal.c.
References vircam_fits_get_ehu(), vircam_fits_get_fullname(), vircam_fits_get_image(), vircam_fits_get_phu(), vircam_illcor_newtab(), vircam_meansigcut(), vircam_medmad(), vircam_medsig(), vircam_pfits_get_airmass(), and vircam_pfits_get_exptime().
Referenced by vircam_jmp_illum().
int vircam_imcombine | ( | vir_fits ** | fset, |
int | nfits, | ||
int | combtype, | ||
int | scaletype, | ||
int | xrej, | ||
float | thresh, | ||
cpl_image ** | outimage, | ||
unsigned char ** | rejmask, | ||
unsigned char ** | rejplus, | ||
cpl_propertylist ** | drs, | ||
int * | status | ||
) |
Stack images into a mean or median image with rejection.
fset | Input image list |
nfits | The number of input images |
combtype | Combination type: 1 == Median, 2 == Mean |
scaletype | Scaling type: 0 == none, 1 == additive, 2 == multiplicative, 3 == multiplicative by exp time then additive by flux |
xrej | Extra rejection cycle flag |
thresh | Rejection threshold in sigma above background |
outimage | Output image |
rejmask | Output rejection mask |
rejplus | Output mask of rejected pixels with positive residual |
drs | A propertylist to be used to write DRS info |
status | An input/output status that is the same as the returned values below |
VIR_OK | if everything is ok |
VIR_WARN | if fset has zero length |
VIR_FATAL | for all other conditions |
Definition at line 155 of file vircam/vircam_imcombine.c.
References vircam_fits_get_filename(), vircam_fits_get_image(), vircam_fits_get_nexten(), vircam_fits_get_phu(), vircam_getnpts(), vircam_med(), vircam_pfits_get_exptime(), and vircam_prov().
Referenced by vircam_genbpm(), vircam_jmp_skycor(), vircam_pawsky_mask(), vircam_pawsky_mask_pre(), and vircam_tilesky().
int vircam_imcore | ( | vir_fits * | infile, |
vir_fits * | conf, | ||
int | ipix, | ||
float | threshold, | ||
int | icrowd, | ||
float | rcore, | ||
int | nbsize, | ||
int | cattyp, | ||
float | filtfwhm, | ||
vir_tfits ** | outtab, | ||
int * | status | ||
) |
Generate object catalogues from input images.
infile | The input frame with the image to be analysed |
conf | The input frame with the confidence map |
ipix | The minimum allowable size of an object |
threshold | The detection threshold in sigma above sky |
icrowd | If set then the deblending software will be used |
rcore | The core radius in pixels |
nbsize | The smoothing box size for background map estimation |
cattyp | The type of catalogue to be produced |
filtfwhm | The FWHM of the smoothing kernel in the detection algorithm |
outtab | The output table of object |
status | The input/output status that has the same return value a below |
VIR_OK | if everything is ok |
VIR_WARN,VIR_FATAL | errors in the called routines |
Definition at line 150 of file vircam/vircam_imcore.c.
References classify(), imcore_conf(), vircam_fits_delete(), vircam_fits_duplicate(), vircam_fits_get_ehu(), vircam_fits_get_filename(), vircam_fits_get_fullname(), vircam_fits_get_phu(), vircam_tfits_get_ehu(), and vircam_tfits_get_table().
Referenced by vircam_jmp_catalogue(), vircam_jmp_dither_offsets(), and vircam_jmp_illum().
int vircam_imdither | ( | vir_fits ** | inf, |
vir_fits ** | inconf, | ||
int | nimages, | ||
int | nconfs, | ||
float | lthr, | ||
float | hthr, | ||
cpl_propertylist ** | p, | ||
cpl_image ** | out, | ||
cpl_image ** | outc, | ||
int * | status | ||
) |
Dither a set of jittered observations.
inf | The list of input jittered observation images. Their extension propertylists need to have: ESO DRS XOFFDITHER (the dither offset in X), ESO DRS YOFFDITHER (the dither offset in Y). These have to be added by the calling routine. |
inconf | 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. |
nimages | The number of input observation images |
nconfs | The number of input confidence maps |
lthr | The lower clipping threshold (in sigma) |
hthr | The upper clipping threshold (in sigma) |
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. |
out | The output dithered image |
outc | The output confidence map |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_FATAL | if a failure occurs in either accessing input data or the input image list has not images in it. |
Definition at line 156 of file vircam/vircam_imdither.c.
References vircam_fits_get_ehu(), vircam_fits_get_fullname(), vircam_fits_get_image(), vircam_fits_get_phu(), vircam_pfits_get_crpix1(), vircam_pfits_get_crpix2(), vircam_pfits_get_exptime(), vircam_pfits_get_jxoff(), vircam_pfits_get_jyoff(), vircam_prov(), and vircam_timestamp().
Referenced by vircam_jmp_dither_images(), and vircam_pawsky_mask().
int vircam_imstack | ( | vir_fits ** | inf, |
vir_fits ** | inconf, | ||
vir_tfits ** | cats, | ||
int | nimages, | ||
int | nconfs, | ||
float | lthr, | ||
float | hthr, | ||
int | method, | ||
int | seeing, | ||
vir_fits ** | out, | ||
vir_fits ** | outc, | ||
int * | status | ||
) |
Stack images into a mean image using WCS info.
inf | Input image list |
inconf | Input list of confidence maps |
cats | Input list of object catalogues. If NULL, then no refinement will be done. |
nimages | The number of input images and (if given) the number of input object catalogues |
nconfs | The number of input confidence maps |
lthr | The lower rejection threshold |
hthr | The upper rejection threshold |
method | The interpolation method:
|
out | The output stacked image |
outc | The output confidence map |
status | The usual input/output status variable |
VIR_OK | if everything is ok |
VIR_FATAL | if there are no images to combine or there is a mismatch between the confidence map sizes and image sizes. |
Definition at line 174 of file vircam/vircam_imstack.c.
References vircam_fits_get_ehu(), vircam_fits_get_fullname(), vircam_fits_get_image(), vircam_fits_get_phu(), vircam_matchxy(), vircam_pfits_get_exptime(), vircam_prov(), and vircam_tfits_get_table().
int vircam_inpaint | ( | vir_fits * | in, |
int | nbsize, | ||
int * | status | ||
) |
Inpaint pixels or patches in a map.
in | The input data image (overwritten by result). |
nbsize | The size of the cells for the smoothing boxes |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_WARN | if the output property list is NULL. |
VIR_FATAL | if image data arrays don't have matching dimensions |
Definition at line 94 of file vircam_inpaint.c.
References vircam_fits_get_image().
Referenced by vircam_pawsky_mask(), vircam_pawsky_mask_pre(), and vircam_tilesky().
int vircam_interleave | ( | vir_fits ** | infiles, |
int | ninputs, | ||
vir_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. |
VIR_OK | if everything is ok |
VIR_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 vircam_crpixshift(), vircam_fits_get_ehu(), vircam_fits_get_image(), vircam_fits_get_phu(), vircam_prov(), vircam_rescalecd(), and vircam_timestamp().
Referenced by vircam_jmp_interleave().
int vircam_lincor | ( | vir_fits * | infile, |
vir_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. |
VIR_OK | if everything is ok |
VIR_FATAL | if the data array can't be mapped for the input image or the linearity channel table is invalid. |
Definition at line 354 of file vircam_genlincur.c.
References vircam_chan_d2r(), vircam_chan_fill(), vircam_chan_free(), vircam_chan_r2a(), vircam_fits_get_ehu(), vircam_fits_get_fullname(), vircam_fits_get_image(), vircam_pfits_get_ditdelay(), vircam_pfits_get_exptime(), vircam_pfits_get_mindit(), vircam_tfits_get_filename(), and vircam_tfits_get_table().
int vircam_matchstds | ( | cpl_table * | objtab, |
cpl_table * | stdstab, | ||
float | srad, | ||
cpl_table ** | outtab, | ||
int * | status | ||
) |
Match object and standard star tables by their xy coordinates.
objtab | The input table with the programme objects. Must have columns called X_coordinate and Y_coordinate (as one gets from vircam_imcore). |
stdstab | The input table with the template objects. Must have columns called xpredict and ypredict (as one gets from vircam_getstds). |
srad | A search radius in pixels. This helps to define the number of points that are used in the grid search |
outtab | The returned output table with both sets of cartesian coordinates plus any extra information that appears in the standards table. |
status | An input/output status that is the same as the returned values below. |
VIR_OK | If everything succeeded. |
VIR_WARN | If either table has no rows. |
VIR_FATAL | If either table is missing one of the required columns |
Definition at line 299 of file vircam_match.c.
References vircam_fndmatch(), and vircam_medmad().
Referenced by vircam_jmp_illum(), and vircam_jmp_matched_stds().
int vircam_matchxy | ( | cpl_table * | progtab, |
cpl_table * | template, | ||
float | srad, | ||
float * | xoffset, | ||
float * | yoffset, | ||
int * | nm, | ||
cpl_table ** | outtab, | ||
int * | status | ||
) |
Match two lists of x,y coordinates from two tables to find the cartesian offset between them.
progtab | The input table with the programme objects. Must have columns called X_coordinate and Y_coordinate. |
template | The input table with the template objects. Must have columns called X_coordinate and Y_coordinate. |
srad | A search radius in pixels. This helps to define the number of points that are used in the grid search |
xoffset | The returned x offset |
yoffset | The returned y offset |
nm | The returned number of matches |
outtab | The returned table of matched objects. |
status | An input/output status that is the same as the returned values below. |
VIR_OK | If everything succeeded. |
VIR_WARN | If either table has no rows. |
VIR_FATAL | If either table is missing one of the required columns |
Definition at line 104 of file vircam_match.c.
References vircam_fndmatch(), and vircam_med().
Referenced by vircam_imstack(), and vircam_jmp_dither_offsets().
int vircam_mkconf | ( | cpl_image * | flat, |
char * | flatfile, | ||
vir_mask * | bpm, | ||
cpl_image ** | outconf, | ||
cpl_propertylist ** | drs, | ||
int * | status | ||
) |
Create a confidence map.
flat | The input flat field data image |
flatfile | The input flat field file name. |
bpm | The input mask image |
outconf | The ouput confidence map image |
drs | A propertylist with entries for the drs header block |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_FATAL | if image data fails to load or the dimensionality of the input images don't match. |
Definition at line 87 of file vircam/vircam_mkconf.c.
References vircam_fits_get_fullname(), vircam_mask_get_data(), vircam_mask_get_fits(), vircam_mask_get_size_x(), vircam_mask_get_size_y(), vircam_mask_get_type(), and vircam_mean().
int vircam_nditcor | ( | vir_fits * | infile, |
int | ndit, | ||
int * | status | ||
) |
Correct input data for dark current.
infile | The input data image (overwritten by result). |
ndit | The number of dits in the observation |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_FATAL | if image data fails to load |
Definition at line 83 of file vircam_nditcor.c.
References vircam_fits_get_ehu(), vircam_fits_get_image(), and vircam_fits_get_phu().
int vircam_nebuliser | ( | vir_fits * | infile, |
vir_fits * | inconf, | ||
int | medfilt, | ||
int | linfilt, | ||
int | niter, | ||
int | axis, | ||
int | twod, | ||
int | takeout_sky, | ||
int | norm, | ||
int | wantback, | ||
float | signeg, | ||
float | sigpos, | ||
vir_fits ** | backmap, | ||
int * | status | ||
) |
Remove small scale background variations.
infile | The input image to be smoothed |
inconf | The relevant confidence map. If this is NULL, then all pixels will be considered good. |
medfilt | The size in pixels of the median filter box |
linfilt | The size in pixels of the linear filter box |
niter | The number of rejection iterations to use |
axis | In the case of a 1d smooth, which axis to do first (1 => X, 2 => Y) |
twod | If set, then a full 2d smooth is done. Otherwise it is a combination of 2 1d smoothing operations |
takeout_sky | If set then the output median background will be zero |
norm | If set, then the output is the input divided by the smoothed image |
wantback | If set, then we want to have an output image of the background map |
signeg | The low clipping threshold |
sigpos | The high clipping threshold |
backmap | The output background map, if requested. Otherwise set to NULL |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_FATAL | if image and confidence maps don't have the same dimensionality |
Definition at line 145 of file vircam_nebuliser.c.
References vircam_fits_duplicate(), vircam_fits_get_ehu(), and vircam_fits_get_image().
int vircam_opm | ( | vir_fits * | infile, |
vir_fits * | conf, | ||
int | ipix, | ||
float | threshold, | ||
int | nbsize, | ||
float | filtfwhm, | ||
int | niter, | ||
int * | status | ||
) |
Generate an object mask from an input image.
infile | The input frame with the image to be analysed |
conf | The input frame with the confidence map |
ipix | The minimum allowable size of an object |
threshold | The detection threshold in sigma above sky |
nbsize | The smoothing box size for background map estimation |
filtfwhm | The FWHM of the smoothing kernel in the detection algorithm |
niter | The number of detection iterations to be done |
status | The input/output status that has the same return value a below |
VIR_OK | if everything is ok |
VIR_WARN,VIR_FATAL | errors in the called routines |
Definition at line 90 of file vircam_opm.c.
References imcore_opm(), vircam_fits_delete(), vircam_fits_duplicate(), and vircam_fits_get_image().
Referenced by vircam_pawsky_mask().
int vircam_pawsky_mask | ( | vir_fits ** | inlist, |
int | nfiles, | ||
vir_fits * | conf, | ||
vir_mask * | mask, | ||
vir_fits ** | skyout, | ||
int | niter, | ||
int | ipix, | ||
float | thresh, | ||
int | nbsize, | ||
float | smkern, | ||
int * | status | ||
) |
Work out a masked sky estimate from an input jitter series.
inlist | The input jitter series |
nfiles | The number of images in the jitter series |
conf | The input confidence map for the jitter series |
mask | The bad pixel mask derived from the confidence map. |
skyout | The output sky map |
niter | The number of masking and clipping iterations to do |
ipix | The minimum object size for masking |
thresh | The threshold in sigma above sky for the object detection alrorithm |
nbsize | The cell size for the background following part of the object detection algorithm |
smkern | The size in pixels of the smoothing kernal for the object detection algorithm |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_FATAL | if something went wrong. An error message will appear. |
Definition at line 111 of file vircam_sky.c.
References vircam_fits_delete(), vircam_fits_get_image(), vircam_fits_wrap(), vircam_imcombine(), vircam_imdither(), vircam_inpaint(), vircam_mask_get_data(), vircam_mask_get_size_x(), vircam_mask_get_size_y(), and vircam_opm().
int vircam_pawsky_mask_pre | ( | vir_fits ** | inlist, |
int | nfiles, | ||
vir_fits * | conf, | ||
vir_mask * | mask, | ||
vir_fits * | objmask, | ||
int | nbsize, | ||
vir_fits ** | skyout, | ||
int * | status | ||
) |
Work out a masked sky estimate from an input jitter series.
inlist | The input jitter series |
nfiles | The number of images in the jitter series |
conf | The input confidence map for the jitter series |
mask | The bad pixel mask derived from the confidence map. |
skyout | The output sky map |
niter | The number of masking and clipping iterations to do |
ipix | The minimum object size for masking |
thresh | The threshold in sigma above sky for the object detection alrorithm |
nbsize | The cell size for the background following part of the object detection algorithm |
smkern | The size in pixels of the smoothing kernal for the object detection algorithm |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_FATAL | if something went wrong. An error message will appear. |
Definition at line 355 of file vircam_sky.c.
References vircam_fits_get_ehu(), vircam_fits_get_image(), vircam_fits_wrap(), vircam_imcombine(), vircam_inpaint(), vircam_mask_get_data(), vircam_mask_get_size_x(), and vircam_mask_get_size_y().
int vircam_photcal | ( | vir_fits ** | images, |
cpl_table ** | mstds, | ||
cpl_propertylist ** | pl, | ||
int | nimages, | ||
char * | filt, | ||
cpl_table * | phottab, | ||
int * | status | ||
) |
Work out the photometric zeropoint.
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 |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_FATAL | if there is a problem with the photometric calibration table |
Definition at line 184 of file vircam_photcal.c.
References vircam_fits_get_ehu(), vircam_fits_get_phu(), vircam_meansigcut(), vircam_medmad(), vircam_pfits_get_airmass(), and vircam_pfits_get_exptime().
Referenced by vircam_jmp_photcal().
int vircam_platesol | ( | cpl_propertylist * | plist, |
cpl_propertylist * | tlist, | ||
cpl_table * | matchedstds, | ||
int | nconst, | ||
int | shiftan, | ||
int * | status | ||
) |
Work out a WCS for an image.
plist | The propertylist which represents the FITS header for an input image. Must have a rough FITS WCS if the tangent point is going to be repositioned. |
tlist | The propertylist which represents the FITS header for the input catalogue that went into the matched standards table. This is needed so that the catalogue header can be updated with the new WCS values. If it is NULL, then obviously no updating with be done |
matchedstds | A matched standards table containing at least the following columns: X_coordinate, Y_coordinate, xpredict, ypredict, ra, dec. See DRLD for more information. |
nconst | The number of plate constants for the fit. The allowed values are 4 and 6 (4 constants or 6 constants). |
shiftan | If set, then the difference between the predicted and true cartesian coordinates are used to redefine the equatorial coordinates of the pole of the WCS. |
status | An input/output status that is the same as the returned values below. |
VIR_OK | if everything is ok |
VIR_FATAL | if the plate solution has failed, there aren't enough standards or the requested number of constants is neither 4 nor 6. |
Definition at line 131 of file vircam/vircam_platesol.c.
References vircam_dmed(), vircam_findcol(), vircam_pfits_get_naxis1(), vircam_pfits_get_naxis2(), vircam_radectoxieta(), and vircam_xytoradec().
Referenced by vircam_jmp_wcsfit().
int vircam_tilesky | ( | vir_fits ** | inlist, |
int | nfiles, | ||
vir_mask * | mask, | ||
vir_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. |
VIR_OK | if everything is ok |
VIR_FATAL | if something went wrong. An error message will appear. |
Definition at line 512 of file vircam_sky.c.
References vircam_fits_get_image(), vircam_fits_get_phu(), vircam_fits_wrap(), vircam_imcombine(), vircam_inpaint(), vircam_mask_get_data(), vircam_mask_get_size_x(), vircam_mask_get_size_y(), vircam_pfits_get_jitteri(), and vircam_pfits_get_njsteps().