VIRCAM Pipeline  1.3.4
Data Reduction Modules
int vircam_darkcor (vir_fits *infile, vir_fits *darksrc, float darkscl, int *status)
 Correct input data for dark current. More...
 
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. More...
 
int vircam_destripe (vir_fits *in, vir_mask *inbpm, int *status)
 Remove stripes from the background of an image. More...
 
int vircam_flatcor (vir_fits *infile, vir_fits *flatsrc, int *status)
 Correct input data for flat field response. More...
 
int vircam_gaincor (vir_fits *infile, float gainscl, int *status)
 Gain correct input data frame. More...
 
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. More...
 
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. More...
 
int vircam_lincor (vir_fits *infile, vir_tfits *lchantab, int kconst, int ndit, int *status)
 Apply linearity curves to data. More...
 
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. More...
 
int vircam_grout (vir_tfits *intab, cpl_frameset *input_cats, cpl_frameset *input_confs, vir_tfits **outtab, int *status)
 Correct input tile catalogues. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
int vircam_inpaint (vir_fits *in, int nbsize, int *status)
 Inpaint pixels or patches in a map. More...
 
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. More...
 
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. More...
 
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. More...
 
int vircam_mkconf (cpl_image *flat, char *flatfile, vir_mask *bpm, cpl_image **outconf, cpl_propertylist **drs, int *status)
 Create a confidence map. More...
 
int vircam_nditcor (vir_fits *infile, int ndit, int *status)
 Correct input data for dark current. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
int vircam_tilesky (vir_fits **inlist, int nfiles, vir_mask *mask, vir_fits **skyout, int *status)
 Work sky estimate from an input tile series. More...
 

Detailed Description

These are the main processing routines. Most of these also have a test recipe described on the test recipe page.

Function Documentation

int vircam_darkcor ( vir_fits *  infile,
vir_fits *  darksrc,
float  darkscl,
int *  status 
)

Correct input data for dark current.

Name:
vircam_darkcor
Purpose:
Correct input data for dark current
Description:
Two images are given – one is the data for an observation, the other is for a mean dark frame. The latter is subtracted from the former. The result overwrites the input data array for the object image. The data for the dark array can be scaled by a factor before subtraction if a scaling factor other than 1 is specified.
Language:
C
Parameters
infileThe input data image (overwritten by result).
darksrcThe input dark image
darksclThe dark scaling factor
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_WARNif the output property list is NULL.
VIR_FATALif image data fails to load
QC headers:
None
DRS headers:
The following DRS keywords are written to the infile extension header
  • DARKCOR The name of the originating FITS file for the dark image
  • DARKSCL: The scale factor applied to the dark frame before subtraction.
Author
Jim Lewis, CASU

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.

Name:
vircam_defringe
Purpose:
Correct input data to remove fringes
Description:
A list of input images are given along with a fringe frame image. Each image is analysed to model out any large scale background variation which would bias the fitting procedure if it were left in. The background corrected fringe data is scaled by a series of different factors subtracted from the image data. The median absolute deviation of each the difference image is worked out and the run of MAD with scale factor is examined to see at what point the scale factor minimises the MAD. This scale factor is then used to correct the input data.
Language:
C
Parameters
infilesThe input data images (overwritten by result).
nimagesThe number of input images
fringesThe input fringe frames
nfringesThe number of input fringe frames
maskThe bad pixel mask
nbsizeThe size of each cell for the background modelling
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
QC headers:
The following QC keywords are written to the infile extension header
  • FRINGE_RATIO The ratio of the background RMS of the input image before fringe correction vs after.
DRS headers:
The following QC keywords are written to the infile extension header
  • FRINGEi The ith fringe frame used in defringing
  • FRNGSCi The scale factor of the ith fringe frame used in correcting the input image
Author
Jim Lewis, CASU

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.

Name:
vircam_destripe
Purpose:
Remove stripes from the background of an image
Description:
Remove stripes from the background of an image by finding the median of each row and putting the value into a profile. Normalise the profile to zero median. Then subtract the normalised median for each row from the original data.
Language:
C
Parameters
inThe input image. This is corrected in-situ.
inbpmThe input image bad pixel mask.
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
QC headers:
None
DRS headers:
The following DRS keywords are written to the plist propertylist
  • STRIPECOR A flag saying that the stripe correction has been done
  • STRIPERMS The RMS of the stripe profile
