Produced by IDL 7.1.1
Developer Documentation

./toolbox/io
sdfits__define.pro

FITS
|
+-sdfits

All known superclasses:
FITS
Last modification date:
Wed Sep 28 13:27:15 2016

This class has all the same functionality as its superclass FITS, but contains special handling for known characteristics of sdfits files, for example what columns to expect in an extension.

Fields Summary
FITSVER
string
.
SDFITVER
string
.
SDFITVER_NUMBER
string
.
FROM_GBTIDL
longword integer
.
AUTO_OFFSETS
longword integer
.

Fields inherited from FITS:
string  FILE_NAME
longword integer  NUM_EXTENSIONS
pointer  EXTENSION_NAMES
pointer  EXTENSION_TYPES
pointer  AXIS
object reference  PRIMARY_HEADER
object reference  EXT_HEADER
longword integer  PROPERTIES_KNOWN
longword integer  DEBUG
string  VERSION

Routine Summary  21 routines

procedure sdfits__define

This class has all the same functionality as its superclass FITS, but contains special handling for known characteristics of sdfits files, for example what columns to expect in an extension.

procedure SDFITS::update_file_properties

Invokes the base class (FITS) update_file_properties and then sets the SDFITS properties

function SDFITS::has_header_keyword(keyword)

Checks wether the header contains given keyword

function SDFITS::is_gbtidl_file()

Checks wether this file was created by gbtidl or not

function SDFITS::get_sdfits_version_number()

Returns the sdfits program version used to create this file

function SDFITS::get_sdfits_version()

Returns the sdfits program version used to create this file

function SDFITS::get_fitsver()

Returns the FITSVER value found in the primary header @ returns '0.

function SDFITS::auto_apply_offsets()

Should any existing non-zero beam offsets be automatically applied when reading data from this file.

procedure SDFITS::create_sdfits_file, file_name

Creates a new blank fits file, with primary header info tagged for Green Bank

function SDFITS::get_extension_data_size(extension)

Retrives the size of the DATA column in given extension

function SDFITS::get_last_extension_data_size()

private

Retrieves the size of the DATA column for the last extension

function SDFITS::get_virtual_columns(header, non_virtual_list)

private

Retrives the keywords from a header that do not define the columns of the extension

function SDFITS::string_in_list(str, list)

private

Deprecated.

function SDFITS::get_and_eval_rows(missing, virtuals, row_nums, [ext=long], [/all_rows], no_data=no_data)

Retrieves rows from an sdfits file, and finds what columsn are missing, and what the important keywords are in the header

function SDFITS::get_missing_columns(present)

Finds what the missing columns are in a list of columns found in an sdfits file

function SDFITS::get_expected_col_names()

Retrives the names of columns expected to be found in an sdfits file

function SDFITS::check_sdfits_properties(file_name=file_name, verbose=verbose)

Checks sdfits file of this object (or of keyword) to see if it meets certain criteria: does it exist? does it have more then one extension? Is the last extension binary and of type 'SINGLE DISH'? keyword file_name {in}{optional}{type=string} file to check keword verbose {in}{optional}{type=boolean} print details when error found?

function SDFITS::exclude_data(rowStruct)

Takes in a structure representing an sdfits row, and returns the same structure, minus the DATA field

function SDFITS::mrdfits_exclude_data(file_name, ext, hdr)

Reads in sdfits file in chunks, and avoids the column excluded by exclude_data() thus saving memory and increasing performance.

function SDFITS::get_sdfits_row_sizes()

private

Returns sizes needed for ASCII columns in sdfits.

function SDFITS::define_sdfits_row(data_points)

Defines an anonymous structure that mirrors a row in an sdfits file, version 1.

Routine Details

sdfits__define

procedure sdfits__define

This class has all the same functionality as its superclass FITS, but contains special handling for known characteristics of sdfits files, for example what columns to expect in an extension.

Inherits
fits

SDFITS::update_file_properties

procedure SDFITS::update_file_properties

Invokes the base class (FITS) update_file_properties and then sets the SDFITS properties

Uses
FITS::update_file_properties

SDFITS::has_header_keyword

function SDFITS::has_header_keyword(keyword)

Checks wether the header contains given keyword

Returns
1 - has keyword; 0 - does not.

Parameters
keyword
in, required
string
keyword to check

SDFITS::is_gbtidl_file

function SDFITS::is_gbtidl_file()

Checks wether this file was created by gbtidl or not

Returns
1 - created by gbtidl, 0 - not.

SDFITS::get_sdfits_version_number

function SDFITS::get_sdfits_version_number()

Returns the sdfits program version used to create this file

Returns
'1.1' if there any problems, other wise, value of SDFITVER keyword

SDFITS::get_sdfits_version

function SDFITS::get_sdfits_version()

Returns the sdfits program version used to create this file

Returns
'sdfits ver 1.1' if there any problems, other wise, value of SDFITVER keyword

