Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for PSA compliant labels for TGO #4631

Merged
merged 4 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ End_Group

Group = ExposureDuration
Auto
Optional
InputPosition = (Observation_Area, Discipline_Area, img:Imaging, img:Imaging_Instrument_Parameters)
InputKey = img:exposure_duration
OutputName = ExposureDuration
Expand Down
169 changes: 169 additions & 0 deletions isis/src/tgo/apps/tgocassis2isis/TgoCassisExportedInstrument_PSA.trn
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Translates CaSSIS xml labels into the Instrument PvlGroup values
# for the ingested ISIS 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 $ISISROOT/appdata/translations/XmlExample.trn for an example xml translation table
# and documentation for the different options.
#
# history 2018-05-17 Kaitlyn Lee - Added ObservationId with a placeholder value for now.

Group = SpacecraftName
Auto
InputPosition = (Observation_Area, Observing_System, Observing_System_Component)
InputKeyDependencies = "tag@type|Host"
InputKey = name
OutputName = SpacecraftName
OutputPosition = (Object,IsisCube,Group,Instrument)
Translation = (*, *)
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 = Expanded
Auto
InputDefault = 1
InputPosition = (Observation_Area, Observing_System, Observing_System_Component)
InputKeyDependencies = "tag@type|Host"
InputKey = name
OutputName = Expanded
OutputPosition = (Object,IsisCube,Group,Instrument)
Translation = (1, *)
End_Group

Group = ObservationId
Auto
InputPosition = (Identification_Area, Alias_List, Alias)
InputKey = alternate_id
OutputName = ObservationId
OutputPosition = (Object, IsisCube, Group, Archive)
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 = ExposureDuration
Auto
InputPosition = (Observation_Area, Mission_Area, em16_tgo_cas:Cassis_Data, em16_tgo_cas:PEHK_Derived_Data)
InputKey = em16_tgo_cas:exposure_time
OutputName = ExposureDuration
OutputPosition = (Object, IsisCube, Group, Instrument)
Translation = (*, *)
End_Group

Group = Filter
Auto
InputPosition = (Observation_Area, Discipline_Area, img:Imaging, img:Optical_Filter)
InputKey = img:filter_name
OutputName = Filter
OutputPosition = (Object,IsisCube,Group,Instrument)
Translation = (*, *)
End_Group

Group = FilterName
Auto
InputPosition = (Observation_Area, Discipline_Area, img:Imaging, img:Optical_Filter)
InputKey = img:filter_name
OutputName = Filter
OutputPosition = (Object,IsisCube,Group,BandBin)
Translation = (*, *)
End_Group

Group = Center
Auto
InputPosition = (Observation_Area, Discipline_Area, img:Imaging, img:Optical_Filter)
InputKey = img:filter_name
OutputName = Center
OutputPosition = (Object, IsisCube, Group, BandBin)
Translation = (675, PAN)
Translation = (485, BLU)
Translation = (840, RED)
Translation = (985, NIR)

End_Group

Group = Width
Auto
InputPosition = (Observation_Area, Discipline_Area, img:Imaging, img:Optical_Filter)
InputKey = img:filter_name
OutputName = Width
OutputPosition = (Object, IsisCube, Group, BandBin)
Translation = (250, PAN)
Translation = (165, BLU)
Translation = (100, RED)
Translation = (220, NIR)

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
195 changes: 195 additions & 0 deletions isis/src/tgo/apps/tgocassis2isis/TgoCassisMapping_PSA.trn
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
# Translates CaSSIS xml labels into the Mapping PvlGroup values
# for the ingested ISIS 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>
#
#
# history 2018-08-09 Jeannie Backer - Changed group name from MapProjection
# to ProjectionName.

Group = ProjectionName
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Planar, cart:Map_Projection)
InputKey = cart:map_projection_name
OutputName = ProjectionName
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = CenterLongitude
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Planar, cart:Map_Projection, cart:Equirectangular)
InputKey = cart:longitude_of_central_meridian
OutputName = CenterLongitude
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = CenterLatitude
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Planar, cart:Map_Projection, cart:Equirectangular)
InputKey = cart:latitude_of_projection_origin
OutputName = CenterLatitude
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

# input has different scales for x and y, but ISIS doesn't distinguish, so use x
Group = Scale
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Planar, cart:Planar_Coordinate_Information, cart:Coordinate_Representation)
InputKey = cart:pixel_scale_x
OutputName = Scale
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

# input has different pixel resolutions for x and y, but ISIS doesn't distinguish, so use x
Group = PixelResolution
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Planar, cart:Planar_Coordinate_Information, cart:Coordinate_Representation)
InputKey = cart:pixel_resolution_x
OutputName = PixelResolution
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = MaximumLatitude
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Domain, cart:Bounding_Coordinates)
InputKey = cart:north_bounding_coordinate
OutputName = MaximumLatitude
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = MinimumLatitude
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Domain, cart:Bounding_Coordinates)
InputKey = cart:south_bounding_coordinate
OutputName = MinimumLatitude
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = MaximumLongitude
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Domain, cart:Bounding_Coordinates)
InputKey = cart:west_bounding_coordinate
OutputName = MaximumLongitude
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = MinimumLongitude
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Domain, cart:Bounding_Coordinates)
InputKey = cart:east_bounding_coordinate
OutputName = MinimumLongitude
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = UpperLeftCornerX
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Planar, cart:Geo_Transformation)
InputKey = cart:upperleft_corner_x
OutputName = UpperLeftCornerX
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = UpperLeftCornerY
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Planar, cart:Geo_Transformation)
InputKey = cart:upperleft_corner_y
OutputName = UpperLeftCornerY
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = EquatorialRadius
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Geodetic_Model)
InputKey = cart:a_axis_radius
OutputName = EquatorialRadius
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = PolarRadius
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Geodetic_Model)
InputKey = cart:c_axis_radius
OutputName = PolarRadius
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

Group = LatitudeType
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Geodetic_Model)
InputKey = cart:latitude_type
OutputName = LatitudeType
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (Planetocentric, planetocentric)
Translation = (*, *)
End_Group

Group = LongitudeDirection
Auto
InputPosition = (Observation_Area, Discipline_Area, cart:Cartography, cart:Spatial_Reference_Information, cart:Horizontal_Coordinate_System_Definition, cart:Geodetic_Model)
InputKey = cart:longitude_direction
OutputName = LongitudeDirection
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (PositiveEast, "Positive East")
Translation = (PositiveWest, "Positive West")
End_Group

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

# Does not exist in xml label
Group = LongitudeDomain
Auto
InputDefault = 360
InputPosition = (Nothing, Nothing)
InputKey = Nothing
OutputName = LongitudeDomain
OutputPosition = (Object,IsisCube,Group,Mapping)
Translation = (*, *)
End_Group

End
Loading