-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Support for OSIRIS-REx TagCams Instruments (#5427)
* Add new IrregularBodyCameraGroundMap class * Update documentation and app/unit tests * Initial version of tagcams2isis Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Initial version of OREX TAGCAMS Camera Model Provides initial version of OREX TAGCAMS camera model for NAVCam (Navcam 1), NFTCam (Navcam 2) and STOWCam instruments Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Improved import of TAGCAMS image data tagcams2isis * Added more keywords to import/translate * Added option REMOVECALPIXELS to allow user to control how the boundary pixels are treated * Implemented summing and scaling based upon expected conditions * Add SourceProductId * Compute CameraHeadTemperature (Celsius) from TCCHTEMP FITS label keyword for camera distortion model * Compute and add YearDoy keyword Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Add complete version of OpenCV distortion model * Added full implementation of the OpenCV 10 parameter distortion model for the TAGCAMS camera * Allow selection of several models including OpenCV, OCAMS or none * Added TOLERANCE parameter to determine convergence tolerance * Added DEBUG_MODEL parameter to turn on print statements to debug the camera distortion model * Added modified kernel DB file to support TAGCAMS along with OCAMS * Updated TAGCAMS camera addendum file Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Modified OpenCV distortion model OsirisRexTagcamsDistortionMap * Renamed OpenCV parameters in the IAK kernel to better conform and associate with the OpenCV parameter names * Added k4-k6 parameters to fully implement the OpenCV model Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Update TAGCAMS OpenCV distortion model parameters orx_tagcams_addendum_v04.ti * Version 4 of the TAGCAMS IAK kernel was created for new OpenCV distortion model parameters for Navcam 1 & 2 Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Removed unused variables to suppress warnings Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Typo in iTime.h include tagcams2isis * Mistyped iTime.h with capital I - works on Macs, not Linux systems Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Removed apostrophe that causes problems on Linux Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Update tagcams2isis temperature computation tagcams2isis * Update b parameter used to convert raw DNs of camera head temperature to Celsius as provided by the NAV team in update to camera model Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Update TAGCAMS camera model TAGCAMS Camera Model * Now use the CCD center as specified in the IK as the focal plane detector map system origin * Update camera model parameters provided by the NAV team * Renamed conversion methods to more meaningful names * Fixes pointing issues Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * New version of TAGCAMS camera model parameters orex_tagcams_addendum_v05.ti * Updated with all new TAGCAMS parameters as provided by the NAV/Kinetx team * Added distortion model reference Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Updates to TAGCAMS IAK orex_tagcams_addendum_v06.ti * Added light time/stellar, abberation correction and target/observer swap parameters for each instrument * Updated documentation Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Added LT and target/observer swap parameters Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Properly initialize distorted/undistorted parms OsirisRexTagcamsDistortionMap * Properly initialize distorted/undistorted parameters Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * tagams2isis.xml fix already happened * Fixed merge issue Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Correct typo Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Minor documentation change Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> * Modified for easy development of derived classes Moved all private variables and methods to protected scope * Added translations for OSIRIS-REx TagCams instruments NFTCam, NAVCam, and StowCam into Instruments.trn file. Originally added to University of Arizona codebase by Kris Becker on January 10, 2019. Addresses #5424. * Committing test data for OsirisREx TagCams support. Addresses #5424. * Initial commit of Osiris-REx Tagcams ingestion program tagcams2isis and supporting files. Addresses #5424. * Adding support for intersections with irregular bodies, in particular to support Osiris-REx instruments. Addresses #5424. * Unit test and truth data for OsirisREx tagcams instruments. Addresses #5424. * Support for OsirisREx tagcams instruments. Addresses #5424. * CHANGELOG entry for Osiris-REx tagcams instrument support. Addresses #5424. * Per review comments 2024-03-18: 1) fixed typo in IrregularBodyGroundMap.h; 2) removed IrregularBodyGroundMap unit test; 3) replaced OsirisRexTagcamsCamera unit test with gtest version. Addresses #5424. * Per Adam's suggestion 2024-03-19, modified second tagcams2isis method to take FileName object as an argument instead of a ProcessImportFits object. Addresses #5424. --------- Signed-off-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> Co-authored-by: Kris J. Becker <kbecker@orex.lpl.arizona.edu> Co-authored-by: Kelvin Rodriguez <krodriguez@usgs.gov>
- Loading branch information
1 parent
35b21fc
commit d9e91ff
Showing
44 changed files
with
24,873 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
isis/appdata/serialnumbers/OsirisRexTagCamsSerialNumber.trn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# history 2019-01-19 Kris Becker - Original version added to UofA codebase. | ||
|
||
Group = Keyword1 | ||
Auto | ||
InputKey = SpacecraftName | ||
InputGroup = "IsisCube,Instrument" | ||
InputPosition = (IsisCube, Instrument) | ||
OutputName = Keyword1 | ||
OutputPosition = ("Group","SerialNumberKeywords") | ||
Translation = ("OsirisRex", "OSIRIS-REx") | ||
Translation = (*,*) | ||
EndGroup | ||
Group = Keyword2 | ||
Auto | ||
InputKey = InstrumentId | ||
InputGroup = "IsisCube,Instrument" | ||
InputPosition = (IsisCube, Instrument) | ||
OutputName = Keyword2 | ||
OutputPosition = ("Group","SerialNumberKeywords") | ||
Translation = (*,*) | ||
EndGroup | ||
Group = Keyword3 | ||
Auto | ||
InputKey = SpacecraftClockStartCount | ||
InputGroup = "IsisCube,Instrument" | ||
InputPosition = (IsisCube, Instrument) | ||
OutputName = Keyword3 | ||
OutputPosition = ("Group","SerialNumberKeywords") | ||
Translation = (*,*) | ||
EndGroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
isis/src/base/objs/IrregularBodyCameraGroundMap/IrregularBodyCameraGroundMap.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** This is free and unencumbered software released into the public domain. | ||
The authors of ISIS do not claim copyright on the contents of this file. | ||
For more details about the LICENSE terms and the AUTHORS, you will | ||
find files of those names at the top level of this repository. **/ | ||
|
||
/* SPDX-License-Identifier: CC0-1.0 */ | ||
|
||
#include "IrregularBodyCameraGroundMap.h" | ||
|
||
#include "SurfacePoint.h" | ||
|
||
using namespace std; | ||
|
||
namespace Isis { | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param parent Pointer to camera to be used for mapping with ground | ||
*/ | ||
IrregularBodyCameraGroundMap::IrregularBodyCameraGroundMap(Camera *parent, | ||
const bool clip_emission_angles) : CameraGroundMap(parent), | ||
m_clip_emission(clip_emission_angles) { | ||
} | ||
|
||
/** | ||
* This method computes the undistorted focal plane coordinates for a ground | ||
* position, using the current Spice settings (time and kernels) without | ||
* resetting the current point values for lat/lon/radius/x/y. The class value | ||
* value for m_pB and m_lookJ are set by this method. | ||
* | ||
* This method has been reimplemented from the CameraGroundMap class to never | ||
* perform the emission angle check. This is because it uses the ellipsoid for | ||
* the check which is in general not adequate for irregular bodies. | ||
* | ||
* @param point Surface point (ground position) | ||
* @param cudx [out] Pointer to computed undistored x focal plane coordinate | ||
* @param cudy [out] Pointer to computed undistored y focal plane coordinate | ||
* | ||
* @return @b bool If conversion was successful | ||
*/ | ||
bool IrregularBodyCameraGroundMap::GetXY(const SurfacePoint &point, | ||
double *cudx, double *cudy) { | ||
|
||
return CameraGroundMap::GetXY(point, cudx, cudy, m_clip_emission); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
isis/src/base/objs/IrregularBodyCameraGroundMap/IrregularBodyCameraGroundMap.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#ifndef IrregularBodyCameraGroundMap_h | ||
#define IrregularBodyCameraGroundMap_h | ||
|
||
/** This is free and unencumbered software released into the public domain. | ||
The authors of ISIS do not claim copyright on the contents of this file. | ||
For more details about the LICENSE terms and the AUTHORS, you will | ||
find files of those names at the top level of this repository. **/ | ||
|
||
/* SPDX-License-Identifier: CC0-1.0 */ | ||
|
||
#include "Camera.h" | ||
#include "CameraGroundMap.h" | ||
#include "SurfacePoint.h" | ||
|
||
namespace Isis { | ||
/** | ||
* Convert between undistorted focal plane and ground coordinates | ||
* | ||
* This class is derived from CameraGroundMap to support the special case of | ||
* irregular bodies. Particularly, only the GetXY() method is reimplemented | ||
* here to never perform the "emission angle" (in places called "back-of-the- | ||
* planet") test. This is because the test uses the ellipsoid to validate | ||
* ground point visibility along the look vector to the surface. This is not | ||
* adequate for most irregular bodies. | ||
* | ||
* @ingroup Camera | ||
* | ||
* @see CameraGroundMap | ||
* | ||
* @author 2018-07-26 UA/OSIRIS-REx IPWG Team | ||
* | ||
* @internal | ||
* @history 2018-07-26 UA/OSIRIS-REx IPWG Team - Developed to support control | ||
* of irregular bodies | ||
* @history 2024-03-10 Ken Edmundson - Modified per Kris Becker such that the | ||
* emission angle (or back-of-the-planet) test is never | ||
* performed in the GetXY method (see class description | ||
* above). | ||
*/ | ||
class IrregularBodyCameraGroundMap : public CameraGroundMap { | ||
public: | ||
IrregularBodyCameraGroundMap(Camera *parent, const bool clip_emission_angles = false); | ||
|
||
//! Destructor | ||
virtual ~IrregularBodyCameraGroundMap() {}; | ||
|
||
virtual bool GetXY(const SurfacePoint &spoint, double *cudx, double *cudy); | ||
|
||
protected: | ||
bool m_clip_emission; /**! Test for emission angles? */ | ||
|
||
}; | ||
}; | ||
#endif |
1 change: 1 addition & 0 deletions
1
isis/src/base/objs/IrregularBodyCameraGroundMap/IrregularBodyCameraGroundMap.truth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This class will be tested by the applications and the individual Camera models. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ifeq ($(ISISROOT), $(BLANK)) | ||
.SILENT: | ||
error: | ||
echo "Please set ISISROOT"; | ||
else | ||
include $(ISISROOT)/make/isismake.objs | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ifeq ($(ISISROOT), $(BLANK)) | ||
.SILENT: | ||
error: | ||
echo "Please set ISISROOT"; | ||
else | ||
include $(ISISROOT)/make/isismake.apps | ||
endif |
92 changes: 92 additions & 0 deletions
92
isis/src/osirisrex/apps/tagcams2isis/OsirisRexTagcamsArchive_fit.trn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# | ||
# This translation file is used to produce the ISIS Archive label group | ||
# for the Osiris-REx Tagcams cameras (NAVCam, StowCam, NFTCam). | ||
# | ||
# Translation = (left,right) convert the input "right" to "left" | ||
# | ||
# history 2019-01-10 Kris Becker - Original version added to UofA codebase. | ||
# | ||
Group = ProducerId | ||
Auto | ||
Optional | ||
InputKey = ORIGIN | ||
InputPosition = FITSLABELS | ||
OutputName = ProducerId | ||
OutputPosition = (Object, IsisCube, Group, Archive) | ||
Translation = (*, *) | ||
End_Group | ||
|
||
Group = CheckSumStatus | ||
Auto | ||
Optional | ||
InputKey = CKPASS | ||
InputPosition = FITSLABELS | ||
OutputName = CheckSumStatus | ||
OutputPosition = (Object, IsisCube, Group, Archive) | ||
Translation = (*, *) | ||
End_Group | ||
|
||
Group = MetaKernel | ||
Auto | ||
Optional | ||
InputKey = META_KER | ||
InputPosition = FITSLABELS | ||
OutputName = MetaKernel | ||
OutputPosition = (Object, IsisCube, Group, Archive) | ||
Translation = (*, *) | ||
End_Group | ||
|
||
Group = TAGCAMSCommandedSequenceId | ||
Auto | ||
Optional | ||
InputKey = TCSEQID | ||
InputPosition = FITSLABELS | ||
OutputName = TagcamsCommandedSequenceId | ||
OutputPosition = (Object, IsisCube, Group, Archive) | ||
Translation = (*, *) | ||
End_Group | ||
|
||
Group = TAGCAMSCommandedImageId | ||
Auto | ||
Optional | ||
InputKey = TCIMGID | ||
InputPosition = FITSLABELS | ||
OutputName = TagcamsCommandedImageId | ||
OutputPosition = (Object, IsisCube, Group, Archive) | ||
Translation = (*, *) | ||
End_Group | ||
|
||
Group = RawCameraHeadTemperature | ||
Auto | ||
Optional | ||
InputKey = TCCHTEMP | ||
InputPosition = FITSLABELS | ||
InputDefault = 0 | ||
OutputName = RawCameraHeadTemperature | ||
OutputPosition = (Object, IsisCube, Group, Archive) | ||
Translation = (*, *) | ||
End_Group | ||
|
||
Group = RAAtReferencePixel | ||
Auto | ||
Optional | ||
InputKey = CRVAL1 | ||
InputPosition = FITSLABELS | ||
InputDefault = 0 | ||
OutputName = RAAtReferencePixel | ||
OutputPosition = (Object, IsisCube, Group, Archive) | ||
Translation = (*, *) | ||
End_Group | ||
|
||
Group = DecAtReferencePixel | ||
Auto | ||
Optional | ||
InputKey = CRVAL2 | ||
InputPosition = FITSLABELS | ||
InputDefault = 0 | ||
OutputName = DecAtReferencePixel | ||
OutputPosition = (Object, IsisCube, Group, Archive) | ||
Translation = (*, *) | ||
End_Group | ||
|
||
End |
57 changes: 57 additions & 0 deletions
57
isis/src/osirisrex/apps/tagcams2isis/OsirisRexTagcamsBandBin_fit.trn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
# This translation file is used to produce the ISIS BandBin label group | ||
# for the OSIRIS-REx Tagcams cameras (NAVCam, StowCam, NFTCam). | ||
# Translation = (left,right) convert the input "right" to "left" | ||
# | ||
# history 2019-01-19 Kris Becker - Original version added to UofA codebase. | ||
|
||
Group = FilterName | ||
Auto | ||
InputKey = FILTNAME | ||
InputPosition = FITSLABELS | ||
InputDefault = Monochrome | ||
OutputName = FilterName | ||
OutputPosition = (Object, IsisCube, Group, BandBin) | ||
InputDefault = Unknown | ||
Translation = (*, *) | ||
End_Group | ||
|
||
Group = Name | ||
Auto | ||
InputKey = INSTRUME | ||
InputPosition = FITSLABELS | ||
InputDefault = TagCams | ||
OutputName = Name | ||
OutputPosition = (Object, IsisCube, Group, BandBin) | ||
InputDefault = Unknown | ||
Translation = (NAVCam, NCM) | ||
Translation = (NFTCam, NFT) | ||
Translation = (StowCam, STO) | ||
Translation = (TagCams, *) | ||
End_Group | ||
|
||
Group = FilterNumber | ||
Auto | ||
InputKey = FILTNUMB | ||
InputPosition = FITSLABELS | ||
InputDefault = 1 | ||
OutputName = Number | ||
OutputPosition = (Object, IsisCube, Group, BandBin) | ||
InputDefault = Unknown | ||
Translation = (*, *) | ||
End_Group | ||
|
||
Group = FilterCenter | ||
Auto | ||
InputKey = INSTRUME | ||
InputPosition = FITSLABELS | ||
OutputName = Center | ||
OutputPosition = (Object, IsisCube, Group, BandBin) | ||
Translation = (550 <nm>, N/A) | ||
Translation = (550 <nm>, NCM) | ||
Translation = (550 <nm>, NFT) | ||
Translation = (550 <nm>, STO) | ||
Translation = (*, *) | ||
End_Group | ||
|
||
End |
Oops, something went wrong.