File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
Chandrayaan1M3Camera.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "Chandrayaan1M3Camera.h"
10 
11 #include <QString>
12 
13 #include "Chandrayaan1M3DistortionMap.h"
14 #include "CameraDistortionMap.h"
15 #include "CameraFocalPlaneMap.h"
16 #include "IException.h"
17 #include "iTime.h"
18 #include "IString.h"
19 #include "LineScanCameraDetectorMap.h"
20 #include "LineScanCameraGroundMap.h"
21 #include "LineScanCameraSkyMap.h"
22 #include "NaifStatus.h"
23 
24 using namespace std;
25 namespace Isis {
37  Chandrayaan1M3Camera::Chandrayaan1M3Camera(Cube &cube) : LineScanCamera(cube) {
38  m_instrumentNameLong = "Moon Mineralogy Mapper";
39  m_instrumentNameShort = "M3";
40  m_spacecraftNameLong = "Chandrayaan 1";
41  m_spacecraftNameShort = "Chan1";
42 
44  // Set up the camera info from ik/iak kernels
46  SetPixelPitch();
47 
48  // Get the start time from labels
49  Pvl &lab = *cube.label();
50  PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse);
51  QString stime = inst["SpacecraftClockStartCount"];
52  double etStart = getClockTime(stime).Et();
53 
54  // Get other info from labels
55  double csum = inst["SpatialSumming"];
56  double lineRate = (double) inst["LineExposureDuration"] / 1000.0;
57  //lineRate *= csum;
58 
59  // Setup detector map
60  LineScanCameraDetectorMap *detectorMap =
61  new LineScanCameraDetectorMap(this, etStart, lineRate);
62  detectorMap->SetDetectorSampleSumming(csum);
63 
64  // Setup focal plane map
65  CameraFocalPlaneMap *focalMap = new CameraFocalPlaneMap(this, naifIkCode());
66 
67  // Retrieve boresight location from instrument kernel (IK) (addendum?)
68  QString ikernKey = "INS" + toString((int)naifIkCode()) + "_BORESIGHT_SAMPLE";
69  double sampleBoreSight = getDouble(ikernKey);
70 
71  ikernKey = "INS" + toString((int)naifIkCode()) + "_BORESIGHT_LINE";
72  double lineBoreSight = getDouble(ikernKey);
73 
74  focalMap->SetDetectorOrigin(sampleBoreSight, lineBoreSight);
75  focalMap->SetDetectorOffset(0.0, 0.0);
76 
77  QString ppKey("INS" + toString(naifIkCode()) + "_PP");
78  QString odKey("INS" + toString(naifIkCode()) + "_OD_K");
79  QString decenterKey("INS" + toString(naifIkCode()) + "_DECENTER");
80 
81 
82  // Setup distortion map
84  getDouble(ppKey, 0), getDouble(ppKey, 1),
85  getDouble(odKey, 0), getDouble(odKey, 1), getDouble(odKey, 2),
86  getDouble(decenterKey, 0), getDouble(decenterKey, 1));
87 
88  // Setup the ground and sky map
89  new LineScanCameraGroundMap(this);
90  new LineScanCameraSkyMap(this);
91 
92  LoadCache();
94  }
95 }
96 
97 
106 extern "C" Isis::Camera *Chandrayaan1M3CameraPlugin(Isis::Cube &cube) {
107  return new Isis::Chandrayaan1M3Camera(cube);
108 }
Isis::LineScanCameraSkyMap
Convert between undistorted focal plane and ra/dec coordinates.
Definition: LineScanCameraSkyMap.h:34
Isis::CameraFocalPlaneMap::SetDetectorOrigin
void SetDetectorOrigin(const double sample, const double line)
Set the detector origin.
Definition: CameraFocalPlaneMap.cpp:293
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::Spice::naifIkCode
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
Definition: Spice.cpp:968
Isis::Camera::m_instrumentNameLong
QString m_instrumentNameLong
Full instrument name.
Definition: Camera.h:496
Isis::Spice::getClockTime
virtual iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
Definition: Spice.cpp:1053
Isis::CameraDetectorMap::SetDetectorSampleSumming
void SetDetectorSampleSumming(const double summing)
Set sample summing mode.
Definition: CameraDetectorMap.h:108
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::CameraFocalPlaneMap::SetDetectorOffset
void SetDetectorOffset(const double sampleOffset, const double lineOffset)
Set the detector offset.
Definition: CameraFocalPlaneMap.cpp:324
Isis::NaifStatus::CheckErrors
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Definition: NaifStatus.cpp:28
Isis::Camera
Definition: Camera.h:236
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::PvlObject::Traverse
@ Traverse
Search child objects.
Definition: PvlObject.h:158
Isis::iTime::Et
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
Definition: iTime.h:126
Isis::Camera::SetPixelPitch
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
Definition: Camera.cpp:1418
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::Chandrayaan1M3Camera
Chandrayaan1 M3 Camera Model.
Definition: Chandrayaan1M3Camera.h:35
Isis::LineScanCamera
Generic class for Line Scan Cameras.
Definition: LineScanCamera.h:36
Isis::LineScanCameraGroundMap
Convert between undistorted focal plane and ground coordinates.
Definition: LineScanCameraGroundMap.h:49
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::Camera::m_spacecraftNameLong
QString m_spacecraftNameLong
Full spacecraft name.
Definition: Camera.h:498
std
Namespace for the standard library.
Isis::Camera::LoadCache
void LoadCache()
This loads the spice cache big enough for this image.
Definition: Camera.cpp:2420
Isis::Camera::m_instrumentNameShort
QString m_instrumentNameShort
Shortened instrument name.
Definition: Camera.h:497
Isis::CameraFocalPlaneMap
Convert between distorted focal plane and detector coordinates.
Definition: CameraFocalPlaneMap.h:85
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
Isis::Chandrayaan1M3DistortionMap
Distortion map for the Chandrayaan1 M3 camera.
Definition: Chandrayaan1M3DistortionMap.h:35
Isis::Spice::getDouble
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
Definition: Spice.cpp:1039
Isis::Camera::m_spacecraftNameShort
QString m_spacecraftNameShort
Shortened spacecraft name.
Definition: Camera.h:499
Isis::Camera::SetFocalLength
void SetFocalLength()
Reads the focal length from the instrument kernel.
Definition: Camera.cpp:1411
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::LineScanCameraDetectorMap
Convert between parent image coordinates and detector coordinates.
Definition: LineScanCameraDetectorMap.h:37

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:14