|
VIRCAM Pipeline
2.3.12
|
These are the main CASU processing modules. More...
Functions | |
| int | casu_backmap (float *map, cpl_binary *bpm, int nx, int ny, int nbsize, float *avback, float **skymap, int *status) |
| Model background of an image. More... | |
| int | casu_getstds (cpl_propertylist *plist, int cache, char *path, char *catname, int cdssearch, char *cacheloc, cpl_table **stds, int *status) |
| Get a table of standard stars that appear on an image from a catalogue. More... | |
| int | casu_getstds_cdslist (int cdschoice, char **cdscatname, char **cdscatid, int *status) |
| int | casu_get_cdschoice (const char *cdscatname) |
| int | casu_darkcor (casu_fits *infile, casu_fits *darksrc, float darkscl, int *status) |
| Correct input data for dark current. More... | |
| int | casu_defringe (casu_fits **infiles, int nimages, casu_fits **fringes, int nfringes, casu_mask *mask, int nbsize, int *status) |
| Correct input data to remove fringes. More... | |
| int | casu_flatcor (casu_fits *infile, casu_fits *flatsrc, int *status) |
| Correct input data for flat field response. More... | |
| int | casu_gaincor (casu_fits *infile, float gainscl, int *status) |
| Gain correct input data frame. More... | |
| int | casu_genbpm (casu_fits **flatlist, int nflatlist, cpl_image *master, float lthr, float hthr, const char *expkey, cpl_array **bpm_array, int *nbad, float *badfrac, int *status) |
| Generate a bad pixel mask from a list of dome flats. More... | |
| int | casu_imcombine (casu_fits **fset, casu_fits **fsetv, int nfits, int combtype, int scaletype, int xrej, float thresh, const char *expkey, cpl_image **outimage, cpl_image **outvimage, unsigned char **rejmask, unsigned char **rejplus, cpl_propertylist **drs, int *status) |
| Stack images into a mean or median image with rejection. More... | |
| int | casu_imcore (casu_fits *infile, casu_fits *conf, int ipix, float threshold, int icrowd, float rcore, int nbsize, int cattype, float filtfwhm, casu_tfits **outtab, float gainloc, int *status) |
| Generate object catalogues from input images. More... | |
| int | casu_imdither (casu_fits **inf, casu_fits **inconf, int nimages, int nconfs, float lthr, float hthr, cpl_propertylist **p, const char *expkey, cpl_image **out, cpl_image **outc, int *status) |
| Dither a set of jittered observations. More... | |
| int | casu_imstack (casu_fits **inf, casu_fits **inconf, casu_fits **invar, casu_tfits **cats, int nimages, int nconfs, float lthr, float hthr, int method, int seeing, int fast, int unmap, const char *expkey, casu_fits **out, casu_fits **outc, casu_fits **outv, int *status) |
| Stack images into a mean image using WCS info. More... | |
| int | casu_inpaint (casu_fits *in, int nbsize, int *status) |
| Inpaint pixels or patches in a map. More... | |
| int | casu_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 | casu_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 | casu_mkconf (cpl_image *flat, char *flatfile, casu_mask *bpm, cpl_image **outconf, cpl_propertylist **drs, int *status) |
| Create a confidence map. More... | |
| int | casu_nditcor (casu_fits *infile, int ndit, const char *expkey, int *status) |
| Correct input data for number of dits. More... | |
| int | casu_nebuliser (casu_fits *infile, casu_fits *inconf, int medfilt, int linfilt, int niter, int axis, int twod, int takeout_sky, int norm, int wantback, float signeg, float sigpos, casu_fits **backmap, int *status) |
| Remove small scale background variations. More... | |
| int | casu_opm (casu_fits *infile, casu_fits *conf, int ipix, float threshold, int nbsize, float filtfwhm, int niter, int *status) |
| Generate an object mask from an input image. More... | |
| int | casu_pawsky_minus (casu_fits **infiles, casu_fits **invar, casu_fits *conf, casu_fits *objmaskfits, int nfiles, casu_fits **skyout, casu_fits **skyvar, int *status) |
| Background correct images using pawsky_minus algorithm. More... | |
| int | casu_photcal_extinct (casu_fits **images, casu_tfits **mstds, casu_tfits **cats, int nimages, char *filt, cpl_table *phottab, int minstars, cpl_frame *schlf_n, cpl_frame *schlf_s, const char *expkey, const char *amkey, float magerrcut, int *status) |
| Do photometric calibration. More... | |
| int | casu_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 | casu_platexy (cpl_table *matchedxy, int nconst, cpl_array **coefs, int *status) |
| Work out an xy transformation for two coodinate lists. More... | |
| int | casu_pawsky_mask (casu_fits **inlist, casu_fits **invar, int nfiles, casu_fits *conf, casu_mask *mask, casu_fits **skyout, casu_fits **skyvar, 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 | casu_pawsky_mask_pre (casu_fits **inlist, casu_fits **invar, int nfiles, casu_mask *mask, casu_fits *objmask, int nbsize, casu_fits **skyout, casu_fits **skyvar, int *status) |
| Work out a sky estimate from an input jitter series and a pre-existing object mask. More... | |
| int | casu_simplesky_mask (casu_fits **inlist, casu_fits **invar, int nfiles, casu_fits *conf, casu_mask *mask, casu_fits **skyout, casu_fits **skyvar, int niter, int ipix, float thresh, int nbsize, float smkern, int *status) |
| Work out a masked sky estimate from a jitter series with large offsets. More... | |
These are the main CASU processing modules.
| int casu_backmap | ( | float * | map, |
| cpl_binary * | bpm, | ||
| int | nx, | ||
| int | ny, | ||
| int | nbsize, | ||
| float * | avback, | ||
| float ** | skymap, | ||
| int * | status | ||
| ) |
Model background of an image.
| map | The input data image |
| bpm | The input bad pixel mask |
| nx | The X dimension of the input maps |
| ny | The Y dimension of the input maps |
| nbsize | The size of the cells for the smoothing boxes |
| avback | The average of the sky in the cells |
| skymap | An output sky map. |
| status | An input/output status that is the same as the returned values |
| CASU_OK | if everything is ok |
| CASU_FATAL | if input parameters are faulty or all pixels are bad in bpm |
Definition at line 108 of file casu_backmap.c.
Referenced by casu_inpaint().
| int casu_darkcor | ( | casu_fits * | infile, |
| casu_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. |
| CASU_OK | if everything is ok |
| CASU_WARN | if the output property list is NULL. |
| CASU_FATAL | if image data fails to load, the images have different dimensionality or if the image subtraction in CPL fails |
Definition at line 86 of file casu_darkcor.c.
References casu_compare_dims(), casu_fits_get_ehu(), casu_fits_get_fullname(), and casu_fits_get_image().
| int casu_defringe | ( | casu_fits ** | infiles, |
| int | nimages, | ||
| casu_fits ** | fringes, | ||
| int | nfringes, | ||
| casu_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. |
| CASU_OK | if everything is ok |
Definition at line 115 of file casu_defringe.c.
References casu_fits_get_ehu(), casu_fits_get_fullname(), casu_fits_get_image(), casu_mask_get_data(), and casu_medmad().
| int casu_flatcor | ( | casu_fits * | infile, |
| casu_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. |
| CASU_OK | if everything is ok |
| CASU_WARN | if there is a zero divide or if the output property list is NULL. |
| CASU_FATAL | if image data fails to load or the division fails |
Definition at line 79 of file casu_flatcor.c.
References casu_compare_dims(), casu_fits_get_ehu(), casu_fits_get_fullname(), and casu_fits_get_image().
| int casu_gaincor | ( | casu_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. |
| CASU_OK | if everything is ok |
| CASU_WARN | if the scale factor is <= zero |
| CASU_FATAL | if image data fails to load |
Definition at line 77 of file casu_gaincor.c.
References casu_fits_get_ehu(), and casu_fits_get_image().
| int casu_genbpm | ( | casu_fits ** | flatlist, |
| int | nflatlist, | ||
| cpl_image * | master, | ||
| float | lthr, | ||
| float | hthr, | ||
| const char * | expkey, | ||
| 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 |
| master | A master flat. If this is NULL then a master will be created from the input list |
| lthr | The low rejection threshold in units of sigma |
| hthr | The high rejection threshold in units of sigma |
| expkey | The header keyword for the exposure time. |
| 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 97 of file casu_genbpm.c.
References casu_fits_get_image(), casu_getnpts(), casu_imcombine(), casu_medmad(), and casu_medsig().
| int casu_get_cdschoice | ( | const char * | cdscatname | ) |
| cdscatname | The CDS designation for the catalogue |
| 0 | if the string doesn't match a catalogue choice |
| 1 | .. maxcds the matching catalogue choice |
Definition at line 443 of file casu_getstds.c.
| int casu_getstds | ( | cpl_propertylist * | plist, |
| int | cache, | ||
| char * | path, | ||
| char * | catname, | ||
| int | cdssearch, | ||
| char * | cacheloc, | ||
| 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 if they are stored locally |
| catname | The name of the input catalogue. This is just used for labelling purposes |
| cdssearch | If this is not zero, then it refers to a catalogue to be searched at the CDS (this takes precedence over local catalogues if both cdssearch and a catpath are specfied). Current values are:
|
| cacheloc | A directory where we want to write the cache directory |
| stds | The output table of standards |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
| CASU_WARN | if the output standards table has no rows in it |
| CASU_FATAL | if a failure occurs in either accessing or extracting the standard data. |
Definition at line 159 of file casu_getstds.c.
References casu_coverage().
Referenced by vircam_jmp_illum(), and vircam_jmp_matched_stds().
| int casu_imcombine | ( | casu_fits ** | fset, |
| casu_fits ** | fsetv, | ||
| int | nfits, | ||
| int | combtype, | ||
| int | scaletype, | ||
| int | xrej, | ||
| float | thresh, | ||
| const char * | expkey, | ||
| cpl_image ** | outimage, | ||
| cpl_image ** | outvimage, | ||
| 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 |
| fsetv | Input image variance list (NULL if not using) |
| 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 |
| expkey | The header keyword with the exposure time |
| outimage | Output image |
| outvimage | Output variance image (if input variances are included) |
| 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 |
| CASU_OK | if everything is ok |
| CASU_WARN | if fset has zero length |
| CASU_FATAL | for all other conditions |
Definition at line 165 of file casu_imcombine.c.
References casu_fits_get_ehu(), casu_fits_get_filename(), casu_fits_get_image(), casu_fits_get_nexten(), casu_fits_get_phu(), casu_getnpts(), casu_med(), and casu_prov().
Referenced by casu_genbpm(), casu_pawsky_mask(), casu_pawsky_mask_pre(), casu_simplesky_mask(), vircam_genbpm(), vircam_jmp_skycor(), and vircam_tilesky().
| int casu_imcore | ( | casu_fits * | infile, |
| casu_fits * | conf, | ||
| int | ipix, | ||
| float | threshold, | ||
| int | icrowd, | ||
| float | rcore, | ||
| int | nbsize, | ||
| int | cattype, | ||
| float | filtfwhm, | ||
| casu_tfits ** | outtab, | ||
| float | gainloc, | ||
| 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 |
| cattype | The type of catalogue to be produced |
| filtfwhm | The FWHM of the smoothing kernel in the detection algorithm |
| outtab | The output table of object |
| gainloc | The detector gain in e-/ADU |
| status | The input/output status that has the same return value a below |
| CASU_OK | if everything is ok |
| CASU_WARN,CASU_FATAL | errors in the called routines |
Definition at line 149 of file casu_imcore.c.
References casu_fits_delete(), casu_fits_duplicate(), casu_fits_get_ehu(), casu_fits_get_filename(), casu_fits_get_fullname(), casu_fits_get_phu(), casu_propertylist_update_float(), casu_tfits_get_ehu(), casu_tfits_get_table(), imcore_classify(), and imcore_conf().
Referenced by vircam_jmp_catalogue(), vircam_jmp_dither_offsets(), and vircam_jmp_illum().
| int casu_imdither | ( | casu_fits ** | inf, |
| casu_fits ** | inconf, | ||
| int | nimages, | ||
| int | nconfs, | ||
| float | lthr, | ||
| float | hthr, | ||
| cpl_propertylist ** | p, | ||
| const char * | expkey, | ||
| 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. |
| expkey | The header keyword for the exposure time |
| out | The output dithered image |
| 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 a failure occurs in either accessing input data or the input image list has not images in it. |
Definition at line 151 of file casu_imdither.c.
References casu_fits_get_ehu(), casu_fits_get_fullname(), casu_fits_get_image(), casu_fits_get_phu(), casu_prov(), and casu_timestamp().
Referenced by casu_pawsky_mask(), and vircam_jmp_dither_images().
| int casu_imstack | ( | casu_fits ** | inf, |
| casu_fits ** | inconf, | ||
| casu_fits ** | invar, | ||
| casu_tfits ** | cats, | ||
| int | nimages, | ||
| int | nconfs, | ||
| float | lthr, | ||
| float | hthr, | ||
| int | method, | ||
| int | seeing, | ||
| int | fast, | ||
| int | unmap, | ||
| const char * | expkey, | ||
| casu_fits ** | out, | ||
| casu_fits ** | outc, | ||
| casu_fits ** | outv, | ||
| int * | status | ||
| ) |
Stack images into a mean image using WCS info.
| inf | Input image list |
| inconf | Input list of confidence maps |
| invar | Input list of variance maps (NULL if not using) |
| 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:
|
| seeing | If set, then the input frames will be weighted by the seeing specified in the header keyword ESO DRS SEEING. |
| fast | If set, then the 'fast' algorithm will be used. The fast algorithm uses much more memory, so if the input image list is large it is best to use the slow algorithm. |
| unmap | If set then the images can be unmapped from time to time and then re-read. This should only be set if the input images also exist on disc |
| expkey | The keyword in the headers that specify the exposure time |
| out | The output stacked image |
| outc | The output confidence map |
| outv | The output variance map |
| status | The usual input/output status variable |
| CASU_OK | if everything is ok |
| CASU_FATAL | if there are no images to combine or there is a mismatch between the confidence map sizes and image sizes. |
Definition at line 187 of file casu_imstack.c.
References casu_coverage(), casu_fits_duplicate(), casu_fits_get_ehu(), casu_fits_get_fullname(), casu_fits_get_image(), casu_fits_get_phu(), casu_fits_unload_im(), casu_matchxy(), casu_platexy(), casu_prov(), and casu_tfits_get_table().
| int casu_inpaint | ( | casu_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. |
| CASU_OK | if everything is ok |
| CASU_WARN | if the output property list is NULL. |
| CASU_FATAL | if image data arrays don't have matching dimensions |
Definition at line 83 of file casu_inpaint.c.
References casu_backmap(), and casu_fits_get_image().
Referenced by casu_pawsky_mask(), casu_pawsky_mask_pre(), casu_pawsky_minus(), casu_simplesky_mask(), and vircam_tilesky().
| int casu_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 casu_imcore). |
| stdstab | The input table with the template objects. Must have columns called xpredict and ypredict (as one gets from casu_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. |
| CASU_OK | If everything succeeded. |
| CASU_WARN | If either table has no rows. |
| CASU_FATAL | If either table is missing one of the required columns |
Definition at line 300 of file casu_match.c.
References casu_fndmatch(), and casu_medmad().
Referenced by vircam_jmp_illum(), and vircam_jmp_matched_stds().
| int casu_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. |
| CASU_OK | If everything succeeded. |
| CASU_WARN | If either table has no rows. |
| CASU_FATAL | If either table is missing one of the required columns |
Definition at line 105 of file casu_match.c.
References casu_fndmatch(), and casu_med().
Referenced by casu_imstack(), and vircam_jmp_dither_offsets().
| int casu_mkconf | ( | cpl_image * | flat, |
| char * | flatfile, | ||
| casu_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. |
| CASU_OK | if everything is ok |
| CASU_FATAL | if image data fails to load or the dimensionality of the input images don't match. |
Definition at line 87 of file casu_mkconf.c.
References casu_mask_get_data(), casu_mask_get_filename(), casu_mask_get_size_x(), casu_mask_get_size_y(), casu_mask_get_type(), and casu_mean().
| int casu_nditcor | ( | casu_fits * | infile, |
| int | ndit, | ||
| const char * | expkey, | ||
| int * | status | ||
| ) |
Correct input data for number of dits.
| infile | The input data image (overwritten by result). |
| ndit | The number of dits in the observation |
| expkey | The FITS keyword for the exposure time |
| 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 85 of file casu_nditcor.c.
References casu_fits_get_ehu(), casu_fits_get_image(), and casu_fits_get_phu().
| int casu_nebuliser | ( | casu_fits * | infile, |
| casu_fits * | inconf, | ||
| int | medfilt, | ||
| int | linfilt, | ||
| int | niter, | ||
| int | axis, | ||
| int | twod, | ||
| int | takeout_sky, | ||
| int | norm, | ||
| int | wantback, | ||
| float | signeg, | ||
| float | sigpos, | ||
| casu_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. |
| CASU_OK | if everything is ok |
| CASU_FATAL | if image and confidence maps don't have the same dimensionality |
Definition at line 153 of file casu_nebuliser.c.
References casu_fits_duplicate(), casu_fits_get_ehu(), and casu_fits_get_image().
| int casu_opm | ( | casu_fits * | infile, |
| casu_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 |
| CASU_OK | if everything is ok |
| CASU_WARN,CASU_FATAL | errors in the called routines |
Definition at line 90 of file casu_opm.c.
References casu_fits_delete(), casu_fits_duplicate(), casu_fits_get_image(), and imcore_opm().
Referenced by casu_pawsky_mask(), and casu_simplesky_mask().
| int casu_pawsky_mask | ( | casu_fits ** | inlist, |
| casu_fits ** | invar, | ||
| int | nfiles, | ||
| casu_fits * | conf, | ||
| casu_mask * | mask, | ||
| casu_fits ** | skyout, | ||
| casu_fits ** | skyvar, | ||
| 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 |
| invar | The variance maps for 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 |
| skyvar | The output sky variance 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. |
| CASU_OK | if everything is ok |
| CASU_FATAL | if something went wrong. An error message will appear. |
Definition at line 110 of file casu_sky.c.
References casu_dummy_image(), casu_dummy_property(), casu_fits_delete(), casu_fits_get_ehu(), casu_fits_get_image(), casu_fits_get_status(), casu_fits_set_status(), casu_fits_wrap(), casu_imcombine(), casu_imdither(), casu_inpaint(), casu_mask_get_data(), casu_mask_get_size_x(), casu_mask_get_size_y(), and casu_opm().
| int casu_pawsky_mask_pre | ( | casu_fits ** | inlist, |
| casu_fits ** | invar, | ||
| int | nfiles, | ||
| casu_mask * | mask, | ||
| casu_fits * | objmask, | ||
| int | nbsize, | ||
| casu_fits ** | skyout, | ||
| casu_fits ** | skyvar, | ||
| int * | status | ||
| ) |
Work out a sky estimate from an input jitter series and a pre-existing object mask.
| inlist | The input jitter series |
| invar | The input jitter series variance maps |
| nfiles | The number of images in the jitter series |
| mask | The bad pixel mask derived from the confidence map. |
| objmask | The input object mask |
| nbsize | The cell size for the background following |
| skyout | The output sky map |
| skyvar | The output sky variance 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 412 of file casu_sky.c.
References casu_dummy_image(), casu_dummy_property(), casu_fits_get_ehu(), casu_fits_get_filename(), casu_fits_get_image(), casu_fits_get_status(), casu_fits_set_status(), casu_fits_wrap(), casu_imcombine(), casu_inpaint(), casu_mask_get_data(), casu_mask_get_size_x(), and casu_mask_get_size_y().
| int casu_pawsky_minus | ( | casu_fits ** | infiles, |
| casu_fits ** | invar, | ||
| casu_fits * | conf, | ||
| casu_fits * | objmaskfits, | ||
| int | nfiles, | ||
| casu_fits ** | skyout, | ||
| casu_fits ** | skyvar, | ||
| int * | status | ||
| ) |
Background correct images using pawsky_minus algorithm.
| infiles | The input image list |
| invar | The input variance image list |
| conf | The input master confidence map |
| objmaskfits | The input object mask. |
| nfiles | The number of input images to be corrected |
| skyout | An output representative sky map. |
| skyvar | An output representative sky variance map. |
| status | An input/output status. |
| CASU_OK | if everything is ok |
| CASU_WARN | if all images have been flagged as bad |
Definition at line 112 of file casu_pawsky_minus.c.
References casu_dummy_image(), casu_dummy_property(), casu_fits_get_ehu(), casu_fits_get_filename(), casu_fits_get_image(), casu_fits_get_status(), casu_fits_set_status(), casu_fits_wrap(), casu_inpaint(), casu_prov(), casu_qmedsig(), and casu_xytoxy_list().
| int casu_photcal_extinct | ( | casu_fits ** | images, |
| casu_tfits ** | mstds, | ||
| casu_tfits ** | cats, | ||
| int | nimages, | ||
| char * | filt, | ||
| cpl_table * | phottab, | ||
| int | minstars, | ||
| cpl_frame * | schlf_n, | ||
| cpl_frame * | schlf_s, | ||
| const char * | expkey, | ||
| const char * | amkey, | ||
| float | magerrcut, | ||
| int * | status | ||
| ) |
Do photometric calibration.
| images | The input image list |
| mstds | The matched standards tables list |
| cats | The list of source catalogues |
| nimages | The number of input images |
| filt | The name of the filter for the observation |
| phottab | The relevant table for photometric calibration for a given standard source |
| minstars | The minimum number of stars for the solution |
| schlf_n | The Schlegel map for the northern hemisphere |
| schlf_s | The Schlegel map for the southern hemisphere |
| expkey | The FITS header keyword for the exposure time |
| amkey | The FITS header keyword for the airmass |
| status | An input/output status |
| CASU_OK | if everything is ok |
| CASU_WARN | if there are no images or images fail to load |
Definition at line 198 of file casu_photcal_extinct.c.
References casu_fits_get_ehu(), casu_fits_get_fullname(), casu_fits_get_phu(), casu_fits_get_status(), casu_tfits_get_ehu(), and casu_tfits_get_table().
Referenced by vircam_jmp_photcal().
| int casu_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. |
| 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. |
| CASU_OK | if everything is ok |
| CASU_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 126 of file casu_platesol.c.
References casu_dmed(), casu_findcol(), casu_propertylist_update_double(), casu_radectoxieta(), and casu_xytoradec().
Referenced by vircam_jmp_wcsfit().
| int casu_platexy | ( | cpl_table * | matchedxy, |
| int | nconst, | ||
| cpl_array ** | coefs, | ||
| int * | status | ||
| ) |
Work out an xy transformation for two coodinate lists.
| matchedxy | A matchedxy table. Must contain the following columns: X_coordinate_1, Y_coordinate_1, X_coordinate_2, Y_coordinate_2. The transformation will be done in the sense of transforming from frame 2 to frame 1. |
| nconst | The number of plate constants for the fit. The allowed values are 4 and 6 (4 constants or 6 constants). |
| coefs | An array of coefs. |
| status | An input/output status that is the same as the returned values below. |
| CASU_OK | if everything is ok |
| CASU_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 569 of file casu_platesol.c.
References casu_dmed().
Referenced by casu_imstack().
| int casu_simplesky_mask | ( | casu_fits ** | inlist, |
| casu_fits ** | invar, | ||
| int | nfiles, | ||
| casu_fits * | conf, | ||
| casu_mask * | mask, | ||
| casu_fits ** | skyout, | ||
| casu_fits ** | skyvar, | ||
| int | niter, | ||
| int | ipix, | ||
| float | thresh, | ||
| int | nbsize, | ||
| float | smkern, | ||
| int * | status | ||
| ) |
Work out a masked sky estimate from a jitter series with large offsets.
| inlist | The input jitter series |
| invar | The input jitter series variance maps |
| 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 |
| skyvar | The output sky variance 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. |
| CASU_OK | if everything is ok |
| CASU_FATAL | if something went wrong. An error message will appear. |
Definition at line 643 of file casu_sky.c.
References casu_dummy_image(), casu_dummy_property(), casu_fits_get_ehu(), casu_fits_get_image(), casu_fits_get_status(), casu_fits_set_status(), casu_fits_wrap(), casu_imcombine(), casu_inpaint(), casu_mask_get_data(), casu_mask_get_size_x(), casu_mask_get_size_y(), and casu_opm().