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

Metakernels lookup for MSL #529

Open
oleg-alexandrov opened this issue Apr 11, 2023 · 5 comments
Open

Metakernels lookup for MSL #529

oleg-alexandrov opened this issue Apr 11, 2023 · 5 comments

Comments

@oleg-alexandrov
Copy link
Collaborator

oleg-alexandrov commented Apr 11, 2023

There is a good chance I filed something like this before, but I cannot look it up in this repo or the ISIS repo. Apologies for repeating it, if that's the case.

Trying to load MSL metakernels runs into the error:

The first file '/usgs/cpkgs/isis3/data/msl/kernels/lsk/naif0012.tls' specified by KERNELS_TO_LOAD in the file /home/oalexan1/projects/isis3data/msl/kernels/mk/msl_v01.tm could not be located.

That is because some files have a hard-coded path pointing to some filesystem local to USGS which does not exist on user's system. Manually editing the offending .tm file to make the location be on my system solves this, but ideally this should work out of the box.

@Kelvinrr
Copy link
Collaborator

Kelvinrr commented May 2, 2023

I think this is a limitation of MKs. You can define a prefix as a variable inside the MK and ship them as such, but a user would still need to open up the file and change the variable value to there personal ISISDATA download. Last I checked, I don't think there is a way to set a prefix via an env var like $ISISDATA using the tools provided by NAIF.

@acpaquette
Copy link
Collaborator

@oleg-alexandrov I think this may be closed as a won't fix? As Kelvin mentions this is a limitation of shipping metakernels with the ISISDATA area

@oleg-alexandrov
Copy link
Collaborator Author

As I understand, the meta kernels are produced / shipped by your team, and also the ale software. So, I see no fundamental reason as to why this can't be fixed one way or another, the same as the ISISDATA variable is expanded.

There's a chance I don't know the whole story or that there's no time for this. But the issue is one which shouldn't really happen in software. The user gets an error and has to edit the input data to make the error go away.

@oleg-alexandrov
Copy link
Collaborator Author

To add, if the issue is in NAIF itself, as it looks, that becomes a problem.

@oleg-alexandrov
Copy link
Collaborator Author

oleg-alexandrov commented Nov 29, 2023

I keep on running into the issue that, after fetching metakernels from the USGS server, ALE fails to read them, because the metakernels assume the files are stored in /usgs/cpkgs/isis3/data.

The only fix for this seems to be for the NaifSpice class to create a temporary file in which this hard-coded value will be replaced with the current value of $ALESPICEROOT, and then have spice.furnsh() load the temporary file (Python's tempfile.NamedTemporaryFile function can be used for that).

Any thoughts on this? I can do the work myself, looks simple enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants