Difference between revisions of "Filling Out the Uniformly Sampled Class"

From The SBN Wiki
Jump to navigation Jump to search
(Update for Release 1.0)
 
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
The '''''<Uniformly_Sampled>''''' class can be used in any table-type class (like ''<Table_Character>'') when the table contains records which are uniformly spaced in some dimension (time, wavelength, distance, etc.).  This class is used to define that dimension and interval rather than including an additional field in each row to hold the value explicitly.
 
The '''''<Uniformly_Sampled>''''' class can be used in any table-type class (like ''<Table_Character>'') when the table contains records which are uniformly spaced in some dimension (time, wavelength, distance, etc.).  This class is used to define that dimension and interval rather than including an additional field in each row to hold the value explicitly.
  
{| class="wikitable" style="background-color: yellow"
+
{| class="wikitable" style="background-color: lightcyan"
 
|  
 
|  
 
: There are certain types of data where this class can prevent a very large data file from increasing in size by %50. Such tables are predominantly used by software, not human readers scanning them by eye. For SBN data, our users generally prefer to see the additional column. So unless those two conditions apply to your data, you should include the extra column.
 
: There are certain types of data where this class can prevent a very large data file from increasing in size by %50. Such tables are predominantly used by software, not human readers scanning them by eye. For SBN data, our users generally prefer to see the additional column. So unless those two conditions apply to your data, you should include the extra column.
Line 8: Line 8:
 
For additional explanation, see the PDS4 ''Standards Reference'', or contact your PDS node consultant.
 
For additional explanation, see the PDS4 ''Standards Reference'', or contact your PDS node consultant.
  
Following are the attributes and subclasses you'll find in ''<Uniformly_Samples>'', in label order.
+
Following are the attributes and subclasses you'll find in ''<Uniformly_Sampled>'', in label order.
  
 
''Note that in the PDS4 master schema, all classes have capitalized names; attributes never do.''
 
''Note that in the PDS4 master schema, all classes have capitalized names; attributes never do.''
Line 22: Line 22:
 
''REQUIRED''
 
''REQUIRED''
  
Distance between records in units of the sampling parameter. So if you're sampling in time, the interval might be 100 milliseconds, for example.
+
Distance between records in units of the sampling parameter. So if you're sampling in time the interval might be 100 milliseconds, for example, so the value you would put here is ''100''.
  
 
== <sampling_parameter_unit> ==
 
== <sampling_parameter_unit> ==
Line 28: Line 28:
 
''REQUIRED''
 
''REQUIRED''
  
The unit associated with the ''sampling_parameter_interval''.
+
The unit associated with the ''sampling_parameter_interval'',
 +
''first_sampling_parameter_value'', and ''last_sampling_parameter_value'', following.  In the previous example, this would be ''ms''.
  
 
== <first_sampling_parameter_value> ==
 
== <first_sampling_parameter_value> ==
Line 34: Line 35:
 
''REQUIRED''
 
''REQUIRED''
  
The value of the sampling parameter at the point where the data of the first record were recorded.
+
The value of the sampling parameter at the point where the data of the first record were recorded. The data dictionary specifically indicates that the minimum sampling parameter value corresponds to the first datum of the sampling interval - so it directly corresponds to the first sample.
{| class="wikitable" style="background-color: yellow"
 
|
 
: The data dictionary does not indicate whether this is the value at the beginning of the sample, in the middle, or at some other point. There is no descriptive field in this class, so if you're specifying ''Uniformly_Sampled'' information for your data your should use the ''<description>'' field in the table to provide this detail.
 
 
 
: '''''Note:''''' The data dictionary is specifically ambiguous about the relationship between ''first_sampling_parameter'' and the first record in the table. It does specifically state that ''first_sampling_parameter'' must be less than ''last_sampling_parameter'', but provides no way to associate either of those to the first (or last) record in the table. So, in general, you should also use the table <description> to indicate that correspondence, especially in the case where the ''last_sampling_parameter'' is actually associated with the '''''first''''' record in the table.
 
|}
 
  
 +
The units for this value are in the ''sampling_parameter_unit'' attribute, above.
  
 
== <last_sampling_parameter_value> ==
 
== <last_sampling_parameter_value> ==
Line 47: Line 43:
 
''REQUIRED''
 
''REQUIRED''
  
The value of the sampling parameter at the point where the data of the last record were recorded.  Also see the yellow box warning under ''first_sampling_parameter'', above.
+
The value of the sampling parameter at the point where the data of the last record were recorded.   
  
 +
The units for this value are in the ''sampling_parameter_unit'' attribute, above.
  
 
== <sampling_parameter_scale> ==
 
== <sampling_parameter_scale> ==
 +
 +
''REQUIRED''
 +
 +
This is actually the type of the scale. It must be one of the standard values '''Exponential''', '''Linear''', or '''Logarithmic'''.  If you specify a type of ''Exponential'', you must also include a ''<sampling_parameter_base>'' attribute.  Logarithmic scales are assumed to be base 10 unless a ''<sampling_parameter_base>'' attribute is present with a different value.
 +
 +
== <sampling_parameter_base> ==
  
 
''OPTIONAL''
 
''OPTIONAL''
  
This is actually the type of the scale. It must be one of the standard values '''Exponential''', '''Linear''', or '''Logarithmic'''. In the anscence of a <sampling_parameter_scale>, you can safely assume the scale is linear. If you use this value for one table in your product, though, you should use it for all of them.
+
This attribute is required to be present and greater than 0.0 for exponential sampling scales. It is optional (but still required to be greater than 0.0) for logarithmic scales (base 10 is assumed if this attribute is not present). It is prohibited if the scale is linear.

Latest revision as of 15:37, 11 January 2017

The <Uniformly_Sampled> class can be used in any table-type class (like <Table_Character>) when the table contains records which are uniformly spaced in some dimension (time, wavelength, distance, etc.). This class is used to define that dimension and interval rather than including an additional field in each row to hold the value explicitly.

There are certain types of data where this class can prevent a very large data file from increasing in size by %50. Such tables are predominantly used by software, not human readers scanning them by eye. For SBN data, our users generally prefer to see the additional column. So unless those two conditions apply to your data, you should include the extra column.

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

Following are the attributes and subclasses you'll find in <Uniformly_Sampled>, in label order.

Note that in the PDS4 master schema, all classes have capitalized names; attributes never do.

<sampling_parameter_name>

REQUIRED

The name of the dimension of sampling (wavelength, time, etc.)

<sampling_parameter_interval>

REQUIRED

Distance between records in units of the sampling parameter. So if you're sampling in time the interval might be 100 milliseconds, for example, so the value you would put here is 100.

<sampling_parameter_unit>

REQUIRED

The unit associated with the sampling_parameter_interval, first_sampling_parameter_value, and last_sampling_parameter_value, following. In the previous example, this would be ms.

<first_sampling_parameter_value>

REQUIRED

The value of the sampling parameter at the point where the data of the first record were recorded. The data dictionary specifically indicates that the minimum sampling parameter value corresponds to the first datum of the sampling interval - so it directly corresponds to the first sample.

The units for this value are in the sampling_parameter_unit attribute, above.

<last_sampling_parameter_value>

REQUIRED

The value of the sampling parameter at the point where the data of the last record were recorded.

The units for this value are in the sampling_parameter_unit attribute, above.

<sampling_parameter_scale>

REQUIRED

This is actually the type of the scale. It must be one of the standard values Exponential, Linear, or Logarithmic. If you specify a type of Exponential, you must also include a <sampling_parameter_base> attribute. Logarithmic scales are assumed to be base 10 unless a <sampling_parameter_base> attribute is present with a different value.

<sampling_parameter_base>

OPTIONAL

This attribute is required to be present and greater than 0.0 for exponential sampling scales. It is optional (but still required to be greater than 0.0) for logarithmic scales (base 10 is assumed if this attribute is not present). It is prohibited if the scale is linear.