HAWKI Pipeline Reference Manual 1.8.12
Functions
Loading related functions

Functions

cpl_frameset * hawki_extract_frameset (const cpl_frameset *in, const char *tag)
 Extract the frames with the given tag from a frameset.
int hawki_get_detector_from_ext (const char *fname, int ext)
 Get the chip to store in the wished extension.
int * hawki_get_ext_detector_mapping (const char *fname)
 Get the mapping between extensions and detectors.
int hawki_get_ext_from_detector (const char *fname, int chip)
 Get the extension corresponding to the wished chip.
cpl_imagelist * hawki_load_detector (const cpl_frameset *fset, int chip, cpl_type ptype)
 Load the chips of HAWKI frameset in an image list.
cpl_imagelist * hawki_load_extensions (const cpl_frameset *fset, int extension, cpl_type ptype)
 Loads a given extension from a HAWKI frameset in an image list.
cpl_imagelist * hawki_load_frame (const cpl_frame *frame, cpl_type ptype)
 Load all the chips of HAWKI images from a frame into an image list.
cpl_image * hawki_load_frame_detector (const cpl_frame *frame, int idet, cpl_type ptype)
 Load one the chips of HAWKI images from a frame into an image.
cpl_image * hawki_load_frame_extension (const cpl_frame *frame, int iextension, cpl_type ptype)
 Load one the extensions of HAWKI images from a frame into an image.
cpl_imagelist * hawki_load_frameset (const cpl_frameset *fset, int chip, cpl_type ptype)
 Load the chip of HAWKI images from a frameset in an image list.
cpl_image * hawki_load_image (const cpl_frameset *fset, int fnum, int chip, cpl_type ptype)
 Load the chip of HAWKI image from a frameset in an image.
cpl_image * hawki_load_quadrant (const cpl_frameset *fset, int fnum, int chip, int quad, cpl_type ptype)
 Load the quarter of a chip from a frameset in an image.
cpl_image * hawki_load_quadrant_from_file (const char *fname, int chip, int quad, cpl_type ptype)
 Load the quarter of a chip from a file in an image.
cpl_imagelist * hawki_load_quadrants (const cpl_frameset *fset, int chip, int quad, cpl_type ptype)
 Load the quarter of a chip from a frameset in an image list.
cpl_bivector ** hawki_load_refined_offsets (const cpl_frame *offsets_frame)
 Load a table containing refined offsets.
cpl_table ** hawki_load_tables (const cpl_frame *frame)
 Load a table with four extensions, one for each chip.
cpl_image * hawki_rebuild_detectors (const cpl_image *ima1, const cpl_image *ima2, const cpl_image *ima3, const cpl_image *ima4)
 Rebuild the 4 chips.
cpl_image * hawki_rebuild_quadrants (const cpl_image *ima1, const cpl_image *ima2, const cpl_image *ima3, const cpl_image *ima4)
 Rebuild the 4 quadrants.

Function Documentation

cpl_frameset* hawki_extract_frameset ( const cpl_frameset *  in,
const char *  tag 
)

Extract the frames with the given tag from a frameset.

Parameters:
inA non-empty frameset
tagThe tag of the requested frames
Returns:
The newly created frameset or NULL on error

The returned frameset must be de allocated with cpl_frameset_delete()

Definition at line 63 of file hawki_load.c.

int hawki_get_detector_from_ext ( const char *  fname,
int  ext 
)

Get the chip to store in the wished extension.

Parameters:
fnameThe input frame name
extthe extension number (1 to HAWKI_NB_DETECTORS)
Returns:
The chip number (1 to HAWKI_NB_DETECTORS) or -1 in error case

Definition at line 817 of file hawki_load.c.

References hawki_pfits_get_extname().

Referenced by hawki_distortion_save(), hawki_get_ext_detector_mapping(), hawki_image_ext_save(), hawki_imagelist_save(), hawki_images_save(), and hawki_tables_save().

int* hawki_get_ext_detector_mapping ( const char *  fname)

Get the mapping between extensions and detectors.

Parameters:
fnameThe input frame name
Returns:
the mapping if everything goes well, NULL otherwise

Definition at line 897 of file hawki_load.c.

References hawki_get_detector_from_ext().

Referenced by hawki_load_frame().

int hawki_get_ext_from_detector ( const char *  fname,
int  chip 
)

Get the extension corresponding to the wished chip.

Parameters:
fnameThe input frame name
chipThe chip number (1 to HAWKI_NB_DETECTORS)
Returns:
the extension number (1 to HAWKI_NB_DETECTORS)

Definition at line 846 of file hawki_load.c.

References hawki_pfits_get_extname().

Referenced by hawki_bpm_calib(), hawki_detectors_locate_star(), hawki_distortion_load(), hawki_load_detector(), hawki_load_frame_detector(), hawki_load_image(), hawki_load_quadrant_from_file(), and hawki_load_tables().

cpl_imagelist* hawki_load_detector ( const cpl_frameset *  fset,
int  chip,
cpl_type  ptype 
)

Load the chips of HAWKI frameset in an image list.

Parameters:
fsetthe input set of frames
chipthe chip to load (1 to HAWKI_NB_DETECTORS)
ptypethe pixel type
Returns:
the image list or NULL in error case

Definition at line 209 of file hawki_load.c.

References hawki_get_ext_from_detector().

cpl_imagelist* hawki_load_extensions ( const cpl_frameset *  fset,
int  extension,
cpl_type  ptype 
)

Loads a given extension from a HAWKI frameset in an image list.

Parameters:
fsetthe input set of frames
extthe chip to load (1 to HAWKI_NB_DETECTORS)
ptypethe pixel type
Returns:
the image list or NULL in error case