SDFITS::get_fitsver

function SDFITS::get_fitsver()

Returns the FITSVER value found in the primary header @ returns '0.0' if there are any problems.

SDFITS::auto_apply_offsets

function SDFITS::auto_apply_offsets()

Should any existing non-zero beam offsets be automatically applied when reading data from this file. This is only 1 (true) if the file is not from GBTIDL, if the SDFITVER keyword value exists, and if the FITSVER version is earlier than 1.7. Otherwise 0 (false) is returned.

SDFITS::create_sdfits_file

procedure SDFITS::create_sdfits_file, file_name

Creates a new blank fits file, with primary header info tagged for Green Bank

Uses
fxhmake fxwrite fxhmodify

Parameters
file_name
in
string
full path name of fits file to create

SDFITS::get_extension_data_size

function SDFITS::get_extension_data_size(extension)

Retrives the size of the DATA column in given extension

Parameters
extension
in, required
long
extension number (1-based) for which data column length is needed @ returns length of DATA column for given extension

SDFITS::get_last_extension_data_size private

function SDFITS::get_last_extension_data_size()

Retrieves the size of the DATA column for the last extension

Returns
size of DATA column

SDFITS::get_virtual_columns private

function SDFITS::get_virtual_columns(header, non_virtual_list)

Retrives the keywords from a header that do not define the columns of the extension

Returns
structure represneting the keywords-value pairs found

Parameters
header
in
array
string array of extension header keyword-value pairs
non_virtual_list
in
array
list of keywords that DO NOT describe columsn, but should NOT be included as virtuals

SDFITS::string_in_list private

function SDFITS::string_in_list(str, list)

Deprecated.

Parameters
str
.
list
.

SDFITS::get_and_eval_rows

function SDFITS::get_and_eval_rows(missing, virtuals, row_nums, [ext=long], [/all_rows], no_data=no_data)

Retrieves rows from an sdfits file, and finds what columsn are missing, and what the important keywords are in the header

Returns
array of structures representing the rows read in from sdfits extension
Uses
mredfits SDFITS::get_virtual_columns SDFITS::get_missing_columns

Parameters
missing
out
variable
string array of columns found to be missing
virtuals
out
variable
keyword-value pairs in header that dont describe columns
row_nums
in
array
row numbers to read

Keywords
ext
in, optional
long
extension number to read from
all_rows
in, optional
boolean
read all rows from extension?
no_data
.

SDFITS::get_missing_columns

function SDFITS::get_missing_columns(present)

Finds what the missing columns are in a list of columns found in an sdfits file

Returns
those columns that were expected but not found
Uses
SDFITS::get_expected_col_names

Parameters
present
in
array
list of columns present in sdfits extension

SDFITS::get_expected_col_names

function SDFITS::get_expected_col_names()

Retrives the names of columns expected to be found in an sdfits file

Returns
expected column names
Uses
SDFITS::define_sdfits_row

SDFITS::check_sdfits_properties

function SDFITS::check_sdfits_properties(file_name=file_name, verbose=verbose)

Checks sdfits file of this object (or of keyword) to see if it meets certain criteria: does it exist? does it have more then one extension? Is the last extension binary and of type 'SINGLE DISH'? keyword file_name {in}{optional}{type=string} file to check keword verbose {in}{optional}{type=boolean} print details when error found?

Returns
0,1

Keywords
file_name
.
verbose
.

SDFITS::exclude_data

function SDFITS::exclude_data(rowStruct)

Takes in a structure representing an sdfits row, and returns the same structure, minus the DATA field

Returns
identical sturcture to that passed in, minus the DATA field

Parameters
rowStruct
.

SDFITS::mrdfits_exclude_data

function SDFITS::mrdfits_exclude_data(file_name, ext, hdr)

Reads in sdfits file in chunks, and avoids the column excluded by exclude_data() thus saving memory and increasing performance. For use when reading in entire sdfits file just for header information (i.e. index file creation).

Returns
array of structures represnting the rows of the sdfits extension read, minus the DATA column

Parameters
file_name
in, required
string
full path name to the sdfits file to read
ext
in, required
long
extension to be read (0-based)
hdr
out, required
variable
string array represnting the header of the extension read

SDFITS::get_sdfits_row_sizes private

function SDFITS::get_sdfits_row_sizes()

Returns sizes needed for ASCII columns in sdfits. Problems: this exists here AND in IO_SDFITS_WRITER.

Returns
structure with sizes for ASCII columsn in sdfits

SDFITS::define_sdfits_row

function SDFITS::define_sdfits_row(data_points)

Defines an anonymous structure that mirrors a row in an sdfits file, version 1.7. Must be anonymos so that the DATA columns length can be defined at run-time. Problems: this exists here AND in IO_SDFITS_WRITER

Returns
structure mirroring row of an sdfits file
Uses
SDFITS::get_sdfits_row_sizes

Parameters
data_points
in
array
length of DATA column


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