OperationThis document describes how to operate the Transform Tool. The following topics can be found in this document: Note: The command-line examples in this section have been broken into multiple lines for readability. The commands should be reassembled into a single line prior to execution. Tool ExecutionThe Transform Tool can be executed in various ways. This section describes how to run the tool, as well as its behaviors and caveats. Command-Line OptionsThe following table describes the command-line options available:
Format TypesThe following table describes the format types available to both PDS3 and PDS4 target inputs:
The following table describes the format types available only to PDS4 products:
The following table describes the format types available only to PDS3 products:
Running the Transform ToolThe Transform Tool requires the passing in of a PDS3 or PDS4 product label that contains a reference to an image file. In addition, the tool assumes that the referenced image file is co-located with the product label. Under the current implementation, if there are multiple image files referenced in a target label, the tool will default to only transforming the first image file reference. Other notable caveats with this initial version of the tool include:
This section demonstrates some of the ways that the tool can be executed using the command-line option flags:
The files used in the command-line examples below are packaged with the tool in the examples directory. Transform a Single PDS4 Array 2D Image The following command demonstrates transforming a PDS4 array 2D image referenced in the associated product label, i943630r.xml, into a jpeg image file named i943630r.jpg: % transform ../examples/i943630r.xml -f jpg Under the current implementation, for PDS4 data products, the tool only supports the transformation of array 2D images. If the -o flag option is not specified on the command-line, the tool will default to creating an output file using the target image file name with the user-specified format as the file extension. The resulting output file will be written to the current working directory. The following command demonstrates transforming a PDS4 array 2D image referenced in the associated product label, i943630r.xml, into a graphics interchange format file: % transform ../examples/i943630r.xml -f gif The resulting output is written to the output file i943630r.gif in the current working directory. Transform a Single PDS4 Label To Parameter Value Language (PVL) File The following command demonstrates transforming a PDS4 label, i943630r.xml, to a PVL file, i943630r.pvl: % transform ../examples/i943630r.xml -f pvl Transform a Single 8-Bit PDS3 Image The following command demonstrates transforming a PDS3, 8-bit image referenced in the associated attached label, FHA01118.LBL, into a bitmap image file named FHA01118.BMP: % transform ../examples/FHA01118.LBL -f bmp The following command demonstrates transforming a PDS3, 8-bit image referenced in the associated detached label, FF01.LBL, into a portable network graphics file named FF01.PNG: % transform ../examples/FF01.LBL -f png Transform a PDS3 Label to PDS4 Label The following command demonstrates transforming a PDS3 data product label, ELE_MOM.LBL, into a PDS4 Product Observational label named ele_mom.xml: % transform ../examples/ELE_MOM.LBL -f pds4-label PDS3 to PDS4 Label TransformationThe intent of the PDS3 to PDS4 label transformation is to transform a PDS3 data product label into a PDS4 Product Observational product label with the minimum set of elements in order to be compliant with the PDS4 standards. Therefore, not all PDS3 keywords will map to the resulting label. This section details how the Transform tool populates some of the required elements of a PDS4 label. Please see the Known Issues section for details on the limitations with PDS3 to PDS4 label transformations. Populating PDS4 ElementsThis section describes how the tool leverages the PDS3 label in order to populate some of the PDS4 elements. Below is a list of PDS4 elements and a description of how the tool goes about populating that element. logical_identifier The tool will populate the logical_identifier element in the following mannner: urn:nasa:pds:data:${DATA_SET_ID}:${PRODUCT_ID} If PRODUCT_ID does not exist in the PDS3 label, then the tool will default to using the label filename instead: urn:nasa:pds:data:${DATA_SET_ID}:${labelFilename} title The tool will populate the title element in the PDS4 label based on the existency of one or more of the following keywords:
So if OBSERVATION_NAME exists in the PDS3 label, it will use that to populate the title element. If it does not exist, it will use OBSERVATION_ID. If that does not exist, then it will use PRODUCT_NAME, and so forth. Investigation_Area For the Investigation_Area, the tool will use MISSION_NAME to populate this element in the following manner: <name>${MISSION_NAME}</name> <type>Mission</type> <Internal_Reference> <lid_reference>urn:nasa:pds:investigation.${MISSION_NAME}</lid_reference> <reference_type>data_to_investigation</reference_type> </Internal_Reference> If MISSION_NAME does not exist, then the tool will use MISSION_PHASE_NAME instead. Observing_System For the Observing_System, the tool will populate this element with INSTRUMENT_HOST_NAME, INSTRUMENT_NAME, and INSTRUMENT_ID in the following manner: <Observing_System_Component> <name>${INSTRUMENT_HOST_NAME}</name> <type>Spacecraft</type> </Observing_System_Component> <Observing_System_Component> <name>${INSTRUMENT_NAME}</name> <type>Instrument</type> </Observing_System_Component> <Observing_System_Component> <name>${INSTRUMENT_ID}</name> <type>Instrument</type> </Observing_System_Component> Known IssuesThis section describes some of the known issues and limitations with the Transform Tool. PDS3 Image Transformations
PDS4 Image Transformations The tool may not support image transformations other than those with a data type of "UnsignedMSB2". It has been tested with a PDS4 image of type "SignedMSB2", which throws the following error even though this is a valid data type according to the PDS data model: Array data type is not valid, null, or unsupported Due to lack of PDS4 image test data, it is unknown at this time what other data types are supported by the tool. PDS3 to PDS4 Label Transformations At this time, the Transform tool will support PDS3 to PDS4 label transformations of the following object types:
Explicit FILE objects, QUBE objects, as well as labels containing pointers to label fragments (i.e. ^STRUCTURE) are not supported by the tool at this time.
|