Simulate data for unit testing


Defines

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

Functions

static cpl_frame * frame_new (const char *filename, const char *tag, cpl_frame_group group)
 Frame constructor.
void create_standard_keys (cpl_propertylist *header, double exptime)
 Write FORS standard keywords to simulated header.
cpl_frame * create_bias (const char *filename, const char *tag, cpl_frame_group group)
 Simulate bias image.
cpl_frame * create_dark (const char *filename, const char *tag, cpl_frame_group group)
 Simulate dark image.
cpl_frame * create_screen_flat (const char *filename, const char *tag, cpl_frame_group group)
 Simulate screen flat image.
cpl_frame * create_sky_flat (const char *filename, const char *tag, cpl_frame_group group, double exptime)
 Simulate sky flat image.
cpl_frame * create_standard (const char *filename, const char *tag, cpl_frame_group group)
 Create standard star image.
cpl_frame * create_std_cat (const char *filename, const char *tag, cpl_frame_group group)
 Create standard star catalogue.
cpl_frame * create_phot_table (const char *filename, const char *tag, cpl_frame_group group)
 Create photometry table.

Variables

static const int det_nx = 400
static const int det_ny = 400
static const int binx = 2
static const int biny = 2
static const double ron = 4.0
static const double conad = 0.78
static const double bias_avg = 200
static const double dark_avg = 50
static const char *const instrume = "fors2"
static const char *const chip_id = "Test chip 234"
static const char *const read_clock = "200Kps/2ports/low_gain"

Detailed Description

Note: The images simulated here are not meant to be realistic. The purpose is to test the software's behaviour on known input before introducing the complexity of real world data.

Define Documentation

#define cleanup
 

Value:

do { \
    fors_image_delete(&bias); \
    cpl_propertylist_delete(header); \
} while(0)

Definition at line 479 of file test_simulate.c.

#define cleanup
 

Value:

do { \
    fors_image_delete(&dark); \
    cpl_propertylist_delete(header); \
} while(0)

Definition at line 479 of file test_simulate.c.

#define cleanup
 

Value:

do { \
    fors_image_delete(&sflat); \
    cpl_propertylist_delete(header); \
} while(0)

Definition at line 479 of file test_simulate.c.

#define cleanup
 

Value:

do { \
    fors_image_delete(&sflat); \
    cpl_propertylist_delete(header); \
} while(0)

Definition at line 479 of file test_simulate.c.

#define cleanup
 

Value:

do { \
    cpl_table_delete(t); \
} while(0)

Definition at line 479 of file test_simulate.c.

#define cleanup
 

Value:

do { \
    cpl_table_delete(t); \
} while(0)

Definition at line 479 of file test_simulate.c.


Function Documentation

static cpl_frame* frame_new const char *  filename,
const char *  tag,
cpl_frame_group  group
[static]
 

Frame constructor.

Parameters:
filename frame filename
tag frame tag
group frame group
Returns:
newly callocated frame with the given contents

Definition at line 75 of file test_simulate.c.

void create_standard_keys cpl_propertylist *  header,
double  exptime
 

Write FORS standard keywords to simulated header.

Parameters:
header to update
exptime exposure time (s), possibly zero

Definition at line 92 of file test_simulate.c.

References binx, biny, chip_id, conad, det_nx, det_ny, FORS_PFITS_AIRMASS_END, FORS_PFITS_AIRMASS_START, FORS_PFITS_BINX, FORS_PFITS_BINY, FORS_PFITS_CHIP_ID, FORS_PFITS_CONAD, FORS_PFITS_DET_NX, FORS_PFITS_DET_NY, FORS_PFITS_EXPOSURE_TIME, FORS_PFITS_FILTER_NAME, FORS_PFITS_INSTRUME, FORS_PFITS_OUTPUTS, FORS_PFITS_OVERSCANX, FORS_PFITS_OVERSCANY, FORS_PFITS_PIXSCALE, FORS_PFITS_PRESCANX, FORS_PFITS_PRESCANY, FORS_PFITS_READ_CLOCK, FORS_PFITS_RON, instrume, read_clock, and ron.

