Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Routines for E3D SPECTRA i/o


Functions

int init_new_E3D_spec (E3D_file *frame, SPECTRUM *spectrum, int npix, double start)
int extract_E3D_spec (E3D_file *frame, SPECTRUM *spectrum, E3Dspec_desc **type_of_spec, int specId)
int get_E3D_spec (E3D_file *frame, SPECTRUM *signal, SPECTRUM *noise, int specId)
int save_E3D_spec (E3D_file *frame, SPECTRUM *spectrum, E3Dspec_desc **type_of_spec, int specId)
int put_E3D_spec (E3D_file *frame, SPECTRUM *signal, SPECTRUM *noise, int specId)
int delete_E3D_spec (E3D_file *frame, int specId)
int get_E3D_spaxels (E3D_file *frame, int specId, SPAXEL **spaxels)
int put_E3D_spaxels (E3D_file *frame, int specId, int nspax, SPAXEL *spaxels)
int exist_group_ID (E3D_file *frame, int groupID)
int get_E3D_groups (E3D_file *frame, int specId, GROUP **groups)
int put_E3D_groups (E3D_file *frame, int ngroups, GROUP *groups)
int delete_E3D_group (E3D_file *frame, int groupID)
int get_E3D_row (E3D_file *frame, int specId, SPECTRUM *signal, SPECTRUM *noise, int *nspax, SPAXEL **spaxels, int *ngroups, GROUP **groups)
int put_E3D_row (E3D_file *frame, int specId, SPECTRUM *signal, SPECTRUM *noise, int nspax, SPAXEL *spaxels, int ngroups, GROUP *groups)
int get_E3D_frame (E3D_file *E3Dframe, IMAGE2D *signal, IMAGE2D *noise)

Function Documentation

int init_new_E3D_spec E3D_file frame,
SPECTRUM spectrum,
int  npix,
double  start
 

returns an initialised spectrum structure items

Parameters:
frame [E3D_file *] E3D file structure
spectrum [SPECTRUM *] spectrum structure
npix [int ] nb of pixels
start [double ] start coordinate of spectrum

Definition at line 1042 of file 3D_iolib.c.

References alloc_spec_mem(), E3D_file::common_bounds, SPECTRUM::cunit, E3D_file::cunit, SPECTRUM::data_format, SPECTRUM::data_type, E3D_file::data_type, SPECTRUM::end, ERR_BAD_PARAM, SPECTRUM::external_info, SPECTRUM::file_type, get_common_param(), Handle_Error(), SPECTRUM::history, E3D_file::history, SPECTRUM::ident, E3D_file::ident, SPECTRUM::imno, SPECTRUM::iomode, E3D_file::iomode, SPECTRUM::iwend, SPECTRUM::iwstart, SPECTRUM::name, E3D_file::name, SPECTRUM::npts, SPECTRUM::start, SPECTRUM::step, E3D_file::step, TIGER_FORMAT, SPECTRUM::wend, and SPECTRUM::wstart.

Referenced by save_E3D_slice().

int extract_E3D_spec E3D_file frame,
SPECTRUM spectrum,
E3Dspec_desc **  type_of_spec,
int  specId
 

Definition at line 1085 of file 3D_iolib.c.

References alloc_spec_mem(), E3D_file::cunit, SPECTRUM::cunit, SPECTRUM::data, E3D_file::data_format, SPECTRUM::data_format, E3Dspec_desc::data_offset, E3D_file::data_type, SPECTRUM::data_type, DOUBLE, E3D_COL_DQ, E3D_COL_INT, E3D_COL_RMS, E3D_DATA, E3Dspec_desc::end, SPECTRUM::end, ERR_BAD_COL, ERR_FORMAT, ERR_NOIMA, ERR_READ, ERR_WRIT, EURO3D_FORMAT, E3D_file::external_info, SPECTRUM::external_info, SPECTRUM::file_type, find_lens, FLOAT, Handle_Error(), E3D_file::history, SPECTRUM::history, E3D_file::ident, SPECTRUM::ident, E3D_file::imno, SPECTRUM::imno, INT, E3D_file::iomode, SPECTRUM::iomode, SPECTRUM::iwend, SPECTRUM::iwstart, LONG, E3D_file::name, SPECTRUM::name, E3Dspec_desc::npix, SPECTRUM::npts, SPECTRUM::quality, read_DOS(), SHORT, E3D_file::signal, sizeof_item(), E3Dspec_desc::start, SPECTRUM::start, E3D_file::step, SPECTRUM::step, E3D_file::swapbytes, TIGER_FORMAT, SPECTRUM::wend, and SPECTRUM::wstart.

Referenced by get_E3D_spec().

int get_E3D_spec E3D_file frame,
SPECTRUM signal,
SPECTRUM noise,
int  specId
 

returns the spectrum structure items

Parameters:
frame [E3D_file *] E3D file structure
signal [SPECTRUM *] signal spectrum structure (or NULL)
noise [SPECTRUM *] noise spectrum structure (or NULL)
specId [int ] spectrum ID

Definition at line 1215 of file 3D_iolib.c.

References extract_E3D_spec(), E3D_file::noise, and E3D_file::signal.

Referenced by convert_datacube(), get_E3D_frame(), and get_E3D_row().

int save_E3D_spec E3D_file frame,
SPECTRUM spectrum,
E3Dspec_desc **  type_of_spec,
int  specId
 

Definition at line 1231 of file 3D_iolib.c.

References E3D_file::common_bounds, E3D_file::common_parameters, E3D_file::cunit, SPECTRUM::data, E3D_file::data_format, E3D_file::data_offset, E3Dspec_desc::data_offset, SPECTRUM::data_type, DOUBLE, E3D_COL_DQ, E3D_COL_IDX, E3D_COL_INT, E3D_COL_NPIX, E3D_COL_RMS, E3D_DATA, E3D_KW_REFPIX, E3D_KW_START, E3D_KW_STEP, E3D_KW_UNITS, E3Dspec_desc::end, SPECTRUM::end, ERR_FORMAT, ERR_WRIT, EURO3D_FORMAT, E3D_file::external_info, FLOAT, free_spec_mem(), Handle_Error(), E3D_file::imno, INT, LENS_UNDEF, LONG, E3D_file::name, SPECTRUM::name, E3D_file::nbspec, E3Dspec_desc::npix, SPECTRUM::npts, SPECTRUM::quality, set_subspec(), SHORT, E3D_file::signal, sizeof_item(), spec_minmax(), E3Dspec_desc::specId, E3Dspec_desc::start, SPECTRUM::start, SPECTRUM::step, E3D_file::swapbytes, TIGER_FORMAT, and write_DOS().

Referenced by put_E3D_spec().

int put_E3D_spec E3D_file frame,
SPECTRUM signal,
SPECTRUM noise,
int  specId
 

update/add a spectrum in a E3D frame if the spectrum already exists, it is overwritten. The data array of the input spectrum is freed by the routine.

Parameters:
frame [E3D_file *] E3D file structure
signal [SPECTRUM *] signal spectrum structure (or NULL)
noise [SPECTRUM *] noise spectrum structure (or NULL)
specId [int ] spectrum ID

Definition at line 1434 of file 3D_iolib.c.

References ERR_ACCESS, Handle_Error(), I_MODE, E3D_file::iomode, E3D_file::name, E3D_file::noise, save_E3D_spec(), and E3D_file::signal.

Referenced by convert_datacube(), put_E3D_row(), and save_E3D_slice().

int delete_E3D_spec E3D_file frame,
int  specId
 

delete a spectrum in a E3D frame

Parameters:
frame [E3D_file *] E3D file structure
specId [int ] spectrum ID

Definition at line 1466 of file 3D_iolib.c.

References E3D_file::data_format, E3D_DATA, ERR_NOIMA, EURO3D_FORMAT, E3D_file::external_info, find_lens, get_tiger_errcode(), Handle_Error(), E3D_file::name, E3D_file::nbspec, E3D_file::noise, and E3D_file::signal.

int get_E3D_spaxels E3D_file frame,
int  specId,
SPAXEL **  spaxels
 

retrieve spaxels relevant to given ID (returns the number of spaxels)

Parameters:
frame [E3D_file *] datacube structure
specId [int ] spectrum ID
spaxels [SPAXEL **] pointer to array of spaxel description

Definition at line 1531 of file 3D_iolib.c.

References E3D_file::data_format, E3D_COL_GRP, E3D_COL_NSPAX, E3D_COL_SPAXID, E3D_COL_XPOS, E3D_COL_YPOS, E3D_DATA, ERR_FORMAT, ERR_NOIMA, ERR_READ, EURO3D_FORMAT, E3D_file::external_info, find_lens, get_lens_coordinates(), Handle_Error(), E3D_file::signal, SPAXEL::specId, and TIGER_FORMAT.

Referenced by convert_datacube(), and get_E3D_row().

int put_E3D_spaxels E3D_file frame,
int  specId,
int  nspax,
SPAXEL spaxels
 

puts the spaxels relevant to given ID

Parameters:
frame [E3D_file *] datacube structure
specId [int ] spectrum ID
nspax [int ] number of spaxels
spaxels [SPAXEL *] array of spaxel structures

Definition at line 1630 of file 3D_iolib.c.

References E3D_file::data_format, E3D_COL_GRP, E3D_COL_ID, E3D_COL_NSPAX, E3D_COL_SPAXID, E3D_COL_XPOS, E3D_COL_YPOS, E3D_DATA, ERR_FORMAT, ERR_NOIMA, ERR_WRIT, EURO3D_FORMAT, E3D_file::external_info, find_lens, SPAXEL::group, Handle_Error(), set_lens_coordinates(), E3D_file::signal, TIGER_FORMAT, and SPAXEL::xpos.

Referenced by convert_datacube(), and put_E3D_row().

int exist_group_ID E3D_file frame,
int  groupID
 

