Produced by IDL 7.1.1
User Documentation

./toolbox/io
io_sdfits_writer__define.pro

IO
|
+-IO_SDFITS
  |
  +-IO_SDFITS_LINE
    |
    +-io_sdfits_writer

All known superclasses:
IO_SDFITS_LINE, IO_SDFITS, IO
Last modification date:
Wed Sep 28 13:27:11 2016

IO_SDFITS_WRITER is intended for use by users who wish to write spectral line data to sdfits. See UML for all IO Classes, or IO_SDFITS UML for just the line and continuum sdfits classes.

Routine Summary  10 routines

procedure io_sdfits_writer__define

IO_SDFITS_WRITER is intended for use by users who wish to write spectral line data to sdfits.

procedure IO_SDFITS_WRITER::set_output_file, file_name

Sets the name of the output file, and if the file exists, creates an sdfits object for it

procedure IO_SDFITS_WRITER::set_file, file_name, file_path=string, index_name=string

Sets the file which this object will exclusively be writing to and reading from.

procedure IO_SDFITS_WRITER::nsave_spectrum, spectrum, nsave[, status]

Writes a single spectrum to the sdfits file, saving an NSAVE number in the index file corresponding to this spectrum

function IO_SDFITS_WRITER::get_nsave_index(nsave)

procedure IO_SDFITS_WRITER::overwrite_spectrum, index, spectrum, status=status

procedure IO_SDFITS_WRITER::write_spectra, spectra, file_name=string

Writes given spectra to an sdfits file.

procedure IO_SDFITS_WRITER::set_sprotect_on

Sets index file so nsave numbers cannot be overwritten

procedure IO_SDFITS_WRITER::set_sprotect_off

Sets index file so nsave numbers can be overwritten

function IO_SDFITS_WRITER::get_sprotect()

Retrieves the state of nsave protection

Routine Details

io_sdfits_writer__define

procedure io_sdfits_writer__define

IO_SDFITS_WRITER is intended for use by users who wish to write spectral line data to sdfits. See UML for all IO Classes, or IO_SDFITS UML for just the line and continuum sdfits classes.

Inherits
io_sdfits_line

IO_SDFITS_WRITER::set_output_file

procedure IO_SDFITS_WRITER::set_output_file, file_name

Sets the name of the output file, and if the file exists, creates an sdfits object for it

Uses
IO::file_exists IO_SDFITS::add_fits_obj

Parameters
file_name
in
string
full path name to the file to write to

IO_SDFITS_WRITER::set_file

procedure IO_SDFITS_WRITER::set_file, file_name, file_path=string, index_name=string

Sets the file which this object will exclusively be writing to and reading from. Acts much like IO_SDFITS::set_file in the way it forces creation of a new index file

Uses
IO_SDFITS::set_file_path IO_SDFITS_LINE::set_file IO_SDFITS::set_index_file_name IO_SDFITS::free_fits_objs

Parameters
file_name
in
string
file name (full path or not) of file to use exclusively

Keywords
file_path
in
string
file path where file_name is found
index_name
in
string
name to use for the index file

IO_SDFITS_WRITER::nsave_spectrum

procedure IO_SDFITS_WRITER::nsave_spectrum, spectrum, nsave[, status]

Writes a single spectrum to the sdfits file, saving an NSAVE number in the index file corresponding to this spectrum

Uses
get_nsave_index write_spectra overwrite_spectra

Parameters
spectrum
in, required
struct
the spectral line data container to be written
nsave
in, required
long
the integer identifier to associate with this spectrum
status
in, optional
long
set to 0 or 1 for failure or success

IO_SDFITS_WRITER::get_nsave_index

function IO_SDFITS_WRITER::get_nsave_index(nsave)

Parameters
nsave
.

IO_SDFITS_WRITER::overwrite_spectrum

procedure IO_SDFITS_WRITER::overwrite_spectrum, index, spectrum, status=status

Parameters
index
.
spectrum
.

Keywords
status
.

IO_SDFITS_WRITER::write_spectra

procedure IO_SDFITS_WRITER::write_spectra, spectra, file_name=string

Writes given spectra to an sdfits file. The spectra are translated to their proper form for sdfits, and the rows are written to the output file in extensions based off the data size of each spectrum.

Uses
IO_SDFITS_WRITER::set_output_file IO_SDFITS_WRITER::check_spectrum_size_uniformity IO_SDFITS_WRITER::spectra_to_rows IO_SDFITS_WRITER::write_rows_to_extension IO_SDFITS_WRITER::update_index_with_spectra

Parameters
spectra
in
array
array of spectrum data containers to write to disk

Keywords
file_name
in
string
if passed in, this is the name of the output file

IO_SDFITS_WRITER::set_sprotect_on

procedure IO_SDFITS_WRITER::set_sprotect_on

Sets index file so nsave numbers cannot be overwritten

IO_SDFITS_WRITER::set_sprotect_off

procedure IO_SDFITS_WRITER::set_sprotect_off

Sets index file so nsave numbers can be overwritten

IO_SDFITS_WRITER::get_sprotect

function IO_SDFITS_WRITER::get_sprotect()

Retrieves the state of nsave protection

Returns
0 - nsave numbers cannot be overwritten; 1 - they cannot be overwritten


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:44 2016