Referenced by create_bias(), create_dark(), create_screen_flat(), create_sky_flat(), test_image(), and test_photometry().

cpl_frame* create_bias const char *  filename,
const char *  tag,
cpl_frame_group  group
 

Simulate bias image.

Parameters:
filename save to this file
tag output frame tag
tag output frame group
Returns:
bias frame
Model: constant + gaussian noise, rounded to nearest integer

Definition at line 181 of file test_simulate.c.

References bias_avg, binx, biny, create_standard_keys(), det_nx, det_ny, FORS_IMAGE_TYPE, FORS_PFITS_FILTER_NAME, fors_rand_gauss(), and ron.

Referenced by test_bias(), test_img_science(), test_stack(), and test_zeropoint().

cpl_frame* create_dark const char *  filename,
const char *  tag,
cpl_frame_group  group
 

Simulate dark image.

Parameters:
filename save to this file
tag output frame tag
tag output frame group
Returns:
dark frame
Model: bias + dark(x,y) Variance = ron**2 + dark(x,y)/conad

Definition at line 233 of file test_simulate.c.

References bias_avg, binx, biny, conad, create_standard_keys(), dark_avg, det_nx, det_ny, FORS_IMAGE_TYPE, fors_rand_gauss(), and ron.

Referenced by test_dark().

cpl_frame* create_screen_flat const char *  filename,
const char *  tag,
cpl_frame_group  group
 

Simulate screen flat image.

Parameters:
filename save to this file
tag output frame tag
group output frame group
Returns:
screen flat frame
Model: bias + flat(x,y) Variance = ron**2 + flat(x,y)/conad

Definition at line 288 of file test_simulate.c.

References bias_avg, binx, biny, conad, create_standard_keys(), det_nx, det_ny, FORS_IMAGE_TYPE, fors_rand_gauss(), and ron.

Referenced by test_img_screen_flat().

cpl_frame* create_sky_flat const char *  filename,
const char *  tag,
cpl_frame_group  group,
double  exptime
 

Simulate sky flat image.

Parameters:
filename save to this file
tag output frame tag
group output frame group
exptime exposure time
Returns:
sky flat frame
Model: bias + flat(x,y) Variance = ron**2 + flat(x,y)/conad

Definition at line 344 of file test_simulate.c.

References bias_avg, binx, biny, conad, create_standard_keys(), det_nx, det_ny, FORS_IMAGE_TYPE, fors_rand_gauss(), and ron.

Referenced by create_standard(), test_img_science(), test_img_sky_flat(), test_photometry(), test_setting(), and test_zeropoint().

cpl_frame* create_standard const char *  filename,
const char *  tag,
cpl_frame_group  group
 

Create standard star image.

Parameters:
filename save to this file
tag output frame tag
group output frame group
Returns:
standard field frame

Definition at line 392 of file test_simulate.c.

References create_sky_flat().

Referenced by test_identify(), test_img_science(), test_new(), and test_zeropoint().

cpl_frame* create_std_cat const char *  filename,
const char *  tag,
cpl_frame_group  group
 

Create standard star catalogue.

Parameters:
filename save to this file
tag output frame tag
group output frame group
Returns:
catalogue

Definition at line 414 of file test_simulate.c.

Referenced by test_identify(), test_img_science(), test_new(), and test_zeropoint().

cpl_frame* create_phot_table const char *  filename,
const char *  tag,
cpl_frame_group  group
 

Create photometry table.

Parameters:
filename save to this file
tag output frame tag
group output frame group
Returns:
photometry table

Definition at line 492 of file test_simulate.c.

Referenced by test_identify(), test_img_science(), test_new(), test_photometry(), and test_zeropoint().


Generated on Wed Sep 10 07:31:55 2008 for FORS Pipeline Reference Manual by  doxygen 1.4.6