DOI-USGS / ISIS3

Integrated Software for Imagers and Spectrometers v3. ISIS3 is a digital image processing software package to manipulate imagery collected by current and past NASA and International planetary missions.
https://isis.astrogeology.usgs.gov
Other
197 stars 167 forks source link

Cannot run spiceinit on Voyager images of Enceladus #5129

Closed blandoplanet closed 1 year ago

blandoplanet commented 1 year ago

ISIS version(s) affected: isis7.0.0. Also attempted on isis6.0.0 (randomly)

Description
When running spiceinit on a Voyager (2) image if Enceladus I get the following error

Group = Kernels NaifFrameCode = -32101 LeapSecond = $base/kernels/lsk/naif0012.tls TargetAttitudeShape = $base/kernels/pck/pck00009.tpc TargetPosition = $base/kernels/spk/de430.bsp InstrumentPointing = ($voyager2/kernels/ck/vg2_sat_qmw_na_fc-32100_t- 2.bc, $voyager2/kernels/fk/vg2_v02.tf) Instrument = $voyager2/kernels/ik/vg2_issna_v02.ti SpacecraftClock = $voyager2/kernels/sclk/vg200044.tsc InstrumentPosition = $voyager2/kernels/spk//vgr2_sat336.bsp InstrumentAddendum = $voyager2/kernels/iak/voyagerAddendum004.ti ShapeModel = Null InstrumentPositionQuality = Reconstructed InstrumentPointingQuality = Reconstructed CameraVersion = 1 Error = "Can not find [BODY_CODE] in text kernels" End_Group ERROR Unable to initialize camera model.

Group = Error Program = spiceinit Code = 1 Message = "Unable to initialize camera model" File = spiceinit.cpp Line = 262 End_Group End_Object

I've attempted 3 different cubes that were freshly created with voy2isis from their *.imq

How to reproduce
See cubes in my /Enceladus-Voyager/ directory under my work/users/. Simply run (for example)

'spiceinit from=c4400432.cub'

Possible Solution
Problem with the data area? Possibly a problem with that results from updated spk for the Saturn system (made post Cassini)?

Additional context
This was brought to my attention by a colleague who was working in ISIS3.? on a MAC. I've confirmed his result running internally on ISIS7.0.0. Spiceinit is working fine for Voyager images of Triton. Given the "BODY_CODE" error I'm guessing their a kernel missing for Saturn or Enceladus.

lwellerastro commented 1 year ago

I tested one of @blandoplanet images via isis7.2.0-RC1 since I was already testing there and get the same error. I changed the ISISDATA area to point to the local/static isis3_old/ data area and got the same results. Could still be a data area problem, but if so, a long standing one. A CassiniISS image of Enceladus works ok as well.

amystamile-usgs commented 1 year ago

So I believe this error is occurring when searching for the BODY_CODE keyword in the text kernels (ik, iaks). I took a look at the text kernels for Voyager 2 and none have a BODY_CODE keyword. I also confirmed that our isis data area kernels matched those of NAIFs. So I don't believe this is an issue regarding the data area or missing kernels.

blandoplanet commented 1 year ago

I've (maybe) fixed one problem but now I've run into another (or maybe I even caused it). Please keep in mind that my understanding of kernels and how ISIS uses them is only skin deep, so some of this could be wrong. Long story short, the TargetName keyword on the cubes is 'ENCELADU'. When I used editlab to change the keyword to 'ENCELADUS' the error was resolved.

But now when I try to run spiceinit I get the following error: "The ck rotation from frame -32100 can not be found due to no pointing available at requested time or a problem with the frame"

I don't have any great ideas about what is causing this issue. The StartTime falls within the Saturn encounter and the image seems to be picking up the correct .bc and .tf kernels. A couple things I noticed that may all be red herrings. The frame code in the error message (-32100) does not match the frame code in the kernels group (-32101). The code in the kernels group seems to be correct. The kernel db in the voyager2/ck dir list spacecraft clock and leap second kernels as dependencies but those are much older than the sclk and lsk the image is actually picking up. However, as noted the correct cks same to be getting selected. Any ideas would be greatly appreciated.

Note on the original problem: I don't think the problem was with the ik or iak. Those are instrument specific and don't include any body information (so no need for a BODY_CODE). They also seem to work fine for Voyager images of both Ganymede (Jupiter system) and Triton (Neptune system). The pck is also a text kernel though, and I noticed that the only tspk listed was de430, which I think only includes the main bodies. There is a tspk for Enceladus but this wasn't being picked up (I tried specifying it on the command line with spiceinit but that didn't work). When I changed the TargetName to ENCELADUS spiceinit picked up BOTH the de430 and the Saturn-specific kernel sat425.bsp. This gives me some confidence (a dangerous thing) that changing the label is appropriate. I'm happy to learn otherwise though.

blandoplanet commented 1 year ago

Updating my update. Despite the error message, it turns out the image now has spice information attached and lat/lons. I need to poke a bit more, but this may be resolved. I will close if it is.

blandoplanet commented 1 year ago

Closing. This appears to be a data issue and not an ISIS issue. I'll re-open if problems persist.