File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
ClipperPushBroomCamera.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "ClipperPushBroomCamera.h"
10 
11 #include "CameraDistortionMap.h"
12 #include "CameraFocalPlaneMap.h"
13 #include "iTime.h"
14 #include "LineScanCameraGroundMap.h"
15 #include "LineScanCameraSkyMap.h"
16 #include "NaifStatus.h"
17 
18 namespace Isis {
25 
26  m_spacecraftNameLong = "Europa Clipper";
27  m_spacecraftNameShort = "Clipper";
28 
29  int frameCode = naifIkCode();
30 
31  if (frameCode == -159103) {
32  m_instrumentNameLong = "Europa Imaging System Push Broom Narrow Angle Camera";
33  m_instrumentNameShort = "EIS-PBNAC";
34  }
35  else if (frameCode == -159104) {
36  m_instrumentNameLong = "Europa Imaging System Push Broom Wide Angle Camera";
37  m_instrumentNameShort = "EIS-PBWAC";
38  }
39  else {
40  QString msg = "Unable to construct Clipper Push Broom camera model. "
41  "Unrecognized NaifFrameCode [" + toString(frameCode) + "].";
42  throw IException(IException::User, msg, _FILEINFO_);
43  }
44 
46 
48  SetPixelPitch();
49 
50  Pvl &lab = *cube.label();
51  PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse);
52  QString startTime = inst["StartTime"];
53  iTime etStart(startTime);
54 
55  ReadLineRates(lab.fileName());
56 
57  // set up detector map
59 
60  // Set up focal plane map
61  CameraFocalPlaneMap *focalMap = new CameraFocalPlaneMap(this, naifIkCode());
62  // center of array (same for WAC and NAC based on XY origin in EIS_Sensor_summary.xlsx)
63  focalMap->SetDetectorOrigin(2048.5, 1024.5);
64 
65  // Set up distortion map
66  CameraDistortionMap *distMap = new CameraDistortionMap(this);
67  distMap->SetDistortion(naifIkCode());
68 
69  // Set up the ground and sky map
70  new LineScanCameraGroundMap(this);
71  new LineScanCameraSkyMap(this);
72 
73  setTime(etStart.Et());
74 
75  LoadCache();
77  }
78 
79 
84  }
85 
86 
94  return (-159000);
95  }
96 
97 
105  return (1);
106  }
107 
108 
116  return (1);
117  }
118 
122  void ClipperPushBroomCamera::ReadLineRates(QString filename) {
123  Table timesTable("LineScanTimes", filename);
124 
125  if(timesTable.Records() <= 0) {
126  QString msg = "Table [LineScanTimes] in [";
127  msg += filename + "] must not be empty";
128  throw IException(IException::Unknown, msg, _FILEINFO_);
129  }
130 
131  for(int i = 0; i < timesTable.Records(); i++) {
132  p_lineRates.push_back(LineRateChange((int)timesTable[i][2],
133  (double)timesTable[i][0],
134  timesTable[i][1]));
135  }
136 
137  if(p_lineRates.size() <= 0) {
138  QString msg = "There is a problem with the data within the Table ";
139  msg += "[LineScanTimes] in [" + filename + "]";
140  throw IException(IException::Unknown, msg, _FILEINFO_);
141  }
142  }
143 }
144 
153 extern "C" Isis::Camera *ClipperPushBroomCameraPlugin(Isis::Cube &cube) {
154  return new Isis::ClipperPushBroomCamera(cube);
155 }
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::CameraDistortionMap::SetDistortion
virtual void SetDistortion(int naifIkCode)
Load distortion coefficients.
Definition: CameraDistortionMap.cpp:58
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::iTime
Parse and return pieces of a time string.
Definition: iTime.h:65
Isis::IException::Unknown
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
Isis::Camera::m_instrumentNameLong
QString m_instrumentNameLong
Full instrument name.
Definition: Camera.h:496
Isis::ClipperPushBroomCamera::CkFrameId
virtual int CkFrameId() const
CK frame ID - Instrument Code from spacit run on CK.
Definition: ClipperPushBroomCamera.cpp:93
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::VariableLineScanCameraDetectorMap
Convert between parent image coordinates and detector coordinates.
Definition: VariableLineScanCameraDetectorMap.h:49
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::ClipperPushBroomCamera::~ClipperPushBroomCamera
~ClipperPushBroomCamera()
Destructor for a ClipperPushBroomCamera object.
Definition: ClipperPushBroomCamera.cpp:83
Isis::PvlObject::Traverse
@ Traverse
Search child objects.
Definition: PvlObject.h:158
Isis::Sensor::setTime
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:97
Isis::ClipperPushBroomCamera::ReadLineRates
void ReadLineRates(QString filename)
Definition: ClipperPushBroomCamera.cpp:122
Isis::ClipperPushBroomCamera
This is the camera model for the Europa Clipper Push Broom Camera.
Definition: ClipperPushBroomCamera.h:20
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::ClipperPushBroomCamera::CkReferenceId
virtual int CkReferenceId() const
CK Reference ID - J2000.
Definition: ClipperPushBroomCamera.cpp:104
Isis::ClipperPushBroomCamera::p_lineRates
std::vector< LineRateChange > p_lineRates
Vector of the variable line rates for this camera model.
Definition: ClipperPushBroomCamera.h:33
Isis::Table
Class for storing Table blobs information.
Definition: Table.h:61
Isis::LineScanCamera
Generic class for Line Scan Cameras.
Definition: LineScanCamera.h:36
Isis::PvlContainer::fileName
QString fileName() const
Returns the filename used to initialise the Pvl object.
Definition: PvlContainer.h:232
Isis::LineScanCameraGroundMap
Convert between undistorted focal plane and ground coordinates.
Definition: LineScanCameraGroundMap.h:49
Isis::CameraDistortionMap
Distort/undistort focal plane coordinates.
Definition: CameraDistortionMap.h:41
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::Camera::m_spacecraftNameLong
QString m_spacecraftNameLong
Full spacecraft name.
Definition: Camera.h:498
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::ClipperPushBroomCamera::SpkReferenceId
virtual int SpkReferenceId() const
SPK Reference ID - J2000.
Definition: ClipperPushBroomCamera.cpp:115
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
Isis::Table::Records
int Records() const
Returns the number of records.
Definition: Table.cpp:313
Isis::Camera::m_spacecraftNameShort
QString m_spacecraftNameShort
Shortened spacecraft name.
Definition: Camera.h:499
Isis::ClipperPushBroomCamera::ClipperPushBroomCamera
ClipperPushBroomCamera(Cube &cube)
Constructs a ClipperPushBroomCamera object using the image labels.
Definition: ClipperPushBroomCamera.cpp:24
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::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::LineRateChange
Container class for storing timing information for a section of an image.
Definition: VariableLineScanCameraDetectorMap.h:83

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:15