Other headers:
None
Author
Jim Lewis, CASU

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.

Name:
vircam_flatcor
Purpose:
Correct input data for flat field response
Description:
Two images are given – one is the data for an observation, the other is for a mean flat frame. The latter is divided into the former. The result overwrites the input data array for the object image.
Language:
C
Parameters
infileThe input data image (overwritten by result).
flatsrcThe input flat image
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_WARNif there is a zero divide or if the output property list is NULL.
VIR_FATALif image data fails to load
QC headers:
None
DRS headers:
The following DRS keywords are written to the infile extension header
  • FLATCOR The name of the originating FITS file for the flat image
Author
Jim Lewis, CASU

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.

Name:
vircam_gaincor
Purpose:
Correct input data for inter-detector gain difference
Description:
An input image is scaled by a constant value so as to put all the images in a single observation onto the same gain scale.
Language:
C
Parameters
infileThe input data image (overwritten by result).
gainsclThe input scale factor
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_WARNif the scale factor is zero
VIR_FATALif image data fails to load
QC headers:
None
DRS headers:
The following DRS keywords are written to the infile extension header
  • GAINCOR The gain correction factor
Author
Jim Lewis, CASU

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.

Name:
vircam_genbpm
Purpose:
Generate a bad pixel mask from a list of dark corrected dome flat images.
Description:
A list of dark corrected dome flat images is given. A master flat is created from all the input flats in the list. Each input flat is then divided by the master. Bad pixels are marked on the new image as those that are above or below the threshold (in sigma) in the new image. Any pixel which has been marked as bad for more than a quarter of the input images is defined as bad in the output mask.
Language:
C
Parameters
flatlistThe list of input dark corrected dome flat images.
nflatlistThe number of input images
lthrThe low rejection threshold in units of sigma
hthrThe high rejection threshold in units of sigma
bpm_arrayThe output bad pixel mask
nbadThe number of bad pixels found
badfracThe fraction of pixels in the map that are bad
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKIf everything is ok
VIR_FATALThe flat combination failed
QC headers:
None
DRS headers:
None
Author
Jim Lewis, CASU

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.

Name:
vircam_genlincur
Purpose:
Generate linearity coefficients for each readout channel of a detector given a median statistic for each channel in a sequence of dome flat field exposures.
Description:
Median flux estimates for each channel in a series of dark corrected dome flat exposures are given along with exposure timing information. The dome exposures must have been taken with a range of exposure times and using a stable light source. From the known reset/read time and exposure times, the linearity curve for each channel can be measured. The resulting coefficients are written to a new channel table, along with an estimate of the non-linearity at a nominal level and an estimate of the quality of the initial fit.
Language:
C
Parameters
fdataA 2d array of medians for each flat. The first index is the image number. The second index is the channel number.
nimagesThe number of input images
expsAn array of exposure times for the input images
minditThe reset/readout time
chantabThe input channel table
norderThe 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.
lchantabThe output channel table with new linearity coefficients
lindataAn array of the linearised values of 'fdata'
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_WARNif one or more channels have a failed fit
VIR_FATALif the channel table is invalid.
QC headers:
None
DRS headers:
None
Author
Jim Lewis, CASU

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.

Name:
vircam_getstds
Purpose:
Get a table of standard stars that appear on an image from a catalogue.
Description:
The propertylist of an image is given. The WCS from that propertylist is extracted and the region in equatorial coordinates covered by the image is calculated. From that information standard stars are extracted from the 2mass or ppmxl source catalogues which reside in a location specified by a given path. For each object in the table and x,y pixel coordinate pair is calculated from the WCS and added to the table.
Language:
C
Parameters
plistThe input propertylist for the image in question
cacheIf set, then we can cache results which should result in faster access for several observations of the same region
pathThe full path to the catalogue FITS files.
catnameThe name of the input catalogue. This is just used for labelling purposes
stdsThe output table of standards
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_WARNif the output standards table has no rows in it
VIR_FATALif a failure occurs in either accessing or extracting the standard data.
QC headers:
None
DRS headers:
None
Author
Jim Lewis, CASU

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.

