-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update gllssical to work without local spice kernels #4306
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this one was basically (Spice object) using the camera already thus requiring spiceinit. May want to put this one on the list for just removing the try/catch and getting a camera off the cube. If we can't get a Camera, there is no chance we can get a Spice since they both require that spiceinit ran. Suggest simplifying the code, but what is there is correct.
If my calculations are correct this is only a 12km difference. Nearly nothing in the grand scheme of sun light getting to the target. |
catch (IException &e) { | ||
Isis::FileName sclk(label->findGroup("Kernels", Pvl::Traverse)["SpacecraftClock"][0]); | ||
QString sclkName(sclk.expanded()); | ||
furnsh_c(sclkName.toLatin1().data()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a naif check around it with a catch. If the furnish fails everything after that will be bad.
rsun = cam->sunToBodyDist() / 1.49597870691E8 / 5.2; | ||
} | ||
catch (IException &e) { | ||
// try original fallback for previously spiceinited data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously/old/prior to this update spiceinited data doesn't have all the information it needs to go through the camera.
* -------- * --- (D/5.2)**2 | ||
* A1 Ko | ||
*/ | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure the 3 lines above are used except in the catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks! I'll move it into the catch.
$(APPNAME) FROM=$(INPUT)/3439R.cub TO=$(OUTPUT)/3439R.cal.cub > /dev/null; | ||
catlab FROM=$(OUTPUT)/3439R.cal.cub TO=$(OUTPUT)/3439R.cal.pvl > /dev/null; | ||
$(APPNAME) FROM=$(INPUT)/1213r.cub TO=$(OUTPUT)/1213r.cal.cub > /dev/null; | ||
catlab FROM=$(OUTPUT)/1213r.cal.cub TO=$(OUTPUT)/1213r.cal.pvl > /dev/null; | ||
|
||
# Test newly re-spiceinited data | ||
$(APPNAME) FROM=$(INPUT)/3439R.respiceinit.cub TO=$(OUTPUT)/3439R.respiceinit.cub > /dev/null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the original cube spiceinit'ed, but you couldn't get a camera off it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly. I figured we'd want to continue support gllssical working on older data without requiring that it be re-spiceinited.
@@ -81,7 +81,7 @@ namespace Isis { | |||
// Get the start time in et | |||
PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); | |||
|
|||
double et = iTime((QString)inst["StartTime"]).Et(); | |||
double et = getClockTime((QString)inst["SpacecraftClockStartCount"]).Et(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still necessary when using setImage call to get sun distance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, thanks for catching this.
Description
Updates
gllssical
to usegetClockTime()
function, which will use the already-saved ET for the Start Time of the image if it has already been saved, or fall back to furnishing thesclk
kernel if this fails.Related Issue
#4303
Motivation and Context
See #4303
How Has This Been Tested?
Tested by hand and using existing tests. Existing test data needed to be re-spiceinited to work with updates, and the results are slightly different with the new kernels and updates. Anyone have thoughts about whether these changes are reasonable or not?
Difference in calibration results for default gllssical tests:
3439R.cal.pvl:
1213r.cal.pvl:
There are also DN changes on the calibrated cubes:
3439R.cal.cub:
1213r.cal.cub:
Screenshots (if appropriate):
Types of changes
Checklist:
Licensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: