fors_recipe Recipe


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
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

Detailed Description

See recipe description for details.

Define Documentation

#define cleanup

Value:

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

Value:

do { \
    cpl_image_delete(smoothed); \
} while (0)

Definition at line 472 of file fors_img_screen_flat_impl.c.

#define cleanup

Value:

do { \
    cpl_image_delete(smoothed); \
} while (0)

Definition at line 472 of file fors_img_screen_flat_impl.c.

#define cleanup

Value:

do { \
    fors_image_delete(&image); \
} while (0)

Definition at line 472 of file fors_img_screen_flat_impl.c.


Function Documentation

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.

Parameters:
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, _fors_setting::binx, _fors_setting::biny, cleanup, 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.

Parameters:
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, cleanup, dfs_get_parameter_int_const(), fors_image_divide_noerr(), fors_image_flat_fit_create(), 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.

Parameters:
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, cleanup, conad, _fors_setting::exposure_time, 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_dic_version, fors_qc_end_group(), fors_qc_start_group(), fors_qc_write_group_heading(), fors_qc_write_qc_double(), and _fors_setting::instrument.

void fors_img_screen_flat_define_parameters ( cpl_parameterlist *  parameters  ) 

Define recipe parameters.

Parameters:
parameters parameter list to fill

Definition at line 96 of file fors_img_screen_flat_impl.c.

References fors_img_screen_flat_name, and 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.

Parameters:
frames input frames
parameters The parameters list
Returns:
0 if everything is ok

Definition at line 186 of file fors_img_screen_flat_impl.c.

References assure, cleanup, fors_dfs_save_image(), fors_frameset_extract(), fors_image_duplicate(), fors_image_load(), fors_image_load_list_const(), fors_img_screen_flat_name, 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.

Parameters:
list The 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_img_screen_flat.c.

References fors_get_version_binary(), fors_img_screen_flat_author, fors_img_screen_flat_create(), fors_img_screen_flat_description, fors_img_screen_flat_description_short, fors_img_screen_flat_destroy(), fors_img_screen_flat_email, fors_img_screen_flat_exec(), fors_img_screen_flat_name, and fors_license.

static int fors_img_screen_flat_create ( cpl_plugin *  plugin  )  [static]

Setup the recipe options.

Parameters:
plugin The plugin
Returns:
0 if everything is ok
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.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Definition at line 158 of file fors_img_screen_flat.c.

References fors_begin(), fors_end(), fors_img_screen_flat(), and fors_img_screen_flat_description_short.

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.

Parameters:
plugin The plugin
Returns:
0 if everything is ok

Definition at line 207 of file fors_img_screen_flat.c.

Referenced by cpl_plugin_get_info().


Variable Documentation

const char* const fors_img_screen_flat_description_short

Initial value:

 
"Compute master screen flat frame"

Definition at line 50 of file fors_img_screen_flat_impl.c.

Referenced by cpl_plugin_get_info(), and fors_img_screen_flat_exec().

const char* const fors_img_screen_flat_description

Initial value:

 
"After bias subtraction, the input flat field frames are combined using\n"
"the given stack method. The combined frame is finally normalised dividing\n"
"it by its large scale illumination trend. The large scale trend is obtained\n"
"by applying a median filter with a large kernel. To avoid boundary effects, \n"
"the median filter is applied only to the specified region.\n"
"The overscan regions, if present, are removed from the result.\n\n"
"Input files:\n"
"\n"
"  DO category:               Type:       Explanation:         Required:\n"
"  SCREEN_FLAT_IMG            Raw         Screen flat field    Y\n"
"  MASTER_BIAS                Raw         Master bias          Y\n"
"\n"
"Output files:\n\n"
"  DO category:               Data type:  Explanation:\n"
"  MASTER_SCREEN_FLAT_IMG     FITS image  Master screen flat field\n"

Definition at line 54 of file fors_img_screen_flat_impl.c.

Referenced by cpl_plugin_get_info().


Generated on Fri Mar 4 09:46:01 2011 for FORS Pipeline Reference Manual by  doxygen 1.4.7