Filling Out the Header Data Structure

From The SBN Wiki
Revision as of 03:28, 26 January 2013 by Raugh (talk | contribs)
Jump to navigation Jump to search

The <Header> class is used to provide a brief description of a header associated with some other PDS data object. The header (or it could be a footer) must be a contiguous string of bytes, and must be described by an specific standard approved for use in the PDS4 archives (FITS and VICAR are common examples).

For additional explanation, see the PDS4 Standards Reference, or contact you PDS node consultant.

Following are the attributes you'll find in <Header>, in label order.

<name>

OPTIONAL

If you want to give the Header a distinguishable, human-readable name, this is the place.

<local_identifier>

OPTIONAL

If you need to be able to refer to this Header from elsewhere in the label, assign it a unique identifier using this attribute. If your value would make a simple variable name in a typical programming language, you should be OK syntactically.

<offset>

REQUIRED

Offset in bytes from the start of the file containing the Header to the byte where the actual Header content starts. You must specify the unit:

    <offset unit="byte">0</offset>

<object_length>

OPTIONAL

This is the total length of the Header, in bytes. You must specify the unit:

    <object_length unit="byte">28800</object_length>
Note: Not having a length for a Header that shares a data file with any other data object - as the common FITS and VICAR headers do - can be rather inconvenient for software that wants to pass the header to some other software for processing. If it's easy to include it, SBN recommends that you do. Reviewers may require it in some cases, depending on their experience attempting to use the data files.

<external_standard_id>

REQUIRED

Note: This should contain a very precise reference, including version number or date, to the standard governing the format of the contents of the HEADER. Unfortunately, none of the current standard values meets that criterion. If you are using a Header in an SBN data set, consult with your SBN contact for an appropriate value, and ignore any associated validation errors.

The curious can find a list of the standard values you shouldn't use in the Standard Values Quick Reference.

<encoding_type>

REQUIRED

If you're dealing with a header that consists of a series of characters with human-readable data, as in a FITS header or a VICAR header, this attribute should have the value Character. If the header contains data in encoded bytes, or numbers in binary format, this attribute should have the value Binary.


Note: According to the data dictionary, the value could be just about any string of 255 bytes or less. I assume this is an oversight.

<description>

OPTIONAL

This is a place for free-format comments and additional description.