10#include "RosettaOsirisCamera.h"
16#include "CameraDetectorMap.h"
17#include "CameraFocalPlaneMap.h"
18#include "CameraGroundMap.h"
19#include "CameraSkyMap.h"
23#include "NaifStatus.h"
24#include "Preference.h"
58 QString fl =
"INS" + ikCode +
"_FOCAL_LENGTH";
64 QString pp =
"INS" + ikCode +
"_PIXEL_SIZE";
75 detectorMap->SetStartingDetectorSample((
double) inst[
"FirstLineSample"]);
78 detectorMap->SetStartingDetectorLine(2050 - cube.
lineCount() - (
double) inst[
"FirstLine"]);
81 double pixelAveragingWidth=(double) inst[
"PixelAveragingWidth"];
82 double pixelAveragingHeight=(double) inst[
"PixelAveragingHeight"];
83 detectorMap->SetDetectorSampleSumming(pixelAveragingWidth);
84 detectorMap->SetDetectorLineSumming(pixelAveragingHeight);
93 QString clockStartCount = inst[
"SpacecraftClockStartCount"];
97 double exposureTime = (double) inst[
"ExposureDuration"];
101 QString filterNumber = BandBin[
"FilterNumber"];
103 distortionMap->setPixelPitch(pixelPitch);
107 double referenceSample =
Spice::getDouble(
"INS" + ikCode +
"_BORESIGHT",0) + 1.0;
108 double referenceLine =
Spice::getDouble(
"INS" + ikCode +
"_BORESIGHT",1) + 1.0;
113 focalMap->SetDetectorOrigin(referenceSample, referenceLine);
114 distortionMap->setBoresight(referenceSample, referenceLine);
116 iTime centerTime = start + (exposureTime / 2.0);
146 double exposureDuration) {
165 for (
int i = 0; i < 4; i++) {
166 for (
int j = 0; j < 4; j++) {
167 toUnDistX(i, j) =
Spice::getDouble(
"INS" + ikCode +
"_TO_UNDISTORTED_X", 4 * i + j);
168 toUnDistY(i, j) =
Spice::getDouble(
"INS" + ikCode +
"_TO_UNDISTORTED_Y", 4 * i + j);
173 distortionMap->setUnDistortedXMatrix(toUnDistX);
174 distortionMap->setUnDistortedYMatrix(toUnDistY);
Convert between parent image coordinates and detector coordinates.
Convert between distorted focal plane and detector coordinates.
Convert between undistorted focal plane and ground coordinates.
QString m_spacecraftNameLong
Full spacecraft name.
virtual double exposureDuration() const
Return the exposure duration for the pixel that the camera is set to.
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.
QString m_spacecraftNameShort
Shortened spacecraft name.
QString m_instrumentNameLong
Full instrument name.
Convert between undistorted focal plane and ra/dec coordinates.
IO Handler for Isis Cubes.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Generic class for Framing Cameras.
virtual std::pair< iTime, iTime > ShutterOpenCloseTimes(double time, double exposureDuration)=0
Returns the shutter open and close times.
static Matrix zeroMatrix(int rows, int columns)
Returns a matrix with given dimensions that is filled with zeroes.
boost::numeric::ublas::matrix< double > Matrix
Definition for an Isis::LinearAlgebra::Matrix of doubles.
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.
Distortion map for converting between undistorted focal plane and distorted focal plane coordinates f...
This is the camera model for the Osiris NAC Framing Camera.
RosettaOsirisCamera(Cube &cube)
Create a OsirisNacCamera object.
void initDistortion(QString ikCode, RosettaOsirisCameraDistortionMap *distortionMap)
Initialize the distortion map using the paramters from the NAIF SPICE kernels.
virtual std::pair< iTime, iTime > ShutterOpenCloseTimes(double time, double exposureDuration)
Reimplemented from FrameCamera.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
virtual iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
virtual iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
SpiceInt naifIkCode() const
This returns the NAIF IK 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.
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.