FORS Pipeline Reference Manual  5.0.9
Macros | Functions
star

Macros

#define cleanup
 
#define cleanup
 
#define cleanup   fors_star_delete(&s)
 
#define cleanup
 
#define cleanup
 
#define cleanup
 
#define cleanup
 
#define cleanup
 
#define cleanup
 
#define cleanup
 
#define LIST_DEFINE
 
#define LIST_ELEM   fors_star
 

Functions

static double _get_optional_table_value (const cpl_table *tab, unsigned int row, const char *colname)
 Get a double value from a table. More...
 
fors_starfors_star_new (double x, double y, double fwhm, double smajor, double sminor, double orientation, double m, double dm, double si)
 Constructor. More...
 
fors_starfors_star_new_from_table (const cpl_table *tab, unsigned int row, const char *x_col, const char *y_col, const char *fwhm_col, const char *smaj_col, const char *smin_col, const char *theta_col, const char *mag_col, const char *dmag_col, const char *stlndx_col)
 Create a star from a table WITHOUT checking. More...
 
bool fors_star_check_values (const fors_star *star)
 Copy constructor. More...
 
fors_starfors_star_duplicate (const fors_star *star)
 Copy constructor. More...
 
void fors_star_delete (fors_star **star)
 Delete object and set pointer to NULL. More...
 
void fors_star_delete_but_standard (fors_star **star)
 Delete object and set pointer to NULL - but ignore the standard star. More...
 
bool fors_star_equal (const fors_star *s, const fors_star *t)
 Test for equality. More...
 
bool fors_star_brighter_than (const fors_star *s1, const fors_star *s2, void *data)
 Compare star brightness. More...
 
double fors_star_distsq (const fors_star *s, const fors_star *t)
 Get distance between stars. More...
 
double fors_star_extension (const fors_star *s, void *data)
 Get star size. More...
 
double fors_star_stellarity (const fors_star *s, void *data)
 Get star stellarity. More...
 
double fors_star_ellipticity (const fors_star *s, void *data)
 Get star ellipticity. More...
 
void fors_star_print (cpl_msg_severity level, const fors_star *s)
 Print object. More...
 
void fors_star_print_list (cpl_msg_severity level, const fors_star_list *sl)
 Print list of stars. More...
 
double fors_star_get_x (const fors_star *s, void *data)
 Get position. More...
 
double fors_star_get_y (const fors_star *s, void *data)
 Get position. More...
 
double fors_star_get_zeropoint (const fors_star *s, void *data)
 Get zeropoint. More...
 
double fors_star_get_zeropoint_err (const fors_star *s, void *data)
 Get zeropoint error. More...
 
bool fors_star_is_identified (const fors_star *s, void *data)
 Determine if star was identified. More...
 

Detailed Description

A data type used to represent stars on a CCD (position, magnitude, etc.)

Function Documentation

static double _get_optional_table_value ( const cpl_table *  tab,
unsigned int  row,
const char *  colname 
)
static

Get a double value from a table.

Parameters
rowInput row
name(Optional) Column name, can be NULL
Returns
The value, 0.0 if no column name was specified or on error

Definition at line 73 of file fors_star.c.

References assure.

Referenced by fors_star_new_from_table().

fors_star* fors_star_new ( double  x,
double  y,
double  fwhm,
double  smajor,
double  sminor,
double  orientation,
double  m,
double  dm,
double  si 
)

Constructor.

Parameters
x1st coordinate
y2nd coordinate
fwhmfull width half maximum
smajorsemi-major axis length
sminorsemi-minor axis length
orientationangle between semi-major axis and x-axis
mmagnitude
dmmagnitude error
sistellarity index
Returns
newly allocated star

Definition at line 114 of file fors_star.c.

References assure, and fors_point_new().

Referenced by extract_test(), and test_identify().

fors_star* fors_star_new_from_table ( const cpl_table *  tab,
unsigned int  row,
const char *  x_col,
const char *  y_col,
const char *  fwhm_col,
const char *  smaj_col,
const char *  smin_col,
const char *  theta_col,
const char *  mag_col,
const char *  dmag_col,
const char *  stlndx_col 
)

Create a star from a table WITHOUT checking.

Parameters
tabInput table
rowInput row index
x_col(Optional) x column name
y_col(Optional) y column name
fwhm_col(Optional) fwhm column name
smaj_col(Optional) s_major column name
smin_col(Optional) s_minor column name
theta_col(Optional) orientation column name
mag_col(Optional) magnitude column name
dmag_col(Optional) magnitude error column name
stlndx_col(Optional) stellar index column name
Returns
newly allocated star

