Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Retrieving I/O parameters according to data format


Functions

void append_ima_extension (char *name, short format)
void append_tbl_extension (char *name, short format)
void append_datacube_extension (char *name, short format)
void remove_file_extension (char *name)
char * file_format (char *filename)
int file_type (char *filename)
int exist_extension (char *file)
int get_iomode_code (short data_format, int iomode)
int get_datatype_code (short data_format, short data_type)
short decode_datatype (short data_format, short data_type)
int sizeof_item (short data_type)

Function Documentation

void append_ima_extension char *  name,
short  format
 

appends extension to filename according to given format

Parameters:
name [char *] image name
format [short ] image format

Definition at line 191 of file io_misc.c.

References FITS_A_FORMAT, FITS_B_FORMAT, IRAF_FORMAT, MIDAS_FORMAT, and STSDAS_FORMAT.

Referenced by create_cube(), create_frame(), create_spec(), file_format(), header_cube(), header_frame(), header_spec(), open_cube(), open_frame(), and open_spec().

void append_tbl_extension char *  name,
short  format
 

appends extension to filename according to given format

Parameters:
name [char *] table name
format [short ] table format

Definition at line 224 of file io_misc.c.

References FITS_A_FORMAT, FITS_B_FORMAT, IRAF_FORMAT, MIDAS_FORMAT, and STSDAS_FORMAT.

Referenced by close_E3D_file(), create_E3D_file(), create_table(), get_ID_and_coordinates(), get_lenses_coord(), get_lenses_no_from_table(), init_new_E3D_slice(), open_table(), set_ID_and_coordinates(), set_lens_coordinates(), and set_lenses_coord().

void append_datacube_extension char *  name,
short  format
 

appends extension to filename according to given format

Parameters:
name [char *] table name
format [short ] table format

Definition at line 258 of file io_misc.c.

References EURO3D_FORMAT, and TIGER_FORMAT.

Referenced by create_E3D_file(), delete_E3D_file(), get_assoc_table_name(), and open_E3D_file().

void remove_file_extension char *  name  ) 
 

remove a filename extension if any

Parameters:
name [char *] table name

Definition at line 286 of file io_misc.c.

Referenced by create_E3D_file().

char* file_format char *  filename  ) 
 

returns the file format (i.e. Midas, FITS, Iraf, etc ...)

Parameters:
filename [char *] filename

Definition at line 309 of file io_misc.c.

References append_ima_extension(), IO_Format::basic_io, FITS_B_FORMAT, IMA_TYPE, InputIO, IRAF_FORMAT, MIDAS_FORMAT, T_TIGER, T_TIGMAX, TBL_TYPE, and TIGER_FORMAT.

Referenced by file_type().

int file_type char *  filename  ) 
 

returns the filetype (i.e. spectrum, image, table ..)

Parameters:
filename [char *] filename (including extension !)

Definition at line 402 of file io_misc.c.

References close_frame(), close_spec(), disable_user_warnings(), file_format(), header_frame(), header_spec(), IMA_TYPE, restore_user_warnings(), T_IMA1D, T_IMA2D, T_TABLE, TBL_TYPE, and TIGER_FORMAT.

int exist_extension char *  file  ) 
 

returns true if extension already exist in file

Parameters:
file [char *] filename with extension

Definition at line 463 of file io_misc.c.

Referenced by exist(), and WR_history().

int get_iomode_code short  data_format,
int  iomode
 

returns the iomode code according to data format

Parameters:
data_format [short ] code for data format
iomode [int ] required i/o mode

Definition at line 493 of file io_misc.c.

References FITS_A_FORMAT, FITS_B_FORMAT, I_MODE, IO_MODE, IRAF_FORMAT, MIDAS_FORMAT, O_MODE, and STSDAS_FORMAT.

Referenced by close_table(), create_cube(), create_frame(), create_spec(), create_spec_mem(), create_table(), delete_cube(), delete_frame(), delete_spec(), delete_table(), header_cube(), header_frame(), header_spec(), open_cube(), open_E3D_file(), open_frame(), open_spec(), and open_table().

int get_datatype_code short  data_format,
short  data_type
 

returns the datatype code according to data format

Parameters:
data_format [short ] code for data format
data_type [short ] required data type

Definition at line 554 of file io_misc.c.

References CHAR, DOUBLE, EURO3D_FORMAT, FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, INT, IRAF_FORMAT, LONG, MIDAS_FORMAT, SHORT, and STSDAS_FORMAT.

Referenced by close_cube(), close_frame(), close_spec(), create_col(), create_cube(), create_frame(), create_spec(), create_spec_mem(), RD_col(), RD_tbl(), Read_one_desc(), WR_desc(), and WR_tbl().

short decode_datatype short  data_format,
short  data_type
 

returns the data type

Parameters:
data_format [short ] code for data format
data_type [short ] coded data type

Definition at line 642 of file io_misc.c.

References FITS_A_FORMAT, FITS_B_FORMAT, IRAF_FORMAT, MIDAS_FORMAT, and STSDAS_FORMAT.

Referenced by get_col_info(), get_descr_type(), header_cube(), header_frame(), header_spec(), open_cube(), open_frame(), and open_spec().

int sizeof_item short  data_type  ) 
 

returns the size of given item

Parameters:
data_type [short ] coded data type

Definition at line 728 of file io_misc.c.

References CHAR, DOUBLE, FLOAT, INT, LONG, and SHORT.

Referenced by alloc_new_desc(), close_E3D_file(), CP_non_std_desc(), extract_E3D_slice(), extract_E3D_spec(), open_E3D_file(), RD_col(), Read_one_desc(), save_E3D_slice(), save_E3D_spec(), search_in_col(), and WR_desc().


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