FORS Pipeline Reference Manual 4.9.9
Defines | Functions | Variables
fors_recipe Recipe

Defines

#define cleanup
#define cleanup
#define cleanup
#define cleanup
#define cleanup
#define cleanup
#define cleanup

Functions

static double get_zeropoint (fors_star_list *stars, double cutoffE, double cutoffk, double dext_coeff, double dcolor_term, double avg_airmass, double *dzeropoint, int *n)
 Compute zeropoint.
static cpl_error_code fors_zeropoint_astrometry (const cpl_frameset *std_cat_frames, char filter_band, double color_correct, double dcolor_correct, const identify_method *id_method, fors_star_list *extracted, cpl_propertylist *wcs_header, fors_std_star_list **std_cat, cpl_image **histogram)
 Load standard star catalogue(s) and do the astrometry.
static cpl_error_code fors_zeropoint_astrometry_get_wcs_shift_px (const fors_star_list *stars, double *dx, double *dy)
 Determine the median difference std_star.pixel - star.pixel.
static cpl_error_code fors_zeropoint_astrometry_shift_wcs_origin (cpl_propertylist *header, double dx, double dy)
 Shift the origin of the WCS in a 2-dimensional frame header.
static cpl_error_code fors_zeropoint_astrometry_apply_unidentified_xy2radec (fors_star_list *stars, const cpl_propertylist *header)
 Create non-standard stars (using the fors_std_star object) connected to the star list entries and assign RA & DEC.
void fors_zeropoint_errorstate_dump_as_warning (unsigned self, unsigned first, unsigned last)
 Dump one error state of the error history.
void fors_zeropoint_define_parameters (cpl_parameterlist *parameters)
 Define recipe parameters.
void fors_zeropoint (cpl_frameset *frames, const cpl_parameterlist *parameters)
 Do the processing.
static bool zeropoint_inside (const fors_star *s, void *data)
 determine if zeropoint is inside cuts
int cpl_plugin_get_info (cpl_pluginlist *list)
 Build the list of available plugins, for this module.
static int fors_zeropoint_create (cpl_plugin *plugin)
 Setup the recipe options.
static int fors_zeropoint_exec (cpl_plugin *plugin)
 Execute the plugin instance given by the interface.
static int fors_zeropoint_destroy (cpl_plugin *plugin)
 Destroy what has been created by the 'create' function.

Variables

const char *const fors_zeropoint_name = "fors_zeropoint"
const char *const fors_zeropoint_description_short = "Compute zeropoint"
const char *const fors_zeropoint_author = "Jonas M. Larsen"
const char *const fors_zeropoint_email = PACKAGE_BUGREPORT
const char *const fors_zeropoint_description = " STANDARD_REDUCED_IMG FITS image Reduced std image\n"

Detailed Description

See recipe description for details.


Define Documentation

#define cleanup
Value:
do { \
    cpl_frameset_delete(std_frame); \
    cpl_frameset_delete(master_bias_frame); \
    cpl_frameset_delete(master_flat_frame); \
    cpl_frameset_delete(std_cat_frames); \
    cpl_frameset_delete(phot_table); \
    fors_image_delete(&std); \
    fors_image_delete_const(&master_bias); \
    fors_image_delete(&master_flat); \
    cpl_table_delete(aligned_phot); \
    cpl_image_delete(background); \
    cpl_table_delete(sources); \
    fors_extract_method_delete(&em); \
    fors_identify_method_delete(&im); \
    fors_std_star_list_delete(&cat, fors_std_star_delete); \
    /* All std-stars (and non-std-stars) are linked by the respective star */ \
    /* objects in "stars", without being referenced by a std-star-list */ \
    /* object. So they are deleted together with the function */ \
    /* fors_star_delete() while deleting the list "stars". */ \
    fors_star_list_delete(&stars, fors_star_delete); \
    cpl_free((void *)context); \
    fors_setting_delete(&setting); \
    cpl_propertylist_delete(qc_phot); \
    cpl_propertylist_delete(qc_sources); \
    cpl_propertylist_delete(product_header); \
    cpl_propertylist_delete(raw_header); \
} while (0)

Definition at line 1558 of file fors_zeropoint_impl.c.

#define cleanup
Value:
do { \
    fors_star_list_delete(&subset, fors_star_delete); \
    fors_star_list_delete(&identified, fors_star_delete); \
} while(0)

Definition at line 1558 of file fors_zeropoint_impl.c.

#define cleanup
Value:
do { \
    fors_std_star_list_delete(&internal_cat, fors_std_star_delete); \
} while (0)

Definition at line 1558 of file fors_zeropoint_impl.c.

#define cleanup
Value:
do { \
    cpl_vector_delete(vdx_long); vdx_long = NULL; \
    cpl_vector_delete(vdy_long); vdy_long = NULL; \
    cpl_vector_unwrap(vdx_only_std); vdx_only_std = NULL; \
    cpl_vector_unwrap(vdy_only_std); vdy_only_std = NULL; \
} while (0)

Definition at line 1558 of file fors_zeropoint_impl.c.

#define cleanup
Value:
do { \
    cpl_wcs_delete(wcs); wcs = NULL; \
    cpl_matrix_delete(mradec); mradec = NULL; \
    cpl_matrix_delete(mxy); mxy = NULL; \
    cpl_array_delete(wcs_conversion_status); wcs_conversion_status = NULL; \
    fors_std_star_delete(&unknown); \
} while (0)

Definition at line 1558 of file fors_zeropoint_impl.c.


Function Documentation

static double get_zeropoint ( fors_star_list *  stars,
double  cutoffE,
double  cutoffk,
double  dext_coeff,
double  dcolor_term,
double  avg_airmass,
double *  dzeropoint,
int *  n 
) [static]

Compute zeropoint.

Parameters:
starslist of stars, flags are set to 1 iff star is used in final zeropoint computation
cutoffErejection parameter (magnitude)
cutoffkrejection parameter (magnitude)
dext_coeffextinction coefficient error
dcolor_termcolor coefficient error
dzeropoint(output) zeropoint stdev
n(output) number of stars used for zeropoint computation
Returns:
median zeropoint after rejection of negative outliers

Definition at line 760 of file fors_zeropoint_impl.c.

References assure, fors_star_delete(), fors_star_duplicate(), fors_star_equal(), fors_star_get_zeropoint(), fors_star_get_zeropoint_err(), fors_star_is_identified(), and zeropoint_inside().

Referenced by fors_zeropoint().

static cpl_error_code fors_zeropoint_astrometry ( const cpl_frameset *  std_cat_frames,
char  filter_band,
double  color_correct,
double  dcolor_correct,
const identify_method *  id_method,
fors_star_list *  extracted,
cpl_propertylist *  wcs_header,
fors_std_star_list **  std_cat,
cpl_image **  histogram 
) [static]

Load standard star catalogue(s) and do the astrometry.

Parameters:
std_cat_framesStandard star catalogue frames
filter_bandStandard star catalogue import: optical filter band
color_correctStandard star catalogue import: color correction term
dcolor_correctStandard star catalogue import: 1-sigma error of color correction term
id_methodFORS pipeline pattern identification method
extractedExtracted sources (modified)
wcs_headerWCS header (modified)
std_cat(Optional) output standard star catalogue, also provided in some error cases, can be NULL
Returns:
CPL error code
Output Details:
  • If a standard star catalogue could be loaded, it will be returned also in the case of error. This means, that it must always be deleted.

Definition at line 1107 of file fors_zeropoint_impl.c.

References assure, fors_identify(), fors_zeropoint_astrometry_apply_unidentified_xy2radec(), fors_zeropoint_astrometry_get_wcs_shift_px(), and fors_zeropoint_astrometry_shift_wcs_origin().

Referenced by fors_zeropoint().

static cpl_error_code fors_zeropoint_astrometry_get_wcs_shift_px ( const fors_star_list *  stars,
double *  dx,
double *  dy 
) [static]

Determine the median difference std_star.pixel - star.pixel.

