Unverified Commit e7e4c755 authored by Kristin Berry's avatar Kristin Berry Committed by GitHub
Browse files

Updates labels generated by tgocassisrdrgen and filter information in tgocassis2isis (#4043)

* Update filter/filter widths in tgocassis2isis labels

* Adds the processing pipeline version to tgo exported labels

* Added a sitch browse LID to the label and also updated the psa observation identifier to use the UID

* Add new smithed kernel information

* Fix tgocassisrdrgen to work on non-Mosaics again

* Updated ProcessExportPds4's reorder function to re-order another top-level section: Reference_List
parent a97be7bd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -374,6 +374,12 @@ namespace Isis {
        identificationAreaNode.insertAfter(aliasListNode, identificationAreaNode.firstChildElement("product_class"));
      }

      // Put Reference list in correct place: 
      QDomElement referenceListNode = m_domDoc->documentElement().firstChildElement("Reference_List");
      if ( !referenceListNode.isNull() && !identificationAreaNode.isNull() ) {
         m_domDoc->documentElement().insertAfter(referenceListNode, obsAreaNode);
      }

      QDomElement fileAreaObservationalNode = m_domDoc->documentElement().firstChildElement("File_Area_Observational");
      QDomElement array2DImageNode = fileAreaObservationalNode.firstChildElement("Array_2D_Image");
      if ( !array2DImageNode.isNull() ) {
+8 −8
Original line number Diff line number Diff line
@@ -52,10 +52,10 @@ Group = Center
  InputKey       = Filter
  OutputName     = Center
  OutputPosition = (Object, IsisCube, Group, BandBin)
  Translation    = (675, PAN)
  Translation    = (485, BLU)
  Translation    = (840, RED)
  Translation    = (985, NIR)
  Translation    = (677.4, PAN)
  Translation    = (497.4, BLU)
  Translation    = (835.4, RED)
  Translation    = (940.2, NIR)

End_Group

@@ -66,10 +66,10 @@ Group = Width
  InputKey       = Filter
  OutputName     = Width
  OutputPosition = (Object, IsisCube, Group, BandBin)
  Translation    = (250, PAN)
  Translation    = (165, BLU)
  Translation    = (100, RED)
  Translation    = (220, NIR)
  Translation    = (231.5, PAN)
  Translation    = (134.3, BLU)
  Translation    = (98.0, RED)
  Translation    = (120.6, NIR)

End_Group

+36 −15
Original line number Diff line number Diff line
@@ -8,7 +8,28 @@
#                                    Line/Sample values in geom:horizontal_display_axis and 
#				     geom:vertical_display_axis, updated Mission_Area to use cas 
#				     namespace instead of cassis, removed non-PDS4-compliant 
#                                    CaSSIS_Header, removed data-type description and moved to code, as it now depends on whether a 2D or 3D image is being exported. 
#                                    CaSSIS_Header, removed data-type description and moved to code, 
#                                    as it now depends on whether a 2D or 3D image is being exported. 
# history 2020-09-22 Kristin Berry - Added stitched browse product LID and UID in Observation_Context
#                                    and added information about SPICE kernels to labels

Group = LidVid
  Auto
  Debug
  InputKey        = LID
  InputPosition   = (IsisCube, Archive)
  OutputName      = lidvid_reference
  OutputPosition  = (Product_Observational, Reference_List, Internal_Reference)
  Translation     = (*, *)
End_Group

Group = LidVidReference
  Auto
  InputDefault    = data_to_calibrated_products
  OutputName      = reference_type
  OutputPosition  = (Product_Observational, Reference_List, Internal_Reference)
  Translation     = (*, *)
End_Group

Group = StartTime
  Auto
@@ -177,6 +198,16 @@ Group = PhaseAngle
  Translation     = (*, *)
End_Group

Group = SmithedMetakernel
  Auto
  Optional
  InputDefault    = em16_cassis.tm
  OutputName      = geom:spice_kernel_file_name
  OutputPosition  = (Product_Observational, Observation_Area, Discipline_Area, geom:Geometry, geom:SPICE_Kernel_Files,
                     geom:SPICE_Kernel_Identification)
  Translation     = (*, *)
End_Group

# Investigation Area
Group = MissionName
  Auto
@@ -307,7 +338,7 @@ End_Group
Group = ProcessingSoftwareTitle
  Auto
  Optional
  InputDefault    = ISIS
  InputDefault    = Geometry_Pipeline 
  InputPosition   = (IsisCube, Archive)
  OutputName      = psa:processing_software_title
  OutputPosition  = (Product_Observational, Observation_Area, Mission_Area, psa:Processing_Context)
@@ -317,7 +348,8 @@ End_Group
Group = ProcessingSoftwareVersion
  Auto
  Optional
  InputDefault    = 3.8.0
  InputDefault    = 1.0.1
  InputKey        = GeometryPipelineVersion
  InputPosition   = (IsisCube, Archive)
  OutputName      = psa:processing_software_version
  OutputPosition  = (Product_Observational, Observation_Area, Mission_Area, psa:Processing_Context)
@@ -347,8 +379,7 @@ End_Group

Group = ObservationContextIdentifier
  Auto
  Optional
  InputKey        = ObservationId
  InputKey        = UID
  InputPosition   = (IsisCube, Archive)
  OutputName      = psa:observation_identifier
  OutputPosition  = (Product_Observational, Observation_Area, Mission_Area, psa:Observation_Context)
@@ -516,16 +547,6 @@ Group = SmithedCK
  Translation     = (*, *)
End_Group

Group = CKKernel
  Auto
  Optional
  InputKey        = CKKernel
  InputPosition   = (IsisCube, Archive)
  OutputName      = cas:ckkernel
  OutputPosition  = (Product_Observational, Observation_Area, Mission_Area, cas:CASSIS_Data, cas:geometry_information)
  Translation     = (*, *)
End_Group



+24 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
#include "Cube.h"
#include "ExportDescription.h"
#include "FileName.h"
#include "iTime.h"
#include "Process.h"
#include "ProcessExportPds4.h"
#include "Pvl.h"
@@ -86,6 +87,29 @@ void IsisMain() {
  logicalId += productId[0];
  process.setLogicalId(logicalId);

  // For a mosaic, calculate stitched browse LID (lidvid) 
  // This is as follows: 
  // StartTime of the first framelet, rounded down to the nearest second
  if (label->findObject("IsisCube").hasGroup("Mosaic")) {
    QString startTime = label->findObject("IsisCube").findGroup("Mosaic").findKeyword("StartTime"); 
    startTime = iTime(startTime).UTC(0).toLower().remove("-").remove(":");

    // StopTime of the last framelet, rounded down to the nearest second + 4 seconds
    QString stopTime = label->findObject("IsisCube").findGroup("Mosaic").findKeyword("StopTime");
    stopTime = (iTime(iTime(stopTime).UTC(0)) + 4).UTC().toLower().remove("-").remove(":");

    // UID
    QString UID = label->findObject("IsisCube").findGroup("Archive").findKeyword("UID");
    // FilterName
    QString filterName = QString(label->findObject("IsisCube").findGroup("BandBin").
                                findKeyword("FilterName")).toLower();

    QString lid = QString("urn:esa:psa:em16_tgo_cas:data_calibrated:cas_cal_sc_%1-%2-%3-%4-sti").arg(startTime)
                          .arg(stopTime).arg(filterName).arg(UID);

    label->findObject("IsisCube").findGroup("Archive").addKeyword(PvlKeyword("LID", lid));
  }

  // Set Title
  if ( ui.WasEntered("TITLE") ) {
    process.setTitle( ui.GetString("TITLE") );