Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page describes how the RPW CDF files are generated by the ROC pipelines, and what are the tools required

ROC CDF file-related convention

...

...

Table of content

Table of Contents

RPW CDF Data Standards

RPW/SOLAR ORBITER CDF DATA

The SOL-SGS-TN-0009 document from ESA gives the convention to be applied by the in situ instrument teams concerning the CDF data products. This document can be found in https://issues.cosmos.esa.int/solarorbiterwiki/display/SOSP/SOC+Documents.

...

RPW/ROC-SGSE CDF DATA

The conventions concerning the RPW data - format, metadata, file naming convention, versioning, etc. - produced on-ground by the ROC-SGSE during the on-ground calibration tests at system level can be found in the "Data format and metadata definition for the ROC-SGSE" document.

...

RPW CDF file creation mechanism

Every ROC RPW CDF data files must be produced using the CDF skeleton mechanism (for more information about CDF and skeletons, visit https://cdf.gsfc.nasa.gov/).

Figure below describes the CDF generation mechanism specific to the RPW CDF data files.

View file
namerpw_cdf-data-prod-flow_v06.pdf
Image Removed
height400


The main steps are:

  1. Each team writes the skeleton CDF skeleton files for their RPW sub-system data sets in a specific Excel 2007 formatASCII format named "skeleton tables" (.skt). It must be one Excel file skeleton table per data set.
  2. From these Excel skeleton files, the teams can generate the corresponding CDF skeleton tables in ASCII format and the master CDF binary files in binary format, using the MASER4PY module (see section "ROC CDF SKELETON CONVERSION PROCEDURE" below).
  3. The CDF master files can be then used by the software to produce the CDF data files.

NOTES:

  1. These skeleton tables are then delivered to the ROC using the mechanism defined in the "ROC Engineering Guidelines for External Users" (REGU) document (see ROC-GEN-SYS-NTT-00019-LES, available in ROC Documents).
  2. After verifications, the skeleton tables are then exported as "master" CDF files by the ROC team. In the same time, copies in the Excel 2007 format (.xlsx) are also created. Both "master" CDFs and Excel copies are made available as soon as possible by the ROC, as described in the REGU.
  3. The RPW Data Product Description Document (DPDD) is generated from Excel export files.

NOTES:

  • The ROC team will also automatically generate the skeleton tables and master CDF files from the Excel format files.
  • The name of the skeleton file for each data set is reported in the "Data Definition Schema File" column in the ROC-SGSE and RPW data products lists.

...

Building CDF file name for science data

The file naming convention for the RPW CDF data files is defined in [RD1].

The ROC pipelines only supplies the path to the output directory to the software, including the RCS.
In consequence, the During data production, the name of the output CDF science data files shall be named by the software them-self, using the values of global attributes saved in the corresponding master CDF, the parent CDF files (e.g., L1 CDF file) and information transmitted by the software (e.g. date of creation).CDFs will be provided by the ROC pipelines as input arguments to the RCS software (see RCS ICD, available in ROC Documents for more details).

The For instance, the following table indicates where CDF file name fields come from in the case of the ROC-SGSE.RODP. This convention must comply the SOL-SGS-TN-0009 doc. specification.

FIELDORIGINFieldOrigin
SourceNameCopy of the "Source_name" global attributes attribute prefix value in the corresponding Master CDF in lower case. (i.e. "solo")
Level

Copy of the "Level" global attributes prefix value in the corresponding Master CDF (e.g. "L1")

DescriptorCopy of the "Descriptor" global attributes attribute value in the corresponding Master CDF
TestIdCopy of the "Test_id" global attributes value in the parent CDF. If more than one parent CDF files is used, they all shall provide the same "Test_id" value.
ProviderCopy of the "Provider" global attributes value in the parent CDF. If more than one parent CDF files is used, they all shall provide the same "Provider" value.
in lower case.
dateTimeSee SOL-SGS-TN-0009
Free_fieldOnly used by the ROC-SGSE to indicate the data provider and test log ID
VXX2-digits version VXXVersion XX of the current CDF data file , transmitted by the Software and/or from information inside the Master CDFs.

In all case, the ROC pipelines will automatically check a posteriori the validity of the output file naming, and the consistency with the global attributes saved inside the file.

ROC CDF SKELETON FILE ARCHIVING

  • The Excel skeleton files shall be delivered to the ROC team for archiving.
  • The Excel skeleton files related to the ROC-SGSE (i.e., on-ground calibration tests data sets) shall be uploaded in the following ROC SVN directory:

https://version-lesia.obspm.fr/repos/ROC/GroundTests/ROC-SGSE/Data/Schemas/CDF/Excel/

  • The Excel skeleton files related to the RPW Data Processing Pipeline (RDPP) (i.e., Solar Orbiter mission data sets) shall be uploaded in the following ROC SVN directory:

https://version-lesia.obspm.fr/repos/ROC/DataProcessing/RPW/Data/Schemas/CDF/Excel/

  • The Excel skeleton files related to the RPW Low Latency Pipeline (RLLP) shall be uploaded in the following ROC SVN directory:

https://version-lesia.obspm.fr/repos/ROC/DataProcessing/LowLatency/Data/Schemas/CDF/Excel/

ROC CDF SKELETON FILE EXAMPLES

Here are example CDF files for RPW L1 HFR data set (restricted access):

...

(must match with the Data_version global attribute value).


Warning
titleWarning
  • The Data_version of a RPW CDF is not the Skeleton_version, which is used to trace the modifications of the skeleton table.
  • The Data_version of a RPW CDF is defined at the file-level granularity. It starts at "01", then must be incremented each time a new version of the given CDF is generated.

RPW CDF skeleton file storing

RPW skeleton files archive is stored in the ROC DataPool Git repository: https://gitlab.obspm.fr/ROC/DataPool/

...

tree/master/

...

ROADS/

...

RODP/CDF

ROC CDF Skeleton Conversion Tools

...

ROC CDF SKELETON CONVERSION PROCEDURE

Conversion of a CDF skeleton

...

files between ASCII, binary and Excel formats

The "maser4py" python package can be used In order to convert a given CDF skeleton file in between the Excel 2007 format "skeleton.xlsx" into a ASCII skeleton table "skeleton.skt", you need to use the "maser4py" python package.ASCII, binary and Excel formats,

maser4py The maser4py package can be installed using pip tool with the command:

pip install maser4py

See https://pypi.python.org/pypi/maser4py for more details.

Note
titleIMPORTANT
  • The maser4py package only works with Python 3.4 or higher.
  • An instance of the maser4py is installed on the roc-dev.obspm.fr server. To call it from a terminal using the BASH shell, first run the command "source /opt/roc/virtualenvs/maser/bin/activate", in order to activate the "maser" virtual environment. Then, just enter the "maser" command from the terminal.

Conversion of a CDF skeleton table to the master CDF binary file

The maser4py package can be also used to generate both the ASCII skeleton and master CDF binary filesmain way to convert a CDF skeleton table to a master CDF binary file is to use the "skeletoncdf" tool of the NASA CDF standard library (https://cdf.gsfc.nasa.gov/).

Be sure that the NASA GSFC CDF software distribution V3.6 is installed on your system, and that the "skeletoncdf" program can be called from terminal.
(Visit visit [RD2] to download the GSFC CDF soft.)
Note that if the output CDF master filename is not provided, then skeletoncdf program will named it using the "CDF_NAME" parameter defined in the skeleton header.

A copy of the GSFC CDF Soft. dist. as well as the xlsx2skt module are . V3.6.1 is ready to be used on the roc-dev.obspm.fr.
To load these libraries at login, just enter:

...

For any issue or feedback, please contact the roc team.

SOME RULES TO KEEP IN MIND WHEN EDITING A CDF SKELETON FILE FOR THE ROC

...

Info
titleINFO

The master CDF binary file can also be generated from the skeleton table using the skeletoncdf module of the maser4py package.

Some rules to keep in mind when editing a CDF skeleton file

About CDF variables

  • All of the CDF variables shall be zVariables
  • The first variable on the CDF file shall always be "Epoch" (becareful that the variable naming is case sensitive).
  • Except "Epoch", all of the variables shall be named using capital letters only, shall start with a letter and shall contain alphanumeric plus underscore and hyphens characters only
  • Variables of "Data" type shall be real or integer only: CDF_UINT1, CDF_UINT2, CDF_UINT4, CDF_INT1, CDF_INT2, CDF_INT4, CDF_REAL4, and CDF_REAL8.
  • The variables shall always be non-fixed "Record variance" (i.e., "T")
  • The "Number Elements" parameter of a given variable is always "1", except for CDF_[U]CHAR data type, where it gives the (maximal) number of characters in the string.
  • A scalar variable shall always has a 0 dimension (i.e., "Dims = 0)

...

About variable attributes

  • The "DEPEND_0" variable attribute value shall always be "Epoch".
  • Depending of variable data type, the FILLVAL attribute value shall comply the ISTP guidelines (see http://spdf.gsfc.nasa.gov/istp_guide/vattributes.html#FILLVAL)
  • The CDF data type of the following attributes shall match the corresponding zVariable data type: "VALIDMIN", "VALIDMAX", "SCALEMIN", "SCALEMAX", "FILLVAL".
  • Make sure to always give a default value for the following attributes: "VALIDMIN", "VALIDMAX", "SCALEMIN", "SCALEMAX", "FILLVAL". If you do not know which values to give to ["VALIDMIN", "VALIDMAX"] you should use the maximal data type encoding values, but not the FILLVAL value (e.g. for a "CDF_UINT1" data type, [0, 254]). Same, if you do not know which default values for the ["SCALEMIN", "SCALEMAX"] set, you should use the ["VALIDMIN", "VALIDMAX"] values. For the FILLVAL, please use the ISTP guideline values as explained above.

...

About CDF

...

header

  • The DATA ENCODING shall always be "NETWORK"
  • The MAJORITY shall always be "COLUMN"
  • The FORMAT shall always be "SINGLE"

REFERENCES

REFERENCES ABOUT CDF

References

CDF Tools

Several language libraries are available to handle the CDF format.
Here are a non-exhaustive list:

Finally, the teams can find additional CDF routines in:

  • IMPORTANT – pycdf uses the datetime module to handle the "Epoch" variable. The best time resolution reaches by datetime is microsecond, the CDF_TT2000_TIME resolution (i.e., nanosecond) is thus not covered.
  • maser4idl – https://github.com/maserlib/maser4idl ( IDL routines are available to read/make cdf). Required CDWAlib and the NASA CDF software to work.

Software are also available from the official NASA CDF web page (http://cdf.gsfc.nasa.gov/).