question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spiceypy.ckgp throws NotFoundError even though all kernels are loaded

See original GitHub issue

Hi, I’m getting a NotFoundError that I can’t figure out. From what I understand of the C documentation, if the ck/ files are all loaded for a given date, the attitude data should be able to be found. Yet spiceypy.ckgp is not able to find anything.

Here’s the code:

sc='-144'
datestr='2021-08-23T12:00:00'
tolerance=100
system='HGRTN'

et=spiceypy.spiceypy.str2et(datestr)
sclkdp=spiceypy.spiceypy.sce2c(int(sc), et) #Ephemeris time, seconds past J2000.
cmat=spiceypy.spiceypy.ckgp(int(sc), sclkdp, tolerance, system)

I’ve checked both that the kernel files are present and that they are listed in the file that loads the kernels. Is there something I’m missing?

Anyway, thanks for any advice and for writing this package, 99% of the time it makes my life easier.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
elastufkacommented, Nov 11, 2021

@marcsit Thanks, it works! I didn’t know the spacecraft frame had a different ID, since I was translating sswidl’s get_sunspice_roll and I must have missed the ID change in get_sunspice_cmat somehow.

0reactions
mcostasitjacommented, Nov 11, 2021

@elastufka by the way, you should re-consider the value that you use for `tolerance’ I suggest that you take a look at the CK Required reading: https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/ck.html and/or take a look at the ckgp_c function header.

In addition please note that this routine might not be the best to use for the purpose of obtaining an orientation matrix, instead I would suggest you to use: pxform_c https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pxform_c.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

CKGP throws a not found exception · Issue #193 - GitHub
So, I using your spiceypy to calculate some positions and states from ... getting the same warning, even after playing with the kernels....
Read more >
main PDF - SpiceyPy Documentation
All notable changes to SpiceyPy will be documented here ... If an exception is raised while loading kernels or executing user code, ...
Read more >
furnsh - NAIF
If the file is a binary SPICE kernel it will be loaded into the ... only until all kernels associated with the variable...
Read more >
AndrewAnnex/SpiceyPy - Gitter
By default joblib.Parallel uses the 'loky' backend module to start separate Python worker processes to execute tasks concurrently on separate CPUs. [...] When...
Read more >
SOC-Provided Ancillary Data for Solar Orbiter - 1
3.3.3 A Note on Attitude Kernels and the Spacecraft Clock . ... be loaded and available, even if a real time correlation is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found