Commit 468a43e3 authored by Kristin Berry's avatar Kristin Berry
Browse files

leisa2isis update and associated translation files.

parent 5219c4c4
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -54,21 +54,22 @@ void IsisMain() {
  fitsLabel.addGroup(importFits.fitsLabel(0));

  // add in label processing later
  /*
  
  // Create an Instrument group
  FileName insTransFile(transDir + "leisaInstrument_fit.trn");// /s/lorri/leisa
//  FileName insTransFile(transDir + "leisaInstrument_fit.trn");//need to create this file
  FileName insTransFile("./leisaInstrument_fit.trn");//need to create this file
  PvlTranslationManager insXlater(fitsLabel, insTransFile.expanded());
  insXlater.Auto(outLabel);

  // Modify/add Instument group keywords not handled by the translater
  PvlGroup &inst = outLabel.findGroup("Instrument", Pvl::Traverse);
  QString target = (QString)inst["TargetName"];
  if (target.startsWith("RADEC=")) {
    inst.addKeyword(PvlKeyword("TargetName", "Sky"), PvlGroup::Replace);
  }
//  PvlGroup &inst = outLabel.findGroup("Instrument", Pvl::Traverse);
//  QString target = (QString)inst["TargetName"];
//  if (target.startsWith("RADEC=")) {
//    inst.addKeyword(PvlKeyword("TargetName", "Sky"), PvlGroup::Replace);
//  }

  output->putGroup(outLabel.findGroup("Instrument", Pvl::Traverse));

/*
  // Create a Band Bin group
  FileName bandTransFile(transDir + "leisaBandBin_fit.trn");
  PvlTranslationManager bandBinXlater(fitsLabel, bandTransFile.expanded());
@@ -80,13 +81,13 @@ void IsisMain() {
  PvlTranslationManager archiveXlater(fitsLabel, archiveTransFile.expanded());
  archiveXlater.Auto(outLabel);
  output->putGroup(outLabel.findGroup("Archive", Pvl::Traverse));

*/
  // Create a Kernels group
  FileName kernelsTransFile(transDir + "leisaKernels_fit.trn");
//  FileName kernelsTransFile(transDir + "leisaKernels_fit.trn");
  FileName kernelsTransFile("./leisaKernels_fit.trn");
  PvlTranslationManager kernelsXlater(fitsLabel, kernelsTransFile.expanded());
  kernelsXlater.Auto(outLabel);
  output->putGroup(outLabel.findGroup("Kernels", Pvl::Traverse));
  */

  // Save the input FITS label in the Cube original labels
  Pvl pvl;
+136 −0
Original line number Diff line number Diff line
#
# This translation file is used to produce the ISIS 3 Instrument label group
# for the New Horizons LEISA camera.
#
Group = SpacecraftName
  Auto
  InputKey       = HOSTNAME
  InputPosition  = FITSLABELS
  InputDefault   = UNKNOWN
  OutputName     = SpacecraftName
  OutputPosition = (Object, IsisCube, Group, Instrument)
  Translation    = ("NEW HORIZONS", "NEW HORIZONS")
End_Group

Group = SpacecraftClockStartCount
 Auto
 InputKey = SPCSCLK0
 InputPosition = FITSLABELS
 OutputName  = SpacecraftClockStartCount
 OutputPosition = (Object, IsisCube, Group, Instrument)
 Translation = (*, *)
End_Group


Group = InstrumentId
  Auto
  InputKey       = INSTRU
  InputPosition  = FITSLABELS
  InputDefault   = UNKNOWN
  OutputName     = InstrumentId
  OutputPosition = (Object, IsisCube, Group, Instrument)
  Translation    = (LEISA, lei)
End_Group

Group = TargetName
  Auto
  InputKey       = TARGET
  InputPosition  = FITSLABELS
  InputDefault   = UNKNOWN
  OutputName     = TargetName
  OutputPosition = (Object, IsisCube, Group, Instrument)
  Translation    = (Jupiter, JUPITER)
  Translation    = (IO, IO)
  Translation    = (Pluto, PLUTO)
  Translation    = (Charon, CHARON)
  Translation    = (Sky, SKY)
  Translation    = (*, *)
End_Group

Group = MidObservationTime
  Auto
  InputKey       = SPCUTCAL
  InputPosition  = FITSLABELS
  OutputName     = MidObservationTime
  OutputPosition = (Object, IsisCube, Group, Instrument)
  Translation    = (*, *)
End_Group

# Commented out until/if we have start and stop times
# Currently there are only center of exposure times
#Group = StopTime
#  Auto
#  InputKey       = SPCUTCAL
#  InputPosition  = FITSLABELS
#  OutputName     = StopTime
#  OutputPosition = (Object, IsisCube, Group, Instrument)
#  Translation    = (*, *)
#End_Group

#Group = SpacecraftClockStartCount
#  Auto
#  InputKey       = SPCSCLK0
#  InputPosition  = FITSLABELS
#  OutputName     = SpacecraftClockStartCount
#  OutputPosition = (Object, IsisCube, Group, Instrument)
#  Translation    = (*, *)
#End_Group

# Commented out until/if we have start and stop times
# Currently there are only center of exposure times
#Group = SpacecraftClockStopCount
#  Auto
#  InputKey       = SPCSCDP
#  InputPosition  = FITSLABELS
#  OutputName     = SpacecraftClockStopCount
#  OutputPosition = (Object, IsisCube, Group, Instrument)
#  Translation    = (*, *)
#End_Group

#### This is WRONG! Put in temporarily for test. 
Group = StartTime
  Auto
  InputKey       = SPCUTCAL
  InputPosition  = FITSLABELS
  OutputName     = StartTime
  OutputPosition = (Object, IsisCube, Group, Instrument)
  Translation    = (*, *)
End_Group

Group = ExposureDuration
  Auto
  InputKey       = RALPHEXP
  InputPosition  = FITSLABELS
  OutputName     = ExposureDuration
  OutputPosition = (Object, IsisCube, Group, Instrument)
  Translation    = (*, *)
End_Group

Group = Detector
  Auto
  InputKey       = DETECTOR
  InputPosition  = FITSLABELS
  OutputName     = Detector
  OutputPosition = (Object, IsisCube, Group, Instrument)
  Translation    = (*, *)
End_Group

Group = ScanType
  Auto
  InputKey       = SCANTYPE
  InputPosition  = FITSLABELS
  OutputName     = ScanType
  OutputPosition = (Object, IsisCube, Group, Instrument)
  Translation    = (*, *)
End_Group

Group = RalphExposureDuration
  Auto
  InputKey       = RALPHEXP
  InputPosition  = FITSLABELS
  OutputName     = RalphExposureDuration
  OutputPosition = (Object, IsisCube, Group, Instrument)
  Translation    = (*, *)
End_Group

End
+12 −0
Original line number Diff line number Diff line
# First attempt at LEISA Kernel translation

Group = NaifCode
  Auto
  InputKey       = SPCINSID
  InputPosition  = FITSLABELS
  OutputName     = NaifFrameCode
  OutputPosition = (Object, IsisCube, Group, Kernels)
  Translation = (-98201, -98201)
End_Group

End