diff --git a/isis/appdata/serialnumbers/NewHorizonsLeisaSerialNumber.trn b/isis/appdata/serialnumbers/NewHorizonsLeisaSerialNumber.trn new file mode 100644 index 0000000000..851a5c66d9 --- /dev/null +++ b/isis/appdata/serialnumbers/NewHorizonsLeisaSerialNumber.trn @@ -0,0 +1,30 @@ +Group = Keyword1 + Auto + InputKey = SpacecraftName + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword1 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (NewHorizons, "NEW HORIZONS") +End_Group + +Group = Keyword2 + Auto + InputKey = InstrumentId + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword2 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (*, *) +End_Group + +Group = Keyword3 + Auto + InputKey = SpacecraftClockStartCount + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword3 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (*, *) +End_Group +End diff --git a/isis/appdata/serialnumbers/NewHorizonsLorriSerialNumber.trn b/isis/appdata/serialnumbers/NewHorizonsLorriSerialNumber.trn new file mode 100644 index 0000000000..851a5c66d9 --- /dev/null +++ b/isis/appdata/serialnumbers/NewHorizonsLorriSerialNumber.trn @@ -0,0 +1,30 @@ +Group = Keyword1 + Auto + InputKey = SpacecraftName + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword1 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (NewHorizons, "NEW HORIZONS") +End_Group + +Group = Keyword2 + Auto + InputKey = InstrumentId + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword2 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (*, *) +End_Group + +Group = Keyword3 + Auto + InputKey = SpacecraftClockStartCount + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword3 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (*, *) +End_Group +End diff --git a/isis/appdata/serialnumbers/NewHorizonsMvicSerialNumber.trn b/isis/appdata/serialnumbers/NewHorizonsMvicSerialNumber.trn new file mode 100644 index 0000000000..8edc230c64 --- /dev/null +++ b/isis/appdata/serialnumbers/NewHorizonsMvicSerialNumber.trn @@ -0,0 +1,40 @@ +Group = Keyword1 + Auto + InputKey = SpacecraftName + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword1 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (NewHorizons, "NEW HORIZONS") +End_Group + +Group = Keyword2 + Auto + InputKey = InstrumentId + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword2 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (*, *) +End_Group + +Group = Keyword3 + Auto + InputKey = Detector + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword3 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (*, *) +End_Group + +Group = Keyword4 + Auto + InputKey = SpacecraftClockStartCount + InputGroup = "IsisCube,Instrument" + InputPosition = (IsisCube, Instrument) + OutputName = Keyword4 + OutputPosition = (Group, SerialNumberKeywords) + Translation = (*, *) +End_Group +End diff --git a/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaArchive_fit.trn b/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaArchive_fit.trn new file mode 100644 index 0000000000..92b07babc0 --- /dev/null +++ b/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaArchive_fit.trn @@ -0,0 +1,42 @@ +# +# This translation file is used to produce the ISIS 3 Archive label group +# for the New Horizons LEISA camera. +# + +Group = MidObservationTime + Auto + InputKey = SPCSCET + InputPosition = FITSLABELS + OutputName = MidObservationTime + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (*, *) +End_Group + +Group = ObservationDuration + Auto + InputKey = DURMET + InputPosition = FITSLABELS + OutputName = ObservationDuration + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (*, *) +End_Group + +Group = Detector + Auto + InputKey = DETECTOR + InputPosition = FITSLABELS + OutputName = Detector + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (*, *) +End_Group + +Group = ScanType + Auto + InputKey = SCANTYPE + InputPosition = FITSLABELS + OutputName = ScanType + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (*, *) +End_Group + +End diff --git a/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaBandBin_fit.trn b/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaBandBin_fit.trn new file mode 100644 index 0000000000..c4d275ab5a --- /dev/null +++ b/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaBandBin_fit.trn @@ -0,0 +1,28 @@ +Group = FilterCenter + Auto + InputKey = FILTER + InputPosition = FITSLABELS + OutputName = Center + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = ((2.4892, 2.4808, 2.4723, 2.4639, 2.4555, 2.4471, 2.4386, 2.4302, 2.4218, 2.4134, 2.4050, 2.3966, 2.3883, 2.3799, 2.3715, 2.3632, 2.3548, 2.3465, 2.3382, 2.3299, 2.3216, 2.3134, 2.3051, 2.2969, 2.2886, 2.2804, 2.2722, 2.2641, 2.2559, 2.2478, 2.2397, 2.2316, 2.2235, 2.2155, 2.2074, 2.1994, 2.1915, 2.1835, 2.1756, 2.1676, 2.1598, 2.1519, 2.1441, 2.1362, 2.1285, 2.1207, 2.1130, 2.1053, 2.0976, 2.0899, 2.0823, 2.0747, 2.0671, 2.0596, 2.0520, 2.0446, 2.0371, 2.0297, 2.0223, 2.0149, 2.0075, 2.0002, 1.9929, 1.9857, 1.9784, 1.9712, 1.9641, 1.9569, 1.9498, 1.9427, 1.9357, 1.9287, 1.9217, 1.9147, 1.9078, 1.9009, 1.8940, 1.8871, 1.8803, 1.8735, 1.8668, 1.8600, 1.8533, 1.8466, 1.8400, 1.8334, 1.8268, 1.8202, 1.8137, 1.8072, 1.8007, 1.7942, 1.7878, 1.7814, 1.7750, 1.7687, 1.7623, 1.7560, 1.7498, 1.7435, 1.7373, 1.7311, 1.7249, 1.7188, 1.7126, 1.7065, 1.7004, 1.6944, 1.6884, 1.6823, 1.6763, 1.6704, 1.6644, 1.6585, 1.6526, 1.6467, 1.6409, 1.6350, 1.6292, 1.6234, 1.6176, 1.6119, 1.6061, 1.6004, 1.5947, 1.5890, 1.5833, 1.5777, 1.5720, 1.5664, 1.5608, 1.5552, 1.5497, 1.5441, 1.5386, 1.5331, 1.5276, 1.5221, 1.5166, 1.5112, 1.5057, 1.5003, 1.4949, 1.4895, 1.4841, 1.4788, 1.4734, 1.4681, 1.4628, 1.4575, 1.4522, 1.4469, 1.4417, 1.4365, 1.4312, 1.4260, 1.4208, 1.4157, 1.4105, 1.4054, 1.4003, 1.3952, 1.3901, 1.3850, 1.3800, 1.3749, 1.3699, 1.3649, 1.3600, 1.3550, 1.3501, 1.3452, 1.3403, 1.3355, 1.3306, 1.3258, 1.3210, 1.3163, 1.3116, 1.3069, 1.3022, 1.2975, 1.2929, 1.2883, 1.2838, 1.2793, 1.2748, 1.2704, 1.2660, 1.2616, 1.2573, 1.2530, 1.2487, 1.2446, 1.2404, 1.2363, 1.2322, 1.2282, 1.2243, 1.2204, 2.2623, 2.2589, 2.2555, 2.2521, 2.2488, 2.2454, 2.2421, 2.2387, 2.2354, 2.2321, 2.2288, 2.2255, 2.2222, 2.2189, 2.2156, 2.2124, 2.2091, 2.2059, 2.2026, 2.1994, 2.1962, 2.1930, 2.1898, 2.1866, 2.1834, 2.1803, 2.1771, 2.1740, 2.1708, 2.1677, 2.1646, 2.1615, 2.1584, 2.1553, 2.1522, 2.1491, 2.1461, 2.1430, 2.1400, 2.1370, 2.1339, 2.1309, 2.1279, 2.1249, 2.1220, 2.1190, 2.1160, 2.1131, 2.1101, 2.1072, 2.1043, 2.1014, 2.0985, 2.0956, 2.0927, 2.0898), WEDGE) +End_Group + +Group = FilterWidth + Auto + InputKey = FILTER + InputPosition = FITSLABELS + OutputName = Width + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = ((0.011228, 0.011190, 0.011152, 0.011114, 0.011076, 0.011038, 0.011000, 0.010962, 0.010924, 0.010886, 0.010848, 0.010810, 0.010772, 0.010735, 0.010697, 0.010659, 0.010622, 0.010584, 0.010547, 0.010509, 0.010472, 0.010435, 0.010397, 0.010360, 0.010323, 0.010286, 0.010249, 0.010212, 0.010176, 0.010139, 0.010102, 0.010066, 0.010029, 0.009993, 0.009957, 0.009921, 0.009885, 0.009849, 0.009813, 0.009777, 0.009742, 0.009706, 0.009671, 0.009636, 0.009601, 0.009566, 0.009531, 0.009496, 0.009461, 0.009427, 0.009392, 0.009358, 0.009324, 0.009290, 0.009256, 0.009222, 0.009189, 0.009155, 0.009122, 0.009088, 0.009055, 0.009022, 0.008989, 0.008957, 0.008924, 0.008891, 0.008859, 0.008827, 0.008795, 0.008763, 0.008731, 0.008699, 0.008668, 0.008636, 0.008605, 0.008574, 0.008543, 0.008512, 0.008481, 0.008451, 0.008420, 0.008390, 0.008360, 0.008329, 0.008299, 0.008270, 0.008240, 0.008210, 0.008181, 0.008151, 0.008122, 0.008093, 0.008064, 0.008035, 0.008006, 0.007978, 0.007949, 0.007921, 0.007892, 0.007864, 0.007836, 0.007808, 0.007780, 0.007753, 0.007725, 0.007697, 0.007670, 0.007643, 0.007615, 0.007588, 0.007561, 0.007534, 0.007508, 0.007481, 0.007454, 0.007428, 0.007401, 0.007375, 0.007349, 0.007322, 0.007296, 0.007270, 0.007245, 0.007219, 0.007193, 0.007167, 0.007142, 0.007116, 0.007091, 0.007065, 0.007040, 0.007015, 0.006990, 0.006965, 0.006940, 0.006915, 0.006890, 0.006865, 0.006841, 0.006816, 0.006792, 0.006767, 0.006743, 0.006719, 0.006694, 0.006670, 0.006646, 0.006622, 0.006598, 0.006574, 0.006550, 0.006527, 0.006503, 0.006479, 0.006456, 0.006432, 0.006409, 0.006386, 0.006362, 0.006339, 0.006316, 0.006293, 0.006270, 0.006247, 0.006224, 0.006202, 0.006179, 0.006157, 0.006134, 0.006112, 0.006090, 0.006068, 0.006046, 0.006024, 0.006002, 0.005980, 0.005959, 0.005937, 0.005916, 0.005895, 0.005874, 0.005853, 0.005832, 0.005811, 0.005791, 0.005770, 0.005750, 0.005730, 0.005710, 0.005691, 0.005671, 0.005652, 0.005633, 0.005614, 0.005595, 0.005576, 0.005558, 0.005540, 0.005522, 0.005505, 0.005321, 0.005313, 0.005305, 0.005297, 0.005289, 0.005281, 0.005273, 0.005265, 0.005257, 0.005249, 0.005242, 0.005234, 0.005226, 0.005218, 0.005211, 0.005203, 0.005195, 0.005188, 0.005180, 0.005173, 0.005165, 0.005158, 0.005150, 0.005143, 0.005135, 0.005128, 0.005120, 0.005113, 0.005105, 0.005098, 0.005091, 0.005083, 0.005076, 0.005069, 0.005062, 0.005054, 0.005047, 0.005040, 0.005033, 0.005026, 0.005019, 0.005012, 0.005005, 0.004998, 0.004990, 0.004984, 0.004977, 0.004970, 0.004963, 0.004956, 0.004949, 0.004942, 0.004935, 0.004928, 0.004922, 0.004915), WEDGE) +End_Group + +Group = OriginalBand + Auto + InputKey = FILTER + InputPosition = FITSLABELS + OutputName = OriginalBand + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = ((1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256), WEDGE) +End_Group + +End diff --git a/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaInstrument_fit.trn b/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaInstrument_fit.trn new file mode 100644 index 0000000000..5ea0d304ac --- /dev/null +++ b/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaInstrument_fit.trn @@ -0,0 +1,58 @@ +# +# 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 = 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 = SpacecraftClockStartCount + Auto + InputKey = SPCSCLK0 + InputPosition = FITSLABELS + OutputName = SpacecraftClockStartCount + 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 + +End diff --git a/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaKernels_fit.trn b/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaKernels_fit.trn new file mode 100644 index 0000000000..97099317bc --- /dev/null +++ b/isis/src/newhorizons/apps/leisa2isis/NewHorizonsLeisaKernels_fit.trn @@ -0,0 +1,10 @@ +Group = NaifCode + Auto + InputKey = SPCINSID + InputPosition = FITSLABELS + OutputName = NaifFrameCode + OutputPosition = (Object, IsisCube, Group, Kernels) + Translation = (-98901, -98201) +End_Group + +End diff --git a/isis/src/newhorizons/apps/leisa2isis/leisa2isis.cpp b/isis/src/newhorizons/apps/leisa2isis/leisa2isis.cpp index 99aee45f41..12fd194443 100644 --- a/isis/src/newhorizons/apps/leisa2isis/leisa2isis.cpp +++ b/isis/src/newhorizons/apps/leisa2isis/leisa2isis.cpp @@ -21,7 +21,7 @@ using namespace std; namespace Isis { void processFunc(Buffer &in); - Cube *outputCubeForLeisa2Isis; + Cube *outputCubeForLeisa2Isis; void leisa2isis(UserInterface &ui, Pvl *log) { ProcessImportFits importFits; @@ -45,12 +45,12 @@ namespace Isis { throw IException(IException::User, msg, _FILEINFO_); } - bool replace = ui.GetBoolean("REPLACE"); + bool replace = ui.GetBoolean("REPLACE"); - // Check to see if the calibration error image was requested from the FITS file and + // Check to see if the calibration error image was requested from the FITS file and // that it has the corresponding extension if (ui.WasEntered("ERRORMAP")) { - PvlGroup extensionLabel; + PvlGroup extensionLabel; try { extensionLabel = importFits.fitsImageLabel(5); /** if (!extensionLabel.hasKeyword("XTENSION")) { @@ -79,12 +79,12 @@ namespace Isis { } - // Check to see if the quality image was requested from the FITS file and + // Check to see if the quality image was requested from the FITS file and // that it has the corresponding extension if (ui.WasEntered("QUALITY") || replace) { - PvlGroup extensionLabel; + PvlGroup extensionLabel; try { - extensionLabel = importFits.fitsImageLabel(6); + extensionLabel = importFits.fitsImageLabel(6); /** if (!extensionLabel.hasKeyword("XTENSION")) { QString msg = QObject::tr("Input file [%1] does not appear to be a calibrated New Horizons " "LEISA FITS file. XTENSION keyword is missing in the sixth extension.") @@ -114,27 +114,27 @@ namespace Isis { importFits.SetOrganization(ProcessImport::BIL); importFits.setProcessFileStructure(0); - Cube *output = NULL; - FileName outputFile; + Cube *output = NULL; + FileName outputFile; CubeAttributeOutput &att = ui.GetOutputAttribute("TO"); if (replace){ outputFile = FileName::createTempFile(FileName("$TEMPORARY/dn.cub")); importFits.SetPixelType(Isis::Real); - output = importFits.SetOutputCube(outputFile.toString(), att); - } + output = importFits.SetOutputCube(outputFile.toString(), att); + } else { if (importFits.PixelType() == Isis::None) { importFits.SetPixelType(Isis::Real); } - importFits.SetAttributes(att); - output = importFits.SetOutputCube(ui.GetFileName("TO"), att); + importFits.SetAttributes(att); + output = importFits.SetOutputCube(ui.GetFileName("TO"), att); } // Get the directory where the New Horizons translation tables are. PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); - QString transDir = (QString) dataDir["NewHorizons"] + "/translations/"; + QString transDir = "$ISISROOT/appdata/translations/"; // Temp storage of translated labels Pvl outLabel; @@ -143,7 +143,7 @@ namespace Isis { Pvl fitsLabel; fitsLabel.addGroup(importFits.fitsImageLabel(0)); // Create an Instrument group - FileName insTransFile(transDir + "leisaInstrument_fit.trn"); + FileName insTransFile(transDir + "NewHorizonsLeisaInstrument_fit.trn"); PvlToPvlTranslationManager insXlater(fitsLabel, insTransFile.expanded()); insXlater.Auto(outLabel); @@ -157,19 +157,19 @@ namespace Isis { output->putGroup(outLabel.findGroup("Instrument", Pvl::Traverse)); // Create an Archive group - FileName archiveTransFile(transDir + "leisaArchive_fit.trn"); + FileName archiveTransFile(transDir + "NewHorizonsLeisaArchive_fit.trn"); PvlToPvlTranslationManager archiveXlater(fitsLabel, archiveTransFile.expanded()); archiveXlater.Auto(outLabel); output->putGroup(outLabel.findGroup("Archive", Pvl::Traverse)); //Create a Band Bin Group - FileName bandTransFile(transDir + "leisaBandBin_fit.trn"); + FileName bandTransFile(transDir + "NewHorizonsLeisaBandBin_fit.trn"); PvlToPvlTranslationManager bandBinXlater(fitsLabel, bandTransFile.expanded()); bandBinXlater.Auto(outLabel); output->putGroup(outLabel.findGroup("BandBin", Pvl::Traverse)); // Create a Kernels group - FileName kernelsTransFile(transDir + "leisaKernels_fit.trn"); + FileName kernelsTransFile(transDir + "NewHorizonsLeisaKernels_fit.trn"); PvlToPvlTranslationManager kernelsXlater(fitsLabel, kernelsTransFile.expanded()); kernelsXlater.Auto(outLabel); output->putGroup(outLabel.findGroup("Kernels", Pvl::Traverse)); @@ -197,7 +197,7 @@ namespace Isis { QString exposureTime = inst["ExposureDuration"]; double frameRate = 1.0/exposureTime.toDouble(); - inst.addKeyword(PvlKeyword("FrameRate", QString::number(frameRate)), PvlGroup::Replace); + inst.addKeyword(PvlKeyword("FrameRate", QString::number(frameRate)), PvlGroup::Replace); inst.findKeyword("FrameRate").setUnits("Hz"); // Save the input FITS label in the Cube original labels @@ -217,15 +217,15 @@ namespace Isis { importFits.SetOrganization(ProcessImport::BIL); importFits.setProcessFileStructure(6); - FileName qualityFile = FileName::createTempFile("$TEMPORARY/quality.cub"); + FileName qualityFile = FileName::createTempFile("$TEMPORARY/quality.cub"); CubeAttributeOutput &cao = ui.GetOutputAttribute("TO"); // Set to Isis::Real if (cao.propagatePixelType()) { - cao.setPixelType(Isis::Real); + cao.setPixelType(Isis::Real); } - outputCubeForLeisa2Isis = importFits.SetOutputCube(qualityFile.toString(), cao); + outputCubeForLeisa2Isis = importFits.SetOutputCube(qualityFile.toString(), cao); importFits.Progress()->SetText("Preparing quality image for comparing against LEISA pixels"); importFits.StartProcess(processFunc); @@ -243,7 +243,7 @@ namespace Isis { // Cleanup by removing temporary cubes remove(qualityFile.toString().toStdString().c_str()); - remove(outputFile.toString().toStdString().c_str()); + remove(outputFile.toString().toStdString().c_str()); } // Import the ERRORMAP image. It is the 6th image in the FITS file (i.e., 5th extension) @@ -289,11 +289,11 @@ namespace Isis { for (int i = 0; i < in.size(); i++) { if (((in[i] == 1) || (in[i] == 2)) || (in[i] == 8)) { in[i] = Isis::NULL8; - } + } else { in[i] = 0; } } - outputCubeForLeisa2Isis->write(in); + outputCubeForLeisa2Isis->write(in); } } diff --git a/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriArchive_fit.trn b/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriArchive_fit.trn new file mode 100644 index 0000000000..a2262f661b --- /dev/null +++ b/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriArchive_fit.trn @@ -0,0 +1,36 @@ +# +# This translation file is used to produce the ISIS 3 Archive label group +# for the New Horizons LORRI camera. +# +Group = HighSpeedCompressionMode + Auto + InputKey = HSCOMPR + InputPosition = FITSLABELS + InputDefault = UNKNOWN + OutputName = HighSpeedCompressionMode + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (*, *) +End_Group + +Group = ObservationCompletionStatus + Auto + InputKey = OBSCOMPL + InputPosition = FITSLABELS + InputDefault = UNKNOWN + OutputName = ObservationCompletionStatus + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (COMPLETE, COMPLETE) + Translation = (UNKNOWN, UNKNOWN) +End_Group + +Group = SequenceDescription + Auto + InputKey = REQDESC + InputPosition = FITSLABELS + InputDefault = NONE + OutputName = SequenceDescription + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (*, *) +End_Group + +End diff --git a/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriBandBin_fit.trn b/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriBandBin_fit.trn new file mode 100644 index 0000000000..351fc697a6 --- /dev/null +++ b/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriBandBin_fit.trn @@ -0,0 +1,28 @@ +Group = FilterName + Auto + InputKey = FILTER_NAME + InputDefault = None + OutputName = Name + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = (*, *) +End_Group + +Group = FilterCenter + Auto + InputKey = CENTER_FILTER_WAVELENGTH + InputDefault = 600 + OutputName = Center + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = (600, 600) +End_Group + +Group = FilterWidth + Auto + InputKey = BAND_WIDTH + InputDefault = 500 + OutputName = Width + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = (500, 500) +End_Group + +End diff --git a/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriInstrument_fit.trn b/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriInstrument_fit.trn new file mode 100644 index 0000000000..8ce0a2303f --- /dev/null +++ b/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriInstrument_fit.trn @@ -0,0 +1,106 @@ +# +# This translation file is used to produce the ISIS 3 Instrument label group +# for the New Horizons LORRI 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 = InstrumentId + Auto + InputKey = INSTRU + InputPosition = FITSLABELS + InputDefault = UNKNOWN + OutputName = InstrumentId + OutputPosition = (Object, IsisCube, Group, Instrument) + Translation = (LORRI, lor) +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 = (Ganymede, GANYMEDE) + Translation = (Callisto, CALLISTO) + Translation = (Europa, EUROPA) + Translation = (Himalia, HIMALIA) + Translation = (Elara, ELARA) + Translation = (Pluto, PLUTO) + Translation = (Charon, CHARON) + Translation = (Sky, SKY) + Translation = (*, *) +End_Group + +Group = StartTime + Auto + InputKey = SPCUTCAL + InputPosition = FITSLABELS + OutputName = StartTime + 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 = SPCSCLK + 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 + +Group = ExposureDuration + Auto + InputKey = EXPTIME + InputPosition = FITSLABELS + OutputName = ExposureDuration + OutputPosition = (Object, IsisCube, Group, Instrument) + Translation = (*, *) +End_Group + +# Not used with the current camera model +# The summing modes are handeled through two different Naif codes +# One for 1x1 and another for 4x4 summing. +#Group = Summing +# Auto +# InputKey = SUMMING +# InputPosition = FITSLABELS +# OutputName = Summing +# OutputPosition = (Object, IsisCube, Group, Instrument) +# Translation = (*, *) +#End_Group + +End diff --git a/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriKernels_fit.trn b/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriKernels_fit.trn new file mode 100644 index 0000000000..5723473fc4 --- /dev/null +++ b/isis/src/newhorizons/apps/lorri2isis/NewHorizonsLorriKernels_fit.trn @@ -0,0 +1,11 @@ +Group = NaifCode + Auto + InputKey = FORMAT + InputPosition = FITSLABELS + OutputName = NaifFrameCode + OutputPosition = (Object, IsisCube, Group, Kernels) + Translation = (-98301, 0) + Translation = (-98302, 1) +End_Group + +End diff --git a/isis/src/newhorizons/apps/lorri2isis/main.cpp b/isis/src/newhorizons/apps/lorri2isis/main.cpp index 4033bd5998..6063f50a5f 100644 --- a/isis/src/newhorizons/apps/lorri2isis/main.cpp +++ b/isis/src/newhorizons/apps/lorri2isis/main.cpp @@ -23,7 +23,7 @@ void flip(Buffer &in); void IsisMain() { - // NOTE: + // NOTE: // Still to be done/considered // Process the other FITS channels. One of them contains pixel quality info // May want to set special pixel values using this channel @@ -57,7 +57,7 @@ void IsisMain() { // Get the label of extension #2 and make sure this is a New Horizons LORRI Quality image if (ui.WasEntered("QUALITY")) { PvlGroup qualityLabel = importFits.fitsImageLabel(2); - if (qualityLabel["XTENSION"][0] != "IMAGE" || + if (qualityLabel["XTENSION"][0] != "IMAGE" || qualityLabel["EXTNAME"][0] != "LORRI Quality flag image") { QString msg = QObject::tr("Input file [%1] does not appear to contain a LORRI Quality image. " "Input file label value for EXTNAME is [%2] and XTENSION is [%3]"). @@ -72,7 +72,7 @@ void IsisMain() { // Get the directory where the New Horizons translation tables are. PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); - QString transDir = (QString) dataDir["NewHorizons"] + "/translations/"; + QString transDir = "$ISISROOT/appdata/translations/"; // Temp storage of translated labels Pvl outLabel; @@ -82,7 +82,7 @@ void IsisMain() { fitsLabel.addGroup(importFits.fitsImageLabel(0)); // Create an Instrument group - FileName insTransFile(transDir + "lorriInstrument_fit.trn"); + FileName insTransFile(transDir + "NewHorizonsLorriInstrument_fit.trn"); PvlToPvlTranslationManager insXlater(fitsLabel, insTransFile.expanded()); insXlater.Auto(outLabel); @@ -96,19 +96,19 @@ void IsisMain() { output->putGroup(outLabel.findGroup("Instrument", Pvl::Traverse)); // Create a Band Bin group - FileName bandTransFile(transDir + "lorriBandBin_fit.trn"); + FileName bandTransFile(transDir + "NewHorizonsLorriBandBin_fit.trn"); PvlToPvlTranslationManager bandBinXlater(fitsLabel, bandTransFile.expanded()); bandBinXlater.Auto(outLabel); output->putGroup(outLabel.findGroup("BandBin", Pvl::Traverse)); // Create an Archive group - FileName archiveTransFile(transDir + "lorriArchive_fit.trn"); + FileName archiveTransFile(transDir + "NewHorizonsLorriArchive_fit.trn"); PvlToPvlTranslationManager archiveXlater(fitsLabel, archiveTransFile.expanded()); archiveXlater.Auto(outLabel); output->putGroup(outLabel.findGroup("Archive", Pvl::Traverse)); // Create a Kernels group - FileName kernelsTransFile(transDir + "lorriKernels_fit.trn"); + FileName kernelsTransFile(transDir + "NewHorizonsLorriKernels_fit.trn"); PvlToPvlTranslationManager kernelsXlater(fitsLabel, kernelsTransFile.expanded()); kernelsXlater.Auto(outLabel); output->putGroup(outLabel.findGroup("Kernels", Pvl::Traverse)); @@ -182,4 +182,3 @@ void IsisMain() { // swap(in[i], in[in.size() - i - 1]); // } //} - diff --git a/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicArchive_fit.trn b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicArchive_fit.trn new file mode 100644 index 0000000000..0d12e3883e --- /dev/null +++ b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicArchive_fit.trn @@ -0,0 +1,37 @@ +# +# This translation file is used to produce the ISIS 3 Archive label group +# for the New Horizons LORRI camera. +# +Group = HighSpeedCompressionMode + Auto + InputKey = HSCOMPR + InputPosition = FITSLABELS + InputDefault = UNKNOWN + OutputName = HighSpeedCompressionMode + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (*, *) +End_Group + +Group = ObservationCompletionStatus + Auto + InputKey = OBSCOMPL + InputPosition = FITSLABELS + InputDefault = UNKNOWN + OutputName = ObservationCompletionStatus + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (COMPLETE, COMPLETE) + Translation = (UNKNOWN, UNKNOWN) + Translation = (*, *) +End_Group + +Group = SequenceDescription + Auto + InputKey = REQDESC + InputPosition = FITSLABELS + InputDefault = NONE + OutputName = SequenceDescription + OutputPosition = (Object, IsisCube, Group, Archive) + Translation = (*, *) +End_Group + +End diff --git a/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicBandBin_fit.trn b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicBandBin_fit.trn new file mode 100644 index 0000000000..842575d7e7 --- /dev/null +++ b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicBandBin_fit.trn @@ -0,0 +1,45 @@ +Group = FilterName + Auto + InputKey = FILTER + InputPosition = FITSLABELS + OutputName = Name + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = (*, *) +End_Group + +Group = FilterCenter + Auto + InputKey = FILTER + InputPosition = FITSLABELS + OutputName = Center + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = (625, RED) + Translation = (475, BLUE) + Translation = (870, NIR) + Translation = (895, CH4) + Translation = (680, CLEAR) +End_Group + +Group = FilterWidth + Auto + InputKey = FILTER + InputPosition = FITSLABELS + OutputName = Width + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = (150, RED) + Translation = (150, BLUE) + Translation = (180, NIR) + Translation = (40, CH4) + Translation = (560, CLEAR) +End_Group + +Group = FilterTime + Optional + Auto + InputKey = UTCMID00 + InputPosition = FITSLABELS + OutputName = UtcTime + OutputPosition = (Object, IsisCube, Group, BandBin) + Translation = (*, *) +End_Group +End diff --git a/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicCalibration_fit.trn b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicCalibration_fit.trn new file mode 100644 index 0000000000..c75cfe2431 --- /dev/null +++ b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicCalibration_fit.trn @@ -0,0 +1,213 @@ +Group = PixelSize + Auto + Optional + InputKey = PIXSIZE + InputPosition = FITSLABELS + OutputName = PixelSize + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = PixelFov + Auto + Optional + InputKey = PIXFOV + InputPosition = FITSLABELS + OutputName = PixelFov + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = Gain + Auto + Optional + InputKey = GAIN + InputPosition = FITSLABELS + OutputName = Gain + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = ReadNoise + Auto + Optional + InputKey = READNOI + InputPosition = FITSLABELS + OutputName = ReadNoise + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = TdiRate + Auto + Optional + InputKey = TDIRATE + InputPosition = FITSLABELS + OutputName = TdiRate + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = SolarSpectrumResolved + Auto + InputKey = RSOLAR + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = SolarSpectrumResolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = SolarSpectrumUnresolved + Auto + InputKey = PSOLAR + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = SolarSpectrumUnresolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = PholusSpectrumResolved + Auto + InputKey = RPHOLUS + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = PholusSpectrumResolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = PholusSpectrumUnresolved + Auto + InputKey = PPHOLUS + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = PholusSpectrumUnresolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = CharonSpectrumResolved + Auto + InputKey = RCHARON + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = CharonSpectrumResolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = CharonSpectrumUnresolved + Auto + InputKey = PCHARON + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = CharonSpectrumUnresolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = JupiterSpectrumResolved + Auto + InputKey = RJUPITER + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = JupiterSpectrumResolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = JupiterSpectrumUnresolved + Auto + InputKey = PJUPITER + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = JupiterSpectrumUnresolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = PlutoSpectrumResolved + Auto + Optional + InputKey = RPLUTO + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = PlutoSpectrumResolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = PlutoSpectrumUnresolved + Auto + Optional + InputKey = PPLUTO + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = PlutoSpectrumUnresolved + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = SolarPivotWavelength + Auto + InputKey = WSOLAR + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = SolarPivotWavelength + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = JupiterPivotWavelength + Auto + InputKey = WJUPITER + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = JupiterPivotWavelength + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = PholusPivotWavelength + Auto + InputKey = WPHOLUS + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = PholusPivotWavelength + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = PlutoPivotWavelength + Auto + InputKey = WPLUTO + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = PlutoPivotWavelength + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = CharonPivotWavelength + Auto + InputKey = WCHARON + InputPosition = FITSLABELS + InputDefault = 0.0 + OutputName = CharonPivotWavelength + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +Group = FlatFile + Auto + Optional + InputKey = FLAT + InputPosition = FITSLABELS + OutputName = FlatFile + OutputPosition = (Object, IsisCube, Group, RadiometricCalibration) + Translation = (*, *) +End_Group + +End diff --git a/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicInstrument_fit.trn b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicInstrument_fit.trn new file mode 100644 index 0000000000..772d4fb567 --- /dev/null +++ b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicInstrument_fit.trn @@ -0,0 +1,154 @@ +# +# This translation file is used to produce the ISIS 3 Instrument label group +# for the New Horizons MVIC 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 = InstrumentId + Auto + InputKey = INSTRU + InputPosition = FITSLABELS + InputDefault = UNKNOWN + OutputName = InstrumentId + OutputPosition = (Object, IsisCube, Group, Instrument) + Translation = (MVIC, mvi) +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 + +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 = PanCcd + Optional + Auto + InputKey = PANCCD + InputPosition = FITSLABELS + OutputName = PanCcd + OutputPosition = (Object, IsisCube, Group, Instrument) + Translation = (*, *) +End_Group + +Group = HwSide + Auto + InputKey = SIDE + InputPosition = FITSLABELS + OutputName = HwSide + 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 = InstrumentMode + Auto + InputKey = MODE + InputPosition = FITSLABELS + OutputName = InstrumentMode + 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 + +Group = TdiRate + Auto + Optional + InputKey = TDIRATE + InputPosition = FITSLABELS + OutputName = TdiRate + OutputPosition = (Object, IsisCube, Group, Instrument) + Translation = (*, *) +End_Group + +End diff --git a/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicKernels_fit.trn b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicKernels_fit.trn new file mode 100644 index 0000000000..41be27809c --- /dev/null +++ b/isis/src/newhorizons/apps/mvic2isis/NewHorizonsMvicKernels_fit.trn @@ -0,0 +1,24 @@ +# All Mvic frames have the boresight in the -X directions, while Isis assumes boresight is either +# in +/- Z direction. A new frame was created for each Mvic ccd's to do a final rotation into the +# Isis assumed boresight. This is a 90 degree rotation around the Y-axis. New Naif Id's were +# created by simply adding 700 to the Mission Naif ID. +# +# This was done as an extra frame rather than in the FocalPlaneMap code because of ckwriter and +# spkwriter. + +Group = NaifCode + Auto + InputKey = SPCINSID + InputPosition = FITSLABELS + OutputName = NaifFrameCode + OutputPosition = (Object, IsisCube, Group, Kernels) + Translation = (-98903, -98203) + Translation = (-98904, -98204) + Translation = (-98905, -98205) + Translation = (-98906, -98206) + Translation = (-98907, -98207) + Translation = (-98908, -98208) + Translation = (-98909, -98209) +End_Group + +End diff --git a/isis/src/newhorizons/apps/mvic2isis/main.cpp b/isis/src/newhorizons/apps/mvic2isis/main.cpp index 63c2efd532..eb1e9c10f4 100644 --- a/isis/src/newhorizons/apps/mvic2isis/main.cpp +++ b/isis/src/newhorizons/apps/mvic2isis/main.cpp @@ -60,7 +60,7 @@ void IsisMain() { throw IException(IException::User, msg, _FILEINFO_); } - // Check to see if the undistorted image was requested from the FITS file and that it has the + // Check to see if the undistorted image was requested from the FITS file and that it has the // corresponding extension and keywords if (ui.WasEntered("UNDISTORTED")) { PvlGroup undistortedLabel = importFits.fitsImageLabel(1); @@ -74,7 +74,7 @@ void IsisMain() { } } - // Check to see if the error image was requested from the FITS file and it has the + // Check to see if the error image was requested from the FITS file and it has the // corresponding extension and keywords if (ui.WasEntered("ERROR")) { PvlGroup errorLabel = importFits.fitsImageLabel(2); @@ -87,7 +87,7 @@ void IsisMain() { } } - // Check to see if the quality image was requested from the FITS file and it has the + // Check to see if the quality image was requested from the FITS file and it has the // corresponding extension and keywords if (ui.WasEntered("QUALITY")) { PvlGroup qualityLabel = importFits.fitsImageLabel(3); @@ -100,7 +100,7 @@ void IsisMain() { } } - // Convert the primary image + // Convert the primary image QString bitpix = primaryLabel.findKeyword("BITPIX", Pvl::Traverse); int bytesPerPix = abs(toInt(bitpix)) / 8; importFits.SetDataPrefixBytes(bytesPerPix * 12); @@ -122,7 +122,7 @@ void IsisMain() { importFits.EndProcess(); - // Convert the bias-subtracted, flattened, distortion removed image. It is currently assumed + // Convert the bias-subtracted, flattened, distortion removed image. It is currently assumed // to be the 2rd image in the FITS file (i.e., 1st extension) if (ui.WasEntered("UNDISTORTED")) { PvlGroup undistortedLabel = importFits.fitsImageLabel(1); @@ -204,11 +204,11 @@ void translateLabels(Pvl &label, Cube *ocube) { // Get the directory where the New Horizons translation tables are. PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); - QString transDir = (QString) dataDir["NewHorizons"] + "/translations/"; + QString transDir = "$ISISROOT/appdata/translations/"; Pvl *isisLabel = ocube->label(); // Create an Instrument group - FileName insTransFile(transDir + "mvicInstrument_fit.trn"); + FileName insTransFile(transDir + "NewHorizonsMvicInstrument_fit.trn"); PvlToPvlTranslationManager insXlater(label, insTransFile.expanded()); insXlater.Auto(*(isisLabel)); @@ -234,13 +234,13 @@ void translateLabels(Pvl &label, Cube *ocube) { // and spacecraft clock kernels to calculate time. NaifStatus::CheckErrors(); // Leapsecond kernel - QString lsk = "$ISIS3DATA/base/kernels/lsk/naif????.tls"; + QString lsk = "$ISISDATA/base/kernels/lsk/naif????.tls"; FileName lskName(lsk); lskName = lskName.highestVersion(); furnsh_c(lskName.expanded().toLatin1().data()); // Spacecraft clock kernel - QString sclk = "$ISIS3DATA/newhorizons/kernels/sclk/new_horizons_???.tsc"; + QString sclk = "$ISISDATA/newhorizons/kernels/sclk/new_horizons_???.tsc"; FileName sclkName(sclk); sclkName = sclkName.highestVersion(); furnsh_c(sclkName.expanded().toLatin1().data()); @@ -262,7 +262,7 @@ void translateLabels(Pvl &label, Cube *ocube) { inst.addKeyword(PvlKeyword("StartTime", QString(utc))); // Create a Band Bin group - FileName bandTransFile(transDir + "mvicBandBin_fit.trn"); + FileName bandTransFile(transDir + "NewHorizonsMvicBandBin_fit.trn"); PvlToPvlTranslationManager bandBinXlater(label, bandTransFile.expanded()); bandBinXlater.Auto(*(isisLabel)); // Add units and OriginalBand keyword @@ -292,18 +292,18 @@ void translateLabels(Pvl &label, Cube *ocube) { } // Create an Archive group - FileName archiveTransFile(transDir + "mvicArchive_fit.trn"); + FileName archiveTransFile(transDir + "NewHorizonsMvicArchive_fit.trn"); PvlToPvlTranslationManager archiveXlater(label, archiveTransFile.expanded()); archiveXlater.Auto(*(isisLabel)); // Create a Kernels group - FileName kernelsTransFile(transDir + "mvicKernels_fit.trn"); + FileName kernelsTransFile(transDir + "NewHorizonsMvicKernels_fit.trn"); PvlToPvlTranslationManager kernelsXlater(label, kernelsTransFile.expanded()); kernelsXlater.Auto(*(isisLabel)); - + // If Level 2 product, Create a RadiometricCalibration group if (label.hasKeyword("SOCL2VER", Pvl::Traverse)) { - FileName calibrationTransFile(transDir + "mvicCalibration_fit.trn"); + FileName calibrationTransFile(transDir + "NewHorizonsMvicCalibration_fit.trn"); PvlToPvlTranslationManager calibrationXlater(label, calibrationTransFile.expanded()); calibrationXlater.Auto(*(isisLabel)); @@ -351,4 +351,3 @@ void translateLabels(Pvl &label, Cube *ocube) { // swap(in[i], in[in.size() - i - 1]); // } //} -