Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Routines for SPECTRA i/o


Functions

int create_spec (SPECTRUM *spectrum, char *name, int npix, double start, double step, short datatype, char *ident, char *unit)
int header_spec (SPECTRUM *spectrum, char *name, char *mode)
int open_spec (SPECTRUM *spectrum, char *name, char *mode)
int close_spec (SPECTRUM *spectrum)
int delete_spec (SPECTRUM *spectrum)
int create_spec_mem (SPECTRUM *spectrum, int npix, double start, double step, short datatype)

Function Documentation

int create_spec SPECTRUM spectrum,
char *  name,
int  npix,
double  start,
double  step,
short  datatype,
char *  ident,
char *  unit
 

creates a new 1D frame according to specifications

Parameters:
spectrum [SPECTRUM *] spectrum structure
name [char *] spectrum filename
npix [int ] number of pixels
start [double ] start coordinate of spectrum
step [double ] step value for spectrum
datatype [short ] type of storage
ident [char *] identifier
unit [char *] units

Definition at line 1508 of file iolib.c.

References alloc_spec_mem(), append_ima_extension(), IO_Format::basic_io, CHAR, confirme_erase(), SPECTRUM::cunit, SPECTRUM::data, SPECTRUM::data_format, SPECTRUM::data_type, delete_spec(), SPECTRUM::end, ERR_WRIT, exist(), SPECTRUM::external_info, SPECTRUM::file_type, first_blk(), FITS_A_FORMAT, FITS_B_FORMAT, fits_bitpix(), get_datatype_code(), get_iomode_code(), get_tiger_errcode(), Handle_Error(), SPECTRUM::history, SPECTRUM::ident, IMA_TYPE, SPECTRUM::imno, SPECTRUM::iomode, IRAF_FORMAT, SPECTRUM::iwend, SPECTRUM::iwstart, lg_ident, lg_name, lg_unit, SPECTRUM::max, MIDAS_FORMAT, SPECTRUM::min, SPECTRUM::name, SPECTRUM::npts, O_MODE, OutputIO, SPECTRUM::start, SPECTRUM::step, STSDAS_FORMAT, SPECTRUM::wend, SPECTRUM::wmax, SPECTRUM::wmin, WR_desc(), and SPECTRUM::wstart.

Referenced by convert_spec().

int header_spec SPECTRUM spectrum,
char *  name,
char *  mode
 

updates the image structure items (does not map data !)

Parameters:
spectrum [SPECTRUM *] spectrum structure
name [char *] spectrum name
mode [char *] open mode (Input,Ouput,IO)

Definition at line 1633 of file iolib.c.

References append_ima_extension(), IO_Format::basic_io, CHAR, SPECTRUM::cunit, SPECTRUM::data, SPECTRUM::data_format, SPECTRUM::data_type, decode_datatype(), disable_user_warnings(), DOUBLE, SPECTRUM::end, ERR_ACCESS, ERR_IMA_HEAD, ERR_OPEN, ERR_READ, exist(), SPECTRUM::external_info, SPECTRUM::file_type, first_blk(), FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_iomode_code(), get_tiger_errcode(), Handle_Error(), SPECTRUM::history, I_MODE, SPECTRUM::ident, IMA_TYPE, SPECTRUM::imno, InputIO, INT, IO_MODE, SPECTRUM::iomode, IRAF_FORMAT, SPECTRUM::iwend, SPECTRUM::iwstart, lg_hist, lg_ident, lg_name, lg_unit, SPECTRUM::max, MIDAS_FORMAT, SPECTRUM::min, SPECTRUM::name, SPECTRUM::npts, O_MODE, RD_desc(), restore_user_warnings(), SPECTRUM::start, SPECTRUM::step, STSDAS_FORMAT, SPECTRUM::wend, SPECTRUM::wmax, SPECTRUM::wmin, and SPECTRUM::wstart.

Referenced by file_type().

int open_spec SPECTRUM spectrum,
char *  name,
char *  mode
 

opens a 1D frame and updates the spectrum structure items

Parameters:
spectrum [SPECTRUM *] spectrum structure
name [char *] spectrum name
mode [char *] open mode (Input,Ouput,IO)

Definition at line 1798 of file iolib.c.

