Closed drschenk closed 1 year ago
Morning @drschenk. I wonder if this is not a either change in the IK or a change in the import code so that the read is flipped. I would wager that the vector element sign flip you did was inside the NH LORRI IK kernel?
Morning @drschenk. I wonder if this is not a either change in the IK or a change in the import code so that the read is flipped. I would wager that the vector element sign flip you did was inside the NH LORRI IK kernel?
mvic2isis reads it in correctly (I think), but yes we did change something in the LORRI kernels to get the distortion field orientation correct. Im trying to find out if and how we need to do the same for MVIC. Stuart was looking into this????
Check the IAK file, $ISISDATA/newhorizons/kernels/iak/mvicAddendum004.ti
. You can change the direction of the distortion (in vs out) by flipping all of the signs on INS-98900_DISTORTION_COEF_X
and INS-98900_DISTORTION_COEF_Y
.
You can also flip the images vertically or horizontally by changing the signs on INS*_TRANSX
, INS*_TRANSY
, INS*_ITRANSS
, and INS*_ITRANSL
. Changing TRANSX
and ITRANSS
will flip horizontally. Changing TRANSY
and ITRANSL
will flip vertically. There are different ones for different filters so I would just change all of them.
ive been trying various things. some reverse the longitude direction. nothing works definitively (yet) but was hoping this could be answered by looking at the code from first principles. . .
Without fully examining your processes and exactly what you are seeing in your results, we can't help more than point you to some simple things to test. Here's all of the MVIC framing specific code if you want to check it:
https://github.com/USGS-Astrogeology/ISIS3/blob/dev/isis/src/newhorizons/objs/NewHorizonsMvicFrameCamera/NewHorizonsMvicFrameCamera.cpp https://github.com/USGS-Astrogeology/ISIS3/blob/dev/isis/src/newhorizons/objs/NewHorizonsMvicFrameCamera/NewHorizonsMvicFrameCameraDistortionMap.cpp
If you can provide clear data on residuals and where they are in the focal plane/image it may be possible to re-fit the distortion model, but that is not work we generally do.
There are comments in the TDI version of the camera model stating that the the distortion is not 100% implemented:
They state that there are additional corrections from Jason Cook. You could try reaching out to him for more information.
I have contacted Jason and will see what happens. the I think we have lost track of the main point. my first order question is whether the existing camera model is implemented correctly in ISIS. the first version of the LORRI distortion model back in 2015 was correct but was flipped right-to-left due to how the image was read in (vs how fits read it in). All Im trying to find out is whether this was also done for MVIC att he time or whether it needs to be done in a similar way now. the images are read in correctly but if the distortion orientation is flipped then positions will be off by small but important amounts.
There are comments in the TDI version of the camera model stating that the the distortion is not 100% implemented:
They state that there are additional corrections from Jason Cook. You could try reaching out to him for more information.
the documentation isn't clear whether this also applies to the framing mode....
The notes in the IAK mention that they thought this would only be required in the TDI observations and that the distortion for the framing observations should be properly handled by the existing legendre polynomial distortion model.
According to this document (page 68) referenced from the IAK: https://pds-ppi.igpp.ucla.edu/data/NH-P-PEPSSI-2-PLUTO-V3.0/DOCUMENT/soc_inst_icd.pdf
There are two sources of geometric distortion: the first is instrumental, due to optical effects in the instrument. The second source of distortion is motion distortion, which only affects TDI observations and is caused by the cross-track drift of the boresight within the deadband during the scan.
So I don't think that will affect framing observations.
I can't find this document from the IAK:
References
--------------------------------------------------------------------------------
1. "Calculation of distortion in MVIC frame images" (filename:
MVICdistortion-harrison8.doc)
Notes:
a. This is also found as section 10.3.1.2 (pp 58-62) of [2] below.
However, the distortion coefficients in the harrison8 version
are different than in [2]. We were told to use the values from
the harrison8 document.
b. The harrison8 version is more extensive in its description of
the least-squares adjustment and analysis. There is a detailed
residual analysis and a number of figures illustrating residual
vectors and various plots of deltaC and deltaR (corrections to
column and row). There is no mention of correlation analysis
(that might have been useful/interesting).
c. Though we are meant to use this distortion model for TDI as
well as Frame, based on the described calibration procedure, it
is not clear that the coefficients derived here would be valid
for the TDI sensors as well.
@scsides Do you know where this is?
@drschenk lorri2isis and mvic2isis go through the same steps to convert the FITS file to an ISIS cube so any flipping being done for LORRI is also being done for MVIC.
I can't find this document from the IAK:
References -------------------------------------------------------------------------------- 1. "Calculation of distortion in MVIC frame images" (filename: MVICdistortion-harrison8.doc) Notes: a. This is also found as section 10.3.1.2 (pp 58-62) of [2] below. However, the distortion coefficients in the harrison8 version are different than in [2]. We were told to use the values from the harrison8 document. b. The harrison8 version is more extensive in its description of the least-squares adjustment and analysis. There is a detailed residual analysis and a number of figures illustrating residual vectors and various plots of deltaC and deltaR (corrections to column and row). There is no mention of correlation analysis (that might have been useful/interesting). c. Though we are meant to use this distortion model for TDI as well as Frame, based on the described calibration procedure, it is not clear that the coefficients derived here would be valid for the TDI sensors as well.
@scsides Do you know where this is?
@drschenk lorri2isis and mvic2isis go through the same steps to convert the FITS file to an ISIS cube so any flipping being done for LORRI is also being done for MVIC.
I see that is true, but Stuart will recall we had to change something in Lorri***ti to either the foresight or something else to get the distortion sign right. I still dont know if that was (or needs to be) done for MVIC...
Okay, @scsides is out right now so he can provide some insight into what was done next week.
Thank you for your contribution!
Unfortunately, this issue hasn't received much attention lately, so it is labeled as 'stale.'
If no additional action is taken, this issue will be automatically closed in 180 days.
In the NH lorri camera model we found that a vector element sign had to be flipped because of the way the fits files were read out vs isis was mirrored. I’ve been wondering if we need to do the same for mvic frames and scans of Pluto. believe e the FITS files are read out in the same way (mirrored left-right) but am not sure and dont know which elements in which kernels would need to be changed to test this? The root problem is that the values for control points and stereo DEMs are coming out with high residuals or warped if MVIC images are used in the solutions. Same question for framing and scan modes as I think the camera model is basically the same. I’ve been stabbing the dark but not sure which kernels have all the required parameters and which parameters need flipping if any, but not finding the solution.
(mostly for Stuart S.)