Name:
vircam_grout
Purpose:
Correct input tile catalogues for the effects of variable seeing and magnitude zeropoints of the images that went into that tile.
Description:
Variable conditions during the observations of the 6 pawprints of a VIRCAM tile can lead to spatial systematics in the fluxes measured from a tiled image. This routine takes that effect out.
Language:
C
Parameters
intabThe input tile catalogue
input_catsThe catalogues for the input pawprints that formed the tile
input_confsThe confidence maps for the input pawprints that formed the tile
outtabThe output tile catalogue
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif image data fails to load
QC headers:
None
DRS headers:
None
Author
Jim Lewis, CASU

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.

Name:
vircam_illum
Purpose:
Work out the illumination correction
Description:
Work out the illumination correction from a set of images by dividing the image space into a number of cells. The median of photometric zeropoints for all the stars in a cell is compared with the median zeropoint over the whole set of images.
Language:
C
Parameters
imagesThe input data images
mstdsThe input matched standards catalogues (one for each image)
plThe list of extension header propertylists (one for each image catalogue)
nimagesThe number of images in the input lists
filtThe filter for the observations
phottabThe photometric calibration table for VIRCAM
nbsizeThe size of the side of a cell in pixels
illcorThe illumination correction table for this detector
illcor_rmsThe RMS of the illumination correction
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_WARNif there weren't any photometric standards or all the objects in the catalogue failed.
VIR_FATALif there is a problem with the photometric calibration table
QC headers:
None
DRS headers:
None
Author
Jim Lewis, CASU

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.

Name:
vircam_imcombine
Purpose:
Stack images into a mean or median image with rejection
Description:
A list of frames is given. The images can be stacked by doing pixel by pixel means or medians. Images can be scaled or biassed to a common background value before any combination or rejection is done. The rejection algorithm has the option of doing an extra cycle which looks at the area surrounding a rejected pixel to see if the rejection is really justified. The output consists of a mean/median image, a rejection mask and a second rejection mask that only marks positive rejections. The latter could be useful if trying to assess the number of cosmic ray hits.
Language:
C
Parameters
fsetInput image list
nfitsThe number of input images
combtypeCombination type: 1 == Median, 2 == Mean
scaletypeScaling type: 0 == none, 1 == additive, 2 == multiplicative, 3 == multiplicative by exp time then additive by flux
xrejExtra rejection cycle flag
threshRejection threshold in sigma above background
outimageOutput image
rejmaskOutput rejection mask
rejplusOutput mask of rejected pixels with positive residual
drsA propertylist to be used to write DRS info
statusAn input/output status that is the same as the returned values below
Return values
VIR_OKif everything is ok
VIR_WARNif fset has zero length
VIR_FATALfor all other conditions
QC headers:
None
DRS headers:
The following DRS keywords are written to the drs propertylist
  • PROV**** The provenance keywords
Author
Jim Lewis, CASU

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.

Name:
vircam_imcore
Purpose:
Generate object catalogues from input images
Description:
A frame and its confidence map are given. Detection thresholds and various other parameters are also given. Output is a table with all the extracted objects with object classifications included.
Language:
C
Parameters
infileThe input frame with the image to be analysed
confThe input frame with the confidence map
ipixThe minimum allowable size of an object
thresholdThe detection threshold in sigma above sky
icrowdIf set then the deblending software will be used
rcoreThe core radius in pixels
nbsizeThe smoothing box size for background map estimation
cattypThe type of catalogue to be produced
filtfwhmThe FWHM of the smoothing kernel in the detection algorithm
outtabThe output table of object
statusThe input/output status that has the same return value a below
Return values
VIR_OKif everything is ok
VIR_WARN,VIR_FATALerrors in the called routines
QC headers:
The following values will go into the extension propertylist
  • SATURATION Saturation level in ADU
  • MEAN_SKY Mean sky brightness in ADU
  • SKY_NOISE Pixel noise at sky level in ADU
  • IMAGE_SIZE The average FWHM of stellar objects in pixels
  • ELLIPTICITY The average stellar ellipticity (1 - b/a)
  • POSANG The average position angle in degrees from North towards East. NB: this value only makes sense if the ellipticity is significant
  • APERTURE_CORR The stellar aperture correction for 1x core flux
  • NOISE_OBJ The number of noise objects
DRS headers:
The following values will go into the extension propertylist
  • THRESHOL The detection threshold in ADU
  • MINPIX The minimum number of pixels per image
  • CROWDED Flag for crowded field analysis
  • RCORE The core radius for default profile fit in pixels
  • FILTFWHM The FWHM of the smoothing kernel in the detection algorithm
  • SEEING The average FWHM of stellar objects in pixels
  • XCOL The column containing the X position
  • YCOL The column containing the Y position
  • NXOUT The X dimension of the original image array
  • NYOUT The Y dimension of the original image array
  • CLASSIFD A flag to say that the catalgoue has been classified
  • SKYLEVEL Mean sky brightness in ADU
  • SKYNOISE Pixel noise at sky level in ADU
Other headers:
The following values will go into the extension propertylist
  • APCORxx A series of aperture correction values for each of the core radius apertures.
  • SYMBOLx A series of keywords to be used by GAIA for plotting ellipses
Author
Jim Lewis, CASU

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.

Name:
vircam_imdither
Purpose:
Dither a set of jittered observations
Description:
A set of jittered observations and their confidence maps (optional) are given. The cartesian offsets for each image are also given in the header. The observations and the confidence maps are dithered into an input map each taking the jitter offsets into account.
Language:
C
Parameters
infThe 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.
inconfThe 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.
nimagesThe number of input observation images
nconfsThe number of input confidence maps
lthrThe lower clipping threshold (in sigma)
hthrThe upper clipping threshold (in sigma)
pA 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.
outThe output dithered image
outcThe output confidence map
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif a failure occurs in either accessing input data or the input image list has not images in it.
QC headers:
None
DRS headers:
The following DRS keywords are written to the p propertylist
  • PROV**** The provenance keywords
Author
Jim Lewis, CASU

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.

Name:
vircam_imstack
Purpose:
Stack images into a mean image using WCS info
Description:
A list of frames is given. A mean image is stack by using the given WCS to work out the shift of an input pixel relative to the grid defined by the first image in the list. At first all are stacked using a nearest neighbour algorithm. Any discordant pixels are marked at this stage. If a different stacking algorithm is required, then the images are restacked, but with the discordant pixels found earlier removed. If object catalogues for each input image are available, then these are used to further refine the coordinate transformation.
Language:
C
Parameters
infInput image list
inconfInput list of confidence maps
catsInput list of object catalogues. If NULL, then no refinement will be done.
nimagesThe number of input images and (if given) the number of input object catalogues
nconfsThe number of input confidence maps
lthrThe lower rejection threshold
hthrThe upper rejection threshold
methodThe interpolation method:
  • 0: Nearest neighbour
  • 1: Bi-linear interpolation
outThe output stacked image
outcThe output confidence map
statusThe usual input/output status variable
Return values
VIR_OKif everything is ok
VIR_FATALif there are no images to combine or there is a mismatch between the confidence map sizes and image sizes.
DRS headers:
The following DRS keywords are written to the drs propertylist
  • PROV**** The provenance keywords
Author
Jim Lewis, CASU

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.

Name:
vircam_inpaint
Purpose:
Inpoint pixels or patches in a map
Description:
An image and its bad pixel mask are given. The background of the image is modelled by using robust medians of cells. This background map is smoothed. Any bad pixels in the input map are replaced by the value in the background map.
Language:
C
Parameters
inThe input data image (overwritten by result).
nbsizeThe size of the cells for the smoothing boxes
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_WARNif the output property list is NULL.
VIR_FATALif image data arrays don't have matching dimensions
QC headers:
None
DRS headers:
None
Author
Jim Lewis, CASU

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.

Name:
vircam_interleave
Purpose:
Interleave a set of microstepped observations
Description:
A set of microstepped observations and their confidence maps (optional) are given. The cartesian offsets as well as the background medians for each image are also given. The observations and optionally the confidence maps are interleaved onto a finer grid defined by the number of steps in the microstep series. If input confidence maps are given, then an output confidence map will also be generated.
Language:
C
Parameters
infilesThe 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.
ninputsThe number of input observation images
inconfsThe 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.
nconfsThe number of input confidence maps
nstepsThe number of steps in the microstep pattern, e.g. for a 3x3 microstep pattern, this should be set to 3.
pA 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.
outimageThe output interleaved image
outconfThe output confidence map
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif a failure occurs in either accessing input data or the input image list has not images in it.
QC headers:
None
DRS headers:
The following DRS keywords are written to the p propertylist
  • PROV**** The provenance keywords
