Difference between revisions of "Filling Out the Header Data Structure"

From The SBN Wiki
Jump to navigation Jump to search
m
(Update for 1.10.1.0)
 
(2 intermediate revisions by the same user not shown)
Line 16: Line 16:
  
 
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.
 
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.
 +
 +
== <md5_checksum> ==
 +
 +
''OPTIONAL''
 +
 +
Use this attribute to provide the MD5 checksum of the object ''only''.  If the object occupies the entire file, then the checksum should be given as an attribute of the ''<File>'' object.  This checksum should be calculated using ''only'' the bytes defined as being part of this table.
  
 
== <offset> ==
 
== <offset> ==
Line 28: Line 34:
 
== <object_length> ==
 
== <object_length> ==
  
''OPTIONAL''
+
''REQUIRED''
  
 
This is the total length of the ''Header'', in bytes.  You must specify the unit:
 
This is the total length of the ''Header'', in bytes.  You must specify the unit:
Line 35: Line 41:
 
</pre>
 
</pre>
  
{| class="wikitable" style="background-color: khaki"
+
== &lt;parsing_standard_id&gt; ==
| '''''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.''
 
|}
 
 
 
== &lt;external_standard_id&gt; ==
 
 
 
''REQUIRED''
 
 
 
{| class="wikitable" style="background-color: thistle"
 
| '''''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#In_.3CHeader.3E|Standard Values Quick Reference]].''
 
|}
 
 
 
== &lt;encoding_type&gt; ==
 
  
 
''REQUIRED''
 
''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'''.
+
This should contain the appropriate standard value found in the data dictionary, and
 +
also available from the [[Standard_Values_Quick_Reference#In_.3CHeader.3E|Standard Values Quick Reference]] on this wiki.
  
 +
For SBN users, the correct answer for all FITS headers (primary and extension) is "FITS 3.0".
  
{| class="wikitable" style="background-color: thistle"
 
| '''''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.''
 
|}
 
  
 
== &lt;description&gt; ==
 
== &lt;description&gt; ==

Latest revision as of 19:04, 24 June 2018

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.

<md5_checksum>

OPTIONAL

Use this attribute to provide the MD5 checksum of the object only. If the object occupies the entire file, then the checksum should be given as an attribute of the <File> object. This checksum should be calculated using only the bytes defined as being part of this table.

<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>

REQUIRED

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

    <object_length unit="byte">28800</object_length>

<parsing_standard_id>

REQUIRED

This should contain the appropriate standard value found in the data dictionary, and also available from the Standard Values Quick Reference on this wiki.

For SBN users, the correct answer for all FITS headers (primary and extension) is "FITS 3.0".


<description>

OPTIONAL

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