Pre 3D Format
[Data Format Handling functions]

Functions

static void xsh_pre_3d_init (xsh_pre_3d *pre, cpl_propertylist *header)
 Fill the XSH_PRE structure from FITS header file.
void xsh_pre_3d_free (xsh_pre_3d **pre_3d)
xsh_pre_3dxsh_pre_3d_new (int nx, int ny, int nz)
 Create new PRE image.
xsh_pre_3dxsh_pre_3d_load (cpl_frame *frame)
 Load a xsh_pre_3d structure from a frame.
int xsh_pre_3d_get_nx (const xsh_pre_3d *pre)
 Get nx of pre_3d structure.
int xsh_pre_3d_get_ny (const xsh_pre_3d *pre)
 Get ny of pre_3d structure.
int xsh_pre_3d_get_nz (const xsh_pre_3d *pre)
 Get nz of pre_3d structure.
xsh_image_3dxsh_pre_3d_get_data (xsh_pre_3d *pre_3d)
 Get data.
xsh_image_3dxsh_pre_3d_get_errs (xsh_pre_3d *pre_3d)
 Get errs.
xsh_image_3dxsh_pre_3d_get_qual (xsh_pre_3d *pre_3d)
 Get qual.
static cpl_error_code xsh_cube_3d_save_float (xsh_image_3d *img_3d, const char *fname, cpl_propertylist *header, unsigned mode)
static cpl_error_code xsh_cube_3d_save_int (xsh_image_3d *img_3d, const char *fname, cpl_propertylist *header, unsigned mode)
cpl_frame * xsh_pre_3d_save (const xsh_pre_3d *pre, const char *filename, int temp)
 Save PRE_3D on disk.

Function Documentation

static cpl_error_code xsh_cube_3d_save_float ( xsh_image_3d img_3d,
const char *  fname,
cpl_propertylist *  header,
unsigned  mode 
) [static]

Save the data cube image. Note that the output file is automatically rewritten if it exists.

Parameters:
img_3d Input Data Cube
fname Output file name
header FITS Header
mode saving mode (default/extend)
Returns:
Possible error code

Definition at line 348 of file xsh_data_pre_3d.c.

References xsh_image_3d::pixels, xsh_free_imagelist(), xsh_image_3d_get_size_x(), xsh_image_3d_get_size_y(), and xsh_image_3d_get_size_z().

Referenced by xsh_pre_3d_save().

static cpl_error_code xsh_cube_3d_save_int ( xsh_image_3d img_3d,
const char *  fname,
cpl_propertylist *  header,
unsigned  mode 
) [static]

Save the data cube image. Note that the output file is automatically rewritten if it exists.

Parameters:
img_3d Input Data Cube
fname Output file name
header FITS Header
mode saving mode (default/extend)
Returns:
Possible error code

Definition at line 392 of file xsh_data_pre_3d.c.

References xsh_image_3d::pixels, xsh_free_imagelist(), xsh_image_3d_get_size_x(), xsh_image_3d_get_size_y(), and xsh_image_3d_get_size_z().

Referenced by xsh_pre_3d_save().

void xsh_pre_3d_free ( xsh_pre_3d **  pre_3d  ) 
xsh_image_3d* xsh_pre_3d_get_data ( xsh_pre_3d pre_3d  ) 

Get data.

Parameters:
pre_3d The PRE image
Returns:
Pointer to existing data image

Definition at line 290 of file xsh_data_pre_3d.c.

References xsh_pre_3d::data, and XSH_ASSURE_NOT_NULL.

Referenced by main(), and xsh_center_cube().

xsh_image_3d* xsh_pre_3d_get_errs ( xsh_pre_3d pre_3d  ) 

Get errs.

Parameters:
pre_3d The PRE image
Returns:
Pointer to existing data image

Definition at line 307 of file xsh_data_pre_3d.c.

References xsh_pre_3d::errs, and XSH_ASSURE_NOT_NULL.

int xsh_pre_3d_get_nx ( const xsh_pre_3d pre  ) 