Author
Jim Lewis, CASU

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.

Name:
vircam_lincor
Purpose:
Apply linearity curves to data.
Description:
Correct the data in an image for its non-linearity. This is done with the help of a linearity channel table and some basic timing information from the header.
Language:
C
Parameters
infileThe input image. This should probably be a series of dome flat exposures of a stable light source with varying exposure times.
lchantabThe linearity channel table
kconstIf 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.
nditSet to the number of co-adds there are in the input data.
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif the data array can't be mapped for the input image or the linearity channel table is invalid.
QC headers:
None
DRS headers:
The following DRS keywords are written to the infile extension header
  • LINCOR The name of the originating FITS file for the linearity table
Author
Jim Lewis, CASU

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.

Name:
vircam_matchstds
Purpose:
Match object and standard star tables by their xy coordinates
Description:
An object table (nominally from vircam_imcore) and a standard star table (nominally from vircam_getstds) are given. The x,y coordinates of each are searched to find the offsets that maximises the number of matched objects. Objects that match are written to an output table with both sets of cartesian coordinates plus any ancillary information that might be in the standards table.
Language:
C
Parameters
objtabThe input table with the programme objects. Must have columns called X_coordinate and Y_coordinate (as one gets from vircam_imcore).
stdstabThe input table with the template objects. Must have columns called xpredict and ypredict (as one gets from vircam_getstds).
sradA search radius in pixels. This helps to define the number of points that are used in the grid search
outtabThe returned output table with both sets of cartesian coordinates plus any extra information that appears in the standards table.
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKIf everything succeeded.
VIR_WARNIf either table has no rows.
VIR_FATALIf either table is missing one of the required columns
QC headers:
None
DRS headers:
None
Author
Jim Lewis, CASU

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.

Name:
vircam_matchxy
Purpose:
Match two lists of x,y coordinates from two tables to find the cartesian offset between them
Description:
A program and a template table are given. The x,y coordinates of each are searched to find the offsets that maximises the number of matched objects. These offsets are returned along with the number of matches. The offsets are in the sense: xoffset = x_template - x_programme
Language:
C
Parameters
progtabThe input table with the programme objects. Must have columns called X_coordinate and Y_coordinate.
templateThe input table with the template objects. Must have columns called X_coordinate and Y_coordinate.
sradA search radius in pixels. This helps to define the number of points that are used in the grid search
xoffsetThe returned x offset
yoffsetThe returned y offset
nmThe returned number of matches
outtabThe returned table of matched objects.
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKIf everything succeeded.
VIR_WARNIf either table has no rows.
VIR_FATALIf either table is missing one of the required columns
QC headers:
None
DRS headers:
None
Author
Jim Lewis, CASU

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.

Name:
vircam_mkconf
Purpose:
Create a confidence map
Description:
Create a confidence map from a given flat image and a bad pixel mask. The confidence is defined as 100 times the normalised flat field. Any pixels that are flagged as bad will have a value of 0 confidence.
Language:
C
Parameters
flatThe input flat field data image
flatfileThe input flat field file name.
bpmThe input mask image
outconfThe ouput confidence map image
drsA propertylist with entries for the drs header block
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif image data fails to load or the dimensionality of the input images don't match.
QC headers:
None
DRS headers:
The following DRS keywords are written to the drs propertylist
  • FLATIN The name of the originating FITS file for the flat image
  • BPMIN: The name of the originating FITS file for the BPM image
Author
Jim Lewis, CASU

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.

Name:
vircam_nditcor
Purpose:
Correct input data for multiple dits.
Description:
Divide the input data by the number of dits. This is so that all images are scaled the same way. The result overwrites the input data array.
Language:
C
Parameters
infileThe input data image (overwritten by result).
nditThe number of dits in the observation
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif image data fails to load
QC headers:
None
DRS headers:
The following DRS keywords are written to the infile extension header
  • NDITCOR A logical keyword to say that this correction has been applied