check if group exists (returns -1 if not)

Parameters:
frame [E3D_file *] datacube structure
groupID [int ] group ID

Definition at line 1723 of file 3D_iolib.c.

References GROUP::groupId, E3D_file::groups, and E3D_file::ngroups.

int get_E3D_groups E3D_file frame,
int  specId,
GROUP **  groups
 

retrieve groups relevant to given ID return the number of groups read, or status (<0) on error

Parameters:
frame [E3D_file *] datacube structure
specId [int ] spectrum ID
groups [GROUP **] pointer to array of group description

Definition at line 1752 of file 3D_iolib.c.

References E3D_file::data_format, E3D_COL_GRP, E3D_DATA, ERR_FORMAT, ERR_NOIMA, ERR_READ, EURO3D_FORMAT, E3D_file::external_info, find_lens, GROUP::groupId, E3D_file::groups, Handle_Error(), E3D_file::ngroups, E3D_file::signal, and TIGER_FORMAT.

Referenced by get_E3D_row().

int put_E3D_groups E3D_file frame,
int  ngroups,
GROUP groups
 

add groups to a E3D frame

Parameters:
frame [E3D_file *] datacube structure
ngroups [int ] number of groups
groups [GROUP *] description of groups

Definition at line 1828 of file 3D_iolib.c.

References GROUP::groupId, E3D_file::groups, Handle_Error(), E3D_file::name, and E3D_file::ngroups.

Referenced by convert_datacube(), and put_E3D_row().

int delete_E3D_group E3D_file frame,
int  groupID
 

delete a group into a E3D frame

Parameters:
frame [E3D_file *] datacube structure
groupID [int ] number of groups

Definition at line 1874 of file 3D_iolib.c.

References ERR_BAD_PARAM, GROUP::groupId, E3D_file::groups, Handle_Error(), E3D_file::name, and E3D_file::ngroups.

int get_E3D_row E3D_file frame,
int  specId,
SPECTRUM signal,
SPECTRUM noise,
int *  nspax,
SPAXEL **  spaxels,
int *  ngroups,
GROUP **  groups
 

returns all informations belonging to the spectrum

Parameters:
frame [E3D_file *] E3D file structure
specId [int ] number of associated lens
signal [SPECTRUM *] spectrum structure (or NULL)
noise [SPECTRUM *] spectrum structure (or NULL)
nspax [int *] on exit, number of spaxels
spaxels [SPAXEL **] pointer to array of spaxel description
ngroups [int *] on exit, number of groups
groups [GROUP **] pointer to array of group description

Definition at line 1920 of file 3D_iolib.c.

References get_E3D_groups(), get_E3D_spaxels(), and get_E3D_spec().

int put_E3D_row E3D_file frame,
int  specId,
SPECTRUM signal,
SPECTRUM noise,
int  nspax,
SPAXEL spaxels,
int  ngroups,
GROUP groups
 

sets all informations belonging to the spectrum

Parameters:
frame [E3D_file *] E3D file structure
specId [int ] number of associated lens
signal [SPECTRUM *] spectrum structure (or NULL)
noise [SPECTRUM *] spectrum structure (or NULL)
nspax [int ] number of spaxels
spaxels [SPAXEL *] array of spaxel description
ngroups [int ] number of groups
groups [GROUP *] pointer to array of group description

Definition at line 1949 of file 3D_iolib.c.

References put_E3D_groups(), put_E3D_spaxels(), and put_E3D_spec().

int get_E3D_frame E3D_file E3Dframe,
IMAGE2D signal,
IMAGE2D noise
 

sets all informations belonging to the spectrum

Parameters:
E3Dframe [E3D_file *] E3D file structure
signal [IMAGE2D *] 2D image structure (or NULL)
noise [IMAGE2D *] 2D image structure (or NULL)

Definition at line 1972 of file 3D_iolib.c.

References alloc_frame_mem(), IO_Format::basic_io, IMAGE2D::cunit, E3D_file::data_format, IMAGE2D::data_format, IMAGE2D::data_type, E3D_file::data_type, E3D_DATA, IMAGE2D::endx, IMAGE2D::endy, ERR_ALLOC, ERR_NOIMPL, EURO3D_FORMAT, IMAGE2D::external_info, IMAGE2D::file_type, free_spec_mem(), get_common_param(), get_E3D_spec(), IMAGE2D::history, IMAGE2D::ident, IMA_TYPE, image_minmax(), InputIO, lg_hist, lg_ident, lg_unit, IMAGE2D::name, E3D_file::name, E3D_file::nbspec, E3D_file::noise, IMAGE2D::nx, IMAGE2D::ny, RD_qspec, RD_spec, E3D_file::signal, E3Dspec_desc::specId, IMAGE2D::startx, IMAGE2D::starty, IMAGE2D::stepx, IMAGE2D::stepy, TIGER_FORMAT, WR_frame, and WR_qframe.


Generated on Tue Jul 1 17:35:47 2003 for IFU_C_iolibs by doxygen1.3