Loading isis/src/hayabusa2/apps/hyb2onccal/Hyb2OncCalUtils.h +25 −14 Original line number Diff line number Diff line Loading @@ -271,8 +271,6 @@ void Calibrate(vector<Buffer *>& in, vector<Buffer *>& out) { // FLATFIELD correction // Check for any special pixels in the flat field (unlikely) // If we have only one input cube, that means that we do not have a flat-field (W1/W2). if (in.size() == 2) { // Note that our current flat-fields to not have special pixel values. if (IsSpecial(flatField[i]) || IsSpecial(imageOut[i])) { Loading @@ -285,7 +283,6 @@ void Calibrate(vector<Buffer *>& in, vector<Buffer *>& out) { } } } } return; } Loading Loading @@ -406,8 +403,22 @@ void translate(Cube *flatField,double *transform, QString fname) { FileName DetermineFlatFieldFile(const QString &filter) { QString fileName = "$hayabusa2/calibration/flatfield/"; // FileName consists of binned/notbinned, camera, and filter if(g_instrument == InstrumentType::ONCT) { if(filter.toLower() == 'v') { // There is no updated v filter flat file fileName += "flat_" + filter.toLower() + "_norm.cub"; } else { fileName += "hyb2_onc_flat_t" + filter.toLower() + "f_nr_trim_20190131.cub"; } } else if(g_instrument == InstrumentType::ONCW1) { fileName += "hyb2_onc_flat_w1f_nr_20190131.cub"; } else { fileName += "hyb2_onc_flat_w2f_nr_20190131.cub"; } FileName final(fileName); return final; } Loading isis/src/hayabusa2/apps/hyb2onccal/hyb2onccal.cpp +53 −56 Original line number Diff line number Diff line Loading @@ -189,12 +189,10 @@ namespace Isis { g_target = target; // NOTE we do not have a valid flat-field for the W1 or W2 images. FileName flatfile = "NONE"; FileName flatfile = DetermineFlatFieldFile(g_filter); PvlGroup alphaCube; if (g_instrument == InstrumentType::ONCT) { QScopedPointer<Cube, TemporaryCubeDeleter> flatcube; flatfile = DetermineFlatFieldFile(g_filter); QString reducedFlat(flatfile.expanded()); try { Loading Loading @@ -257,9 +255,8 @@ namespace Isis { CubeAttributeInput att; p.SetInputCube(transFlat.expanded(),att); } //Finished setting flatfield file for ONC-T } //Finished setting flatfield file } Cube *ocube = p.SetOutputCube("TO"); QString calfile = loadCalibrationVariables(ui.GetAsString("CONFIG")); g_timeRatio = g_Tvct/(g_texp + g_Tvct); Loading Loading
isis/src/hayabusa2/apps/hyb2onccal/Hyb2OncCalUtils.h +25 −14 Original line number Diff line number Diff line Loading @@ -271,8 +271,6 @@ void Calibrate(vector<Buffer *>& in, vector<Buffer *>& out) { // FLATFIELD correction // Check for any special pixels in the flat field (unlikely) // If we have only one input cube, that means that we do not have a flat-field (W1/W2). if (in.size() == 2) { // Note that our current flat-fields to not have special pixel values. if (IsSpecial(flatField[i]) || IsSpecial(imageOut[i])) { Loading @@ -285,7 +283,6 @@ void Calibrate(vector<Buffer *>& in, vector<Buffer *>& out) { } } } } return; } Loading Loading @@ -406,8 +403,22 @@ void translate(Cube *flatField,double *transform, QString fname) { FileName DetermineFlatFieldFile(const QString &filter) { QString fileName = "$hayabusa2/calibration/flatfield/"; // FileName consists of binned/notbinned, camera, and filter if(g_instrument == InstrumentType::ONCT) { if(filter.toLower() == 'v') { // There is no updated v filter flat file fileName += "flat_" + filter.toLower() + "_norm.cub"; } else { fileName += "hyb2_onc_flat_t" + filter.toLower() + "f_nr_trim_20190131.cub"; } } else if(g_instrument == InstrumentType::ONCW1) { fileName += "hyb2_onc_flat_w1f_nr_20190131.cub"; } else { fileName += "hyb2_onc_flat_w2f_nr_20190131.cub"; } FileName final(fileName); return final; } Loading
isis/src/hayabusa2/apps/hyb2onccal/hyb2onccal.cpp +53 −56 Original line number Diff line number Diff line Loading @@ -189,12 +189,10 @@ namespace Isis { g_target = target; // NOTE we do not have a valid flat-field for the W1 or W2 images. FileName flatfile = "NONE"; FileName flatfile = DetermineFlatFieldFile(g_filter); PvlGroup alphaCube; if (g_instrument == InstrumentType::ONCT) { QScopedPointer<Cube, TemporaryCubeDeleter> flatcube; flatfile = DetermineFlatFieldFile(g_filter); QString reducedFlat(flatfile.expanded()); try { Loading Loading @@ -257,9 +255,8 @@ namespace Isis { CubeAttributeInput att; p.SetInputCube(transFlat.expanded(),att); } //Finished setting flatfield file for ONC-T } //Finished setting flatfield file } Cube *ocube = p.SetOutputCube("TO"); QString calfile = loadCalibrationVariables(ui.GetAsString("CONFIG")); g_timeRatio = g_Tvct/(g_texp + g_Tvct); Loading