Main headers:
The following keywords in the non-hierarchical part of the headers have been modified:
  • EXPTIME The exposure time on entry is divided by the number of DITs. This is done both in the extension and the primary header.
Author
Jim Lewis, CASU

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.

Name:
vircam_nebuliser
Purpose:
Remove small scale background variations
Description:
An input image is smoothed using an unsharp masking algorithm. The smoothed image is subtracted which should leave an image with minimal background variation.
Language:
C
Parameters
infileThe input image to be smoothed
inconfThe relevant confidence map. If this is NULL, then all pixels will be considered good.
medfiltThe size in pixels of the median filter box
linfiltThe size in pixels of the linear filter box
niterThe number of rejection iterations to use
axisIn the case of a 1d smooth, which axis to do first (1 => X, 2 => Y)
twodIf set, then a full 2d smooth is done. Otherwise it is a combination of 2 1d smoothing operations
takeout_skyIf set then the output median background will be zero
normIf set, then the output is the input divided by the smoothed image
wantbackIf set, then we want to have an output image of the background map
signegThe low clipping threshold
sigposThe high clipping threshold
backmapThe output background map, if requested. Otherwise set to NULL
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif image and confidence maps don't have the same dimensionality
QC headers:
None
DRS headers:
NEBULISED
Author
Jim Lewis, CASU

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.

Name:
vircam_opm
Purpose:
Generate an object mask from an input image
Description:
A frame and its confidence map are given. Detection thresholds and various other parameters are also given. Output is an object mask of the extracted objects. The result is written to the input cpl_image bad pixel mask.
Language:
C
Parameters
infileThe input frame with the image to be analysed
confThe input frame with the confidence map
ipixThe minimum allowable size of an object
thresholdThe detection threshold in sigma above sky
nbsizeThe smoothing box size for background map estimation
filtfwhmThe FWHM of the smoothing kernel in the detection algorithm
niterThe number of detection iterations to be done
statusThe input/output status that has the same return value a below
Return values
VIR_OKif everything is ok
VIR_WARN,VIR_FATALerrors in the called routines
QC headers:
The following values will go into the extension propertylist
  • MEAN_SKY Mean sky brightness in ADU
  • SKY_NOISE Pixel noise at sky level in ADU
Author
Jim Lewis, CASU

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.

Name:
vircam_pawsky_mask
Purpose:
Work a masked sky estimate from an input jitter series
Description:
Given an input jitter series stars are iteratively masked and clipped to form a final sky estimate.
Language:
C
Parameters
inlistThe input jitter series
nfilesThe number of images in the jitter series
confThe input confidence map for the jitter series
maskThe bad pixel mask derived from the confidence map.
skyoutThe output sky map
niterThe number of masking and clipping iterations to do
ipixThe minimum object size for masking
threshThe threshold in sigma above sky for the object detection alrorithm
nbsizeThe cell size for the background following part of the object detection algorithm
smkernThe size in pixels of the smoothing kernal for the object detection algorithm
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif something went wrong. An error message will appear.
Author
Jim Lewis, CASU

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.

Name:
vircam_pawsky_mask
Purpose:
Work a masked sky estimate from an input jitter series
Description:
Given an input jitter series stars are iteratively masked and clipped to form a final sky estimate.
Language:
C
Parameters
inlistThe input jitter series
nfilesThe number of images in the jitter series
confThe input confidence map for the jitter series
maskThe bad pixel mask derived from the confidence map.
skyoutThe output sky map
niterThe number of masking and clipping iterations to do
ipixThe minimum object size for masking
threshThe threshold in sigma above sky for the object detection alrorithm
nbsizeThe cell size for the background following part of the object detection algorithm
smkernThe size in pixels of the smoothing kernal for the object detection algorithm
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif something went wrong. An error message will appear.
Author
Jim Lewis, CASU

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.

