!sENfoZnXsOePhaLRJE:matrix.org

poliastro

265 Members
General chat about poliastro, a fast, easy to use Python library for interactive Astrodynamics and Orbital Mechanics https://docs.poliastro.space28 Servers

Load older messages


SenderMessageTime
17 Jul 2023
@astrojuanlu:matrix.orgastrojuanlu this is the right place to ask bahar21 :) what have you tried? 12:18:39
@bahar21:matrix.orgbahar21 Thank you! This is what I'm doing: solar_system_ephemeris.set("jpl") start_date = Time("2022-07-11 12:00:00", scale="utc") sso_orb = Orbit.from_classical(Earth, a, ecc, inc, raan, argp, int_nu, epoch=start_date, plane=Planes.EARTH_EQUATOR) num_orb = 2 end_nu = int_nu.value + num_orb * 2 * np.pi << u.rad num_samples = int(np.rad2deg(end_nu).value) end_date = sso_orb.propagate(num_orb * sso_orb.period).epoch epochs = time_range(start=start_date.value, periods=num_samples, end=end_date.value) moon_position = build_ephem_interpolant(body=Moon, period=Moon.period, t_span=epochs, attractor=Earth) The num_samples is important, because I will implement the moon's position into the 3rd body perturbation function and that into a system of nonlinear differential equations, I will be integrating with Runge Kuttah. Every other value I have sampled for example the true anomalies is also that many. I get the samples without any errors when I use the default 'periods = 50' in the time_range function, but when I specify that I get the following errors: Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm Community Edition 2023.1.2\plugins\python-ce\helpers\pydev\pydevd.py", line 1496, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "C:\Program Files\JetBrains\PyCharm Community Edition 2023.1.2\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "D:\Masterarbeit\PythonTool\TSS_1dof_Runge_Kutta.py", line 77, in moon_position = build_ephem_interpolant(body=Moon, File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\poliastro\ephem.py", line 56, in build_ephem_interpolant ephem = Ephem.from_body(body, epochs, attractor=attractor) File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\poliastro\ephem.py", line 230, in from_body .represent_as(CartesianRepresentation, CartesianDifferential) File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\astropy\coordinates\baseframe.py", line 1127, in represent_as raise TypeError( TypeError: Frame data has no associated differentials (i.e. the frame has no velocity data) - represent_as() only accepts a new representation. 12:57:18
@bahar21:matrix.orgbahar21 *

Thank you!
This is what I'm doing:
\n
solar_system_ephemeris.set("jpl")
start_date = Time("2022-07-11 12:00:00", scale="utc")
sso_orb = Orbit.from_classical(Earth, a, ecc, inc, raan, argp, int_nu, epoch=start_date, plane=Planes.EARTH_EQUATOR)

num_orb = 2
end_nu = int_nu.value + num_orb * 2 * np.pi << u.rad
num_samples = int(np.rad2deg(end_nu).value)
end_date = sso_orb.propagate(num_orb * sso_orb.period).epoch
epochs = time_range(start=start_date.value, periods=num_samples, end=end_date.value)
moon_position = build_ephem_interpolant(body=Moon,
period=Moon.period,
t_span=epochs,
attractor=Earth)

The num_samples is important, because I will implement the moon's position into the 3rd body perturbation function and that into a system of nonlinear differential equations, I will be integrating with Runge Kuttah.
Every other value I have sampled for example the true anomalies is also that many.

I get the samples without any errors when I use the default 'periods = 50' in the time_range function, but when I specify that I get the following errors:

Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2023.1.2\plugins\python-ce\helpers\pydev\pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2023.1.2\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:\Masterarbeit\PythonTool\TSS_1dof_Runge_Kutta.py", line 77, in
moon_position = build_ephem_interpolant(body=Moon,
File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\poliastro\ephem.py", line 56, in build_ephem_interpolant
ephem = Ephem.from_body(body, epochs, attractor=attractor)
File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\poliastro\ephem.py", line 230, in from_body
.represent_as(CartesianRepresentation, CartesianDifferential)
File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\astropy\coordinates\baseframe.py", line 1127, in represent_as
raise TypeError(
TypeError: Frame data has no associated differentials (i.e. the frame has no velocity data) - represent_as() only accepts a new representation.

12:57:59
@bahar21:matrix.orgbahar21 *

Thank you!
This is what I'm doing:

solar_system_ephemeris.set("jpl")
start_date = Time("2022-07-11 12:00:00", scale="utc")
sso_orb = Orbit.from_classical(Earth, a, ecc, inc, raan, argp, int_nu, epoch=start_date, plane=Planes.EARTH_EQUATOR)

num_orb = 2
end_nu = int_nu.value + num_orb * 2 * np.pi << u.rad
num_samples = int(np.rad2deg(end_nu).value)
end_date = sso_orb.propagate(num_orb * sso_orb.period).epoch
epochs = time_range(start=start_date.value, periods=num_samples, end=end_date.value)
moon_position = build_ephem_interpolant(body=Moon,
period=Moon.period,
t_span=epochs,
attractor=Earth)

The num_samples is important, because I will implement the moon's position into the 3rd body perturbation function and that into a system of nonlinear differential equations, I will be integrating with Runge Kuttah.
Every other value I have sampled for example the true anomalies is also that many.

I get the samples without any errors when I use the default 'periods = 50' in the time_range function, but when I specify that I get the following errors:

Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2023.1.2\plugins\python-ce\helpers\pydev\pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2023.1.2\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:\Masterarbeit\PythonTool\TSS_1dof_Runge_Kutta.py", line 77, in
moon_position = build_ephem_interpolant(body=Moon,
File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\poliastro\ephem.py", line 56, in build_ephem_interpolant
ephem = Ephem.from_body(body, epochs, attractor=attractor)
File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\poliastro\ephem.py", line 230, in from_body
.represent_as(CartesianRepresentation, CartesianDifferential)
File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\astropy\coordinates\baseframe.py", line 1127, in represent_as
raise TypeError(
TypeError: Frame data has no associated differentials (i.e. the frame has no velocity data) - represent_as() only accepts a new representation.

12:58:06
@bahar21:matrix.orgbahar21 *

Thank you!
This is what I'm doing:

solar_system_ephemeris.set("jpl")
start_date = Time("2022-07-11 12:00:00", scale="utc")
sso_orb = Orbit.from_classical(Earth, a, ecc, inc, raan, argp, int_nu, epoch=start_date, plane=Planes.EARTH_EQUATOR)

num_orb = 2
end_nu = int_nu.value + num_orb * 2 * np.pi << u.rad
num_samples = int(np.rad2deg(end_nu).value)
end_date = sso_orb.propagate(num_orb * sso_orb.period).epoch
epochs = time_range(start=start_date.value, periods=num_samples, end=end_date.value)
moon_position = build_ephem_interpolant(body=Moon,
period=28*u.d,
t_span=epochs,
attractor=Earth)

The num_samples is important, because I will implement the moon's position into the 3rd body perturbation function and that into a system of nonlinear differential equations, I will be integrating with Runge Kuttah.
Every other value I have sampled for example the true anomalies is also that many.

I get the samples without any errors when I use the default 'periods = 50' in the time_range function, but when I specify that I get the following errors:

Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2023.1.2\plugins\python-ce\helpers\pydev\pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2023.1.2\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:\Masterarbeit\PythonTool\TSS_1dof_Runge_Kutta.py", line 77, in
moon_position = build_ephem_interpolant(body=Moon,
File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\poliastro\ephem.py", line 56, in build_ephem_interpolant
ephem = Ephem.from_body(body, epochs, attractor=attractor)
File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\poliastro\ephem.py", line 230, in from_body
.represent_as(CartesianRepresentation, CartesianDifferential)
File "C:\Users\BAHAR.conda\envs\myenv\lib\site-packages\astropy\coordinates\baseframe.py", line 1127, in represent_as
raise TypeError(
TypeError: Frame data has no associated differentials (i.e. the frame has no velocity data) - represent_as() only accepts a new representation.

13:00:02
19 Jul 2023
@redsharpbyte:matrix.orgRedThank you Poliastro ! https://twitter.com/redotics/status/1681057136816660486 That is me trying to see where CHANDRAYAAN-3 is, couple of days ago :)20:55:07
25 Jul 2023
@aisulu:matrix.orgAisulu Burkitbayeva joined the room.03:45:32
@aisulu:matrix.orgAisulu BurkitbayevaHi) I wanted to ask if your library permits calculating and visualising Earth Coverage by Satellites in Circular Orbit? 03:48:31
3 Aug 2023
@globalymbe:matrix.orgAndrew Lewis joined the room.06:38:19
@globalymbe:matrix.orgAndrew LewisHI there, we're a new startup called Globalymbe Limited researching and developing guidance algorithms. As an ouvre question, does anyone know any good books which discuss the use of this poliastro library, please?06:40:15
@astrojuanlu:matrix.orgastrojuanlu Hi Andrew Lewis, I'm not aware of any books (that would be so cool). You have plenty of examples in https://docs.poliastro.space if that helps 06:41:56
@globalymbe:matrix.orgAndrew Lewiswow you are a gem, astrojuanlu, thank you very much. Tally ho.06:42:43
@globalymbe:matrix.orgAndrew LewisI have just ordered a VR headset and am looking into creating £D VR visualizations from this library of orbital simulations. Any also interested in this?06:46:25
@globalymbe:matrix.orgAndrew Lewisthats 3D not £D. apologies06:46:44
@astrojuanlu:matrix.orgastrojuanlu
In reply to @globalymbe:matrix.org
I have just ordered a VR headset and am looking into creating £D VR visualizations from this library of orbital simulations. Any also interested in this?
that sounds awesome 😍 keep us posted!
06:48:02
@globalymbe:matrix.orgAndrew LewisYes I shall. The trick is converting 2D representations of 3D into VR stereo vision. I may try Unity or Blender?06:49:17
@astrojuanlu:matrix.orgastrojuanlupoliastro does 3D through Plotly and Cesium: https://docs.poliastro.space/en/stable/gallery.html06:51:02
@globalymbe:matrix.orgAndrew Lewiswow, that's very interesting. I shall investigate whether that needs converting any more? Many thanks, must dash, speak again soon one morning.06:52:18
15 Aug 2023
@cartern:matrix.orgcartern joined the room.16:15:40
@cartern:matrix.orgcarternPoliastro crashes whenever I try to plot. I'm using the examples scripts given in the documentation. Any idea why this is happening? In python, I get either error "segmentation fault:11" or "Illegal instruction:4". In Jupyterlab, I get "The kernel for Untitled.ipynb appears to have died. It will restart automatically."16:18:42
@astrojuanlu:matrix.orgastrojuanlu
In reply to @cartern:matrix.org
Poliastro crashes whenever I try to plot. I'm using the examples scripts given in the documentation. Any idea why this is happening? In python, I get either error "segmentation fault:11" or "Illegal instruction:4". In Jupyterlab, I get "The kernel for Untitled.ipynb appears to have died. It will restart automatically."
Hey cartern, can you share a complete traceback from Python? and what plotter are you trying to use, relevant versions and so on
16:44:28
@cartern:matrix.orgcarternI don't get a traceback message other than "segmentation fault" or "illegal instruction" (it says nothing else). I tried using traceback.print_exc() but it still doesn't output anything. Is this code https://docs.poliastro.space/en/stable/examples/Catch%20that%20asteroid%21.html self-contained or should I be importing matplotlib somewhere?17:01:40
@cartern:matrix.orgcarternThanks btw17:01:59
@astrojuanlu:matrix.orgastrojuanlu
In reply to @cartern:matrix.org

I don't get a traceback message other than "segmentation fault" or "illegal instruction" (it says nothing else). I tried using traceback.print_exc() but it still doesn't output anything.

Is this code

https://docs.poliastro.space/en/stable/examples/Catch%20that%20asteroid%21.html

self-contained or should I be importing matplotlib somewhere?

if you execute the cells one by one, which cell produces the crash?
17:02:32
@cartern:matrix.orgcarternEarth.plot(EPOCH)17:02:50
@astrojuanlu:matrix.orgastrojuanluokay, that helps. `Earth.plot(EPOCH)` does a bunch of stuff, so we'd need to dig what exactly causes the crash17:04:32
@astrojuanlu:matrix.orgastrojuanlu can you replace that cell with ``` from poliastro.plotting.orbit.plotter import OrbitPlotter plotter = OrbitPlotter() plotter.plot_body_orbit(Earth) ``` and see if it also fails, and if so, identify which line produces the crash cartern: 17:08:09
@cartern:matrix.orgcarternModuleNotFoundError Traceback (most recent call last) Cell In[4], line 1 ----> 1 from poliastro.plotting.orbit.plotter import OrbitPlotter ModuleNotFoundError: No module named 'poliastro.plotting.orbit'17:10:09
@cartern:matrix.orgcarternI used from poliastro.plotting import StaticOrbitPlotter plotter = StaticOrbitPlotter() both of which were fine, but then with plotter.plot_body_orbit(Earth,EPOCH) I got the same crashing behavior, with no message17:20:25
@astrojuanlu:matrix.orgastrojuanluwhat version of poliastro are you using then?18:06:00

Show newer messages


Back to Room ListRoom Version: 4