Skip to content

Commit

Permalink
Move Europa Clipper data files into repo (#3787)
Browse files Browse the repository at this point in the history
* Removed ISIS3DATA from base apps

* Removing ISIS3DATA from base/objs

* more ISIS3DATAs

* more ISIS3DATAs

* Other non base ISIS3DATAs

* Remove ISIS3DATA from docsys

* Update maptemplate.xml

* Update smtk.xml

* Update unitTest.xml

* Fixed another file name

* Removed local Standard preference file references and took all but the ShapeModel group out of the other two preference files in the input dir

* Moving ISIS3DATA to ISISDATA fixing apptests

* Fixing app tests

* More app test fixes

* Remove ref to ISIS3DATA

* Moved Europa Clipper data files to reop

* Update ClipperEisCore.trn

Co-authored-by: Kristin <[email protected]>
  • Loading branch information
scsides and krlberry authored Mar 23, 2020
1 parent 42fb1fb commit 7d00324
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 10 deletions.
124 changes: 124 additions & 0 deletions isis/appdata/translations/ClipperEisCore.trn
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# This translation table is for translating Europa clipper xml labels into pvl cube
# labels.
#
# The Dependencies keyword specifies a tag or attribute at the same level as
# the InputKey that uniquely identifies the InputKey.
#
# Consider the following translation group and xml
#
# Group = CoreSamples
# Auto
# InputPosition = (Array_2D_Image, Axis_Array)
# Dependencies = "tag@axis_name|Sample"
# InputKey = elements
# OutputName = CoreSamples
# OutputPosition = (Group, Dimensions)
# Translation = (*, *)
# End_Group
#
# <Array_2D_Image>
# <Axis_Array>
# <axis_name>Line</axis_name>
# <sequence_number>1</sequence_number>
# <elements>2048</elements>
# </Axis_Array>
# <Axis_Array>
# <axis_name>Sample</axis_name>
# <sequence_number>2</sequence_number>
# <elements>279</elements>
# </Axis_Array>
# </Array_2D_Image>
#
# There are two Axis_Array tags below Array_2D_Image and both of them have an
# elements tag. So, the Dependencies keyword specifies to take the value of
# the elements tag under the second Axis_Array array tag because it also has a
# axis_name tag with a value of Sample.
#
# history 2016-07-01 Jeannie Backer - Original version.

Group = CoreSamples
Auto
InputPosition = (File_Area_Observational, Array_2D_Image, Axis_Array)
InputPosition = (File_Area_Observational, Array_3D_Image, Axis_Array)
InputKeyDependencies = "tag@axis_name|Sample"
InputKey = elements
OutputName = CoreSamples
OutputPosition = (Group, Dimensions)
Translation = (*, *)
End_Group

Group = CoreLines
Auto
InputPosition = (File_Area_Observational, Array_2D_Image, Axis_Array)
InputPosition = (File_Area_Observational, Array_3D_Image, Axis_Array)
InputKeyDependencies = "tag@axis_name|Line"
InputKey = elements
OutputName = CoreLines
OutputPosition = (Group, Dimensions)
Translation = (*, *)
End_Group

Group = CoreBands
Auto
Optional
InputPosition = (File_Area_Observational, Array_3D_Image, Axis_Array)
InputKeyDependencies = "tag@axis_name|Band"
InputKey = elements
InputDefault = 1
OutputName = CoreBands
OutputPosition = (Group, Dimensions)
Translation = (*, *)
End_Group

Group = CoreType
Auto
InputPosition = (File_Area_Observational, Array_2D_Image, Element_Array)
InputPosition = (File_Area_Observational, Array_3D_Image, Element_Array)
InputKey = idl_data_type
OutputName = CoreType
OutputPosition = (Group, Pixels)
Translation = (UnsignedByte, 1)
Translation = (SignedWord, 2)
Translation = (SignedInteger, 3)
Translation = (Real, 4)
Translation = (Real, 5)
Translation = (UnsignedWord, 12)
Translation = (UnsignedInteger, 13)
Translation = (SignedInteger, 14)
Translation = (UnsignedInteger,15)
End_Group

Group = CoreByteOrder
Auto
InputDefault = 1.0
InputPosition = (File_Area_Observational, Array_2D_Image, Element_Array)
InputPosition = (File_Area_Observational, Array_3D_Image, Element_Array)
InputKey = data_type
OutputName = CoreByteOrder
OutputPosition = (Group, Pixels)
Translation = (Lsb, IEEE754LSBSingle)
Translation = (Lsb, SignedLSB2)
End_Group

Group = CoreBase
Auto
InputDefault = 0.0
InputPosition = (File_Area_Observational, Array_2D_Image, Element_Array)
InputPosition = (File_Area_Observational, Array_3D_Image, Element_Array)
InputKey = offset
OutputName = CoreBase
OutputPosition = (Group, Pixels)
Translation = (*, *)
End_Group

Group = CoreMultiplier
Auto
InputDefault = 1.0
InputPosition = (File_Area_Observational, Array_2D_Image, Element_Array)
InputPosition = (File_Area_Observational, Array_3D_Image, Element_Array)
InputKey = scaling_factor
OutputName = CoreMultiplier
OutputPosition = (Group, Pixels)
Translation = (*, *)
End_Group
End
123 changes: 123 additions & 0 deletions isis/appdata/translations/ClipperEisInstrument.trn
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Translates Europa Clipper EIS xml labels into the Instrument PvlGroup values
# for the ingested ISIS3 cube labels.
#
# The Dependencies keyword specifies a tag or attribute at the same level as
# the InputKey that uniquely identifies the InputKey.
#
# Consider the following translation group and xml
#
# Group = Samples
# Auto
# InputPosition = (Array_2D_Image, Axis_Array)
# Dependencies = "tag@axis_name|Sample"
# InputKey = elements
# OutputName = Samples
# OutputPosition = (Group, Dimensions)
# Translation = (*, *)
# End_Group
#
# <Array_2D_Image>
# <Axis_Array>
# <axis_name>Line</axis_name>
# <sequence_number>1</sequence_number>
# <elements>2048</elements>
# </Axis_Array>
# <Axis_Array>
# <axis_name>Sample</axis_name>
# <sequence_number>2</sequence_number>
# <elements>279</elements>
# </Axis_Array>
# </Array_2D_Image>
#
# There are two Axis_Array tags below Array_2D_Image and both of them have an
# elements tag. So, the Dependencies keyword specifies to take the value of
# the elements tag under the second Axis_Array array tag because it also has a
# axis_name tag with a value of Sample.
#
#
# This translation table is for translating CaSSIS xml labels into pvl cube
# labels.
#
# See $base/translations/XmlExample.trn for an example xml translation table
# and documentation for the different options.
#
# history 2019-06-11 Stuart Sides - Original version from CaSSIS.
#

Group = SpacecraftName
Auto
InputPosition = (Observation_Area, Investigation_Area)
InputKey = name
OutputName = SpacecraftName
OutputPosition = (Object, IsisCube, Group, Instrument)
Translation = (Clipper, "Clipper EIS 2025")
End_Group

Group = InstrumentId
Auto
InputPosition = (Observation_Area, Observing_System, Observing_System_Component)
InputKeyDependencies = "tag@type|Instrument"
InputKey = name
OutputName = InstrumentId
OutputPosition = (Object, IsisCube, Group, Instrument)
Translation = (*, *)
End_Group

Group = TargetName
Auto
InputPosition = (Observation_Area, Target_Identification)
InputKey = name
OutputName = TargetName
OutputPosition = (Object, IsisCube, Group, Instrument)
Translation = (*, *)
End_Group

Group = StartTime
Auto
InputPosition = (Observation_Area, Time_Coordinates)
InputKey = start_date_time
OutputName = StartTime
OutputPosition = (Object, IsisCube, Group, Instrument)
Translation = (*, *)
End_Group

#Group = SpacecraftClockStartCount
# Auto
# InputPosition = CaSSIS_Header
# InputKey = FSW_HEADER
# InputKeyAttribute = ExposureTimestamp
# OutputName = SpacecraftClockStartCount
# OutputPosition = (Object, IsisCube, Group, Instrument)
# Translation = (*, *)
#End_Group

#Group = ExposureDuration
# Auto
# InputPosition = CaSSIS_Header
# InputKey = PEHK_HEADER
# InputKeyAttribute = Exposure_Time
# OutputName = ExposureDuration
# OutputPosition = (Object, IsisCube, Group, Instrument)
# Translation = (*, *)
#End_Group

#Group = Filter
# Auto
# InputPosition = (CaSSIS_Header, DERIVED_HEADER_DATA)
# InputKey = Filter
# OutputName = Filter
# OutputPosition = (Object, IsisCube, Group, Instrument)
# Translation = (*, *)
#End_Group

#Group = Expanded
# Auto
# Optional
# InputPosition = (CaSSIS_Header, DERIVED_HEADER_DATA)
# InputKey = Expanded
# OutputName = Expanded
# OutputPosition = (Object, IsisCube, Group, Instrument)
# Translation = (*, *)
#End_Group

End
6 changes: 6 additions & 0 deletions isis/appdata/translations/Instruments.trn
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ Group = InstrumentName
Translation = (Nir, NIR)
Translation = (Uvvis, UVVIS)

# Clipper (Europa)
Translation = (EisWacFrame, WacFrame)
Translation = (EisWacPushBroom, WacPushBroom)
Translation = (EisNacRollingShutter, NacRollingShutter)
Translation = (EisNacPushBroom, NacPushBroom)

# Dawn
Translation = (Fc, FC1)
Translation = (Fc, FC2)
Expand Down
13 changes: 3 additions & 10 deletions isis/src/clipper/apps/eis2isis/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,9 @@ void IsisMain() {
* @history 2017-01-20 Jeannie Backer - Original Version
*/
void translateCoreInfo(FileName &inputLabel, ProcessImport &importer) {
// Get the directory where the Clipper translation tables are
PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory");
QString missionDir = (QString) dataDir["Clipper"];

// Get the translation manager ready
FileName transFile;
transFile = FileName(missionDir + "/translations/clipperEIS.trn");
FileName transFile = "$ISISROOT/appdata/translations/ClipperEisCore.trn";
XmlToPvlTranslationManager labelXlater(inputLabel, transFile.expanded());
translateCoreInfo(labelXlater, importer);
}
Expand Down Expand Up @@ -191,12 +187,9 @@ void translateCoreInfo(XmlToPvlTranslationManager labelXlater, ProcessImport &im
* @param Pvl outputCube Pointer to the output cube where ISIS labels will be added and updated.
*/
void translateEISLabels(FileName &inputLabel, Pvl *outputLabel) {
// Get the directory where the Clipper translation tables are
PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory");
QString missionDir = (QString) dataDir["Clipper"];

// Make a call to translate labels for each translation file needed
translateLabels(inputLabel, outputLabel, FileName(missionDir + "/translations/clipperEisInstrument.trn"));
// Translate labels for each translation file needed
translateLabels(inputLabel, outputLabel, FileName("$ISISROOT/appdata/translations/ClipperEisInstrument.trn"));
}


Expand Down

0 comments on commit 7d00324

Please sign in to comment.