9#include "ThemisIrCamera.h"
10#include "ThemisIrDistortionMap.h"
14#include "CameraFocalPlaneMap.h"
15#include "IException.h"
17#include "LineScanCameraDetectorMap.h"
18#include "LineScanCameraGroundMap.h"
19#include "LineScanCameraSkyMap.h"
20#include "NaifStatus.h"
48 QString stime = inst[
"SpacecraftClockCount"];
51 double offset = inst[
"SpacecraftClockOffset"];
59 for(
int i = 0; i < orgBand.size(); i++) {
60 p_originalBand.push_back(
toInt(orgBand[i]));
69 if(inst.hasKeyword(
"SpatialSumming")) {
70 sumMode = inst[
"SpatialSumming"];
72 p_lineRate = 33.2871 / 1000.0 * sumMode;
77 p_tdiMode = (QString) inst[
"TimeDelayIntegration"];
83 detectorMap->SetDetectorSampleSumming(sumMode);
84 detectorMap->SetDetectorLineSumming(sumMode);
94 focalMap->SetDetectorOrigin(160.5, 0.0);
95 focalMap->SetDetectorOffset(0.0, 120.5 - 8.5);
126 if((band < 1) || (band > 10)) {
127 string msg =
"Invalid Reference Band [" +
IString(band) +
"]";
132 if(vband > (
int) p_originalBand.size()) {
133 string msg =
"Band number out of array bounds in ThemisIRCamera";
136 band = p_originalBand[vband-1];
147 if(p_tdiMode ==
"ENABLED") {
148 double bandDetector_TDI[] = {8.5, 24.5, 50.5, 76.5, 102.5,
149 128.5, 154.5, 180.5, 205.5, 231.5
151 detectorLine = bandDetector_TDI[band-1];
154 int bandDetector_noTDI[] = {9, 24, 52, 77, 102, 129, 155, 181, 206, 232};
155 detectorLine = (double) bandDetector_noTDI[band-1];
162 p_bandTimeOffset = (detectorLine - 0.5) * p_lineRate;
168 detectorMap->
SetStartTime(p_etStart + p_bandTimeOffset);
174 double alongtrackOffset = 120.5 - detectorLine;
178 double empiricalOffset[] = { -0.076, -0.098, -0.089, -0.022, 0.0,
179 -0.020, -0.005, -0.069, 0.025, 0.0
181 alongtrackOffset += empiricalOffset[band-1];
186 double sampleBoresight = 160.5;
187 double empiricalBoresightOffset[] = { 0.021, 0.027, 0.005, 0.005, 0.0,
188 -0.007, -0.012, -0.039, -0.045, 0.0
190 sampleBoresight -= empiricalBoresightOffset[band-1];
196 distMap->SetBand(band);
virtual double LineScaleFactor() const
Return scaling factor for computing line resolution.
Convert between distorted focal plane and detector coordinates.
void SetDetectorOffset(const double sampleOffset, const double lineOffset)
Set the detector offset.
void SetDetectorOrigin(const double sample, const double line)
Set the detector origin.
QString m_spacecraftNameLong
Full spacecraft name.
int ReferenceBand() const
Returns the reference band.
void SetFocalLength()
Reads the focal length from the instrument kernel.
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
void LoadCache()
This loads the spice cache big enough for this image.
QString m_instrumentNameShort
Shortened instrument name.
CameraDistortionMap * DistortionMap()
Returns a pointer to the CameraDistortionMap object.
QString m_spacecraftNameShort
Shortened spacecraft name.
bool HasReferenceBand() const
Checks to see if the Camera object has a reference band.
CameraFocalPlaneMap * FocalPlaneMap()
Returns a pointer to the CameraFocalPlaneMap object.
QString m_instrumentNameLong
Full instrument name.
IO Handler for Isis Cubes.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
@ Programmer
This error is for when a programmer made an API call that was illegal.
Adds specific functionality to C++ strings.
Convert between parent image coordinates and detector coordinates.
void SetStartTime(const double etStart)
Reset the starting ephemeris time.
Convert between undistorted focal plane and ground coordinates.
Generic class for Line Scan Cameras.
LineScanCameraDetectorMap * DetectorMap()
Returns a pointer to the LineScanCameraDetectorMap object.
Convert between undistorted focal plane and ra/dec coordinates.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Contains multiple PvlContainers.
Container for cube-like labels.
A single keyword-value pair.
@ Traverse
Search child objects.
virtual iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
void SetBand(const int band)
Change the THEMIS IR camera parameters based on the band number.
ThemisIrCamera(Cube &cube)
Constructor for the Themis Ir Camera Model.
Distort/undistort focal plane coordinates.
This is free and unencumbered software released into the public domain.
int toInt(const QString &string)
Global function to convert from a string to an integer.
Namespace for the standard library.