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) |
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 |
#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); \ cpl_propertylist_delete(product_header); \ cpl_propertylist_delete(raw_header); \ } while (0)
Definition at line 1517 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 1517 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 1517 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 1517 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 1517 of file fors_zeropoint_impl.c.
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.
stars | list of stars, flags are set to 1 iff star is used in final zeropoint computation | |
cutoffE | rejection parameter (magnitude) | |
cutoffk | rejection parameter (magnitude) | |
dext_coeff | extinction coefficient error | |
dcolor_term | color coefficient error | |
dzeropoint | (output) zeropoint stdev | |
n | (output) number of stars used for zeropoint computation |
Definition at line 721 of file fors_zeropoint_impl.c.
References assure, cleanup, fors_star_delete(), fors_star_duplicate(), fors_star_equal(), fors_star_get_zeropoint(), fors_star_get_zeropoint_err(), fors_star_is_identified(), _fors_star::id, _fors_star::weight, 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 | |||
) | [static] |
Load standard star catalogue(s) and do the astrometry.
std_cat_frames | Standard star catalogue frames | |
filter_band | Standard star catalogue import: optical filter band | |
color_correct | Standard star catalogue import: color correction term | |
dcolor_correct | Standard star catalogue import: 1-sigma error of color correction term | |
id_method | FORS pipeline pattern identification method | |
extracted | Extracted sources (modified) | |
wcs_header | WCS header (modified) | |
std_cat | (Optional) output standard star catalogue, also provided in some error cases, can be NULL |
Definition at line 1068 of file fors_zeropoint_impl.c.
References assure, cleanup, fors_identify(), fors_zeropoint_astrometry_apply_unidentified_xy2radec(), fors_zeropoint_astrometry_get_wcs_shift_px(), fors_zeropoint_astrometry_shift_wcs_origin(), and _fors_star::id.
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.
stars | Star list contain (at least partially) pointers to std stars | |
dx | (Output) median x difference | |
dy | (Output) median y difference |
Definition at line 1229 of file fors_zeropoint_impl.c.
References cleanup, _fors_star::id, and _fors_star::pixel.
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.
header | Frame header | |
dx | X shift in pixels | |
dy | Y shift in pixels |
Definition at line 1310 of file fors_zeropoint_impl.c.
References assure, and cleanup.
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.
stars | Star list | |
header | Frame header containing WCS |
Definition at line 1382 of file fors_zeropoint_impl.c.
References assure, cleanup, _fors_star::id, and _fors_star::pixel.
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.
self | ||
first | ||
last |
Definition at line 1526 of file fors_zeropoint_impl.c.
Referenced by fors_zeropoint().
void fors_zeropoint_define_parameters | ( | cpl_parameterlist * | parameters | ) |
Define recipe parameters.
parameters | parameter list to fill |
Definition at line 124 of file fors_zeropoint_impl.c.
References fors_extract_define_parameters(), fors_identify_define_parameters(), and fors_zeropoint_name.
Referenced by fors_zeropoint_create(), and test_zeropoint().
void fors_zeropoint | ( | cpl_frameset * | frames, | |
const cpl_parameterlist * | parameters | |||
) |
Do the processing.
frames | input frames | |
parameters | recipe parameters |
Definition at line 202 of file fors_zeropoint_impl.c.
References assure, cleanup, dfs_get_parameter_double_const(), dfs_save_image(), _fors_setting::exposure_time, _fors_setting::filter_name, fors_create_sources_table(), fors_dfs_add_exptime(), fors_dfs_add_wcs(), fors_dfs_save_image(), fors_dfs_save_table(), fors_extract(), fors_extract_method_new(), fors_frameset_extract(), fors_get_airmass(), fors_identify_method_new(), fors_image_delete(), fors_image_delete_const(), fors_image_divide(), fors_image_divide_scalar(), fors_image_draw(), fors_image_get_median(), fors_image_get_min(), fors_image_load(), FORS_PFITS_EXPOSURE_TIME, fors_qc_dic_version, fors_qc_end_group(), fors_qc_start_group(), fors_qc_write_group_heading(), fors_qc_write_qc_double(), fors_qc_write_qc_int(), fors_setting_new(), fors_star_ext_corr(), fors_zeropoint_astrometry(), fors_zeropoint_errorstate_dump_as_warning(), fors_zeropoint_name, get_zeropoint(), _fors_star::id, _fors_setting::instrument, _fors_star::pixel, and _fors_setting::version.
Referenced by fors_zeropoint_exec(), and test_zeropoint().
static bool zeropoint_inside | ( | const fors_star * | s, | |
void * | data | |||
) | [static] |
determine if zeropoint is inside cuts
s | star | |
data | hi and lo cuts |
Definition at line 686 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.
list | The plugin list |
Definition at line 62 of file fors_zeropoint.c.
References fors_get_version_binary(), fors_license, fors_zeropoint_author, fors_zeropoint_create(), fors_zeropoint_description, fors_zeropoint_description_short, fors_zeropoint_destroy(), fors_zeropoint_email, fors_zeropoint_exec(), and fors_zeropoint_name.
static int fors_zeropoint_create | ( | cpl_plugin * | plugin | ) | [static] |
Setup the recipe options.
plugin | The plugin |
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.
plugin | the plugin |
Definition at line 158 of file fors_zeropoint.c.
References fors_begin(), fors_end(), fors_zeropoint(), and fors_zeropoint_description_short.
Referenced by cpl_plugin_get_info().
static int fors_zeropoint_destroy | ( | cpl_plugin * | plugin | ) | [static] |
Destroy what has been created by the 'create' function.
plugin | The plugin |
Definition at line 207 of file fors_zeropoint.c.
Referenced by cpl_plugin_get_info().
const char* const fors_zeropoint_description |
Initial value:
"Input files:\n" " DO category: Type: Explanation: Number:\n" " STANDARD_IMG FITS image Phot. standard field 1\n" " MASTER_BIAS FITS image Master bias 1\n" " MASTER_SKY_FLAT_IMG FITS image Master sky flatfield 1\n" " FLX_STD_IMG FITS table Standard star catalog 1+\n" " PHOT_TABLE FITS table Filter ext. coeff, color 1\n" "\n" "Output files:\n" " DO category: Data type: Explanation:\n" " SOURCES_STD_IMG FITS image Unfiltered SExtractor output\n" " ALIGNED_PHOT FITS table\n" " PHOT_BACKGROUND_STD_IMG FITS image Reduced science image background\n" " STANDARD_REDUCED_IMG FITS image Reduced std image\n"
Definition at line 63 of file fors_zeropoint_impl.c.
Referenced by cpl_plugin_get_info().