73 const int MdisWac(-236800);
74 const int MdisNac(-236820);
86 msg +=
" is not a supported instrument kernel code for Messenger.";
98 #if defined(MDIS_SUBFRAMES_UNSUPPORTED) 99 int subFrameMode = inst[
"SubFrameMode"];
100 if(subFrameMode != 0) {
101 string msg =
"Subframe imaging mode is not supported!";
102 throw iException::Message(iException::User, msg,
_FILEINFO_);
109 #if defined(MDIS_JAILBARS_UNSUPPORTED) 110 int jailBars = inst[
"JailBars"];
112 string msg =
"Jail bar observations are not currently supported!";
113 throw iException::Message(iException::Programmer, msg,
_FILEINFO_);
122 filterNumber = bandBin[
"Number"];
128 QString filterCode =
toString(fnCode);
132 ikernKey =
"INS" + ikCode +
"_REFERENCE_FRAME";
135 ikernKey =
"INS" + filterCode +
"_FRAME";
156 QString stime = inst[
"SpacecraftClockCount"];
169 ikernKey =
"INS" + ikCode +
"_BORESIGHT_SAMPLE";
170 double sampleBoreSight =
getDouble(ikernKey);
172 ikernKey =
"INS" + ikCode +
"_BORESIGHT_LINE";
173 double lineBoreSight =
getDouble(ikernKey);
188 int fpuBinMode = inst[
"FpuBinningMode"];
189 int pixelBinMode = inst[
"PixelBinningMode"];
191 int summing = ((pixelBinMode == 0) ? 1 : pixelBinMode);
194 if(fpuBinMode == 1) {
195 #if defined(USE_FPU_BINNING_OFFSETS) 196 ikernKey =
"INS" + ikCode +
"_FPUBIN_START_SAMPLE";
197 double fpuStartingSample =
getDouble(ikernKey);
200 ikernKey =
"INS" + ikCode +
"_FPUBIN_START_LINE";
201 double fpuStartingLine =
getDouble(ikernKey);
227 string msg =
"New MDIS NAC/WAC distortion models will invalidate previous " 228 "SPICE - you may need to rerun spiceinit to get new kernels";
272 double exposureDuration) {
309 double focalLength(0.0);
310 QString tdflKey(
"TempDependentFocalLength");
316 if (my_tdfl.isValid()) {
324 focalLength =
getDouble(
"INS" + filterCode +
"_FOCAL_LENGTH");
327 bool tdfl_disabled(
false);
328 #ifndef DISABLE_TDFL_DISABLING 331 tdfl_disabled = (
"TRUE" == tdfl_state.
UpCase() );
334 tdfl_disabled =
false;
340 if ( !tdfl_disabled ) {
345 double fpTemp = inst[
"FocalPlaneTemperature"];
347 QString fptCoeffs =
"INS" + filterCode +
"_FL_TEMP_COEFFS";
349 for (
int i = 0 ; i < 6 ; i++) {
350 fl +=
getDouble(fptCoeffs, i) * pow(fpTemp, (
double) i);
360 "Failed to compute temperature-dependent focal length",
365 return (focalLength);
void SetFocalLength()
Reads the focal length from the instrument kernel.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Parse and return pieces of a time string.
QString m_instrumentNameLong
Full instrument name.
void SetDetectorSampleSumming(const double summing)
Set sample summing mode.
Distort/undistort focal plane coordinates.
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
Namespace for the standard library.
double computeFocalLength(const QString &filterCode, Pvl &label)
Computes temperature-dependent focal length.
MESSENGER MDIS NAC and WAC Camera Model.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
void SetDetectorOrigin(const double sample, const double line)
Set the detector origin.
This error is for when a programmer made an API call that was illegal.
void SetDetectorLineSumming(const double summing)
Set line summing mode.
void SetStartingDetectorLine(const double line)
Set the starting detector line.
virtual std::pair< iTime, iTime > ShutterOpenCloseTimes(double time, double exposureDuration)=0
Returns the shutter open and close times.
Convert between parent image coordinates and detector coordinates.
Convert between undistorted focal plane and ground coordinates.
Convert between distorted focal plane and detector coordinates.
QString m_instrumentNameShort
Shortened instrument name.
Contains multiple PvlContainers.
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
#define _FILEINFO_
Macro for the filename and line number.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
A type of error that could only have occurred due to a mistake on the user's part (e...
Isis::Camera * MdisCameraPlugin(Isis::Cube &cube)
This is the function that is called in order to instantiate a MdisCamera object.
virtual std::pair< iTime, iTime > ShutterOpenCloseTimes(double time, double exposureDuration)
Returns the shutter open and close times.
iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
Container for cube-like labels.
double ToDouble(const T &value)
Helper function to convert values to doubles.
void LoadCache()
This loads the spice cache big enough for this image.
QString getString(const QString &key, int index=0)
This returns a value from the NAIF text pool.
QString m_spacecraftNameLong
Full spacecraft name.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
void SetStartingDetectorSample(const double sample)
Set the starting detector sample.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.
void SetDistortion(const int naifIkCode)
Load distortion coefficients.
Convert between undistorted focal plane and ra/dec coordinates.
QString m_spacecraftNameShort
Shortened spacecraft name.
virtual double exposureDuration() const
Return the exposure duration for the pixel that the camera is set to.
Generic class for Framing Cameras.
IString UpCase()
Converst any lower case characters in the object IString with uppercase characters.
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
IO Handler for Isis Cubes.
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions...