FORS Pipeline Reference Manual 4.9.20
|
Defines | |
#define | cleanup |
#define | cleanup |
#define | cleanup |
#define | cleanup |
Functions | |
static void | remove_large_scale (fors_image *master_screen_flat, const cpl_parameterlist *parameters, const char *context, const fors_setting *setting) |
Fit and divide out large scale structure. | |
static void | remove_large_scale_fit (fors_image *master_screen_flat, const cpl_parameterlist *parameters, const char *context, const fors_setting *setting) |
Fit and divide out large scale structure. | |
static void | write_qc (cpl_propertylist *qc, const cpl_frame *first_raw_frame, const fors_image_list *sflats, const fors_image *master_sflat, const fors_setting *setting, double saturation) |
Compute QC. | |
void | fors_img_screen_flat_define_parameters (cpl_parameterlist *parameters) |
Define recipe parameters. | |
void | fors_img_screen_flat (cpl_frameset *frames, const cpl_parameterlist *parameters) |
Do the processing. | |
int | cpl_plugin_get_info (cpl_pluginlist *list) |
Build the list of available plugins, for this module. | |
static int | fors_img_screen_flat_create (cpl_plugin *plugin) |
Setup the recipe options. | |
static int | fors_img_screen_flat_exec (cpl_plugin *plugin) |
Execute the plugin instance given by the interface. | |
static int | fors_img_screen_flat_destroy (cpl_plugin *plugin) |
Destroy what has been created by the 'create' function. | |
Variables | |
const char *const | fors_img_screen_flat_name = "fors_img_screen_flat" |
const char *const | fors_img_screen_flat_description_short = "Compute master screen flat frame" |
const char *const | fors_img_screen_flat_author = "Jonas M. Larsen" |
const char *const | fors_img_screen_flat_email = PACKAGE_BUGREPORT |
const char *const | fors_img_screen_flat_description = " MASTER_SCREEN_FLAT_IMG FITS image Master screen flat field\n" |
See recipe description for details.
#define cleanup |
do { \ cpl_frameset_delete(sflat_frames); \ fors_setting_delete(&setting); \ cpl_frameset_delete(master_bias_frame); \ fors_image_delete_const(&master_bias); \ fors_stack_method_delete(&sm); \ cpl_free((void *)context); \ fors_image_delete(&master_screen_flat); \ fors_image_delete(&master_norm_flat); \ fors_image_list_delete_const(&sflats, fors_image_delete); \ cpl_propertylist_delete(qc); \ } while (0)
Definition at line 472 of file fors_img_screen_flat_impl.c.
#define cleanup |
do { \ cpl_image_delete(smoothed); \ } while (0)
Definition at line 472 of file fors_img_screen_flat_impl.c.
#define cleanup |
do { \ cpl_image_delete(smoothed); \ } while (0)
Definition at line 472 of file fors_img_screen_flat_impl.c.
#define cleanup |
do { \ fors_image_delete(&image); \ } while (0)
Definition at line 472 of file fors_img_screen_flat_impl.c.
static void remove_large_scale | ( | fors_image * | master_screen_flat, |
const cpl_parameterlist * | parameters, | ||
const char * | context, | ||
const fors_setting * | setting | ||
) | [static] |
Fit and divide out large scale structure.
master_screen_flat | pre-normalized screen flat image |
parameters | smoothing parameters |
context | read parameters from this context |
setting | instrument setting |
This function applies a median filter to the screen flat field image. The master screen flat field is then divided by this smoothed image which removes large scale structure and normalizes the flat field to one.
To avoid dealing with correlated noise, the obtained smoothed image is assumed to be effectively noiseless. For a median filter window size of only 11x11, this assumption introduces a relative error in the error bars of only ~ 1/sqrt(11x11) = 10 %.
Definition at line 299 of file fors_img_screen_flat_impl.c.
References assure, dfs_get_parameter_int_const(), fors_image_divide_noerr(), fors_image_filter_median_create(), fors_image_get_size_x(), fors_image_get_size_y(), and remove_large_scale_fit().
Referenced by fors_img_screen_flat().
static void remove_large_scale_fit | ( | fors_image * | master_screen_flat, |
const cpl_parameterlist * | parameters, | ||
const char * | context, | ||
const fors_setting * | setting | ||
) | [static] |
Fit and divide out large scale structure.
master_screen_flat | pre-normalized screen flat image |
parameters | fitting parameters |
context | read parameters from this context |
setting | instrument setting |
This function fits the illuminated part of the screen flat field frame with a low degree polynomial. The input frame is then divided by this fit-smoothed image which removes large scale structure and normalizes the flat field to one.
To avoid dealing with correlated noise, the obtained smoothed image is assumed to be effectively noiseless.
Definition at line 407 of file fors_img_screen_flat_impl.c.
References assure, dfs_get_parameter_int_const(), fors_image_divide_noerr(), and fors_image_get_median().
Referenced by remove_large_scale().
static void write_qc | ( | cpl_propertylist * | qc, |
const cpl_frame * | first_raw_frame, | ||
const fors_image_list * | sflats, | ||
const fors_image * | master_sflat, | ||
const fors_setting * | setting, | ||
double | saturation | ||
) | [static] |
Compute QC.
qc | write to this list |
sflats | raw flats (already bias subtracted) |
setting | instrument setting |
saturation | previously computed saturation percentage |
Definition at line 485 of file fors_img_screen_flat_impl.c.
References assure, fors_fixed_pattern_noise(), fors_image_crop(), fors_image_delete(), fors_image_divide(), fors_image_divide_scalar(), fors_image_duplicate(), fors_image_get_data_const(), fors_image_get_mean(), fors_image_get_median(), fors_image_get_size_x(), fors_image_get_size_y(), fors_image_get_stdev(), fors_image_multiply_scalar(), fors_image_square(), fors_image_subtract(), fors_image_subtract_scalar(), fors_qc_end_group(), fors_qc_start_group(), fors_qc_write_group_heading(), and fors_qc_write_qc_double().
Referenced by fors_bias(), and fors_img_screen_flat().
void fors_img_screen_flat_define_parameters | ( | cpl_parameterlist * | parameters | ) |
Define recipe parameters.
parameters | parameter list to fill |
Definition at line 96 of file fors_img_screen_flat_impl.c.
References fors_stack_define_parameters().
Referenced by fors_img_screen_flat_create(), and test_img_screen_flat().
void fors_img_screen_flat | ( | cpl_frameset * | frames, |
const cpl_parameterlist * | parameters | ||
) |
Do the processing.
frames | input frames |
parameters | The parameters list |
Definition at line 186 of file fors_img_screen_flat_impl.c.
References assure, fors_dfs_save_image(), fors_frameset_extract(), fors_image_duplicate(), fors_image_load(), fors_image_load_list_const(), fors_setting_new(), fors_stack_const(), fors_stack_method_new(), remove_large_scale(), and write_qc().
Referenced by fors_img_screen_flat_exec(), and test_img_screen_flat().
int cpl_plugin_get_info | ( | cpl_pluginlist * | list | ) |
Build the list of available plugins, for this module.
list | The plugin list |
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_img_screen_flat.c.
References fors_get_license(), fors_get_version_binary(), fors_img_screen_flat_create(), fors_img_screen_flat_destroy(), and fors_img_screen_flat_exec().
static int fors_img_screen_flat_create | ( | cpl_plugin * | plugin | ) | [static] |
Setup the recipe options.
plugin | The plugin |
Defining the command-line/configuration parameters for the recipe.
Definition at line 109 of file fors_img_screen_flat.c.
References fors_img_screen_flat_define_parameters().
Referenced by cpl_plugin_get_info().
static int fors_img_screen_flat_exec | ( | cpl_plugin * | plugin | ) | [static] |
Execute the plugin instance given by the interface.
plugin | the plugin |
Definition at line 158 of file fors_img_screen_flat.c.
References fors_begin(), fors_end(), and fors_img_screen_flat().
Referenced by cpl_plugin_get_info().
static int fors_img_screen_flat_destroy | ( | cpl_plugin * | plugin | ) | [static] |
Destroy what has been created by the 'create' function.
plugin | The plugin |
Definition at line 207 of file fors_img_screen_flat.c.
Referenced by cpl_plugin_get_info().