Skip to content
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

SPICEINIT KERNEL ISSUE #5728

Open
emresezer opened this issue Feb 12, 2025 · 10 comments
Open

SPICEINIT KERNEL ISSUE #5728

emresezer opened this issue Feb 12, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@emresezer
Copy link

emresezer commented Feb 12, 2025

ISIS version(s) affected: 8.3.0

Description
Hello,

I am using ISIS version 8.3.0. I converted the my mro crism data file I downloaded from Mars Orbital Data Esplorer to cube format with crism2isis. To work on mu cube I tried to load SPICE information with spiceinit command. I got the following output.

Group = Kernels
NaifIkCode                = -74017
LeapSecond                = $base/kernels/lsk/naif0012.tls
TargetAttitudeShape       = $mro/kernels/pck/pck00008.tpc
TargetPosition            = ($base/kernels/spk/de430.bsp,
                             $base/kernels/spk/mar097.bsp)
InstrumentPointing        = ($mro/kernels/ck/mro_crm_psp_070201_070228.bc,
                             $mro/kernels/ck/mro_sc_psp_070220_070226.bc,
                             $mro/kernels/fk/mro_v16.tf)
Instrument                = $mro/kernels/ik/mro_crism_v10.ti
SpacecraftClock           = $mro/kernels/sclk/MRO_SCLKSCET.00113.65536.tsc
InstrumentPosition        = $mro/kernels/spk/mro_psp2_ssd_mro110c.bsp
InstrumentAddendum        = $mro/kernels/iak/crismAddendum001.ti
ShapeModel                = $base/dems/molaMarsPlanetaryRadius0005.cub
InstrumentPositionQuality = Reconstructed
InstrumentPointingQuality = Reconstructed
CameraVersion             = 1
Error                     = "Failed to convert string [Null] to an integer"
End_Group
This function(PvlObject::addLogGroup) will be depreciated in ISIS3 v9.0 in favor of Application::appendLogGroup
**ERROR** Unable to initialize camera model.

How can I fix; Error = "Failed to convert string [Null] to an integer" and **ERROR** Unable to initialize camera model errors?

I installed the kernel files with the following commands.

downloadIsisData base $ISISDATA
downloadIsisData mro $ISISDATA

Should I delete these kernel files and download NAIF MRO kernel files instead? Or should it be download both?

Best wishes,
thanks for any help.

@emresezer emresezer added the bug Something isn't working label Feb 12, 2025
@emresezer
Copy link
Author

Instead of Error = "Failed to convert string [Null] to an integer" I now get Error = "Array subscript [0] is out of array boundsfor Keyword [TargetPosition]".
How can I fix; Error = "Array subscript [0] is out of array boundsfor Keyword [TargetPosition]" and **ERROR** Unable to initialize camera model errors?

@acpaquette
Copy link
Collaborator

acpaquette commented Feb 13, 2025

Hi @emresezer, similar to your last issue, could you provide the cube you are using or point me to the raw image and reproduction steps?

@acpaquette
Copy link
Collaborator

acpaquette commented Feb 13, 2025

It would also be useful to know what you are trying to process in ISIS. After some digging it looks like some of the products from the CRISM dataset provided by the Mars Orbital Data Explorer may not be supported in the ISIS CRISM camera model

@emresezer
Copy link
Author

I’m using this data file: frt0001ecba_07_if166j_ter3.lbl from https://ode.rsl.wustl.edu/mars/productPageAtlas.aspx?product_id=FRT0001ECBA_07_IF166J_TER3&product_idGeo=32162163

I convert it to a cube file with the crism2isis command.
crism2isis from= frt0001c558_07_if165j_ter3.lbl to= frt0001c558_07_if165j_ter3.cub

I got the following warning.

Group = Results
  Warning = "When using cam2map or cam2cam, images imported into Isis using
         	crism2isis should only be interpolated using the nearest-neighbor
         	algorithm due to gimble jitter of the MRO CRISM instrument."
End_Group
This function(PvlObject::addLogGroup) will be depreciated in ISIS3 v9.0 in favor of Application::appendLogGroup

I load the kernel information with the spiceinit command.
spiceinit from= frt0001c558_07_if165j_ter3.cub

I got the following warning.

