Comments (4)
you are not passing in the correct path to the meta kernel. Try passing in the absolute path to the meta kernel to spice.furnsh or be sure to start the python interpreter or script within that directory as you are only giving a relative path. Also as you are on windows, you may need to use windows paths ie C:\\blah\to\thing.txt
not *nix style paths ie /blah/to/thing.txt
. Also the paths within the meta kernel may also need to be absolute, if that still doesn't work try loading each kernel separately with furnsh without using the meta kernel.
from spiceypy.
Thank you, Sir, I am getting the results for Cassini Position example http://spiceypy.readthedocs.io/en/master/exampleone.html,
but when I am plotting data, I am not getting the plot, and also there is not any error.
### ```
threeDPlot = Scatter3d(
x=positions[:, 0], # X coordinates
y=positions[:, 1], # Y coordinates
z=positions[:, 2], # Z coordinates
name='Cassini',
mode='lines',
line=Line(width=3)
)
barycenter = Scatter3d(
x=[0],
y=[0],
z=[0],
name='bc',
mode='marker',
marker=dict(
size=10,
color='orange'
)
)
data = Data([threeDPlot, barycenter])
layout = Layout(title="SpiceyPy Cassini Position Example")
fig = dict(data=data, layout=layout)
iplot(fig)
In[]: data
Out[]:
[{'line': {'width': 3},
'mode': 'lines',
'name': 'Cassini',
'type': 'scatter3d',
'x': array([-5461446.61080924, -5405334.74422541, -5349146.94705376, ...,
-1707474.84294684, -1746356.96542149, -1783710.34586425]),
'y': array([-4434793.40785864, -4394389.30467674, -4353923.53971293, ...,
-274607.5065943 , -310089.45261548, -345300.0914401 ]),
'z': array([-1200385.93315424, -1188170.51939463, -1175938.44080957, ...,
169001.94299463, 174816.22627009, 180477.49434824])},
{'marker': {'color': 'orange', 'size': 10},
'mode': 'marker',
'name': 'bc',
'type': 'scatter3d',
'x': [0],
'y': [0],
'z': [0]}]
How can I see the plot? Thank you.
from spiceypy.
The example I provided in the docs uses a library called plotly which hasn't been updated so it doesn't work, so don't use that code verbatim. Yes I do need to update that. You can plot the data using matplotlib instead, see https://matplotlib.org/examples/mplot3d/lines3d_demo.html for a simple example that should be easy to adapt to use the position data returned from spkpos.
from spiceypy.
Thank you, getting the plot.
from spiceypy.
Related Issues (20)
- Binary PCK generation tutorial HOT 3
- ❗N67 support timeline HOT 4
- get celestial body position at a given gps coordinate HOT 1
- Allow np.ndarray inputs for subpnt, subslr, and pxform HOT 1
- v4.0.3 : "function 'bodeul_' not found" after update HOT 5
- [WinError 126] The specified module could not be found HOT 4
- get_spice.py doesn't work on FreeBSD HOT 3
- TANGPT N67 API wrapper missing HOT 1
- Arm64 whl install issue HOT 3
- Context manager for SPICE kernels HOT 8
- add a CFF file
- sincpt unpacks 3 values HOT 4
- Toolkit version: CSPICE_N0067 HOT 1
- spiceypy.et2datetime(et) issue around the date where a leapsecond is added HOT 4
- Bug in test_oscelt and test_oscltx HOT 3
- 3 Tests failing on Macos M1 Pro HOT 5
- Implementation of sphlat calls sphcyl by mistake HOT 4
- tkfram returns transposed result HOT 5
- error importing spiceypy - (--no-cache-dir didn't work) HOT 10
- Trouble Furnishing Files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spiceypy.