Parameters:
starsStar list contain (at least partially) pointers to std stars
dx(Output) median x difference
dy(Output) median y difference
Returns:
CPL error code

Definition at line 1270 of file fors_zeropoint_impl.c.

Referenced by fors_zeropoint_astrometry().

static cpl_error_code fors_zeropoint_astrometry_shift_wcs_origin ( cpl_propertylist *  header,
double  dx,
double  dy 
) [static]

Shift the origin of the WCS in a 2-dimensional frame header.

Parameters:
headerFrame header
dxX shift in pixels
dyY shift in pixels
Returns:
CPL error code

Definition at line 1351 of file fors_zeropoint_impl.c.

References assure.

Referenced by fors_zeropoint_astrometry().

static cpl_error_code fors_zeropoint_astrometry_apply_unidentified_xy2radec ( fors_star_list *  stars,
const cpl_propertylist *  header 
) [static]

Create non-standard stars (using the fors_std_star object) connected to the star list entries and assign RA & DEC.

Parameters:
starsStar list
headerFrame header containing WCS
Returns:
Non-standard star list, NULL in the case of error

This means, that at the end for every star from the star-list the referenced standard-star-object should be deleted, then the existing standard-star-list object without deleting the entries, and finally the star-list-object.

Definition at line 1423 of file fors_zeropoint_impl.c.

References assure.

Referenced by fors_zeropoint_astrometry().

void fors_zeropoint_errorstate_dump_as_warning ( unsigned  self,
unsigned  first,
unsigned  last 
)

Dump one error state of the error history.

Parameters:
self
first
last

Definition at line 1567 of file fors_zeropoint_impl.c.

Referenced by fors_zeropoint().

void fors_zeropoint_define_parameters ( cpl_parameterlist *  parameters)

Define recipe parameters.

Parameters:
parametersparameter list to fill

Definition at line 124 of file fors_zeropoint_impl.c.

References fors_extract_define_parameters(), and fors_identify_define_parameters().

Referenced by fors_zeropoint_create(), and test_zeropoint().

void fors_zeropoint ( cpl_frameset *  frames,
const cpl_parameterlist *  parameters 
)
static bool zeropoint_inside ( const fors_star s,
void *  data 
) [static]

determine if zeropoint is inside cuts

Parameters:
sstar
datahi and lo cuts
Returns:
true iff the star's zeropoint is inside the given intervals

Definition at line 725 of file fors_zeropoint_impl.c.

References fors_star_get_zeropoint(), and fors_star_get_zeropoint_err().

Referenced by get_zeropoint().

int cpl_plugin_get_info ( cpl_pluginlist *  list)

Build the list of available plugins, for this module.

Parameters:
listThe plugin list
Returns:
0 if everything is ok, -1 otherwise

Create the recipe instance and make it available to the application using the interface. This function is exported.

Definition at line 62 of file fors_zeropoint.c.

References fors_get_license(), fors_get_version_binary(), fors_zeropoint_create(), fors_zeropoint_destroy(), and fors_zeropoint_exec().

static int fors_zeropoint_create ( cpl_plugin *  plugin) [static]

Setup the recipe options.

Parameters:
pluginThe plugin
Returns:
0 if everything is ok

Defining the command-line/configuration parameters for the recipe.

Definition at line 109 of file fors_zeropoint.c.

References fors_zeropoint_define_parameters().

Referenced by cpl_plugin_get_info().

static int fors_zeropoint_exec ( cpl_plugin *  plugin) [static]

Execute the plugin instance given by the interface.

Parameters:
pluginthe plugin
Returns:
0 if everything is ok

Definition at line 158 of file fors_zeropoint.c.

References fors_begin(), fors_end(), and fors_zeropoint().

Referenced by cpl_plugin_get_info().

static int fors_zeropoint_destroy ( cpl_plugin *  plugin) [static]

Destroy what has been created by the 'create' function.

Parameters:
pluginThe plugin
Returns:
0 if everything is ok

Definition at line 207 of file fors_zeropoint.c.

Referenced by cpl_plugin_get_info().