Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Routines for associated LENSES i/o


Defines

#define extract_E3D_slice_noalloc(type_of_slice)

Functions

int exist_spec_ID (E3D_file *frame, int specId)
int set_ID_and_coordinates (E3D_file *frame, int nbl, int *specId, float *xlens, float *ylens)
int get_ID_and_coordinates (E3D_file *frame, int *specId, float *xlens, float *ylens)
int get_spectra_ID (E3D_file *frame, int *specId)
int alloc_slice_mem (SLICE *slice, short type, int npts)
int free_slice_mem (SLICE *slice)
int init_new_E3D_slice (E3D_file *frame, SLICE *slice)
int extract_E3D_slice (E3D_file *frame, SLICE *slice, E3Dspec_desc **type_of_slice, int index)
int get_E3D_slice (E3D_file *frame, SLICE *signal, SLICE *noise, int index)
int save_E3D_slice (E3D_file *frame, SLICE *slice, E3Dspec_desc **type_of_slice, int index)
int put_E3D_slice (E3D_file *frame, SLICE *signal, SLICE *noise, int index)

Define Documentation

#define extract_E3D_slice_noalloc type_of_slice   ) 
 

Value:

type_of_slice->index = index; \
        current_spec = &(frame->type_of_slice[0]); \
        for (i=0;i <frame->nbspec; i++, current_spec++) { \
                type_of_slice->specId[i] = current_spec->specId; \
                if (index < current_spec->npix) { \
                        lseek(frame->imno,(current_spec->data_offset \
                                +index*sizeof_item(type_of_slice->data_type)),SEEK_SET); \
                        if (frame->swapbytes) {\
                                read_DOS(frame->imno,(char *)((char *)(type_of_slice->data.s_data)+\
                                        i*sizeof_item(type_of_slice->data_type)), \
                                        sizeof_item(type_of_slice->data_type)); \
                        } else { \
                                read(frame->imno,(char *)((char *)(type_of_slice->data.s_data)+\
                                        i*sizeof_item(type_of_slice->data_type)), \
                                        sizeof_item(type_of_slice->data_type)); \
                        } \
                }\
                else \
                        WR_slice(type_of_slice,i,DATA_UNDEF); \
        }

Definition at line 2675 of file 3D_iolib.c.


Function Documentation

int exist_spec_ID E3D_file frame,
int  specId
 

checks existence of a spectrum ID number in the given E3D frame

Parameters:
frame [E3D_file *] E3D file structure
specId [int ] lens number

Definition at line 2193 of file 3D_iolib.c.

References find_lens, E3D_file::noise, and E3D_file::signal.

int set_ID_and_coordinates E3D_file frame,
int  nbl,
int *  specId,
float *  xlens,
float *  ylens
 

set spectrum ID and coordinates

Parameters:
frame [E3D_file *] E3D file structure
nbl [int ] number of spectra
specId [int *] list of spectrum ID
xlens [float *] list of x coordinates
ylens [float *] list of y coordinates

Definition at line 2222 of file 3D_iolib.c.

References append_tbl_extension(), IO_Format::basic_io, close_table(), E3D_file::data_format, E3D_COL_GRP, E3D_COL_ID, E3D_COL_NSPAX, E3D_COL_XPOS, E3D_COL_YPOS, E3D_DATA, EURO3D_FORMAT, get_col_ref(), Handle_Error(), InputIO, lg_name, E3D_file::name, open_table(), and WR_tbl().

Referenced by set_lenses_coord().

int get_ID_and_coordinates E3D_file frame,
int *  specId,
float *  xlens,
float *  ylens
 

get spectra ID and coordinates

Parameters:
frame [E3D_file *] E3D file structure
specId [int *] list of spectrum ID
xlens [float *] list of x coordinates
ylens [float *] list of y coordinates

Definition at line 2268 of file 3D_iolib.c.

References append_tbl_extension(), IO_Format::basic_io, close_table(), E3D_file::data_format, E3D_COL_ID, E3D_COL_XPOS, E3D_COL_YPOS, E3D_DATA, ERR_NOCOL, EURO3D_FORMAT, get_col_ref(), Handle_Error(), InputIO, lg_name, E3D_file::name, open_table(), RD_tbl(), and TABLE::row.

int get_spectra_ID E3D_file frame,
int *  specId
 

get full list of spectrum IDs

Parameters:
frame [E3D_file *] E3D file structure
specId [int *] list of lens numbers

Definition at line 2318 of file 3D_iolib.c.

References ERR_BAD_PARAM, Handle_Error(), E3D_file::nbspec, E3D_file::noise, E3D_file::signal, and E3Dspec_desc::specId.

int alloc_slice_mem SLICE slice,
short  type,
int  npts
 

allocate memory for slices

