File failed to load: https://isis.astrogeology.usgs.gov/9.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
UvvisCamera.cpp
1
6
7/* SPDX-License-Identifier: CC0-1.0 */
8
9#include "UvvisCamera.h"
10
11#include <QString>
12
13#include "CameraDetectorMap.h"
14#include "CameraFocalPlaneMap.h"
15#include "CameraGroundMap.h"
16#include "CameraSkyMap.h"
17#include "ClementineUvvisDistortionMap.h"
18#include "IString.h"
19#include "iTime.h"
20#include "NaifStatus.h"
21
22using namespace std;
23
24namespace Isis {
35 m_instrumentNameLong = "Ultraviolet Visible Camera";
36 m_instrumentNameShort = "UVVIS";
37 m_spacecraftNameLong = "Clementine 1";
38 m_spacecraftNameShort = "Clementine1";
39
41 // Get the camera characteristics
44
45 // Get the start time in et
46 Pvl &lab = *cube.label();
47 PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse);
48
49 // set variables startTime and exposureDuration
50 double time = iTime((QString)inst["StartTime"]).Et();
51
52 // divide exposure duration keyword value by 1000 to convert to seconds
53 double exposureDuration = ((double) inst["ExposureDuration"]) / 1000.0;
54 pair<iTime, iTime> shuttertimes = ShutterOpenCloseTimes(time, exposureDuration);
55 // Add half exposure duration to get time at center of image
56 iTime centerTime = shuttertimes.first.Et() + exposureDuration / 2.0;
57
58 // Setup detector map
59 new CameraDetectorMap(this);
60
61 // Setup focal plane map
62 CameraFocalPlaneMap *focalMap = new CameraFocalPlaneMap(this, naifIkCode());
63
64 focalMap->SetDetectorOrigin(
66 "_BORESIGHT_SAMPLE"),
68 "_BORESIGHT_LINE"));
69
70 QString ppKey("INS" + toString(naifIkCode()) + "_PP");
71 QString odKey("INS" + toString(naifIkCode()) + "_OD_K");
72 QString decenterKey("INS" + toString(naifIkCode()) + "_DECENTER");
73
74 // Setup distortion map
76 getDouble(ppKey, 0), getDouble(ppKey, 1),
77 getDouble(odKey, 0), getDouble(odKey, 1), getDouble(odKey, 2),
78 getDouble(decenterKey, 0), getDouble(decenterKey, 1));
79
80
81
82 // Setup the ground and sky map
83 new CameraGroundMap(this);
84 new CameraSkyMap(this);
85
86 setTime(centerTime);
87 LoadCache();
89 }
90
91
118}
119
120
132extern "C" Isis::Camera *UvvisCameraPlugin(Isis::Cube &cube) {
133 return new Isis::UvvisCamera(cube);
134}
Convert between parent image coordinates and detector coordinates.
Convert between distorted focal plane and detector coordinates.
void SetDetectorOrigin(const double sample, const double line)
Set the detector origin.
Convert between undistorted focal plane and ground coordinates.
QString m_spacecraftNameLong
Full spacecraft name.
Definition Camera.h:499
virtual double exposureDuration() const
Return the exposure duration for the pixel that the camera is set to.
Definition Camera.cpp:3093
void SetFocalLength()
Reads the focal length from the instrument kernel.
Definition Camera.cpp:1422
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
Definition Camera.cpp:1429
void LoadCache()
This loads the spice cache big enough for this image.
Definition Camera.cpp:2450
QString m_instrumentNameShort
Shortened instrument name.
Definition Camera.h:498
QString m_spacecraftNameShort
Shortened spacecraft name.
Definition Camera.h:500
QString m_instrumentNameLong
Full instrument name.
Definition Camera.h:497
Convert between undistorted focal plane and ra/dec coordinates.
Distortion map for the Clementine UVVIS camera.
IO Handler for Isis Cubes.
Definition Cube.h:168
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition Cube.cpp:1734
FramingCamera(Cube &cube)
Constructs the FramingCamera object.
virtual std::pair< iTime, iTime > ShutterOpenCloseTimes(double time, double exposureDuration)=0
Returns the shutter open and close times.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Container for cube-like labels.
Definition Pvl.h:119
@ Traverse
Search child objects.
Definition PvlObject.h:158
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition PvlObject.h:129
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
Definition Sensor.cpp:99
virtual iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
Definition Spice.cpp:891
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
Definition Spice.cpp:975
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
Definition Spice.cpp:1046
This is the camera model for the Clementine Ultraviolet/Visible Camera.
Definition UvvisCamera.h:69
virtual std::pair< iTime, iTime > ShutterOpenCloseTimes(double time, double exposureDuration)
Returns the shutter open and close times.
UvvisCamera(Cube &cube)
Constructs a Clementine UV/VIS Model using the image labels.
Parse and return pieces of a time string.
Definition iTime.h:65
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
Definition iTime.h:126
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition IString.cpp:211
Namespace for the standard library.