Get nx of pre_3d structure.

Parameters:
pre the pre structure
Returns:
the nx value

Definition at line 236 of file xsh_data_pre_3d.c.

References xsh_pre_3d::nx, and XSH_ASSURE_NOT_NULL.

Referenced by make_data_cube().

int xsh_pre_3d_get_ny ( const xsh_pre_3d pre  ) 

Get ny of pre_3d structure.

Parameters:
pre the pre structure
Returns:
the ny value

Definition at line 254 of file xsh_data_pre_3d.c.

References xsh_pre_3d::ny, and XSH_ASSURE_NOT_NULL.

Referenced by make_data_cube().

int xsh_pre_3d_get_nz ( const xsh_pre_3d pre  ) 

Get nz of pre_3d structure.

Parameters:
pre the pre structure
Returns:
the ny value

Definition at line 272 of file xsh_data_pre_3d.c.

References xsh_pre_3d::nz, and XSH_ASSURE_NOT_NULL.

Referenced by make_data_cube().

xsh_image_3d* xsh_pre_3d_get_qual ( xsh_pre_3d pre_3d  ) 

Get qual.

Parameters:
pre_3d The PRE image
Returns:
Pointer to existing data image

Definition at line 324 of file xsh_data_pre_3d.c.

References xsh_pre_3d::qual, and XSH_ASSURE_NOT_NULL.

static void xsh_pre_3d_init ( xsh_pre_3d pre,
cpl_propertylist *  header 
) [static]

Fill the XSH_PRE structure from FITS header file.

Parameters:
[in] pre The pre structure to fill
[in] header The header of fits image

Definition at line 67 of file xsh_data_pre_3d.c.

References check, xsh_pre_3d::data_header, xsh_pre_3d::naxis1, xsh_pre_3d::naxis2, xsh_pre_3d::naxis3, XSH_ASSURE_NOT_NULL, xsh_pfits_get_naxis1(), xsh_pfits_get_naxis2(), and xsh_pfits_get_naxis3().

Referenced by xsh_pre_3d_load().

xsh_pre_3d* xsh_pre_3d_load ( cpl_frame *  frame  ) 
xsh_pre_3d* xsh_pre_3d_new ( int  nx,
int  ny,
int  nz 
)

Create new PRE image.

Parameters:
nx The x-size
ny The y-size
nz The z-size
Returns:
The newly allocated PRE image

The data and errs units are initialized to zero.

Definition at line 129 of file xsh_data_pre_3d.c.

References assure, check, xsh_pre_3d::data, xsh_pre_3d::data_header, xsh_pre_3d::errs, xsh_pre_3d::errs_header, xsh_pre_3d::nx, xsh_pre_3d::ny, xsh_pre_3d::nz, xsh_pre_3d::qual, xsh_pre_3d::qual_header, XSH_CALLOC, xsh_image_3d_new(), xsh_pre_3d_free(), XSH_PRE_DATA_TYPE, XSH_PRE_ERRS_TYPE, and XSH_PRE_QUAL_TYPE.

Referenced by xsh_cube(), and xsh_format().

cpl_frame* xsh_pre_3d_save ( const xsh_pre_3d pre,
const char *  filename,
int  temp 
)

Save PRE_3D on disk.

Parameters:
pre to save
filename The file to save to
temp Flag if 1 frame is temporary file
Returns:
A frame pointing to the file that was saved

Definition at line 431 of file xsh_data_pre_3d.c.

References check, check_msg, xsh_pre_3d::data, xsh_pre_3d::data_header, xsh_pre_3d::errs, xsh_pre_3d::errs_header, xsh_pre_3d::qual, xsh_pre_3d::qual_header, XSH_ASSURE_NOT_NULL, xsh_cube_3d_save_float(), xsh_cube_3d_save_int(), and xsh_free_frame().

Referenced by xsh_add_product_pre_3d(), xsh_cube(), and xsh_format().


Generated on 13 Mar 2013 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1