Definition at line 266 of file hawki_load.c.

cpl_imagelist* hawki_load_frame ( const cpl_frame *  frame,
cpl_type  ptype 
)

Load all the chips of HAWKI images from a frame into an image list.

Parameters:
framethe input set of frames
ptypethe pixel type
Returns:
the image list (image chip 1 to chip HAWKI_NB_DETECTORS) or NULL in error case

Definition at line 445 of file hawki_load.c.

References hawki_get_ext_detector_mapping().

Referenced by hawki_image_stats_fill_from_frame().

cpl_image* hawki_load_frame_detector ( const cpl_frame *  frame,
int  idet,
cpl_type  ptype 
)

Load one the chips of HAWKI images from a frame into an image.

Parameters:
framethe input frame
idetthe detector to load (1 to HAWKI_NB_DETECTORS)
ptypethe pixel type
Returns:
the image or NULL in error case

Definition at line 547 of file hawki_load.c.

References hawki_get_ext_from_detector().

Referenced by hawki_distortion_load().

cpl_image* hawki_load_frame_extension ( const cpl_frame *  frame,
int  iextension,
cpl_type  ptype 
)

Load one the extensions of HAWKI images from a frame into an image.

Parameters:
framethe input frame
extensionthe extension to load (1 to HAWKI_NB_DETECTORS)
ptypethe pixel type
Returns:
the image or NULL in error case

Definition at line 513 of file hawki_load.c.

cpl_imagelist* hawki_load_frameset ( const cpl_frameset *  fset,
int  chip,
cpl_type  ptype 
)

Load the chip of HAWKI images from a frameset in an image list.

Parameters:
fsetthe input set of frames
chipthe chip to load (1 to HAWKI_NB_DETECTORS)
ptypethe pixel type
Returns:
the image list (image chip 1 to chip HAWKI_NB_DETECTORS) or NULL in error case

Definition at line 407 of file hawki_load.c.

References hawki_load_image().

cpl_image* hawki_load_image ( const cpl_frameset *  fset,
int  fnum,
int  chip,
cpl_type  ptype 
)

Load the chip of HAWKI image from a frameset in an image.

Parameters:
fsetthe input set of frames
fnumthe frame to load from (start from 0)
chipthe chip to load (1 to HAWKI_NB_DETECTORS)
ptypethe pixel type
Returns:
the image list or NULL in error case

Definition at line 313 of file hawki_load.c.

References hawki_get_ext_from_detector().

Referenced by hawki_load_frameset().

cpl_image* hawki_load_quadrant ( const cpl_frameset *  fset,
int  fnum,
int  chip,
int  quad,
cpl_type  ptype 
)

Load the quarter of a chip from a frameset in an image.

Parameters:
fsetthe input set of frames
fnumthe frame to load from (start from 0)
chipthe chip to load (1 to HAWKI_NB_DETECTORS)
quadthe quadrant to load (1 to 4)
ptypethe pixel type
Returns:
the image list or NULL in error case

Definition at line 110 of file hawki_load.c.

References hawki_load_quadrant_from_file().

Referenced by hawki_load_quadrants().

cpl_image* hawki_load_quadrant_from_file ( const char *  fname,
int  chip,
int  quad,
cpl_type  ptype 
)

Load the quarter of a chip from a file in an image.

Parameters:
fnamethe input file name
chipthe chip to load (1 to HAWKI_NB_DETECTORS)
quadthe quadrant to load (1 to 4)
ptypethe pixel type
Returns:
the image list or NULL in error case

Definition at line 149 of file hawki_load.c.

References hawki_get_ext_from_detector().

Referenced by hawki_load_quadrant().

cpl_imagelist* hawki_load_quadrants ( const cpl_frameset *  fset,
int  chip,
int  quad,
cpl_type  ptype 
)

Load the quarter of a chip from a frameset in an image list.

Parameters:
fsetthe input set of frames
chipthe chip to load (1 to HAWKI_NB_DETECTORS)
quadthe quadrant to load (1 to 4)
ptypethe pixel type
Returns:
the image list or NULL in error case

Definition at line 365 of file hawki_load.c.

References hawki_load_quadrant().

cpl_bivector** hawki_load_refined_offsets ( const cpl_frame *  offsets_frame)

Load a table containing refined offsets.

Parameters:
offsets_framethe frame containing the offests.
Returns:
the offsets bivector. It must be deallocated afterwards. NULL if in error case

Definition at line 633 of file hawki_load.c.

References hawki_load_tables().

cpl_table** hawki_load_tables ( const cpl_frame *  frame)

Load a table with four extensions, one for each chip.

Parameters:
framethe input set of frames
ptypethe pixel type
Returns:
the image list (image chip 1 to chip HAWKI_NB_DETECTORS) or NULL in error case

Definition at line 589 of file hawki_load.c.

References hawki_get_ext_from_detector().

Referenced by hawki_load_refined_offsets().

cpl_image* hawki_rebuild_detectors ( const cpl_image *  ima1,
const cpl_image *  ima2,
const cpl_image *  ima3,
const cpl_image *  ima4 
)

Rebuild the 4 chips.

Parameters:
ima1the first chip
ima2the second chip
ima3the third chip
ima4the fourth chip
Returns:
the image or NULL in error case

Definition at line 718 of file hawki_load.c.

cpl_image* hawki_rebuild_quadrants ( const cpl_image *  ima1,
const cpl_image *  ima2,
const cpl_image *  ima3,
const cpl_image *  ima4 
)

Rebuild the 4 quadrants.

Parameters:
ima1the first quadrant
ima2the second quadrant
ima3the third quadrant
ima4the fourth quadrant
Returns:
the image or NULL in error case

Definition at line 769 of file hawki_load.c.