Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Routines for 3D FRAMES i/o


Defines

#define extract_3D_slice_noalloc(type_of_slice)

Functions

int set_tiger_group (E3D_file *frame)
int create_tiger_frame (E3D_file *frame, char *name, int npix, double start, double step, short datatype, char *table_name, char *ident, char *unit)
int close_tiger_frame (E3D_file *frame)
int delete_tiger_spec (E3D_file *frame, SPECTRUM *signal, SPECTRUM *noise, int specId)
int set_bigendian (short type)
int get_assoc_table_name (char *name, char *tab_name)
int get_lenses_no_from_table (E3D_file *frame, int *specId)
int get_lenses_coord (E3D_file *frame, char *lab_xcol, char *lab_ycol, int *specId, float *xlens, float *ylens, int *il)
int set_lenses_coord (E3D_file *frame, char *lab_xcol, char *lab_ycol, int nbl, int *specId, float *xlens, float *ylens)
int get_lenses_coord_select (E3D_file *frame, char *lab_xcol, char *lab_ycol, int *specId, float *xlens, float *ylens, int *il, int *nbsel)
int init_new_tiger_slice (E3D_file *frame, SLICE *slice, int npts)
int get_3D_slice_noalloc (E3D_file *frame, SLICE *signal, SLICE *noise, int index)
int get_lens_coordinates (E3D_file *frame, int specId, float *xlens, float *ylens)
int set_lens_coordinates (E3D_file *frame, int specId, float *xlens, float *ylens)

Define Documentation

#define extract_3D_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 608 of file compat.c.

Referenced by get_3D_slice_noalloc().


Function Documentation

int set_tiger_group E3D_file frame  ) 
 

set a tiger group description in a E3D file

Parameters:
frame [TIGERfile *] Tiger file structure

Definition at line 47 of file compat.c.

References GROUP::airmass, GROUP::angle, CHAR, disable_user_warnings(), GROUP::groupId, E3D_file::groups, HEXAGON, lg_label, E3D_file::ngroups, GROUP::parang, GROUP::poswav, GROUP::pressure, RD_desc(), GROUP::rel_humidity, restore_user_warnings(), GROUP::shape, GROUP::size1, GROUP::size2, SQUARE, GROUP::temperature, and upper_strg().

Referenced by close_tiger_frame(), and create_tiger_frame().

int create_tiger_frame E3D_file frame,
char *  name,
int  npix,
double  start,
double  step,
short  datatype,
char *  table_name,
char *  ident,
char *  unit
 

creates a new Tiger frame according to specifications

tbl_name,ident,unit)

Parameters:
frame [E3D_file *] Tiger file structure
name [char *] file name
npix [int ] nb of pixels (if common bounds, else -1)
start [double ] start value for lambda (if common bounds)
step [double ] step value for lambda
datatype [short ] type of data storage
table_name [char *] name of associated table
ident [char *] identifier
unit [char *] units

Definition at line 102 of file compat.c.

References create_E3D_file(), E3D_file::data_format, E3D_DATA, EURO3D_FORMAT, E3D_file::name, set_tiger_group(), E3D_file::table_name, and TIGER_FORMAT.

int close_tiger_frame E3D_file frame  ) 
 

set a tiger group description in a E3D file

Parameters:
frame [TIGERfile *] Tiger file structure

Definition at line 128 of file compat.c.

References close_E3D_file(), and set_tiger_group().

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

delete a spectrum in a E3D frame

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

Definition at line 146 of file compat.c.

References ERR_NOIMA, find_lens, free_spec_mem(), Handle_Error(), SPECTRUM::name, E3D_file::nbspec, E3D_file::noise, and E3D_file::signal.

int set_bigendian short  type  ) 
 

check the way bytes are stored

Parameters:
type [short ] units

Definition at line 190 of file compat.c.

Referenced by open_E3D_file().

int get_assoc_table_name char *  name,
char *  tab_name
 

returns the table name associated with a 3D frame

Parameters:
name [char *] frame name
tab_name [char *] table name

Definition at line 223 of file compat.c.

References append_datacube_extension(), IO_Format::datacubes, E3D_DATA, ERR_BAD_TYPE, ERR_OPEN, EURO3D_FORMAT, first_blk(), Handle_Error(), InputIO, lg_hist, lg_ident, lg_name, lg_unit, lg_version, OPEN_FILE_PERM, and TIGER_FORMAT.

Referenced by convert_datacube().

int get_lenses_no_from_table E3D_file frame,
int *  specId
 

return lenses number from associated table

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

Definition at line 277 of file compat.c.

References append_tbl_extension(), IO_Format::basic_io, close_table(), E3D_COL_ID, ERR_NOCOL, get_col_ref(), Handle_Error(), handle_select_flag(), InputIO, lg_name, E3D_file::nbspec, E3D_file::noise, open_table(), RD_tbl(), TABLE::row, E3D_file::signal, E3Dspec_desc::specId, and E3D_file::table_name.

Referenced by init_new_E3D_slice(), and init_new_tiger_slice().

int get_lenses_coord E3D_file frame,
char *  lab_xcol,
char *  lab_ycol,
int *  specId,
float *  xlens,
float *  ylens,
int *  il
 

get spectra ID and coordinates

Parameters:
frame [E3D_file *] E3D file structure
lab_xcol [char *] column label for x coord
lab_ycol [char *] column label for y coord
specId [int *] list of spectrum ID
xlens [float *] list of x coordinates
ylens [float *] list of y coordinates
il [int *] list of table rows

Definition at line 347 of file compat.c.

References append_tbl_extension(), IO_Format::basic_io, close_table(), E3D_COL_ID, ERR_NOCOL, ERR_NODATA, get_col_ref(), Handle_Error(), InputIO, lg_name, E3D_file::nbspec, E3D_file::noise, open_table(), RD_col(), RD_tbl(), TABLE::row, search_in_col(), E3D_file::signal, E3Dspec_desc::specId, and E3D_file::table_name.

int set_lenses_coord E3D_file frame,
char *  lab_xcol,
char *  lab_ycol,
int  nbl,
int *  specId,
float *  xlens,
float *  ylens
 

set spectra ID and coordinates in extension also

Parameters:
frame [E3D_file *] E3D file structure
lab_xcol [char *] column label for x coord
lab_ycol [char *] column label for y coord
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 421 of file compat.c.

References append_tbl_extension(), IO_Format::basic_io, close_table(), create_col(), create_table(), exist(), FLOAT, Handle_Error(), InputIO, LAB_COL_NO, lg_name, LONG, open_table(), set_ID_and_coordinates(), E3D_file::table_name, and WR_tbl().

int get_lenses_coord_select E3D_file frame,
char *  lab_xcol,
char *  lab_ycol,
int *  specId,
float *  xlens,
float *  ylens,
int *  il,
int *  nbsel
 

get associated lenses number and coordinates

Parameters:
frame [E3D_file *] 3D file structure
lab_xcol [char *] column label for x coord
lab_ycol [char *] column label for y coord
specId [int *] list of lens numbers
xlens [float *] list of x coordinates
ylens [float *] list of y coordinates
il [int *] list of table rows
nbsel [int *] nb of select lenses

Definition at line 471 of file compat.c.

References close_table(), E3D_COL_ID, ERR_NOCOL, get_col_ref(), Handle_Error(), handle_select_flag(), lg_name, E3D_file::nbspec, E3D_file::noise, open_table(), RD_col(), RD_tbl(), TABLE::row, E3D_file::signal, E3Dspec_desc::specId, and E3D_file::table_name.

int init_new_tiger_slice E3D_file frame,
SLICE slice,
int  npts
 

returns an initialised slice structure items

Parameters:
frame [E3D_file *] E3D file structure
slice [SLICE *] slice structure
npts [int ] nb of values in slice

Definition at line 553 of file compat.c.

References SLICE::data, SLICE::data_type, E3D_file::data_type, DOUBLE, ERR_ALLOC, FLOAT, get_lenses_no_from_table(), Handle_Error(), SLICE::index, INT, LONG, E3D_file::noise, SLICE::npts, SLICE::quality, SHORT, E3D_file::signal, SLICE::specId, and E3Dspec_desc::specId.

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

Definition at line 631 of file compat.c.

References ERR_BAD_PARAM, extract_3D_slice_noalloc, Handle_Error(), and has_common_bounds().

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

get associated coordinates to one lens

Parameters:
frame [E3D_file *] file structure
specId [int ] lens numbers
xlens [float *] x coordinates
ylens [float *] y coordinates

Definition at line 664 of file compat.c.

References close_table(), ERR_NOCOL, get_col_ref(), Handle_Error(), LAB_COL_NO, LAB_COL_XLD, LAB_COL_YLD, lg_name, open_table(), RD_tbl(), search_in_col(), and E3D_file::table_name.

Referenced by get_E3D_spaxels().

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

set associated coordinates to one lens

Parameters:
frame [E3D_file *] 3D file structure
specId [int ] lens numbers
xlens [float *] x coordinates
ylens [float *] y coordinates

Definition at line 709 of file compat.c.

References append_tbl_extension(), IO_Format::basic_io, close_table(), create_col(), create_table(), ERR_NOCOL, exist(), FLOAT, get_col_ref(), Handle_Error(), LAB_COL_NO, LAB_COL_XLD, LAB_COL_YLD, lg_name, LONG, open_table(), OutputIO, TABLE::row, search_in_col(), E3D_file::table_name, and WR_tbl().

Referenced by put_E3D_spaxels().


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