Isis 3 Programmer Reference
CSMCamera.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "CSMCamera.h"
10 #include "CameraSkyMap.h"
11 
12 #include <fstream>
13 #include <iostream>
14 #include <iomanip>
15 
16 #include <QDebug>
17 #include <QList>
18 #include <QPointF>
19 #include <QString>
20 
21 #include "Blob.h"
22 #include "CameraDetectorMap.h"
23 #include "CameraDistortionMap.h"
24 #include "CameraFocalPlaneMap.h"
25 #include "Constants.h"
26 #include "Displacement.h"
27 #include "Distance.h"
28 #include "FileName.h"
29 #include "IException.h"
30 #include "IString.h"
31 #include "iTime.h"
32 #include "Latitude.h"
33 #include "Longitude.h"
34 #include "LinearAlgebra.h"
35 #include "NaifStatus.h"
36 #include "SpecialPixel.h"
37 #include "SurfacePoint.h"
38 
39 #include "csm/Warning.h"
40 #include "csm/Error.h"
41 #include "csm/Plugin.h"
42 #include "csm/Ellipsoid.h"
43 #include "csm/SettableEllipsoid.h"
44 
45 using namespace std;
46 
47 namespace Isis {
48 
56  CSMCamera::CSMCamera(Cube &cube) : Camera(cube) {
57  Blob state("CSMState", "String");
58  cube.read(state);
59  PvlObject &blobLabel = state.Label();
60  QString pluginName = blobLabel.findKeyword("PluginName")[0];
61  QString modelName = blobLabel.findKeyword("ModelName")[0];
62  QString stateString = QString::fromUtf8(state.getBuffer(), state.Size());
63  init(cube, pluginName, modelName, stateString);
64  }
65 
66 
75  void CSMCamera::init(Cube &cube, QString pluginName, QString modelName, QString stateString){
76  const csm::Plugin *plugin = csm::Plugin::findPlugin(pluginName.toStdString());
77  if (!plugin) {
78  QStringList availablePlugins;
79  for (const csm::Plugin *plugin: csm::Plugin::getList()) {
80  availablePlugins.append(QString::fromStdString(plugin->getPluginName()));
81  }
82  QString msg = "Failed to find plugin [" + pluginName + "] for image [" + cube.fileName() +
83  "]. Check that the corresponding CSM plugin library is in the directory "
84  "specified by your IsisPreferences. Loaded plugins [" +
85  availablePlugins.join(", ") + "].";
86  throw IException(IException::User, msg, _FILEINFO_);
87  }
88  if (!plugin->canModelBeConstructedFromState(modelName.toStdString(), stateString.toStdString())) {
89  QString msg = "CSM state string attached to image [" + cube.fileName() + "] cannot "
90  "be converted to a [" + modelName + "] using [" + pluginName + "].";
91  throw IException(IException::Programmer, msg, _FILEINFO_);
92  }
93  m_model = dynamic_cast<csm::RasterGM*>(plugin->constructModelFromState(stateString.toStdString()));
94  // If the dynamic cast failed, raise an exception
95  if (!m_model) {
96  QString msg = "Failed to convert CSM Model to RasterGM.";
97  throw IException(IException::Programmer, msg, _FILEINFO_);
98  }
99 
100  m_instrumentNameLong = QString::fromStdString(m_model->getSensorIdentifier());
101  m_instrumentNameShort = QString::fromStdString(m_model->getSensorIdentifier());
102  m_spacecraftNameLong = QString::fromStdString(m_model->getPlatformIdentifier());
103  m_spacecraftNameShort = QString::fromStdString(m_model->getPlatformIdentifier());
104 
105  QString timeString = QString::fromStdString(m_model->getReferenceDateAndTime());
106  // Strip the UTC time zone indicator for iTime
107  timeString.remove("Z");
108  m_refTime.setUtc(timeString);
109 
110  setTarget(*cube.label());
111  }
112 
113 
123  bool CSMCamera::SetImage(const double sample, const double line) {
124  // Save off the line & sample
125  p_childSample = sample;
126  p_childLine = line;
127 
128  csm::ImageCoord imagePt;
129  isisToCsmPixel(p_alphaCube->AlphaLine(line), p_alphaCube->AlphaSample(sample), imagePt);
130  double achievedPrecision = 0;
131  csm::WarningList warnings;
132  csm::EcefLocus imageLocus;
133  try {
134  imageLocus = m_model->imageToRemoteImagingLocus(imagePt,
135  0.001,
136  &achievedPrecision,
137  &warnings);
138  }
139  catch (csm::Error &e) {
140  return false;
141  }
142 
143  // Check for issues on the CSM end
144  if (achievedPrecision > 0.001) {
145  return false;
146  }
147  if (!warnings.empty()) {
148  for (csm::Warning warning : warnings) {
149  if (warning.getWarning() == csm::Warning::IMAGE_COORD_OUT_OF_BOUNDS){
150  return false;
151  }
152  }
153  }
154 
155  // ISIS sensors work in Kilometers, CSM works in meters
156  std::vector<double> obsPosition = {imageLocus.point.x / 1000.0,
157  imageLocus.point.y / 1000.0,
158  imageLocus.point.z / 1000.0};
159  std::vector<double> locusVec = {imageLocus.direction.x,
160  imageLocus.direction.y,
161  imageLocus.direction.z};
162 
163  // Save off the look vector
164  m_lookB[0] = locusVec[0];
165  m_lookB[1] = locusVec[1];
166  m_lookB[2] = locusVec[2];
167  m_newLookB = true;
168 
169  // Check for a ground intersection
170  if(!target()->shape()->intersectSurface(obsPosition, locusVec)) {
171  return false;
172  }
173 
174  p_pointComputed = true;
175  if (!m_et) {
176  m_et = new iTime();
177  }
178  *m_et = m_refTime + m_model->getImageTime(imagePt);
179  return true;
180  }
181 
182 
193  bool CSMCamera::SetUniversalGround(const double latitude, const double longitude) {
194  return SetGround(
195  Latitude(latitude, Angle::Degrees),
196  Longitude(longitude, Angle::Degrees));
197  }
198 
199 
210  bool CSMCamera::SetUniversalGround(const double latitude, const double longitude, double radius) {
211  return SetGround(SurfacePoint(
212  Latitude(latitude, Angle::Degrees),
213  Longitude(longitude, Angle::Degrees),
214  Distance(radius, Distance::Meters)));
215  }
216 
217 
228  bool CSMCamera::SetGround(Latitude latitude, Longitude longitude) {
229  ShapeModel *shape = target()->shape();
230  Distance localRadius;
231 
232  if (shape->name() != "Plane") { // this is the normal behavior
233  localRadius = LocalRadius(latitude, longitude);
234  }
235  else {
236  localRadius = Distance(latitude.degrees(),Distance::Kilometers);
237  latitude = Latitude(0.,Angle::Degrees);
238  }
239 
240  if (!localRadius.isValid()) {
242  return false;
243  }
244 
245  return SetGround(SurfacePoint(latitude, longitude, localRadius));
246  }
247 
248 
257  bool CSMCamera::SetGround(const SurfacePoint & surfacePt) {
258  ShapeModel *shape = target()->shape();
259  if (!surfacePt.Valid()) {
260  shape->clearSurfacePoint();
261  return false;
262  }
263 
264  bool validBackProject = true;
265 
266  // Back project through the CSM model
267  csm::ImageCoord imagePt;
268  double achievedPrecision = 0;
269  csm::WarningList warnings;
270  csm::EcefCoord groundPt = isisToCsmGround(surfacePt);
271  try {
272  imagePt = m_model->groundToImage(groundPt, 0.01, &achievedPrecision, &warnings);
273  }
274  catch (csm::Error &e) {
275  validBackProject = false;
276  }
277  if (achievedPrecision > 0.01) {
278  validBackProject = false;
279  }
280  if (!warnings.empty()) {
281  for (csm::Warning warning : warnings) {
282  if (warning.getWarning() == csm::Warning::IMAGE_COORD_OUT_OF_BOUNDS){
283  validBackProject = false;
284  }
285  }
286  }
287 
288  // Check for occlusion
289  double line, sample;
290  csmToIsisPixel(imagePt, line, sample);
291  csm::EcefLocus imageLocus = m_model->imageToRemoteImagingLocus(imagePt);
292  std::vector<double> sensorPosition = {imageLocus.point.x, imageLocus.point.y, imageLocus.point.z};
293  shape->clearSurfacePoint();
294  shape->intersectSurface(surfacePt,
295  sensorPosition,
296  true);
297  if (!shape->hasIntersection()) {
298  validBackProject = false;
299  }
300 
301  // If the back projection was successful, then save it
302  if (validBackProject) {
303  m_lookB[0] = imageLocus.direction.x;
304  m_lookB[1] = imageLocus.direction.y;
305  m_lookB[2] = imageLocus.direction.z;
306  m_newLookB = true;
309  p_pointComputed = true;
310  shape->setHasIntersection(true);
311  if (!m_et) {
312  m_et = new iTime();
313  }
314  *m_et = m_refTime + m_model->getImageTime(imagePt);
315  return true;
316  }
317 
318  // Otherwise reset
319  shape->clearSurfacePoint();
320  return false;
321  }
322 
323 
338  vector<double> imagePartials = ImagePartials();
339  return sqrt(imagePartials[0]*imagePartials[0] +
340  imagePartials[2]*imagePartials[2] +
341  imagePartials[4]*imagePartials[4]);
342  }
343 
344 
355  vector<double> imagePartials = ImagePartials();
356  return sqrt(imagePartials[1]*imagePartials[1] +
357  imagePartials[3]*imagePartials[3] +
358  imagePartials[5]*imagePartials[5]);
359  }
360 
361 
372  // Redo the line and sample resolution calculations because it avoids
373  // a call to ImagePartials which could be a costly call
374  vector<double> imagePartials = ImagePartials();
375  double lineRes = sqrt(imagePartials[0]*imagePartials[0] +
376  imagePartials[2]*imagePartials[2] +
377  imagePartials[4]*imagePartials[4]);
378  double sampRes = sqrt(imagePartials[1]*imagePartials[1] +
379  imagePartials[3]*imagePartials[3] +
380  imagePartials[5]*imagePartials[5]);
381  return (sampRes + lineRes) / 2.0;
382  }
383 
384 
395  // CSM resolution is always the oblique resolution so just return it
396  return LineResolution();
397  }
398 
399 
410  // CSM resolution is always the oblique resolution so just return it
411  return SampleResolution();
412  }
413 
414 
425  // CSM resolution is always the oblique resolution so just return it
426  return DetectorResolution();
427  }
428 
429 
437  double CSMCamera::parentLine() const {
438  return p_alphaCube->AlphaLine(Line());
439  }
440 
441 
449  double CSMCamera::parentSample() const {
450  return p_alphaCube->AlphaSample(Sample());
451  }
452 
453 
461  void CSMCamera::instrumentBodyFixedPosition(double p[3]) const {
462  std::vector<double> position = sensorPositionBodyFixed();
463  p[0] = position[0];
464  p[1] = position[1];
465  p[2] = position[2];
466  }
467 
468 
475  std::vector<double> CSMCamera::sensorPositionBodyFixed() const {
477  }
478 
479 
489  std::vector<double> CSMCamera::sensorPositionBodyFixed(double line, double sample) const {
490  csm::ImageCoord imagePt;
491  isisToCsmPixel(line, sample, imagePt);
492  csm::EcefCoord sensorPosition = m_model->getSensorPosition(imagePt);
493  // CSM uses meters, but ISIS wants this in Km
494  std::vector<double> result {
495  sensorPosition.x / 1000.0,
496  sensorPosition.y / 1000.0,
497  sensorPosition.z / 1000.0};
498  return result;
499  }
500 
501 
510  void CSMCamera::subSpacecraftPoint(double &lat, double &lon) {
512  }
513 
514 
525  void CSMCamera::subSpacecraftPoint(double &lat, double &lon, double line, double sample) {
526  // Get s/c position from CSM because it is vector from center of body to that
527  vector<double> sensorPosition = sensorPositionBodyFixed(line, sample);
528  SurfacePoint surfacePoint(
529  Displacement(sensorPosition[0], Displacement::Kilometers),
530  Displacement(sensorPosition[1], Displacement::Kilometers),
531  Displacement(sensorPosition[2], Displacement::Kilometers));
532  lat = surfacePoint.GetLatitude().degrees();
533  lon = surfacePoint.GetLongitude().degrees();
534  }
535 
536 
552  vector<double> CSMCamera::ImagePartials() {
553  return ImagePartials(GetSurfacePoint());
554  }
555 
556 
579  vector<double> CSMCamera::ImagePartials(SurfacePoint groundPoint) {
580  csm::EcefCoord groundCoord = isisToCsmGround(groundPoint);
581  vector<double> groundPartials = m_model->computeGroundPartials(groundCoord);
582 
583  // Jacobian format is
584  // line WRT X line WRT Y line WRT Z
585  // samp WRT X samp WRT Y samp WRT Z
586  LinearAlgebra::Matrix groundMatrix(2, 3);
587  groundMatrix(0,0) = groundPartials[0];
588  groundMatrix(0,1) = groundPartials[1];
589  groundMatrix(0,2) = groundPartials[2];
590  groundMatrix(1,0) = groundPartials[3];
591  groundMatrix(1,1) = groundPartials[4];
592  groundMatrix(1,2) = groundPartials[5];
593 
594  LinearAlgebra::Matrix imageMatrix = LinearAlgebra::pseudoinverse(groundMatrix);
595 
596  vector<double> imagePartials = {imageMatrix(0,0),
597  imageMatrix(0,1),
598  imageMatrix(1,0),
599  imageMatrix(1,1),
600  imageMatrix(2,0),
601  imageMatrix(2,1)};
602  return imagePartials;
603  }
604 
605 
622  vector<double> CSMCamera::GroundPartials() {
624  }
625 
626 
645  vector<double> CSMCamera::GroundPartials(SurfacePoint groundPoint) {
646  csm::EcefCoord groundCoord = isisToCsmGround(groundPoint);
647  vector<double> groundPartials = m_model->computeGroundPartials(groundCoord);
648  return groundPartials;
649  }
650 
651 
657  void CSMCamera::setTarget(Pvl label) {
658  Target *target = new Target(label);
659 
660  // get radii from CSM
661  csm::Ellipsoid targetEllipsoid = csm::SettableEllipsoid::getEllipsoid(m_model);
662  std::vector<Distance> radii = {Distance(targetEllipsoid.getSemiMajorRadius(), Distance::Meters),
663  Distance(targetEllipsoid.getSemiMajorRadius(), Distance::Meters),
664  Distance(targetEllipsoid.getSemiMinorRadius(), Distance::Meters)};
666 
667  // Target needs to be able to access the camera to do things like
668  // compute resolution
669  target->setSpice(this);
670 
671  if (m_target) {
672  delete m_target;
673  m_target = nullptr;
674  }
675 
676  m_target = target;
677  }
678 
679 
689  void CSMCamera::isisToCsmPixel(double line, double sample, csm::ImageCoord &csmPixel) const {
690  csmPixel.line = line - 0.5;
691  csmPixel.samp = sample - 0.5;
692  }
693 
694 
704  void CSMCamera::csmToIsisPixel(csm::ImageCoord csmPixel, double &line, double &sample) const {
705  line = csmPixel.line + 0.5;
706  sample = csmPixel.samp + 0.5;
707  }
708 
709 
720  csm::EcefCoord CSMCamera::isisToCsmGround(const SurfacePoint &groundPt) const {
721  return csm::EcefCoord(groundPt.GetX().meters(),
722  groundPt.GetY().meters(),
723  groundPt.GetZ().meters());
724  }
725 
726 
737  SurfacePoint CSMCamera::csmToIsisGround(const csm::EcefCoord &groundPt) const {
738  return SurfacePoint(Displacement(groundPt.x, Displacement::Meters),
739  Displacement(groundPt.y, Displacement::Meters),
740  Displacement(groundPt.z, Displacement::Meters));
741  }
742 
743 
749  double CSMCamera::PhaseAngle() const {
750  csm::EcefCoord groundPt = isisToCsmGround(GetSurfacePoint());
751  csm::EcefVector sunEcefVec = m_model->getIlluminationDirection(groundPt);
752  // ISIS wants the position of the sun, not just the vector from the ground
753  // point to the sun. So, we approximate this by adding in the ground point.
754  // ISIS wants this in Km so convert
755  std::vector<double> sunVec = {
756  (groundPt.x - sunEcefVec.x) / 1000.0,
757  (groundPt.y - sunEcefVec.y) / 1000.0,
758  (groundPt.z - sunEcefVec.z) / 1000.0};
759  return target()->shape()->phaseAngle(sensorPositionBodyFixed(), sunVec);
760  }
761 
762 
768  double CSMCamera::EmissionAngle() const {
770  }
771 
772 
778  double CSMCamera::IncidenceAngle() const {
779  csm::EcefCoord groundPt = isisToCsmGround(GetSurfacePoint());
780  csm::EcefVector sunEcefVec = m_model->getIlluminationDirection(groundPt);
781  // ISIS wants the position of the sun, not just the vector from the ground
782  // point to the sun. So, we approximate this by adding in the ground point.
783  // ISIS wants this in Km so convert
784  std::vector<double> sunVec = {
785  (groundPt.x - sunEcefVec.x) / 1000.0,
786  (groundPt.y - sunEcefVec.y) / 1000.0,
787  (groundPt.z - sunEcefVec.z) / 1000.0};
788  return target()->shape()->incidenceAngle(sunVec);
789  }
790 
791 
798  double CSMCamera::SlantDistance() const {
799  std::vector<double> sensorPosition = sensorPositionBodyFixed();
800  SurfacePoint groundPoint = GetSurfacePoint();
801 
802  std::vector<double> sensorToGround = {
803  groundPoint.GetX().kilometers() - (sensorPosition[0]),
804  groundPoint.GetY().kilometers() - (sensorPosition[1]),
805  groundPoint.GetZ().kilometers() - (sensorPosition[2])};
806 
807  return sqrt(
808  sensorToGround[0] * sensorToGround[0] +
809  sensorToGround[1] * sensorToGround[1] +
810  sensorToGround[2] * sensorToGround[2]);
811  }
812 
813 
821  std::vector<double> sensorPosition = sensorPositionBodyFixed();
822  return sqrt(
823  sensorPosition[0] * sensorPosition[0] +
824  sensorPosition[1] * sensorPosition[1] +
825  sensorPosition[2] * sensorPosition[2]);
826  }
827 
828 
836  std::vector<int> CSMCamera::getParameterIndices(csm::param::Set paramSet) const {
837  return m_model->getParameterSetIndices(paramSet);
838  }
839 
840 
848  std::vector<int> CSMCamera::getParameterIndices(csm::param::Type paramType) const {
849  std::vector<int> parameterIndices;
850  for (int i = 0; i < m_model->getNumParameters(); i++) {
851  if (m_model->getParameterType(i) == paramType) {
852  parameterIndices.push_back(i);
853  }
854  }
855  return parameterIndices;
856  }
857 
858 
866  std::vector<int> CSMCamera::getParameterIndices(QStringList paramList) const {
867  std::vector<int> parameterIndices;
868  QStringList failedParams;
869  for (int i = 0; i < paramList.size(); i++) {
870  bool found = false;
871  for (int j = 0; j < m_model->getNumParameters(); j++) {
872  if (QString::compare(QString::fromStdString(m_model->getParameterName(j)).trimmed(),
873  paramList[i].trimmed(),
874  Qt::CaseInsensitive) == 0) {
875  parameterIndices.push_back(j);
876  found = true;
877  break;
878  }
879  }
880 
881  if (!found) {
882  failedParams.push_back(paramList[i]);
883  }
884  }
885 
886  if (!failedParams.empty()) {
887  QString msg = "Failed to find indices for the following parameters [" +
888  failedParams.join(",") + "].";
889  throw IException(IException::User, msg, _FILEINFO_);
890  }
891  return parameterIndices;
892  }
893 
894 
901  void CSMCamera::applyParameterCorrection(int index, double correction) {
902  double currentValue = m_model->getParameterValue(index);
903  m_model->setParameterValue(index, currentValue + correction);
904  }
905 
906 
913  double CSMCamera::getParameterCovariance(int index1, int index2) {
914  return m_model->getParameterCovariance(index1, index2);
915  }
916 
917 
918  vector<double> CSMCamera::getSensorPartials(int index, SurfacePoint groundPoint) {
919  // csm::SensorPartials holds (line, sample) in order for each parameter
920  csm::EcefCoord groundCoord = isisToCsmGround(groundPoint);
921  std::pair<double, double> partials = m_model->computeSensorPartials(index, groundCoord);
922  vector<double> partialsVector = {partials.first, partials.second};
923 
924  return partialsVector;
925  }
926 
927 
935  QString CSMCamera::getParameterName(int index) {
936  return QString::fromStdString(m_model->getParameterName(index));
937  }
938 
939 
947  double CSMCamera::getParameterValue(int index) {
948  return m_model->getParameterValue(index);
949  }
950 
951 
959  QString CSMCamera::getParameterUnits(int index) {
960  return QString::fromStdString(m_model->getParameterUnits(index));
961  }
962 
963 
969  QString CSMCamera::getModelState() const {
970  return QString::fromStdString(m_model->getModelState());
971  }
972 
973 
982  void CSMCamera::setTime(const iTime &time) {
983  QString msg = "Setting the image time is not supported for CSM camera models";
984  throw IException(IException::Programmer, msg, _FILEINFO_);
985  }
986 
987 
998  void CSMCamera::subSolarPoint(double &lat, double &lon) {
999  QString msg = "Sub solar point is not supported for CSM camera models";
1000  throw IException(IException::Programmer, msg, _FILEINFO_);
1001  }
1002 
1003 
1012  QString msg = "Pixel Field of View is not supported for CSM camera models";
1013  throw IException(IException::User, msg, _FILEINFO_);
1014  }
1015 
1016 
1025  void CSMCamera::sunPosition(double p[3]) const {
1026  QString msg = "Sun position is not supported for CSM camera models";
1027  throw IException(IException::Programmer, msg, _FILEINFO_);
1028  }
1029 
1030 
1040  QString msg = "Sun position is not supported for CSM camera models";
1041  throw IException(IException::Programmer, msg, _FILEINFO_);
1042  }
1043 
1044 
1055  QString msg = "Instrument position is not supported for CSM camera models";
1056  throw IException(IException::Programmer, msg, _FILEINFO_);
1057  }
1058 
1059 
1070  QString msg = "Target body orientation is not supported for CSM camera models";
1071  throw IException(IException::Programmer, msg, _FILEINFO_);
1072  }
1073 
1074 
1085  QString msg = "Instrument orientation is not supported for CSM camera models";
1086  throw IException(IException::Programmer, msg, _FILEINFO_);
1087  }
1088 
1089 
1099  QString msg = "Solar longitude is not supported for CSM camera models";
1100  throw IException(IException::Programmer, msg, _FILEINFO_);
1101  }
1102 
1103 
1111  double CSMCamera::SolarDistance() const {
1112  QString msg = "Solar distance is not supported for CSM camera models";
1113  throw IException(IException::Programmer, msg, _FILEINFO_);
1114  }
1115 
1116 
1126  QString msg = "Right Ascension is not supported for CSM camera models";
1127  throw IException(IException::Programmer, msg, _FILEINFO_);
1128  }
1129 
1130 
1140  QString msg = "Declination is not supported for CSM camera models";
1141  throw IException(IException::Programmer, msg, _FILEINFO_);
1142  }
1143 }
Isis::CSMCamera::computeSolarLongitude
virtual void computeSolarLongitude(iTime et)
Computes the solar longitude for the given ephemeris time.
Definition: CSMCamera.cpp:1098
Isis::Spice::radii
void radii(Distance r[3]) const
Returns the radii of the body in km.
Definition: Spice.cpp:930
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Isis::CSMCamera::targetCenterDistance
virtual double targetCenterDistance() const
Calculates and returns the distance from the spacecraft to the target center at the currently set tim...
Definition: CSMCamera.cpp:820
Isis::CSMCamera::PixelIfovOffsets
virtual QList< QPointF > PixelIfovOffsets()
Returns the pixel ifov offsets from center of pixel.
Definition: CSMCamera.cpp:1011
Isis::CSMCamera::sunPosition
virtual SpicePosition * sunPosition() const
Get the SpicePosition object that contains the state information for the sun in J2000.
Definition: CSMCamera.cpp:1039
Isis::Spice::m_et
iTime * m_et
Ephemeris time (read NAIF documentation for a detailed description)
Definition: Spice.h:382
Isis::ShapeModel::emissionAngle
virtual double emissionAngle(const std::vector< double > &sB)
Computes and returns emission angle, in degrees, given the observer position.
Definition: ShapeModel.cpp:185
Isis::SpicePosition
Obtain SPICE position information for a body.
Definition: SpicePosition.h:173
Isis::Target::shape
ShapeModel * shape() const
Return the shape.
Definition: Target.cpp:655
Isis::Cube::fileName
virtual QString fileName() const
Returns the opened cube's filename.
Definition: Cube.cpp:1563
Isis::ShapeModel::clearSurfacePoint
virtual void clearSurfacePoint()
Clears or resets the current surface point.
Definition: ShapeModel.cpp:386
Isis::CSMCamera::ObliqueDetectorResolution
virtual double ObliqueDetectorResolution()
Compute the oblique detector resolution in meters per pixel for the current set point.
Definition: CSMCamera.cpp:424
Isis::CSMCamera::csmToIsisGround
SurfacePoint csmToIsisGround(const csm::EcefCoord &groundPt) const
Convert a CSM ground point into an ISIS ground point.
Definition: CSMCamera.cpp:737
Isis::CSMCamera::getParameterCovariance
double getParameterCovariance(int index1, int index2)
Get the covariance between two parameters.
Definition: CSMCamera.cpp:913
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::CSMCamera::IncidenceAngle
virtual double IncidenceAngle() const
Compute the incidence angle at the currently set ground point.
Definition: CSMCamera.cpp:778
Isis::CSMCamera::csmToIsisPixel
void csmToIsisPixel(csm::ImageCoord csmPixel, double &line, double &sample) const
Convert a CSM pixel coordinate to an ISIS pixel coordinate.
Definition: CSMCamera.cpp:704
Isis::Displacement::Meters
@ Meters
The distance is being specified in meters.
Definition: Displacement.h:40
QList< QPointF >
Isis::Camera::p_childLine
double p_childLine
Line value for child.
Definition: Camera.h:502
Isis::Latitude
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:51
Isis::Target::setRadii
void setRadii(std::vector< Distance > radii)
Sets the radii of the body.
Definition: Target.cpp:615
Isis::CSMCamera::m_refTime
iTime m_refTime
CSM sensor model.
Definition: CSMCamera.h:147
Isis::iTime
Parse and return pieces of a time string.
Definition: iTime.h:65
Isis::CSMCamera::ImagePartials
virtual std::vector< double > ImagePartials()
Compute the partial derivatives of the ground point with respect to the line and sample at the curren...
Definition: CSMCamera.cpp:552
Isis::Cube::read
void read(Blob &blob, const std::vector< PvlKeyword > keywords=std::vector< PvlKeyword >()) const
This method will read data from the specified Blob object.
Definition: Cube.cpp:807
Isis::CSMCamera::instrumentRotation
virtual SpiceRotation * instrumentRotation() const
Get the SpiceRotation object the contains the orientation of the sensor relative to J2000.
Definition: CSMCamera.cpp:1084
Isis::Camera::Sample
virtual double Sample() const
Returns the current sample number.
Definition: Camera.cpp:2690
Isis::CSMCamera::ObliqueSampleResolution
virtual double ObliqueSampleResolution()
Compute the oblique sample resolution in meters per pixel for the current set point.
Definition: CSMCamera.cpp:409
Isis::ShapeModel::setHasIntersection
void setHasIntersection(bool b)
Sets the flag to indicate whether this ShapeModel has an intersection.
Definition: ShapeModel.cpp:554
Isis::Target::setSpice
void setSpice(Spice *spice)
Set the Spice pointer for the Target.
Definition: Target.cpp:647
Isis::CSMCamera::SetImage
virtual bool SetImage(const double sample, const double line)
Set the image sample and line for the Camera Model and then compute the corresponding image time,...
Definition: CSMCamera.cpp:123
Isis::Camera::m_instrumentNameLong
QString m_instrumentNameLong
Full instrument name.
Definition: Camera.h:496
Isis::CSMCamera::applyParameterCorrection
void applyParameterCorrection(int index, double correction)
Adjust the value of a parameter.
Definition: CSMCamera.cpp:901
Isis::ShapeModel::incidenceAngle
virtual double incidenceAngle(const std::vector< double > &uB)
Computes and returns incidence angle, in degrees, given the illuminator position.
Definition: ShapeModel.cpp:232
Isis::AlphaCube::AlphaLine
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
Definition: AlphaCube.h:109
Isis::CSMCamera::SolarDistance
virtual double SolarDistance() const
Computes the distance to the sun from the currently set ground point.
Definition: CSMCamera.cpp:1111
Isis::CSMCamera::EmissionAngle
virtual double EmissionAngle() const
Compute the emission angle at the currently set ground point.
Definition: CSMCamera.cpp:768
Isis::ShapeModel::name
QString name() const
Gets the shape name.
Definition: ShapeModel.cpp:543
Isis::CSMCamera::subSpacecraftPoint
virtual void subSpacecraftPoint(double &lat, double &lon)
Get the latitude and longitude of the sub-spacecraft point at the currently set time.
Definition: CSMCamera.cpp:510
Isis::CSMCamera::SlantDistance
virtual double SlantDistance() const
Compute the slant distance from the sensor to the ground point at the currently set time.
Definition: CSMCamera.cpp:798
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::CSMCamera::GroundPartials
virtual std::vector< double > GroundPartials()
Compute the partial derivatives of the sample, line with respect to the x, y, z coordinates of the gr...
Definition: CSMCamera.cpp:622
Isis::AlphaCube::AlphaSample
double AlphaSample(double betaSample)
Returns an alpha sample given a beta sample.
Definition: AlphaCube.h:121
Isis::SurfacePoint::GetLatitude
Latitude GetLatitude() const
Return the body-fixed latitude for the surface point.
Definition: SurfacePoint.cpp:1665
Isis::CSMCamera::PhaseAngle
virtual double PhaseAngle() const
Compute the phase angle at the currently set ground point.
Definition: CSMCamera.cpp:749
Isis::Sensor::GetSurfacePoint
SurfacePoint GetSurfacePoint() const
Returns the surface point (most efficient accessor).
Definition: Sensor.cpp:255
Isis::Camera
Definition: Camera.h:236
Isis::CSMCamera::bodyRotation
virtual SpiceRotation * bodyRotation() const
Get the SpiceRotation object the contains the orientation of the target body relative to J2000.
Definition: CSMCamera.cpp:1069
Isis::LinearAlgebra::Matrix
boost::numeric::ublas::matrix< double > Matrix
Definition for an Isis::LinearAlgebra::Matrix of doubles.
Definition: LinearAlgebra.h:100
QStringList
Isis::CSMCamera::LineResolution
virtual double LineResolution()
Compute the line resolution in meters per pixel for the current set point.
Definition: CSMCamera.cpp:337
Isis::CSMCamera::init
void init(Cube &cube, QString pluginName, QString modelName, QString stateString)
Init method which performs most of the setup for the CSM Camera Model inside ISIS.
Definition: CSMCamera.cpp:75
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::CSMCamera::getParameterValue
double getParameterValue(int index)
Get the value of a parameter.
Definition: CSMCamera.cpp:947
Isis::CSMCamera::ObliqueLineResolution
virtual double ObliqueLineResolution()
Compute the oblique line resolution in meters per pixel for the current set point.
Definition: CSMCamera.cpp:394
Isis::AlphaCube::BetaLine
double BetaLine(double alphaLine)
Returns a beta line given an alpha line.
Definition: AlphaCube.h:133
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
Isis::Spice::target
virtual Target * target() const
Returns a pointer to the target object.
Definition: Spice.cpp:1368
Isis::CSMCamera::parentLine
virtual double parentLine() const
Returns the currently set parent line for the camera model.
Definition: CSMCamera.cpp:437
Isis::CSMCamera::setTime
virtual void setTime(const iTime &time)
Set the time and update the sensor position and orientation.
Definition: CSMCamera.cpp:982
Isis::Distance::Kilometers
@ Kilometers
The distance is being specified in kilometers.
Definition: Distance.h:45
Isis::Displacement
Displacement is a signed length, usually in meters.
Definition: Displacement.h:31
Isis::CSMCamera::setTarget
void setTarget(Pvl label)
Set the Target object for the camera model.
Definition: CSMCamera.cpp:657
Isis::Distance::Meters
@ Meters
The distance is being specified in meters.
Definition: Distance.h:43
Isis::Displacement::meters
double meters() const
Get the displacement in meters.
Definition: Displacement.cpp:73
Isis::CSMCamera::DetectorResolution
virtual double DetectorResolution()
Compute the detector resolution in meters per pixel for the current set point.
Definition: CSMCamera.cpp:371
Isis::CSMCamera::SetGround
virtual bool SetGround(Latitude latitude, Longitude longitude)
Set the latitude and longitude for the Camera Model and then compute the corresponding image time,...
Definition: CSMCamera.cpp:228
Isis::CSMCamera::subSolarPoint
virtual void subSolarPoint(double &lat, double &lon)
Returns the sub-solar latitude/longitude in universal coordinates (0-360 positive east,...
Definition: CSMCamera.cpp:998
Isis::Blob::getBuffer
char * getBuffer()
Get the internal data buff of the Blob.
Definition: Blob.cpp:546
Isis::Blob::Label
PvlObject & Label()
Accessor method that returns a PvlObject containing the Blob label.
Definition: Blob.cpp:151
Isis::Camera::p_childSample
double p_childSample
Sample value for child.
Definition: Camera.h:501
Isis::Distance::isValid
bool isValid() const
Test if this distance has been initialized or not.
Definition: Distance.cpp:192
Isis::CSMCamera::SetUniversalGround
virtual bool SetUniversalGround(const double latitude, const double longitude)
Set the latitude and longitude for the Camera Model and then compute the corresponding image time,...
Definition: CSMCamera.cpp:193
Isis::LinearAlgebra::pseudoinverse
static Matrix pseudoinverse(const Matrix &matrix)
Returns the pseudoinverse of a matrix.
Definition: LinearAlgebra.cpp:339
Isis::CSMCamera::parentSample
virtual double parentSample() const
Returns the currently set parent sample for the camera model.
Definition: CSMCamera.cpp:449
Isis::Camera::p_alphaCube
AlphaCube * p_alphaCube
A pointer to the AlphaCube.
Definition: Camera.h:503
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::Spice::m_target
Target * m_target
Target of the observation.
Definition: Spice.h:381
Isis::Camera::m_spacecraftNameLong
QString m_spacecraftNameLong
Full spacecraft name.
Definition: Camera.h:498
Isis::CSMCamera::Declination
virtual double Declination()
Computes the Declination of the currently set image coordinate.
Definition: CSMCamera.cpp:1139
Isis::SurfacePoint::GetLongitude
Longitude GetLongitude() const
Return the body-fixed longitude for the surface point.
Definition: SurfacePoint.cpp:1685
Isis::AlphaCube::BetaSample
double BetaSample(double alphaSample)
Returns a beta sample given an alpha sample.
Definition: AlphaCube.h:145
Isis::CSMCamera::getModelState
QString getModelState() const
Get the CSM Model state string to re-create the CSM Model.
Definition: CSMCamera.cpp:969
Isis::Blob::Size
int Size() const
Accessor method that returns the number of bytes in the blob data.
Definition: Blob.cpp:142
Isis::Displacement::kilometers
double kilometers() const
Get the displacement in kilometers.
Definition: Displacement.cpp:94
Isis::Camera::p_pointComputed
bool p_pointComputed
Flag showing if Sample/Line has been computed.
Definition: Camera.h:505
Isis::CSMCamera::getParameterIndices
std::vector< int > getParameterIndices(csm::param::Set paramSet) const
Get the indices of the parameters that belong to a set.
Definition: CSMCamera.cpp:836
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::CSMCamera::getParameterUnits
QString getParameterUnits(int index)
Get the units of the parameter at a particular index.
Definition: CSMCamera.cpp:959
std
Namespace for the standard library.
Isis::Sensor::m_newLookB
bool m_newLookB
flag to indicate we need to recompute ra/dec
Definition: Sensor.h:240
Isis::ShapeModel
Define shapes and provide utilities for Isis targets.
Definition: ShapeModel.h:62
Isis::Camera::m_instrumentNameShort
QString m_instrumentNameShort
Shortened instrument name.
Definition: Camera.h:497
Isis::ShapeModel::phaseAngle
virtual double phaseAngle(const std::vector< double > &sB, const std::vector< double > &uB)
Computes and returns phase angle, in degrees, given the positions of the observer and illuminator.
Definition: ShapeModel.cpp:324
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
Isis::CSMCamera::sensorPositionBodyFixed
std::vector< double > sensorPositionBodyFixed() const
Get the position of the sensor in the body fixed coordinate system at the currently set time.
Definition: CSMCamera.cpp:475
Isis::CSMCamera::getParameterName
QString getParameterName(int index)
Get the name of the parameter.
Definition: CSMCamera.cpp:935
Isis::CSMCamera::isisToCsmGround
csm::EcefCoord isisToCsmGround(const SurfacePoint &groundPt) const
Convert an ISIS ground point into a CSM ground point.
Definition: CSMCamera.cpp:720
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Isis::CSMCamera::instrumentBodyFixedPosition
virtual void instrumentBodyFixedPosition(double p[3]) const
Get the position of the sensor in the body fixed coordinate system at the currently set time.
Definition: CSMCamera.cpp:461
Isis::ShapeModel::hasIntersection
bool hasIntersection()
Returns intersection status.
Definition: ShapeModel.cpp:368
Isis::PvlObject::findKeyword
PvlKeyword & findKeyword(const QString &kname, FindOptions opts)
Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this...
Definition: PvlObject.cpp:177
Isis::CSMCamera::instrumentPosition
virtual SpicePosition * instrumentPosition() const
Get the SpicePosition object the contains the state information for the sensor in J2000.
Definition: CSMCamera.cpp:1054
Isis::Camera::Line
virtual double Line() const
Returns the current line number.
Definition: Camera.cpp:2710
Isis::Blob
Definition: Blob.h:51
Isis::Sensor::m_lookB
SpiceDouble m_lookB[3]
Look direction in body fixed.
Definition: Sensor.h:239
Isis::Camera::m_spacecraftNameShort
QString m_spacecraftNameShort
Shortened spacecraft name.
Definition: Camera.h:499
Isis::Target
This class is used to create and store valid Isis targets.
Definition: Target.h:63
Isis::Displacement::Kilometers
@ Kilometers
The distance is being specified in kilometers.
Definition: Displacement.h:42
Isis::CSMCamera::SampleResolution
virtual double SampleResolution()
Compute the sample resolution in meters per pixel for the current set point.
Definition: CSMCamera.cpp:354
Isis::CSMCamera::RightAscension
virtual double RightAscension()
Computes the Right Ascension of the currently set image coordinate.
Definition: CSMCamera.cpp:1125
Isis::SurfacePoint
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:132
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Sensor::LocalRadius
Distance LocalRadius() const
Returns the local radius at the intersection point.
Definition: Sensor.cpp:267
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::CSMCamera::isisToCsmPixel
void isisToCsmPixel(double line, double sample, csm::ImageCoord &csmPixel) const
The reference time that all model image times are relative to.
Definition: CSMCamera.cpp:689
Isis::SpiceRotation
Obtain SPICE rotation information for a body.
Definition: SpiceRotation.h:209