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, cpl_image **histogram)
 Identify sources.

Define Documentation

#define cleanup
Value:
do { \
    cpl_free((void *)name); \
} while (0)

Definition at line 992 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 992 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 992 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 976 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 1023 of file fors_identify.c.

References assure, fors_angle_diff(), fors_point_new(), and fors_star_extension().

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 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 193 of file fors_identify.c.

References assure, and dfs_get_parameter_double_const().

Referenced by 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 274 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 290 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 305 of file fors_identify.c.

References fors_point_delete(), fors_point_distsq(), and fors_point_new().

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 329 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,
cpl_image **  histogram 
)

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 372 of file fors_identify.c.

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

Referenced by test_identify().


Generated on 12 Feb 2016 for FORS Pipeline Reference Manual by  doxygen 1.6.1