Open
Conversation
1 task
Kelvinrr
reviewed
Apr 1, 2026
Comment on lines
+16
to
+25
| def main(): | ||
| parser = argparse.ArgumentParser(description=__doc__) | ||
| parser.add_argument( | ||
| "-f", "--isd_file", | ||
| type=Path, | ||
| help="Input ISD (Image Support Data) JSON file to extract kernel information from." | ||
| ) | ||
| parser.add_argument( | ||
| "-k", "--kernel_type", | ||
| default=None, |
Collaborator
There was a problem hiding this comment.
early on we walked about using click, no need to change now but any reason you went with an arparse script?
Contributor
Author
There was a problem hiding this comment.
Kept it consistent with how isd_generate is formatted. I can update to use click, should be straightforward.
ale/isd_to_kernel.py
Outdated
Comment on lines
+78
to
+84
| reference_frame_map = { | ||
| 1: "J2000", | ||
| 2: "B1950", | ||
| 3: "FK4", | ||
| 4: "DE-118", | ||
| 5: "DE-96", | ||
| 6: "DE-102", |
Collaborator
There was a problem hiding this comment.
cspice should be able to get these without furnishing anything, why are we maintaining our own?
ale/isd_to_kernel.py
Outdated
Comment on lines
+103
to
+124
| class KernelType(Enum): | ||
| """ | ||
| An enumeration representing supported SPICE kernel types and their | ||
| associated file extensions. | ||
|
|
||
| This class serves as the central authority for mapping kernel names | ||
| (e.g., 'SPK', 'CK') to their standard NAIF file extensions and provides | ||
| utility methods for distinguishing between binary and text-based kernels. | ||
| """ | ||
| SPK = ".bsp" | ||
| CK = ".bc" | ||
| FK = ".tf" | ||
| IK = ".ti" | ||
| LSK = ".tls" | ||
| MK = ".tm" | ||
| PCK = ".tpc" | ||
| SCLK = ".tsc" | ||
|
|
||
| @classmethod | ||
| def get_ext(cls, kernel_type: str) -> str: | ||
| """ | ||
| Retrieves the file extension for a given kernel type string. |
Collaborator
There was a problem hiding this comment.
some of this is partially already in SpiceQL. It would be better to augment that than reproduce here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #602
Associated with this SpiceQL PR so make sure to build and install that locally before trying out
isd_to_kernel.**Looks like the tests are failing because they are relying on a SpiceQL version that has the changes mentioned above. Once a SpiceQL release is out, I will re-run the pipeline.
You can use ISDs in ALE's tests/pytest/data/isds/ to test CK and SPK creation.
Check out the help first:
Here are some examples:
*Note: It's possible that some CK/SPK generation may fail because their frame name is not included in the aliasMap in SpiceQL so that has to be updated first then you can test again.
You can check out the binary kernels with NAIFs toolkit
ckbriefandbriefand comment headers withcommnt.Run tests:
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: