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
196 stars 166 forks source link

fixed problems with downloadIsisData, spiceinit, and missing Mars MOLA DEM file #5258

Closed swoodwa closed 1 month ago

swoodwa commented 1 year ago

I was unable to run "spiceinit" on a THEMIS IR image cube because the Mars shape model file it needed (molaMarsPlanetaryRadius0005.cub) was missing from my $ISISROOT/base/dems directory. I had the other 4 versions (...0001.cub, ...0002.cub, ...0003.cub, and ...0004.cub) but not number 5.

After much searching of the ISIS GitHub site, and much trial and error, I was eventually able to piece together how to obtain this file using the "downloadIsisData" script, but it seemed to require several modifications of the recommended commands and procedures, so I wanted to share my solution here in case it might help other people with similar issue(s).

BTW, for context, I'm running ISIS version 7.0.0 in MacOS 10.15.7 (Catalina) on a 2015 MacBook Pro (i7). In the following, I've preceded the actual commands I used with a "$":

$ thm2isis from=I03070002RDR.QUB to=I03070002RDR $ spiceinit from=I03070002RDR.cub web=yes (this command gave the following result and error messages): Group = Kernels NaifFrameCode = -53031 LeapSecond = $base/kernels/lsk/naif0012.tls TargetAttitudeShape = $base/kernels/pck/pck00009.tpc TargetPosition = (Table, $base/kernels/spk/de430.bsp, $base/kernels/spk/mar097.bsp) InstrumentPointing = (Table, $odyssey/kernels/ck/m01_sc_map3.bc, $odyssey/kernels/fk/m01_v29.tf) Instrument = Null SpacecraftClock = $odyssey/kernels/sclk/ORB1_SCLKSCET.00290.tsc InstrumentPosition = (Table, $odyssey/kernels/spk/m01_map3.bsp) InstrumentAddendum = $odyssey/kernels/iak/themisAddendum003.ti ShapeModel = $base/dems/molaMarsPlanetaryRadius0005.cub InstrumentPositionQuality = Reconstructed InstrumentPointingQuality = Reconstructed CameraVersion = 2 End_Group ERROR The SPICE server returned incompatible SPICE data. ERROR Unable to initialize camera model in Camera Factory. PROGRAMMER ERROR Unable to create a shape model from given target and pvl. I/O ERROR Invalid shape model file [$base/dems/molaMarsPlanetaryRadius0005.cub] in Kernels group. ERROR The given shape model file is not a valid ISIS DEM. Unable to open as an ISIS cube. I/O ERROR Unable to open [/Users/stephen/miniconda3/envs/isis/data/base/dems/molaMarsPlanetaryRadius0005.cub]. ERROR The given shape model file is not a valid NAIF DSK file. Unable to construct a NAIF DSK shape model. USER ERROR NAIF DSK file [$base/dems/molaMarsPlanetaryRadius0005.cub] does not exist.

I searched the ISIS3/Issues on GitHub about this problem and it seemed that the way to get this missing file was to use a python script called "downloadIsisData" and do a partial download of the ISIS base data. But when I tried running that script I discovered it didn't exist in my ISIS installation (was supposed to be in $ISISROOT/scripts). More searching re this problem led me to these pages:

https://github.com/DOI-USGS/ISIS3/issues/5027 https://github.com/USGS-Astrogeology/ISIS3/#how-do-i-access-the-isisdata-download-script-with-isis-700-or-earlier

But I ended up using modified versions of the commands given on those pages, as shown below. I also had to create a "config" directory in $ISISROOT since it didn't exist and apparently that's where "downloadIsisData.py" looks for the "rclone.conf" file. So here's what I did:

$ conda install -c conda-forge rclone

$ curl -LJ0 https://github.com/USGS-Astrogeology/ISIS3/raw/dev/isis/scripts/downloadIsisData -o $ISISROOT/scripts/downloadIsisData.py

$ mkdir $ISISROOT/config

$ curl -LJ0 https://github.com/USGS-Astrogeology/ISIS3/raw/dev/isis/config/rclone.conf -o $ISISROOT/config/rclone.conf

$ python downloadIsisData.py base $ISISDATA --config $ISISROOT/config/rclone.conf --include="mola*0005.cub"

This command successfully downloaded the missing file and then "spiceinit" worked on my THEMIS cube.

Kelvinrr commented 1 year ago

You are correct that that would be the way you can mimic the install directory. From the instructions, you can override the location of the config with --config <path>. Are you saying that you that this option didn't work? Or that we should amend the docs to include this method of installing the config into an existing ISIS install?

github-actions[bot] commented 7 months ago

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.

If you want to participate in our support prioritization meetings or be notified when support sprints are happening, you can sign up the support sprint notification emails here.

Read more about our support processs here