Name:
vircam_photcal
Purpose:
Work out the photometric zeropoint
Description:
Work out the photometric zeropoint for a set of input images.
Language:
C
Parameters
imagesThe input data images
mstdsThe input matched standards catalogues (one for each image)
plThe list of extension header propertylists (one for each image catalogue)
nimagesThe number of images in the input lists
filtThe filter for the observations
phottabThe photometric calibration table for VIRCAM
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif there is a problem with the photometric calibration table
QC headers:
  • MAGZPT The zeropoint calculated through aperture 3 using only objects from the current image
  • MAGZERR The zeropoint sigma calculated through aperture 3 using only objects from the current image.
  • MAGNZPT The number of objects used to calculate the zeropoint.
  • MAGNCUT The number of objects cut from zeropoint calculation
  • LIMITING_MAG The 5 sigma limiting magnitude through aperture 3.
DRS headers:
The following DRS keywords are written to the infile extension header
  • MAGNZPTIM The number of objects used to calculate the zeropoint for the current image.
  • ZPIM1 The zeropoint calculated through 1*rcore using only objects from the current image.
  • ZPSIGIM1 The zeropoint sigma calculated through 1*rcore using only objects from the current image.
  • LIMIT_MAG1 The 5 sigma limiting magnitude for this image in 1*rcore
  • ZPIM2 The zeropoint calculated through 2*rcore using only objects from the current image.
  • ZPSIGIM2 The zeropoint sigma calculated through 2*rcore using only objects from the current image.
  • LIMIT_MAG2 The 5 sigma limiting magnitude for this image in 2*rcore
  • MAGNZPTALL The number of objects on all images used to calculate the zeropoint.
  • ZPALL1 The zeropoint calculated through 1*rcore using all objects from all images in the list.
  • ZPSIGALL1 The zeropoint sigma calculated through 1*rcore using all objects from all images in the list
  • ZPALL2 The zeropoint calculated through 2*rcore using all objects from all images in the list.
  • ZPSIGALL2 The zeropoint sigma calculated through 2*rcore using all objects from all images in the list
Author
Jim Lewis, CASU

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.

Name:
vircam_platesol
Purpose:
Work out a WCS for an image
Description:
Given a matched standards table (a table of astrometric standards matched with objects on an image), work out a world coordinate system for the image. A full 6 constant plate solution (two zero points, two scales and two rotations) or a more restricted 4 constant solution (two zero points, one scale and one rotation) can be fit.
Language:
C
Parameters
plistThe 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.
tlistThe 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
matchedstdsA matched standards table containing at least the following columns: X_coordinate, Y_coordinate, xpredict, ypredict, ra, dec. See DRLD for more information.
nconstThe number of plate constants for the fit. The allowed values are 4 and 6 (4 constants or 6 constants).
shiftanIf set, then the difference between the predicted and true cartesian coordinates are used to redefine the equatorial coordinates of the pole of the WCS.
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif the plate solution has failed, there aren't enough standards or the requested number of constants is neither 4 nor 6.
QC headers:
The following QC keywords are written to the plist propertylist
  • WCS_DCRVAL1 Change in crval1 (degrees)
  • WCS_DCRVAL2 Change in crval2 (degrees)
  • WCS_DTHETA Change in rotation (degrees)
  • WCS_SCALE The mean plate scale (arcsec/pixel)
  • WCS_SHEAR Shear in the WCS solution (degrees)
  • WCS_RMS Average error in WCS fit in (arcsec)
DRS headers:
The following DRS keywords are written to the plist propertylist
  • NUMBRMS The number of stars in the WCS fit
  • STDCRMS The average error in the WCS fit (arcsec)
  • WCSRAOFF Central pixel RA_after - RA_before (arcsec)
  • WCSDECOFF Central pixel Dec_after - Dec_before (arcsec)
Other headers:
The input FITS WCS keywords are overwritten by updated values
Author
Jim Lewis, CASU

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.

Name:
vircam_tilesky
Purpose:
Work a sky estimate from an input tile
Description:
A list of images from a whole tile is given. These are broken up into groups that all have the same position within the jitter sequence. An intermediate sky is formed from each group and then a final output sky is formed from the intermediate sky files.
Language:
C
Parameters
inlistThe input images from the tile
nfilesThe number of images in the jitter series
maskThe bad pixel mask derived from the confidence map.
skyoutThe output sky map
statusAn input/output status that is the same as the returned values below.
Return values
VIR_OKif everything is ok
VIR_FATALif something went wrong. An error message will appear.
Author
Jim Lewis, CASU

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().