SPICEINIT fro LROC NAC Image

I am trying to use the ‘spiceinit’ command for one of the ISIS cubes for LROC NAC images. I used both offline and online spice initialization.

For offline, it shows the following error: ERROR No existing files found with a numerial version matching [kernels.???.db] in [[/home/prateek/anaconda3/envs/isis/[/home/prateek/anaconda3/envs/isis]]/base/kernels/lsk].

The GUI interface shows a different error (screenshot attached).
Any help will be appreciated.

Thanks



You need to download the base data See here:

I have already downloaded the base data. You can see all the screenshots attached.

I have copied all the downloaded IMG files inside the LRO folder

Did I download the (Base data) in the wrong directory?




Is your ISISDATA environment variable set to your ISISDATA directory? Check that ls $ISISDATA/base/dems/ldem_128ppd_Mars2011_clon180_radius_pad.cub resolves properly.

Where you downloaded the EDR files does not matter as you are passing your cube in as an input.

Hi,

It shows “No such file or directory.”
But I did set the environmental variables during the installation using the following command:
conda env config vars set ISISROOT=$CONDA_PREFIX ISISDATA=[home/prateek/anaconda3/envs/isis]
Do I need to fix them again?

Note: I had forgotten to download the ISIS base data during the installation, but I downloaded the base data after downloading all LRO data. I hope it is not the issue.

It looks like you set the variable 1 directory too high. Based on your screenshots it needs to be set to home/prateek/anaconda3/envs/isis/ISISDATA. You can re-run the command with the correct path and anaconda will handle it from there. Make sure you re-activate your environment after you run it again.

@jessemapel Thanks for the update.
It shows the same error even after updating the environment variable (path is updated). I have also restarted the terminal.

I can see the files in the DEM directory (screenshot attached). There are files that I can see in blue and others in white (in the screenshot).
Following command and ‘spiceinit’ is not working (showing the same error):
ls ISISDATA/base/dems/ldem_128ppd_Mars2011_clon180_radius_pad.cub

Can you provide what exactly your ISISDATA variable is set to?

Hello,
Can you elaborate more, please?
I have used the following command-
conda env config vars set ISISROOT=$CONDA_PREFIX ISISDATA=home/prateek/anaconda3/envs/isis/ISISDATA

I have attached the screenshot. It seems it can navigate to the path, but can’t


read the ldem cub file. Please look at it.

Can you run echo $ISISDATA and share the result of that.

@jessemapel
Here what I got:

It looks like you are missing a leading slash before home. So it should be:

conda env config vars set ISISROOT=$CONDA_PREFIX ISISDATA=/home/prateek/anaconda3/envs/isis/ISISDATA

Hello @jessemapel ,

It worked. Thank you very much for the timely replies. It was the slash and path which was creating the problem. I have successfully used the’ spiceinit’ and other commands.

However, I have query related map template. I can create a new topic.

Error:
I have an LROC NAC image from the south pole. following are the parameters of the maptemplate, I created (screenshots are also attached)

Group = Mapping
ProjectionName = PolarStereographic
CenterLongitude = 180.0
CenterLatitude = 0.0
TargetName = Moon
EquatorialRadius = 1737400.0
PolarRadius = 1737400.0
LatitudeType = Planetocentric
LongitudeDirection = PositiveEast
LongitudeDomain = 360
PixelResolution = 0.5 <meters/pixel>
End_Group

What should I put in central latitude and long.?


maptemp_2

It depends heavily upon what you want your map to be. I’d suggest reading these docs: Learning_About_Map_Projections · USGS-Astrogeology/ISIS3 Wiki · GitHub

also check the maptemplate application USGS: ISIS maptemplate Application Documentation

I would assume you would want to use the pole as your center point, but that’s not 100% a given.

Hello,

Thank you for the links.
I have gone through them. As the image tile is from the south pole, I selected the polar stereographic projection with 180 and 90 as center long and lat. I have also defined the latitude and longitude extent too.

Group = Mapping
ProjectionName = PolarStereographic
CenterLongitude = 180.0
CenterLatitude = -90.0
TargetName = Moon
EquatorialRadius = 1737400.0
PolarRadius = 1737400.0
LatitudeType = Planetocentric
LongitudeDirection = PositiveEast
LongitudeDomain = 360
PixelResolution = 0.5 <meters/pixel>
End_Group

I am getting the following errors. I tried several times, and the error I got is about the size of the output cube. I don’t think the size of 21 Gb is correct here.

maptemp_3
maptemp_4
maptemp_5

By default, ISIS limits the size of the output files it will create to 12 GB. When projecting high-resolution data such as LROC, into polar stereographic, the resulting cubes have a lot of NoData pixels that inflate the size of the file. It is very common for full-resolution LROC images in polar stereographic projection to have sizes > 12GB.

You have several options for dealing with this:

  • Do what the error message suggests and edit ~/.Isis/IsisPreferences to increase the MaximumSize threshold to a larger value
  • Stretch your input images and convert them to 1-Byte per pixel rather than 4 Bytes per pixel (will shrink file size by factor of 4). Based on your screenshots, this would be enough for some, but not all of your images. See Example 2 in the cubeatt documentation for a simple example of how to do this.
  • Specify a larger value for PixelResolution in your map template. (If you really need 0.5 meters/pixel, this won’t be an option)

If you edit your IsisPreferences file, look for a section beginning with “Group = CubeCustomization.” A few lines below that you will see “MaximumSize = 12”. Just change the 12 to a larger value (for LROC, perhaps try 125; that’s the value I use and it works much of the time).

There are also ways to split the output into several smaller images, but that’s a little more complicated to set up.

@dpmayerUSGS @jessemapel

I have tried with a different map template and got a 12 GB image as output. But it is not at the exact position I wanted (screenshot attached). In the screenshot, the NAC image is above the desired polygon (study area). It seems inverted too.!
Here are the parameters of the map template which I created:

***** Output of [/home/prateek/anaconda3/envs/isis/ISISDATA/lro/EDR/lroc_nac1.map] *****

Group = Mapping
ProjectionName = PolarStereographic
CenterLongitude = -180.0
CenterLatitude = -90.0
TargetName = Moon
EquatorialRadius = 1737400.0
PolarRadius = 1737400.0
LatitudeType = Planetocentric
LongitudeDirection = PositiveEast
LongitudeDomain = 360
MinimumLatitude = -90.0
MaximumLatitude = -88.0
MinimumLongitude = 170.0
MaximumLongitude = 180.0
PixelResolution = 0.5 <meters/pixel>
End_Group

Do I need to reassign the center coordinates?

maptemp_6