66 const int MdisWac(-236800);
77 #if defined(MDIS_SUBFRAMES_UNSUPPORTED)
78 int subFrameMode = inst[
"SubFrameMode"];
79 if(subFrameMode != 0) {
80 string msg =
"Subframe imaging mode is not supported!";
81 throw iException::Message(iException::User, msg,
_FILEINFO_);
88 #if defined(MDIS_JAILBARS_UNSUPPORTED)
89 int jailBars = inst[
"JailBars"];
91 string msg =
"Jail bar observations are not currently supported!";
92 throw iException::Message(iException::Programmer, msg,
_FILEINFO_);
101 filterNumber = bandBin[
"Number"];
107 QString filterCode =
toString(fnCode);
111 ikernKey =
"INS" + ikCode +
"_REFERENCE_FRAME";
114 ikernKey =
"INS" + filterCode +
"_FRAME";
135 QString stime = inst[
"SpacecraftClockCount"];
136 double exposureDuration = ((double) inst[
"ExposureDuration"]) / 1000.0;
148 ikernKey =
"INS" + ikCode +
"_BORESIGHT_SAMPLE";
149 double sampleBoreSight =
getDouble(ikernKey);
151 ikernKey =
"INS" + ikCode +
"_BORESIGHT_LINE";
152 double lineBoreSight =
getDouble(ikernKey);
167 int fpuBinMode = inst[
"FpuBinningMode"];
168 int pixelBinMode = inst[
"PixelBinningMode"];
170 int summing = ((pixelBinMode == 0) ? 1 : pixelBinMode);
173 if(fpuBinMode == 1) {
174 #if defined(USE_FPU_BINNING_OFFSETS)
175 ikernKey =
"INS" + ikCode +
"_FPUBIN_START_SAMPLE";
176 double fpuStartingSample =
getDouble(ikernKey);
179 ikernKey =
"INS" + ikCode +
"_FPUBIN_START_LINE";
180 double fpuStartingLine =
getDouble(ikernKey);
206 string msg =
"New MDIS NAC/WAC distortion models will invalidate previous "
207 "SPICE - you may need to rerun spiceinit to get new kernels";
222 iTime centerTime = etStart + (exposureDuration / 2.0);
251 double exposureDuration) {
287 double focalLength(0.0);
288 QString tdflKey(
"TempDependentFocalLength");
294 if (my_tdfl.isValid()) {
295 focalLength =
IString(my_tdfl.toString()).ToDouble();
302 focalLength =
getDouble(
"INS" + filterCode +
"_FOCAL_LENGTH");
305 bool tdfl_disabled(
false);
306 #ifndef DISABLE_TDFL_DISABLING
309 tdfl_disabled = (
"TRUE" == tdfl_state.
UpCase() );
312 tdfl_disabled =
false;
318 if ( !tdfl_disabled ) {
323 double fpTemp = inst[
"FocalPlaneTemperature"];
325 QString fptCoeffs =
"INS" + filterCode +
"_FL_TEMP_COEFFS";
327 for (
int i = 0 ; i < 6 ; i++) {
328 fl +=
getDouble(fptCoeffs, i) * pow(fpTemp, (
double) i);
338 "Failed to compute temperature-dependent focal length",
343 return (focalLength);