Skip to content

Get Kernels from MKs (with path correction to SPICEROOT)#703

Merged
Kelvinrr merged 21 commits into
DOI-USGS:mainfrom
jrcain-usgs:metakernal-auto-path
May 30, 2026
Merged

Get Kernels from MKs (with path correction to SPICEROOT)#703
Kelvinrr merged 21 commits into
DOI-USGS:mainfrom
jrcain-usgs:metakernal-auto-path

Conversation

@jrcain-usgs
Copy link
Copy Markdown
Contributor

@jrcain-usgs jrcain-usgs commented May 1, 2026

When Metakernels were auto-loaded from SPICEROOT, they would often still have their default directory, /usgs/cpkgs/isis3/data, which does not exist on most user's systems, and must be manually changed by the user.

This PR checks auto-loaded metakernels for correct kernel paths (in both the mk's default paths, and SPICEROOT), and returns a list of kernels paths that exist, or fails with an error explaining which kernel is missing from where.

Fixes #529

Licensing

This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

@Kelvinrr
Copy link
Copy Markdown
Collaborator

Kelvinrr commented May 4, 2026

Needs changelog and tests for new function.

@jrcain-usgs jrcain-usgs marked this pull request as draft May 6, 2026 16:34
@jrcain-usgs jrcain-usgs marked this pull request as ready for review May 8, 2026 00:08
@oleg-alexandrov oleg-alexandrov mentioned this pull request May 8, 2026
1 task
@oleg-alexandrov
Copy link
Copy Markdown
Collaborator

oleg-alexandrov commented May 8, 2026

I added the semi-related #705. I had some fix for this particular issue as well but then took it out not to have a conflict. That one addresses something else.

All these show up with Chandrayaan-2. This particular thing is very long-standing.

@jrcain-usgs jrcain-usgs changed the title load_metakernel_with_new_root Get Kernels from MKs (with path correction to SPICEROOT) May 8, 2026
@jrcain-usgs jrcain-usgs requested a review from acpaquette May 8, 2026 00:16
Copy link
Copy Markdown
Collaborator

@acpaquette acpaquette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review

Comment thread ale/kernel_access.py Outdated
Comment thread ale/kernel_access.py Outdated
Comment thread ale/kernel_access.py
@jrcain-usgs jrcain-usgs requested a review from acpaquette May 13, 2026 19:32
Comment thread ale/kernel_access.py Outdated
Comment thread ale/kernel_access.py Outdated
Comment thread ale/kernel_access.py
@jrcain-usgs jrcain-usgs requested a review from Kelvinrr May 29, 2026 17:35
@Kelvinrr Kelvinrr merged commit 06586fa into DOI-USGS:main May 30, 2026
13 checks passed
@Kelvinrr
Copy link
Copy Markdown
Collaborator

We should figure out how to integrate this into the MK ale.loads paradigm. So users dont have to use python to make it work.

@oleg-alexandrov
Copy link
Copy Markdown
Collaborator

@Kelvinrr Thanks a lot for the review and @jrcain-usgs for the work. I validated that this works. As to integrating this into the MK ale.loads paradigm, that would likely be nice, but the fix does what it intends. When going through the NAIF path the metakernel gets loaded properly. The other path is with -k when an ISIS cub is loaded and meta kernels are not needed. I can't think of a use case where the bug would still be triggered (so unless the user does something custom).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metakernels lookup for MSL

4 participants