Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Routines for DESCRIPTORS read/write


Functions

int get_descr_type (void *anyfile, char *descr, short *type)
int Read_one_desc (void *anyfile, char *descr, short type, int nb_elt, void *val)
int RD_desc (void *anyfile, char *descr, short type, int nb_elt, void *val)
int WR_desc (void *anyfile, char *descr, short type,int nb_elt, void *val)
int WR_history (void *anyfile_out, void *anyfile_in)
int delete_desc (void *anyfile, char *descr)
int get_all_desc (void *anyfile_in, char ***descr_list)
int CP_non_std_desc (void *anyfile_in, void *anyfile_out)

Function Documentation

int get_descr_type void *  anyfile,
char *  descr,
short *  type
 

returns type of data in given descriptor

Parameters:
anyfile [(type) *] image, spectrum or table
descr [char *] name of descriptor
type [short *] type of data

Definition at line 321 of file iolib.c.

References CHAR, Anyfile::data_format, Descriptor::data_type, decode_datatype(), Descr_Items::descr_list, Descriptor::descr_name, DOUBLE, ERR_NODESC, Anyfile::external_info, FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_tiger_errcode(), Handle_Error(), Anyfile::imno, INT, IRAF_FORMAT, MIDAS_FORMAT, MIN, Anyfile::name, Descr_Items::nb_descr, Descriptor::nb_values, STSDAS_FORMAT, and TIGER_FORMAT.

Referenced by CP_non_std_desc().

int Read_one_desc void *  anyfile,
char *  descr,
short  type,
int  nb_elt,
void *  val
 

Definition at line 440 of file iolib.c.

References CHAR, Anyfile::data_format, Descriptor::data_type, Descr_Items::descr_list, Descriptor::descr_name, Descriptor::descr_value, DOUBLE, ERR_BAD_DESC, ERR_NODESC, EURO3D_FORMAT, Anyfile::external_info, Anyfile::file_type, FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_datatype_code(), get_tiger_errcode(), Handle_Error(), Anyfile::imno, INT, IRAF_FORMAT, LONG, MIDAS_FORMAT, MIN, Anyfile::name, Descr_Items::nb_descr, Descriptor::nb_values, SHORT, sizeof_item(), STSDAS_FORMAT, TBL_TYPE, and TIGER_FORMAT.

Referenced by RD_desc().

int RD_desc void *  anyfile,
char *  descr,
short  type,
int  nb_elt,
void *  val
 

reads values in descriptor, returns number of values read

Parameters:
anyfile [(type) *] image, spectrum or table
descr [char *] name of descriptor (or list of synonym)
type [short ] type of data
nb_elt [int ] number of elements to read
val [(type) *] array to store values

Definition at line 672 of file iolib.c.

References disable_user_warnings(), ERR_BAD_DESC, Handle_Error(), Anyfile::name, Read_one_desc(), and restore_user_warnings().

Referenced by close_table(), copy_table_desc(), CP_non_std_desc(), get_col_width(), handle_select_flag(), header_cube(), header_frame(), header_spec(), open_cube(), open_E3D_file(), open_frame(), open_spec(), open_table(), read_file_class(), and set_tiger_group().

int WR_desc void *  anyfile,
char *  descr,
short  type,
int  nb_elt,
void *  val
 

writes values in given descriptor

Parameters:
anyfile [(type) *] image, spectrum or table
descr [char *] name of descriptor
type [short ] type of data
nb_elt [int ] number of elements
val [(type) *] array of values to be stored

Definition at line 722 of file iolib.c.

References alloc_new_desc(), CHAR, Anyfile::data_format, Descriptor::data_type, Descr_Items::descr_list, Descriptor::descr_name, Descriptor::descr_value, DOUBLE, ERR_BAD_DESC, EURO3D_FORMAT, Anyfile::external_info, Anyfile::file_type, FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_datatype_code(), get_tiger_errcode(), Handle_Error(), Anyfile::imno, INT, IRAF_FORMAT, lg_unit, LONG, MIDAS_FORMAT, Anyfile::name, Descr_Items::nb_descr, Descriptor::nb_values, SHORT, sizeof_item(), STSDAS_FORMAT, TBL_TYPE, TIGER_FORMAT, and upper_strg().

Referenced by close_cube(), close_frame(), close_spec(), close_table(), copy_table_desc(), CP_non_std_desc(), create_col(), create_cube(), create_E3D_file(), create_frame(), create_spec(), create_table(), set_super_class(), unset_super_class(), WR_history(), write_file_class(), and write_selection().

int WR_history void *  anyfile_out,
void *  anyfile_in
 

updates the descriptor History (or creates it if necessary)

Parameters:
anyfile_out [(type) *] image, spectrum or table (input)
anyfile_in [(type) *] image, spectrum or table (output)

Definition at line 1010 of file iolib.c.

References CHAR, Cmd_History, exist_extension(), Anyfile::history, lg_hist, lg_name, Anyfile::name, and WR_desc().

Referenced by close_cube(), close_E3D_file(), close_frame(), close_spec(), and close_table().

int delete_desc void *  anyfile,
char *  descr
 

writes values in given descriptor

Parameters:
anyfile [(type) *] image, spectrum or table
descr [char *] name of descriptor

Definition at line 1060 of file iolib.c.

References Anyfile::data_format, Descr_Items::descr_list, Descriptor::descr_name, ERR_BAD_DESC, Anyfile::external_info, Anyfile::file_type, FITS_A_FORMAT, FITS_B_FORMAT, get_tiger_errcode(), Handle_Error(), Anyfile::imno, IRAF_FORMAT, lg_unit, MIDAS_FORMAT, MIN, Anyfile::name, Descr_Items::nb_descr, STSDAS_FORMAT, TBL_TYPE, TIGER_FORMAT, and upper_strg().

int get_all_desc void *  anyfile_in,
char ***  descr_list
 

returns number of descriptors and their names

Parameters:
anyfile_in [(type) *] image, spectrum or table
descr_list [char **] list of descriptors

Definition at line 1165 of file iolib.c.

References alloc2d(), CHAR, Anyfile::data_format, Descr_Items::descr_list, Descriptor::descr_name, disable_user_warnings(), ERR_READ, Anyfile::external_info, first_blk(), FITS_A_FORMAT, FITS_B_FORMAT, Anyfile::imno, IRAF_FORMAT, lg_label, MIDAS_FORMAT, Descr_Items::nb_descr, restore_user_warnings(), STSDAS_FORMAT, and TIGER_FORMAT.

int CP_non_std_desc void *  anyfile_in,
void *  anyfile_out
 

copies all but standard descriptors from first file to second one

Parameters:
anyfile_in [(type) *] image, spectrum or table
anyfile_out [(type) *] image, spectrum or table

Definition at line 1291 of file iolib.c.

References CHAR, Anyfile::data_format, Descriptor::data_type, Descr_Items::descr_list, Descriptor::descr_name, disable_user_warnings(), DOUBLE, ERR_BAD_TYPE, ERR_READ, Anyfile::external_info, first_blk(), FITS_A_FORMAT, FITS_B_FORMAT, fits_non_std_desc(), FLOAT, get_descr_type(), Anyfile::imno, INT, IRAF_FORMAT, lg_label, MIDAS_FORMAT, Descr_Items::nb_descr, Descriptor::nb_values, print_progress(), RD_desc(), restore_user_warnings(), sizeof_item(), STSDAS_FORMAT, TIGER_FORMAT, and WR_desc().

Referenced by convert_datacube(), convert_image(), convert_spec(), and convert_table().


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