Group = Kernels
  NaifIkCode            	= -74017
  LeapSecond            	= $base/kernels/lsk/naif0012.tls
  TargetAttitudeShape   	= $mro/kernels/pck/pck00008.tpc
  TargetPosition        	= Null
  InstrumentPointing    	= ($mro/kernels/ck/mro_crm_psp_101201_101231.bc,
                           	$mro/kernels/ck/mro_sc_psp_101207_101213.bc,
                           	$mro/kernels/fk/mro_v16.tf)
  Instrument            	= $mro/kernels/ik/mro_crism_v10.ti
  SpacecraftClock       	= $mro/kernels/sclk/MRO_SCLKSCET.00113.65536.tsc
  InstrumentPosition    	= $mro/kernels/spk/mro_psp17_ssd_mro110c.bsp
  InstrumentAddendum    	= $mro/kernels/iak/crismAddendum001.ti
  ShapeModel            	= $base/dems/molaMarsPlanetaryRadius0005.cub
  InstrumentPositionQuality = Reconstructed
  InstrumentPointingQuality = Reconstructed
  CameraVersion         	= 1
  Error                 	= "Array subscript [0] is out of array boundsfor
                           	Keyword [TargetPosition]"
End_Group

This function(PvlObject::addLogGroup) will be depreciated in ISIS3 v9.0 in favor of Application::appendLogGroup
**ERROR** Unable to initialize camera model.

@afrigeri
Copy link
Contributor

I see that from the first output one difference is from:

...
TargetPosition            = ($base/kernels/spk/de430.bsp,
                             $base/kernels/spk/mar097.bsp)
...

to:

...
TargetPosition        	= Null
...

and the last error message tells that isis is trying to pick the first element of an array, but the array is Null

not a solution, but maybe useful

@emresezer
Copy link
Author

emresezer commented Feb 14, 2025

Thank you, I checked. I've de430.bsp and mar097.bsp docs.

@afrigeri
Copy link
Contributor

afrigeri commented Feb 14, 2025

@emresezer, the XXXXX_if165j_ter3 dataproduct does not have camera information anymore. Starting from what @acpaquette wrote above, we can not spiceinit some (high-level) CRISM dataproducts. In this case we can not spiceinit CRISM cubes where the two sensors data has been already merged (e.g. CRISM J/TER), because each sensor has his own operative parameters.

in fact, the ter3 file we find:

  Group = Instrument
    SpacecraftName            = "MARS RECONNAISSANCE ORBITER"
    InstrumentId              = CRISM
    TargetName                = Mars
    StartTime                 = 2010-12-09T03:58:21.797
    StopTime                  = 2010-12-09T04:00:21.531
    SpacecraftClockStartCount = 10/0976334333.32816
    SpacecraftClockStopCount  = 10/0976334453.15394
    SensorId                  = J
    ShutterModeId             = UNKNOWN
    FrameRate                 = UNKNOWN
    ExposureParameter         = Null
    PixelAveragingWidth       = UNKNOWN
    ScanModeId                = UNKNOWN
    SamplingModeId            = UNKNOWN
  End_Group

while in one of it's ancestor, the calibrated data product TRDR (_trr file, Targeted Reduced Data Record), we find what spiceinit needs to reconstruct the scene:

  Group = Instrument
    SpacecraftName            = "MARS RECONNAISSANCE ORBITER"
    InstrumentId              = CRISM
    TargetName                = Mars
    StartTime                 = 2010-12-09T03:58:21.797
    StopTime                  = 2010-12-09T04:00:21.531
    SpacecraftClockStartCount = 10/0976334333.32816
    SpacecraftClockStopCount  = 10/0976334453.15394
    SensorId                  = S
    ShutterModeId             = OPEN
    FrameRate                 = 3.75 <HZ>
    ExposureParameter         = 184
    PixelAveragingWidth       = 1
    ScanModeId                = SHORT
    SamplingModeId            = HYPERSPEC
  End_Group

please try to spiceinit e.g. the VNIR sensor datafrt0001c558_07_if165s_trr3, that should get through without errors.

@acpaquette
Copy link
Collaborator

@afrigeri Thanks for the reply here! I found the trr3 data worked well/correctly with the camera model in ISIS. I will explore the ter3 data but it is likely not support by the current camera model

@emresezer
Copy link
Author

@afrigeri Thanks for the comment. @acpaquette Thank you for your interest. I am eagerly awaiting the results of the review. How can I use features such as map projection, foot print, latitude / longitude informations without running the spiceinit command my cube? What data type should I use to work with these features?

@afrigeri
Copy link
Contributor

@emresezer, within the ISIS working environment, the spiceinit step is required to attach all the information required to reconstruct the geometry of the data acquisition and deriving, for example the lat/lon displayed in qview or map-project the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants