Unverified Commit 32ce1c48 authored by Summer Stapleton's avatar Summer Stapleton Committed by GitHub
Browse files

Fixed SummingMode keyword being set in tgocassis2isis (#2847)

* Adding Expanded keyword to cassis label and modifying SummingMode keyword

* Updating the window count value

* Adding capacity to handle imports without Expanded tag
parent 41def84a
Loading
Loading
Loading
Loading
+45 −34
Original line number Diff line number Diff line
@@ -341,6 +341,17 @@ void translateLabels(FileName &inputLabel, Cube *outputCube, QString instTransFi

  PvlGroup &archive = outputLabel->findGroup("Archive", Pvl::Traverse);

  // Calculate SummingMode keyword and add to label
  QString sumMode;
  if (inst.hasKeyword("Expanded") && (int)inst.findKeyword("Expanded") == 1) {
    sumMode = "0";
  }
  else {
    sumMode = (QString)archive["Window" + (QString)archive["WindowCount"] + "Binning"];
  }
  PvlKeyword summingMode("SummingMode", sumMode);
  outputLabel->findGroup("Instrument", Pvl::Traverse).addKeyword(summingMode);

  PvlKeyword yeardoy("YearDoy", toString(stime.Year()*1000 + stime.DayOfYear()));
  archive.addKeyword(yeardoy);