Unverified Commit 8ecbff2e authored by jcwbacker's avatar jcwbacker Committed by GitHub
Browse files

Merge pull request #225 from kberryUSGS/CaSSIS_Pipeline

Update tgocassisrdrgen to use the correct translation file for mosaics.
parents 75befa89 8e202bdf
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -58,9 +58,6 @@ void IsisMain() {
      Pvl *pcomp = clist[i]->label();
      CompareLabels(*pmatch, *pcomp);
      ProdId = (QString)pmatch->findGroup("Archive", Pvl::Traverse)["UniqueIdentifier"];
      QString bandname = (QString)pmatch->findGroup("BandBin", Pvl::Traverse)["FilterName"];
      bandname = bandname.toUpper();
      ProdId = ProdId + "_" + bandname;
    }

    bool runXY = true;
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@
    <change name="Adam Goins" date="2018-05-17">
      Added SpacecraftName and InstrumentId to mosaic group.
    </change>
    <change name="Kristin Berry" date="2018-06-12">
      Removed the "_filtername" from the ProductId. 
    </change>
  </history>

  <groups>
+1 −1
Original line number Diff line number Diff line
@@ -6,5 +6,5 @@ commands:
	$(LS) -1 $(INPUT)/*.cub > $(OUTPUT)/mosaic.lis;
	$(APPNAME) fromlist=$(OUTPUT)/mosaic.lis \
		   to=$(OUTPUT)/tgocassismos.cub >& /dev/null;
	catlab from=$(OUTPUT)/tgocassismos.cub to=$(OUTPUT)/tgocassismos.pvl > /dev/null;
	catlab from=$(OUTPUT)/tgocassismos.cub to=$(OUTPUT)/tgocassismos.pvl >& /dev/null;	
	$(RM) $(OUTPUT)/mosaic.lis;
+15 −4
Original line number Diff line number Diff line
@@ -32,11 +32,13 @@ void IsisMain() {
  Cube *icube = process.SetInputCube("FROM");

  PvlObject *label= icube->label();

  PvlGroup targetGroup;
  QString logicalId = "urn:esa:psa:em16_tgo_frd:";

  if ( label->findObject("IsisCube").hasGroup("Instrument") ) {
    targetGroup = label->findObject("IsisCube").findGroup("Instrument");
    if (label->hasGroup("Mapping")) {
    if (label->findObject("IsisCube").hasGroup("Mapping")) {
      logicalId += "data_projected:";
    }
    else {
@@ -45,7 +47,7 @@ void IsisMain() {
  }
  else if ( label->findObject("IsisCube").hasGroup("Mosaic") ) {
    targetGroup = label->findObject("IsisCube").findGroup("Mosaic");
    logicalId = "data_mosaic";
    logicalId += "data_mosaic:";
  }

  // Check if the cube is able to be translated into a CaSSIS xml file
@@ -84,12 +86,21 @@ void IsisMain() {
  // std PDS4 label
  process.StandardPds4Label();


  /*
  * Add additional pds label data here
  */
  QDomDocument &pdsLabel = process.GetLabel();
  PvlToXmlTranslationManager cubeLab(*(icube->label()),
                                    "$tgo/translations/tgoCassisExport.trn");


  // The default translation for for non-mosaicked output
  QString exportTranslationFile = "$tgo/translations/tgoCassisExport.trn"; 

  if (label->findObject("IsisCube").hasGroup("Mosaic")) {
    exportTranslationFile = "$tgo/translations/tgoCassisExportMosaic.trn";
  }

  PvlToXmlTranslationManager cubeLab(*(icube->label()), exportTranslationFile);
  cubeLab.Auto(pdsLabel);

  ProcessExportPds4::translateUnits(pdsLabel);
+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@
      the Instrument group, the cube will have a Mosaic group. So, the ProductId
      will now be written to the Mosaic group.
    </change>
    <change name="Kristin Berry" date="2018-06-12">
      Updated to use the tgoCassisExportMosaic.trn translation file when the input cube is a mosaic.
    </change>
  </history>

  <category>