9#include "CrismCamera.h"
19#include "CameraFocalPlaneMap.h"
20#include "LineScanCameraDetectorMap.h"
21#include "LineScanCameraGroundMap.h"
22#include "LineScanCameraSkyMap.h"
25#include "IException.h"
28#include "NaifStatus.h"
29#include "SpecialPixel.h"
44 m_isBandDependent(true) {
56 QString sensor = (QString) inst [
"SensorId"];
66 double etStart = getEtTime((QString) inst [
"SpacecraftClockStartCount"]);
67 double etStop = getEtTime((QString) inst [
"SpacecraftClockStopCount"]);
74 int exposure = (int) inst[
"ExposureParameter"];
85 int reg = ((480 - exposure) * 83333) / 480;
89 int start_clocks = reg + (3 * 166);
90 if (start_clocks % 166) start_clocks += 166 - (start_clocks % 166);
105 double frameStartTime(etStart);
114 iTime myLineStartTime(etStart + ((25.0 - 1.0) * frame_time));
117 (void) sce2s_c(
naifSclkCode(), myLineStartTime.Et(),
sizeof(sclk), sclk);
131 double stime(obsStartTime);
132 double scanTime(stop_time-start_time);
139 double endTime(stime-frame_time+scanTime);
143 int binning = inst[
"PixelAveragingWidth"];
152 double bLine =
getDouble(
"INS"+ikCode+
"_BORESIGHT_LINE");
153 double bSample =
getDouble(
"INS"+ikCode+
"_BORESIGHT_SAMPLE");
155 fmap->SetDetectorOrigin(bSample, bLine);
156 fmap->SetDetectorOffset(0.0, 0.0);
194 return (m_isBandDependent);
198 double CrismCamera::getEtTime(
const QString &sclk) {
void SetDetectorLineSumming(const double summing)
Set line summing mode.
void SetDetectorSampleSumming(const double summing)
Set sample summing mode.
Distort/undistort focal plane coordinates.
Convert between distorted focal plane and detector coordinates.
QString m_spacecraftNameLong
Full spacecraft name.
int ParentLines() const
Returns the number of lines in the parent alphacube.
double PixelPitch() const
Returns the pixel pitch.
void SetFocalLength()
Reads the focal length from the instrument kernel.
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
double FocalLength() const
Returns the focal length.
void LoadCache()
This loads the spice cache big enough for this image.
QString m_instrumentNameShort
Shortened instrument name.
QString m_spacecraftNameShort
Shortened spacecraft name.
QString m_instrumentNameLong
Full instrument name.
CrismCamera(Cube &cube)
Constructor for the MRO CRISM Camera Model.
bool IsBandIndependent()
This is a band-dependant instrument.
void SetBand(const int physicalBand)
Virtual method that sets the band number.
IO Handler for Isis Cubes.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Container class for storing timing information for a section of an image.
Convert between parent image coordinates and detector coordinates.
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.
@ Traverse
Search child objects.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
double SpacecraftAltitude()
Returns the distance from the spacecraft to the subspacecraft point in km.
virtual iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
virtual void createCache(iTime startTime, iTime endTime, const int size, double tol)
This method creates an internal cache of spacecraft and sun positions over a specified time range.
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
SpiceInt naifSclkCode() const
This returns the NAIF SCLK code to use when reading from instrument kernels.
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
Convert between parent image coordinates and detector coordinates.
Parse and return pieces of a time string.
This is free and unencumbered software released into the public domain.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Namespace for the standard library.