https://sbnwiki.astro.umd.edu/wiki/index.php?title=Using_the_Spectral_Dictionary&feed=atom&action=historyUsing the Spectral Dictionary - Revision history2024-03-29T08:55:52ZRevision history for this page on the wikiMediaWiki 1.34.1https://sbnwiki.astro.umd.edu/wiki/index.php?title=Using_the_Spectral_Dictionary&diff=2788&oldid=prevRaugh: Safety Save2019-05-03T01:30:46Z<p>Safety Save</p>
<p><b>New page</b></p><div>== Intro ==<br />
<br />
The ''Spectral Discipline Dictionary'' is used to provide observational and binning parameters for lightwave spectra. Other pages on this wiki you may wish to consult either before or during your perusal of this page:<br />
<br />
:* A [[Quick Introduction to the Spectral Dictionary]]<br />
:* [[Filling Out the Spectral Dictionary Classes]]<br />
:* [[Schema Referencing in PDS4 Labels]]<br />
<br />
This page assumes you're already familiar with the concepts introduced in the first document, and leaves details on Spectral classes and schema referencing to the other two documents. This page is concerned with mechanics and techniques for properly and effectively using the Spectral Dictionary classes.<br />
<br />
For some measure of convenience, when you see the little clipboard icon following some sample text, like this:<br />
::<clippy show="true">Click the icon to copy this text to your clipboard.</clippy><br />
you can click the icon to copy, and then paste the text into your label at the appropriate place. The little icon is not artificially intelligent, however, so you will need to edit the string to match your specific circumstances.<br />
<br />
'''''For the purposes of the following examples, the IM 1.13.0.0 (a.k.a. "1C00") version of the Spectral Dictionary is used. You will likely need to edit specific version numbers and file names to meet your particular version and environment needs.'''''<br />
<br />
== Setting up the Label for Validation ==<br />
<br />
If you use the recommended method for defining references for validation (as described in [[Schema Referencing in PDS4 Labels]]), the <code>&lt;?xml-model&gt;</code> processing instructions at the top of your label will look like this:<br />
::<clippy show="true"><?xml-model href="https://pds.nasa.gov/pds4/sp/v1/PDS4_SP_1C00_1100.sch" schematypens="http://purl.oclc.org/dsdl/schematron"?></clippy><br />
<br />
Similarly, if you're following the recommendations on that page for XSD referencing, then inside the <code>&lt;Product_Observational&gt;</code> tag you will need to add this namespace definition:<br />
::<clippy show="true">xmlns:sp="http://pds.nasa.gov/pds4/sp/v1"</clippy><br />
<br />
and this pair inside the quotes of your <code>xsi:schemaLocation</code> XML attribute:<br />
::<clippy show="true">http://pds.nasa.gov/pds4/sp/v1 https://pds.nasa.gov/pds4/sp/v1/PDS4_SP_1C00_1100.xsd</clippy><br />
<br />
The '''sp:''' prefix is reserved by PDS for classes and attributes from the ''Spectral Discipline Dictionary''.<br />
<br />
== Data Structures and Metadata Requirements ==<br />
<br />
Spectral data comes in a wide variety of formats, only some of which are supported by the Spectral Dictionary. (If you need to use an unsupported data structure application for your spectral data, please do contact the PDS node that will be reviewing and archiving your data so that metadata requirements can be agreed on well in advance of review.)<br />
<br />
Four basic data structures are supported, the first of which has a couple of formatting variations. The associated metadata varies a bit from structure to structure. <br />
<br />
<br />
'''Typographic Conventions'''<br />
<br />
In defining the metadata requirements here and following, XPath expressions are used. Only very simple XPath expressions will be used to represent the class hierarchy in the label. For example, for all lightwave spectra, the wavelength regime should be indicated. The attribute used to define wavelength regime is in the ''&lt;Science_Facets&gt;'' sub-class of the ''&lt;Primary_Result_Summary&gt;'' class, which itself is an optional subclass of the ''&lt;Observation_Area&gt;''. (We're going to assume you know where ''Observation_Area'' is in a product label.) This attribute may be repeated if a spectrum extends across regimes. So the requirement to specify wavelength regime looks like this:<br />
<br />
::* <code>Observation_Area/Primary_Result_Summary/Science_Facets/wavelength_range</code> must be specified (may be repeated)<br />
<br />
Classes and attributes in the pds: core namespace will not have a namespace prefix. Classes and attributes from the Spectral Dictionary will be prefixed with "'''sp:'''", as they typically would be in labels. So a specific value required for ''&lt;sp:spectrum_format&gt:'' would follow this format:<br />
<br />
::* <code>sp:Spectral_Characteristics/sp:spectrum_format</code> must be '''Tabulated-Flat'''.<br />
<br />
Where appropriate, standard values that must be typed exactly will be '''bold'''.<br />
<br />
<br />
=== General Metadata Requirements ===<br />
<br />
For all data products where the Spectral Discipline Dictionary is employed:<br />
:* <code>Observation_Area/Primary_Result_Summary/Science_Facets/wavelength_range</code> must be specified (may be multi-valued)<br />
:* <code>Observation_Area/Primary_Result_Summary/Science_Facets/discipline_name</code> should be '''Spectroscopy'''.<br />
:* The spectral data structure (table or array) must have a <code><local_identifier></code>.<br />
<br />
=== Tabulated Spectra ===<br />
<br />
When a table (character, binary, or delimited) contains one spectrum per table record, the spectral structure is referred to as "tabulated". There are three supported format variations for tabulated spectra:<br />
<br />
:; Flat<br />
:: ''Data Structure'': Each spectral bin is defined as a separate ''Field'' class - there are no ''Group_Field'' classes.<br />
:: ''Metadata Requirements'':<br />
:::* <code>Primary_Result_Summary/Science_Facets/facet1</code> should be '''Tabulated'''<br />
:::* <code>sp:Spectral_Characteristics/sp:spectrum_format</code> must be '''Tabulated-Flat'''<br />
:::* All ''Field'' classes must contain valid, unique <code><field_number></code> attributes.<br />
:::* <code>sp:Spectral_Charateristics/sp:value_field_number_list</code> must be used to identify the measured spectral point values.<br />
<br />
:; Grouped Parameters<br />
:: ''Data Structure'': ''Group_Field'' classes are provided for each type of data so that parameter values are stored contiguously in the record - that is, there is one ''Group_Field'' with only a single member ''Field'' for the measured intensities, a ''Group_Field'' for the bin centers ''Field'', and so on.<br />
:: ''Metadata Requirements'':<br />
:::* <code>Primary_Result_Summary/Science_Facets/facet1</code> should be '''Tabulated'''<br />
:::* <code>sp:Spectral_Characteristics/sp:spectrum_format</code> must be '''Tabulated-Parameter Groups'''<br />
:::* The ''Field'' class within the ''Group_Field'' for each parameter to be referenced must have a <code><name></code> attribute with a unique value.<br />
<br />
:; Grouped Points<br />
:: ''Data Structure'': A single ''Group_Field'' class is used to hold all parameters associated with a single spectral point; the ''Group_Field'' contains ''Field'' definitions for intensity, bin center, bin width, etc., and that group repeats for the number of points in the spectrum.<br />
:: ''Metadata Requirements'':<br />
:::* <code>Primary_Result_Summary/Science_Facets/facet1</code> should be '''Tabulated'''<br />
:::* <code>sp:Spectral_Characteristics/sp:spectrum_format</code> must be '''Tabulated-Point Groups'''<br />
:::* The ''Field'' classes for each parameter to be referenced within the ''Group_Field'' must have <code><name></code> attributes with unique values.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
== <Spectral_Characteristics> ==</div>Raugh