Skip to content

Commit

Permalink
updates for review comments (#3277)
Browse files Browse the repository at this point in the history
* Updated truthdata for ProcessExportPds4 class to match updates made for CaSSIS sprint

* Fix trailing Z time-format in tgocassis2isis when reingesting images exported from ISIS3

* Added base for KaguyaTcCamera

* Still adding to base

* additonal changes

* Added appropriate ckframeid

* Fixed improper makefile

* Added unitTest.cpp to KaguyaTcCamera

* Adding camera plugin and test.

* Update camera plugin.

* Added working unit test. Added naif ck ID to ingestion.

* Changed camera parent class to LineScanCamera

* Add a Distortion Model to Kaguya TC ISIS camera model (#3215)

* Initial distortion model changes

* Distortion model updates to actually match equation in documentation

* Update truthdata for sensor model

* Update Kaguya TC Camera model to use LineScan Camera detector map (#3218)

* Initial distortion model changes

* Distortion model updates to actually match equation in documentation

* Update truthdata for sensor model

* Switch Kaguya TC to use L/S camera detector map. It is not a framer!

* Fix typo

* Fixes GroundMap, SkyMap in Kaguya TC Camera Model and improve Focal Map Origin (#3220)

* Initial distortion model changes

* Distortion model updates to actually match equation in documentation

* Update truthdata for sensor model

* Switch Kaguya TC to use L/S camera detector map. It is not a framer!

* Fix typo

* Update detector origin in Kaguya TC model to be more reasonable

* Update Kaguya TC Camera Model to include Detector offsets for swath modes (#3222)

* Initial distortion model changes

* Distortion model updates to actually match equation in documentation

* Update truthdata for sensor model

* Switch Kaguya TC to use L/S camera detector map. It is not a framer!

* Fix typo

* Update detector origin in Kaguya TC model to be more reasonable

* Update to center position and offsets for distortion map swath modes added to Kaguya TC Camera Model

* Change camera model to pull the Origin from the IAK

* Update Kaguya TC camera model time and add option to Spice::getClockTime (#3237)

* Added gtests for Displacement.cpp, removed Displacement unitTest and truthfile. (#3209)

* Added BasisFunctionTests.cpp. Removed BasisFunction unit test and truthfile.

* changed expectedOutput values for some of the tests

* Made tests for Displacement.cpp using gtest. removed Displacement unitTest and truthfile.

* Initial distortion model changes

* Updated README data area instructions (#3214)

* Fixed data area instructions in README and some links

* Fixed bold in block quote

* Fixed legacy install guide link

* extra l

* Testing indentation list

* Testing indentation list again

* Testing indentation list code snippet

* Minor wording clean up

* Removed extra number

* Removed duplicate Mars Odyssey entry

* Distortion model updates to actually match equation in documentation

* Update truthdata for sensor model

* Updates to the build recipe for ISIS releases for the 3.7.0 release candidate. (#3205)

* Minor modifications for RC build

* Small modification to version in the recipe/meta.yaml

* Updating release stage in isis/version

* Switch Kaguya TC to use L/S camera detector map. It is not a framer!

* Fix typo

* Update detector origin in Kaguya TC model to be more reasonable

* Update to center position and offsets for distortion map swath modes added to Kaguya TC Camera Model

* Added Area3DTests.cpp (#3216)

* Added BasisFunctionTests.cpp. Removed BasisFunction unit test and truthfile.

* changed expectedOutput values for some of the tests

* Made tests for Displacement.cpp using gtest. removed Displacement unitTest and truthfile.

* Added Area3DTests.cpp, removed Area3D truthfile and unit test.

* included TestUtilities.h for use with exception testing, added a test for teh Area3D '=' operator

* changed formatting to adhere to USGS coding standards

* re-addedd the unit test and truth file

* gllssi2isis Original Label Fix (#3226)

* Allowed writting of residuals when value is zero to controlnet pvl

* Updated ControlNetVersioner unit test

* Fixed pvl labels original pvl labels not being written to the resulting cube.

* Updated docstrings and history for updated methods

* Removed the need to set the output cube pixel type

* Reverted proceeimport changes

* Set the dimensions in the process before processing

* Added missing 1 in a history record

* Reverted and applied a more appropriate fix

* Used outfile obtained at the beginning of the program

* Added history comment to app xml

* Removed accidental comma (#3230)

* Update README.md (#3232)

Update readability

* Updated the time used by the camera model to use the clock count, rather than the start time

* Modifying files for conda build for ISIS3.7.0_RC2 (#3229)

* Modifying files for conda build for ISIS3.7.0_RC_2

* Changes to modifications until issue #3231 can be completed

* Small typo

* One final added comment for clarification

* Update unit test for Kaguya TC to match output of updated camera model

* Updates to Kaguya TC big PR based on comments
  • Loading branch information
krlberry authored May 16, 2019
1 parent 05078c0 commit 4ac2d46
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 25 deletions.
2 changes: 1 addition & 1 deletion isis/src/kaguya/apps/kaguyatc2isis/kaguyatc2isis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</brief>
<description>
Use this parameter to select the Kaguya Terrain
Camera filename. This file must contain the PDS
Camera filename. This file must contain the PDS
labels.
</description>
<filter>
Expand Down
6 changes: 5 additions & 1 deletion isis/src/kaguya/apps/kaguyatc2isis/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ void IsisMain() {
}
}
outcube->putGroup(otherLabels.findGroup("Instrument"));
/*
/*
// This code is not needed now, but is included here commented-out in case it becomes necessary
// to support the swath modes by setting their NaifFrameCodes in the future. The swath mode
// setting is currently handled entirely via the camera model.
// add kernels group
QString instId = inst["InstrumentId"];
QString encoding = inst["EncodingType"];
Expand Down
7 changes: 2 additions & 5 deletions isis/src/kaguya/objs/KaguyaTcCamera/KaguyaTcCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <QString>

#include "LineScanCameraDetectorMap.h"
#include "CameraDistortionMap.h"
#include "CameraFocalPlaneMap.h"
#include "LineScanCameraGroundMap.h"
#include "LineScanCameraSkyMap.h"
Expand Down Expand Up @@ -84,10 +83,9 @@ namespace Isis {

CameraFocalPlaneMap *focalMap = new CameraFocalPlaneMap(this, naifIkCode());

// This is the same, no matter the swath mode

// This set the origin of the detector (not image samp,line). It is zero bassed.
// This sets the origin of the detector (not image samp,line). It is zero bassed.
// The detector offsets are 0,0 because the borsight is in the center of the array
// The origin of the detector does not depend on swath mode.
QString key;
key = "INS" + toString(naifIkCode()) + "_BORESIGHT_SAMPLE";
double sampleBoreSight = getDouble(key);
Expand All @@ -98,7 +96,6 @@ namespace Isis {

// Setup distortion map
new KaguyaTcCameraDistortionMap(this, naifIkCode());
// new CameraDistortionMap(this);

// Setup the ground and sky map
new LineScanCameraGroundMap(this);
Expand Down
15 changes: 14 additions & 1 deletion isis/src/kaguya/objs/KaguyaTcCamera/KaguyaTcCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,20 @@
#include "LineScanCamera.h"

namespace Isis {

/**
* This is the camera model for the Kaguya Terrain Cameras TC1 and TC2
*
* @internal
* @history 2018-10-01 Adam Goins and Jeannie Backer - Original Version
*
* @history 2019-04-26 Stuart Sides and Kristin Berry - Updates to Kaguya TC camera model
* including updating to use LineScanCamera detector and ground maps, adding
* detector offsets for swath modes, setting the focal plane map center to
* the center of the detector, regardless of swath mode, and using the
* spacecraft clock start count, rather than the StartTime for image timing.
* See Git issue #3215 for more information.
*
*/
class KaguyaTcCamera : public LineScanCamera {
public:
KaguyaTcCamera(Cube &cube);
Expand Down
35 changes: 18 additions & 17 deletions isis/src/kaguya/objs/KaguyaTcCamera/KaguyaTcCameraDistortionMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,27 @@ namespace Isis {
double r = qSqrt(r2);
double r3 = r2 * r;

// Apply distortion correction


// This function implements the following distortion correction from the IK for the terrain camera,
// see: SEL_TC_V01.TI
//
// r2 = x^2 + y^2
// Line-of-sight vector of pixel no. n can be expressed as below.

// Distortion coefficients information:
// INS<INSTID>_DISTORTION_COEF_X = ( a0, a1, a2, a3)
// INS<INSTID>_DISTORTION_COEF_Y = ( b0, b1, b2, b3),
//
// Distance r from the center:
// r = - (n - INS<INSTID>_CENTER) * INS<INSTID>_PIXEL_SIZE.
//
// Line-of-sight vector v is calculated as
// v[X] = INS<INSTID>BORESIGHT[X]
// +a0 +a1*r +a2*r^2 +a3*r^3 ,
// v[Y] = INS<INSTID>BORESIGHT[Y]
// +r +a0 +a1*r +a2*r^2 +a3*r^3 ,
// v[Z] = INS<INSTID>BORESIGHT[Z] .

// Distortion coefficients information:
// INS<INSTID>_DISTORTION_COEF_X = ( a0, a1, a2, a3)
// INS<INSTID>_DISTORTION_COEF_Y = ( b0, b1, b2, b3),
//
// Distance r from the center:
// r = - (n - INS<INSTID>_CENTER) * INS<INSTID>_PIXEL_SIZE.
//
// Line-of-sight vector v is calculated as
// v[X] = INS<INSTID>BORESIGHT[X]
// +a0 +a1*r +a2*r^2 +a3*r^3 ,
// v[Y] = INS<INSTID>BORESIGHT[Y]
// +r +a0 +a1*r +a2*r^2 +a3*r^3 ,
// v[Z] = INS<INSTID>BORESIGHT[Z] .

// Apply distortion correction
double dr_x = p_odkx[0] + p_odkx[1] * r + p_odkx[2] * r2 + p_odkx[3] * r3;
double dr_y = p_odky[0] + p_odky[1] * r + p_odky[2] * r2 + p_odky[3] * r3;

Expand Down

0 comments on commit 4ac2d46

Please sign in to comment.