References alloc_spec_mem(), append_ima_extension(), IO_Format::basic_io, CHAR, SPECTRUM::cunit, SPECTRUM::data, SPECTRUM::data_format, SPECTRUM::data_type, decode_datatype(), disable_user_warnings(), DOUBLE, SPECTRUM::end, ERR_ACCESS, ERR_ALLOC, ERR_IMA_HEAD, ERR_OPEN, ERR_READ, exist(), SPECTRUM::external_info, SPECTRUM::file_type, first_blk(), FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_iomode_code(), get_tiger_errcode(), Handle_Error(), SPECTRUM::history, I_MODE, SPECTRUM::ident, IMA_TYPE, SPECTRUM::imno, InputIO, INT, IO_MODE, SPECTRUM::iomode, IRAF_FORMAT, SPECTRUM::iwend, SPECTRUM::iwstart, lg_hist, lg_ident, lg_name, lg_unit, LONG, SPECTRUM::max, MIDAS_FORMAT, SPECTRUM::min, SPECTRUM::name, SPECTRUM::npts, O_MODE, RD_desc(), restore_user_warnings(), SHORT, spec_minmax(), SPECTRUM::start, SPECTRUM::step, STSDAS_FORMAT, SPECTRUM::wend, SPECTRUM::wmax, SPECTRUM::wmin, and SPECTRUM::wstart.

Referenced by convert_spec().

int close_spec SPECTRUM spectrum  ) 
 

closes a currently active 1D frame

Parameters:
spectrum [SPECTRUM *] spectrum structure

Definition at line 2029 of file iolib.c.

References IO_Format::basic_io, SPECTRUM::data, SPECTRUM::data_format, SPECTRUM::data_type, DOUBLE, SPECTRUM::end, ERR_WRIT, SPECTRUM::external_info, FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, free_spec_mem(), get_datatype_code(), get_tiger_errcode(), Handle_Error(), I_MODE, SPECTRUM::imno, INT, IO_MODE, SPECTRUM::iomode, IRAF_FORMAT, lg_name, LONG, MIDAS_FORMAT, SPECTRUM::name, SPECTRUM::npts, O_MODE, OutputIO, set_subspec(), SHORT, spec_minmax(), SPECTRUM::start, STSDAS_FORMAT, TK, SPECTRUM::wmax, SPECTRUM::wmin, WR_desc(), and WR_history().

Referenced by convert_spec(), and file_type().

int delete_spec SPECTRUM spectrum  ) 
 

delete a 1D frame

Parameters:
spectrum [SPECTRUM *] spectrum structure

Definition at line 2169 of file iolib.c.

References IO_Format::basic_io, SPECTRUM::data_format, SPECTRUM::external_info, FITS_A_FORMAT, FITS_B_FORMAT, free_spec_mem(), get_iomode_code(), get_tiger_errcode(), Handle_Error(), I_MODE, InputIO, IRAF_FORMAT, lg_name, MIDAS_FORMAT, SPECTRUM::name, and STSDAS_FORMAT.

Referenced by create_spec().

int create_spec_mem SPECTRUM spectrum,
int  npix,
double  start,
double  step,
short  datatype
 

creates a new spectrum into memory

Parameters:
spectrum [SPECTRUM *] spectrum structure
npix [int ] number of pixels
start [double ] start coordinate of spectrum
step [double ] step value for spectrum
datatype [short ] type of storage

Definition at line 2239 of file iolib.c.

References alloc_spec_mem(), IO_Format::basic_io, SPECTRUM::cunit, SPECTRUM::data_format, SPECTRUM::data_type, SPECTRUM::end, SPECTRUM::external_info, SPECTRUM::file_type, get_datatype_code(), get_iomode_code(), get_tiger_errcode(), Handle_Error(), SPECTRUM::history, SPECTRUM::ident, IMA_TYPE, SPECTRUM::iomode, SPECTRUM::iwend, SPECTRUM::iwstart, SPECTRUM::max, SPECTRUM::min, SPECTRUM::name, SPECTRUM::npts, O_MODE, OutputIO, SPECTRUM::start, SPECTRUM::step, SPECTRUM::wend, SPECTRUM::wmax, SPECTRUM::wmin, and SPECTRUM::wstart.


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