Definition at line 170 of file fors_star.c.

References _get_optional_table_value(), assure, and fors_point_new().

Referenced by extract_sex().

bool fors_star_check_values ( const fors_star star)

Copy constructor.

Parameters
starInput star
Returns
1 if successful, 0 on error

Definition at line 227 of file fors_star.c.

Referenced by fors_extract_check_sex_star().

fors_star* fors_star_duplicate ( const fors_star star)

Copy constructor.

Parameters
starto duplicate
Returns
newly allocated star

Definition at line 248 of file fors_star.c.

References assure, and fors_point_duplicate().

Referenced by fors_identify(), and test_identify().

void fors_star_delete ( fors_star **  star)

Delete object and set pointer to NULL.

Parameters
starto delete

Definition at line 273 of file fors_star.c.

References fors_point_delete().

Referenced by extract_sex(), and test_identify().

void fors_star_delete_but_standard ( fors_star **  star)

Delete object and set pointer to NULL - but ignore the standard star.

Parameters
starto delete

Definition at line 291 of file fors_star.c.

References fors_point_delete().

bool fors_star_equal ( const fors_star s,
const fors_star t 
)

Test for equality.

Parameters
s1st star
t2nd star
Returns
true if and only if the two stars compare equal

Definition at line 309 of file fors_star.c.

References assure, and fors_point_equal().

Referenced by test_identify().

bool fors_star_brighter_than ( const fors_star s1,
const fors_star s2,
void *  data 
)

Compare star brightness.

Parameters
s11st star
s22nd star
datanot used
Returns
true iff s1 is brighter than s2

Definition at line 329 of file fors_star.c.

Referenced by fors_identify(), and star_brighter_than().

double fors_star_distsq ( const fors_star s,
const fors_star t 
)

Get distance between stars.

Parameters
s1st star
t2nd star
Returns
squared distance between stars

Definition at line 347 of file fors_star.c.

References assure, and fors_point_distsq().

double fors_star_extension ( const fors_star s,
void *  data 
)

Get star size.

Parameters
sstar
datanot used
Returns
average extension (one sigma)

Definition at line 365 of file fors_star.c.

References assure.

Referenced by match_patterns().

double fors_star_stellarity ( const fors_star s,
void *  data 
)

Get star stellarity.

Parameters
sstar
datanot used
Returns
stellarity index

Definition at line 384 of file fors_star.c.

References assure.

double fors_star_ellipticity ( const fors_star s,
void *  data 
)

Get star ellipticity.

Parameters
sstar
datanot used
Returns
geometric average of semi major/minor axes length

Definition at line 402 of file fors_star.c.

References assure.

Referenced by fors_create_sources_table().

void fors_star_print ( cpl_msg_severity  level,
const fors_star s 
)

Print object.

Parameters
levelmessage level
sto print at the info level

Definition at line 418 of file fors_star.c.

Referenced by fors_star_print_list().

void fors_star_print_list ( cpl_msg_severity  level,
const fors_star_list *  sl 
)

Print list of stars.

Parameters
levelmessage level
sllist to print

Definition at line 443 of file fors_star.c.

References fors_star_print().

Referenced by fors_identify().

double fors_star_get_x ( const fors_star s,
void *  data 
)

Get position.

Parameters
sstar
datanot used
Returns
x-position

Definition at line 467 of file fors_star.c.

References assure.

Referenced by fors_identify().

double fors_star_get_y ( const fors_star s,
void *  data 
)

Get position.

Parameters
sstar
datanot used
Returns
y-position

Definition at line 485 of file fors_star.c.

References assure.

Referenced by fors_identify().

double fors_star_get_zeropoint ( const fors_star s,
void *  data 
)

Get zeropoint.

Parameters
sstar, must be identified
datanot used
Returns
zeropoint

Definition at line 504 of file fors_star.c.

References assure.

Referenced by fors_create_sources_table().

double fors_star_get_zeropoint_err ( const fors_star s,
void *  data 
)

Get zeropoint error.

Parameters
sstar, must be identified
datanot used
Returns
zeropoint error

Definition at line 522 of file fors_star.c.

References assure.

Referenced by fors_create_sources_table().

bool fors_star_is_identified ( const fors_star s,
void *  data 
)

Determine if star was identified.

Parameters
sstar
datanot used
Returns
true iff star is identified

Definition at line 541 of file fors_star.c.

References assure.