Image source extraction


Data Structures

struct  _extract_method

Defines

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

Functions

static fors_star_list * extract_sex (const fors_image *image, const fors_setting *setting, const char *sex_exe, const char *sex_config, const char *sex_mag, const char *sex_magerr, int radius, fors_extract_sky_stats *sky_stats, cpl_image **background, cpl_table **extracted_sources)
 Extract sources using SExtractor.
static fors_star_list * extract_test (fors_extract_sky_stats *sky_stats, cpl_image **background, cpl_table **extracted_sources)
 Extract sources.
bool fors_extract_check_sex_flag (unsigned int sex_flag)
 Check SExtractor object feature: FLAG.
bool fors_extract_check_sex_star (const fors_star *star, const cpl_image *ref_img)
 Check a sextracted star for validity.
void fors_extract_define_parameters (cpl_parameterlist *parameters, const char *context)
 Define recipe parameters.
extract_method * fors_extract_method_new (const cpl_parameterlist *parameters, const char *context)
 Get extraction method from parameter list.
void fors_extract_method_delete (extract_method **em)
 Deallocate extraction method and set the pointer to NULL.
fors_star_list * fors_extract (const fors_image *image, const fors_setting *setting, const extract_method *em, fors_extract_sky_stats *sky_stats, cpl_image **background, cpl_table **extracted_sources)
 Extract sources.

Define Documentation

#define cleanup

Value:

do { \
    cpl_free((void *)name); \
} while (0)

Definition at line 835 of file fors/fors_extract.c.

#define cleanup

Value:

do { \
    cpl_table_delete(out); out = NULL; \
    cpl_free((void *)command); \
    cpl_image_delete(work_back); work_back = NULL; \
    cpl_image_delete(bmaxsigma); bmaxsigma = NULL; \
    cpl_image_delete(bsigma); bsigma = NULL; \
    fors_image_delete(&fbsigma); \
} while (0)

Definition at line 835 of file fors/fors_extract.c.


Function Documentation

static fors_star_list * extract_sex ( const fors_image image,
const fors_setting setting,
const char *  sex_exe,
const char *  sex_config,
const char *  sex_mag,
const char *  sex_magerr,
int  radius,
fors_extract_sky_stats sky_stats,
cpl_image **  background,
cpl_table **  extracted_sources 
) [static]

Extract sources using SExtractor.

Parameters:
image source image
setting instrument setting (gain)
sex_exe SExtractor executable
sex_config SExtractor configuration file
sex_mag SExtractor catalog magnitude
sex_magerr SExtractor catalog magnitude error
radius background error map median filter radius
sky_stats (output) statistics on determined sky
background (output) background image
extracted_sources (output) if non-NULL, SExtractor output table
Returns:
newly allocated list of stars
Note: The gain given in the setting must describe the image. Therefore, if the provided value of the gain is just the detector gain, the input image must not be stacked or normalized to e.g. 1s exposure time.

A background error map is given to SExtractor. This error map is obtained by applying a median filter to the input image error map (in order to remove sources).

Definition at line 419 of file fors/fors_extract.c.

References assure, _fors_setting::average_gain, _fors_setting::binx, _fors_setting::biny, _fors_setting::chip_id, cleanup, fors_extract_check_sex_flag(), fors_extract_check_sex_star(), fors_image_crop(), fors_image_delete(), fors_image_duplicate(), fors_image_filter_max_create(), fors_image_get_size_x(), fors_image_get_size_y(), fors_image_new(), fors_image_save_sex(), fors_star_delete(), fors_star_new_from_table(), fors_extract_sky_stats::mean, fors_extract_sky_stats::median, _fors_setting::pixel_scale, fors_extract_sky_stats::rms, and STDEV_PR_MAD.

Referenced by fors_extract().

static fors_star_list * extract_test ( fors_extract_sky_stats sky_stats,
cpl_image **  background,
cpl_table **  extracted_sources 
) [static]

Extract sources.

Parameters:
sky_stats (output) sky statistics
background (output) background
extracted_sources (output) if non-NULL, table of sources
Returns:
newly allocated list of extracted stars
The star positions are hardcoded!

This method is used only for testing without relying on external packages

Definition at line 850 of file fors/fors_extract.c.

References assure, fors_create_sources_table(), fors_star_new(), fors_extract_sky_stats::mean, fors_extract_sky_stats::median, and fors_extract_sky_stats::rms.

Referenced by fors_extract().

bool fors_extract_check_sex_flag ( unsigned int  sex_flag  ) 

Check SExtractor object feature: FLAG.

Parameters:
SExtractor object's binary contamination flags
Returns:
1 if successful, 0 on failure
All FLAGS 1, 2, 4, ..., 128 are severe enough that we do not want to use the source for photometry see SExtractor doc. for the meaning of each flag.

Definition at line 98 of file fors/fors_extract.c.

Referenced by extract_sex().

bool fors_extract_check_sex_star ( const fors_star star,
const cpl_image *  ref_img 
)

Check a sextracted star for validity.

Parameters:
star (S)Extracted star
ref_img (Optional) reference image (to check for image range)
Returns:
1 if successful, 0 on failure
The following SExtractor failures are caught:

Definition at line 120 of file fors/fors_extract.c.

References fors_star_check_values(), _fors_star::magnitude, and _fors_star::pixel.

Referenced by extract_sex(), and fors_photometry_read_input().

void fors_extract_define_parameters ( cpl_parameterlist *  parameters,
const char *  context 
)

Define recipe parameters.

Parameters:
parameters parameter list to fill
context parameters context

Definition at line 151 of file fors/fors_extract.c.

Referenced by fors_img_science_define_parameters(), and fors_zeropoint_define_parameters().

extract_method* fors_extract_method_new ( const cpl_parameterlist *  parameters,
const char *  context 
)

Get extraction method from parameter list.

Parameters:
parameters recipe parameter list
context read extraction method from this context
Returns:
newly allocated extraction method
The parameter list should have been previously created using fors_extract_define_parameters()

Definition at line 253 of file fors/fors_extract.c.

References assure, cleanup, dfs_get_parameter_int_const(), and dfs_get_parameter_string_const().

Referenced by fors_img_science(), and fors_zeropoint().

fors_star_list* fors_extract ( const fors_image image,
const fors_setting setting,
const extract_method *  em,
fors_extract_sky_stats sky_stats,
cpl_image **  background,
cpl_table **  extracted_sources 
)

Extract sources.

Parameters:
image source image
setting instrument setting (gain)
em extraction method to use
sky_stats (output) statistics on determined sky
background (output) inferred background image
extracted_sources (output) if non-NULL, table of extracted sources
Returns:
newly allocated list of extracted stars

Definition at line 355 of file fors/fors_extract.c.

Referenced by fors_img_science(), and fors_zeropoint().


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