Parameters:
slice [SLICE *] slice structure
type [short ] data type
npts [int ] nb of values in slice

Definition at line 2407 of file 3D_iolib.c.

References SLICE::data, SLICE::data_type, DOUBLE, ERR_ALLOC, FLOAT, INT, LONG, SLICE::npts, SLICE::quality, SHORT, and SLICE::specId.

Referenced by init_new_E3D_slice().

int free_slice_mem SLICE slice  ) 
 

free memory for slices

Parameters:
slice [SLICE *] slice structure

Definition at line 2450 of file 3D_iolib.c.

References SLICE::data, SLICE::data_type, DOUBLE, FLOAT, INT, LONG, SLICE::quality, SHORT, and SLICE::specId.

Referenced by save_E3D_slice().

int init_new_E3D_slice E3D_file frame,
SLICE slice
 

returns an initialised slice structure items

Parameters:
frame [E3D_file *] E3D file structure
slice [SLICE *] slice structure

Definition at line 2479 of file 3D_iolib.c.

References alloc_slice_mem(), append_tbl_extension(), IO_Format::basic_io, close_table(), E3D_file::data_type, get_lenses_no_from_table(), Handle_Error(), SLICE::index, InputIO, lg_name, E3D_file::nbspec, E3D_file::noise, SLICE::npts, open_table(), TABLE::row, E3D_file::signal, SLICE::specId, E3Dspec_desc::specId, and E3D_file::table_name.

Referenced by extract_E3D_slice().

int extract_E3D_slice E3D_file frame,
SLICE slice,
E3Dspec_desc **  type_of_slice,
int  index
 

Definition at line 2521 of file 3D_iolib.c.

References E3D_file::common_parameters, SLICE::data, E3D_file::data_format, E3Dspec_desc::data_offset, SLICE::data_type, DATA_UNDEF, DOUBLE, E3D_COL_INT, E3D_COL_RMS, E3D_DATA, ERR_BAD_COL, ERR_FORMAT, EURO3D_FORMAT, E3D_file::external_info, FLOAT, Handle_Error(), E3D_file::imno, SLICE::index, init_new_E3D_slice(), INT, LONG, MAXDOUBLE, MAXFLOAT, MAXLONG, MAXSHORT, E3D_file::nbspec, E3Dspec_desc::npix, read_DOS(), SHORT, E3D_file::signal, sizeof_item(), E3Dspec_desc::specId, SLICE::specId, E3D_file::swapbytes, TIGER_FORMAT, and WR_slice.

Referenced by get_E3D_slice().

int get_E3D_slice E3D_file frame,
SLICE signal,
SLICE noise,
int  index
 

returns the slice structure items

Parameters:
frame [E3D_file *] E3D file structure
signal [SLICE *] slice structure (or NULL)
noise [SLICE *] slice structure (or NULL)
index [int ] index of slice

Definition at line 2653 of file 3D_iolib.c.

References ERR_IMA_BOUND, extract_E3D_slice(), Handle_Error(), has_common_bounds(), E3D_file::noise, and E3D_file::signal.

int save_E3D_slice E3D_file frame,
SLICE slice,
E3Dspec_desc **  type_of_slice,
int  index
 

Definition at line 2697 of file 3D_iolib.c.

References E3D_file::common_parameters, SLICE::data, E3D_file::data_format, E3Dspec_desc::data_offset, SLICE::data_type, DATA_UNDEF, DOUBLE, E3D_COL_DQ, E3D_COL_INT, E3D_COL_RMS, E3D_DATA, ERR_FORMAT, ERR_NODATA, ERR_WRIT, EURO3D_FORMAT, E3D_file::external_info, find_lens, FLOAT, free_slice_mem(), Handle_Error(), E3D_file::imno, SLICE::index, init_new_E3D_spec(), INT, LONG, E3D_file::nbspec, SLICE::npts, put_E3D_spec(), SLICE::quality, RD_slice, SHORT, E3D_file::signal, sizeof_item(), SLICE::specId, E3D_file::swapbytes, TIGER_FORMAT, WR_spec, and write_DOS().

Referenced by put_E3D_slice().

int put_E3D_slice E3D_file frame,
SLICE signal,
SLICE noise,
int  index
 

update/add a slice in a E3D frame

Parameters:
frame [E3D_file *] E3D file structure
signal [SLICE *] slice structure (or NULL)
noise [SLICE *] slice structure (or NULL)
index [int ] index of slice

Definition at line 2877 of file 3D_iolib.c.

References ERR_ACCESS, ERR_BAD_PARAM, Handle_Error(), has_common_bounds(), I_MODE, E3D_file::iomode, E3D_file::name, E3D_file::noise, save_E3D_slice(), and E3D_file::signal.


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