Source identification


Data Structures

struct  _identify_method

Defines

#define cleanup
#define cleanup
#define cleanup

Functions

static bool inside_region (const fors_std_star *std, void *reg)
 Determine if star is inside region.
static void match_patterns (const fors_star_list *stars, const fors_std_star_list *std, double kappa, double *sx_00, double *sy_00, double *med_scale, double *med_angle, int *status)
 Match patterns.
void fors_identify_define_parameters (cpl_parameterlist *parameters, const char *context)
 Define recipe parameters.
identify_method * fors_identify_method_new (const cpl_parameterlist *parameters, const char *context)
 Get id method from parameter list.
void fors_identify_method_delete (identify_method **em)
 Deallocate identifyion method and set the pointer to NULL.
static bool std_brighter_than (const fors_std_star *s1, void *s2)
 Compare brightness.
static bool star_brighter_than (const fors_star *s1, void *s2)
 Compare brightness.
static double distsq_shift (const fors_star *s, const fors_std_star *std, double shiftx, double shifty)
 Distance between source and shifted catalog star.
static bool star_nearer (const fors_star *s1, const fors_star *s2, void *data)
 Tell if a source is closest to a catalog star.
void fors_identify (fors_star_list *stars, fors_std_star_list *cat, const identify_method *im)
 Identify sources.

Define Documentation

#define cleanup

Value:

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

Definition at line 743 of file fors_identify.c.

#define cleanup

Value:

do { \
    fors_std_star_list_delete(&std_ccd       , fors_std_star_delete); \
    fors_std_star_list_delete(&std_ccd_bright, fors_std_star_delete); \
    fors_star_list_delete(&source_bright, fors_star_delete); \
} while (0)

Definition at line 743 of file fors_identify.c.

#define cleanup

Value:

do { \
    fors_point_list_delete(&std_points, fors_point_delete); \
    fors_point_list_delete(&source_points, fors_point_delete); \
    fors_pattern_list_delete(&std_patterns, fors_pattern_delete); \
    fors_pattern_list_delete(&source_patterns, fors_pattern_delete); \
    double_list_delete(&scales, double_delete); \
    double_list_delete(&angles, double_delete); \
    double_list_delete(&angle_cos, double_delete); \
    double_list_delete(&angle_sin, double_delete); \
    double_list_delete(&match_dist, double_delete); \
    double_list_delete(&shiftx, double_delete); \
    double_list_delete(&shifty, double_delete); \
} while (0)

Definition at line 743 of file fors_identify.c.


Function Documentation

static bool inside_region ( const fors_std_star *  std,
void *  reg 
) [static]

Determine if star is inside region.

Parameters:
std star
reg rectangular region, see code for the required type
Returns:
true iff the star's pixel coordinates are inside the given region

Definition at line 727 of file fors_identify.c.

Referenced by fors_identify().

static void match_patterns ( const fors_star_list *  stars,
const fors_std_star_list *  std,
double  kappa,
double *  sx_00,
double *  sy_00,
double *  med_scale,
double *  med_angle,
int *  status 
) [static]

Match patterns.

Parameters:
stars sources
std reference stars
sx_00 (output) shift in x
sy_00 (output) shift in y
med_scale (output) median scale
med_angle (output) median angle
For now, the shifts are approximated with constant 2d polynomials as function of detector (x, y) position.

This function could be extended to fit 2d polynomials of degree > 0, if necessary.

Definition at line 774 of file fors_identify.c.

References assure, cleanup, fors_angle_diff(), fors_point_new(), fors_star_extension(), _fors_star::pixel, and STDEV_PR_MAD.

Referenced by fors_identify().

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

Define recipe parameters.

Parameters:
parameters parameter list to fill
context parameters context

Definition at line 82 of file fors_identify.c.

Referenced by fors_zeropoint_define_parameters(), and test_identify().

identify_method* fors_identify_method_new ( const cpl_parameterlist *  parameters,
const char *  context 
)

Get id method from parameter list.

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

Definition at line 187 of file fors_identify.c.

References assure, dfs_get_parameter_double_const(), and dfs_get_parameter_int_const().

Referenced by fors_zeropoint(), and test_identify().

static bool std_brighter_than ( const fors_std_star *  s1,
void *  s2 
) [static]

Compare brightness.

Parameters:
s1 1st star
s2 2nd star
Returns:
true if s1 is brighter than s2
This function is the same as fors_std_star_brighter_than() but with the interface expected by list_extract()

Definition at line 263 of file fors_identify.c.

Referenced by fors_identify().

static bool star_brighter_than ( const fors_star s1,
void *  s2 
) [static]

Compare brightness.

Parameters:
s1 1st star
s2 2nd star
Returns:
true if s1 is brighter than s2
This function is the same as fors_star_brighter_than() but with the interface expected by list_extract()

Definition at line 279 of file fors_identify.c.

References fors_star_brighter_than().

Referenced by fors_identify().

static double distsq_shift ( const fors_star s,
const fors_std_star *  std,
double  shiftx,
double  shifty 
) [static]

Distance between source and shifted catalog star.

Parameters:
s source
std catalog star
shiftx shift applied to std
shifty shift applied to std
Returns:
squared distance between source and shifted catalog star

Definition at line 294 of file fors_identify.c.

References fors_point_delete(), fors_point_distsq(), fors_point_new(), and _fors_star::pixel.

Referenced by fors_identify(), and star_nearer().

static bool star_nearer ( const fors_star s1,
const fors_star s2,
void *  data 
) [static]

Tell if a source is closest to a catalog star.

Parameters:
s1 1st source
s2 2nd source
d radius, shift, catalog star
Returns:
true s1 is closer than s2 to reference, after shifting the reference star

Definition at line 318 of file fors_identify.c.

References distsq_shift().

Referenced by fors_identify().

void fors_identify ( fors_star_list *  stars,
fors_std_star_list *  cat,
const identify_method *  im 
)

Identify sources.

Parameters:
stars list of stars to identify
cat list of catalog stars
im parameters
pseudocode: Select catalog stars, 10 brightest stars inside CCD Select source stars, brightest 2 x catalog stars Compute reference patterns Compute source patterns For each reference pattern Identify with nearest source, compute scale, orientation Reject outliers, get average shift

For each catalog star Apply shift Identify with nearest source inside search radius

Definition at line 361 of file fors_identify.c.

References assure, cleanup, distsq_shift(), fors_star_brighter_than(), fors_star_duplicate(), fors_star_get_x(), fors_star_get_y(), fors_star_print_list(), inside_region(), kth(), match_patterns(), star_brighter_than(), star_nearer(), and std_brighter_than().

Referenced by fors_zeropoint_astrometry(), and test_identify().


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