You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
High-level concept
Add the ability to initialise an Orbit() object from a table/dataframe containing orbital elements.
Explain the relevance to sbpy
sbpy Orbit() documentation only references from_mpc and from_horizons as the way to set up an orbit (unless I've missed something).
Proposal details
It is possible to create an empty Orbit() instance and fill the fields manually, this would probably just need a wrapper function. This functionality would be handy for dealing with simulated orbits, e.g. the LINCC Simulated Solar System Products Data Base
Example (pseudo-)code
e.g. from dataframe
df_orb = ... # pandas dataframe with orbital element fields ["a","e","incl","Omega","w","M"]
elem = Orbit() # empty orbit instance
Fill fields (remember astropy units):
orb_col = list(df_orb)]
orb_unit = [u.au,u.dimensionless_unscaled,u.deg,u.deg,u.deg,u.deg]
for i in range(len(orb_col)):
elem[orb_col[i]] = df_orb[orb_col[i]] * orb_unit[i]
Thanks, @jrob93 . I actually have an active pull request that aims to improve the documentation and this could be a good example. Or maybe for our tutorial repository. (We definitely need this in the SSSC technical documentation.)
I think the main problem with the pandas dataframe is that it lacks (astropy) units, right? But we can go through an astropy QTable. How about something like this:
Ah cool, that's much better using QTable. I've never really used tables before because I was more familiar with pandas when I started learning astropy type things, but yes the units are easier with tables. I'm nearly finished the notebook you requested for the SSSC technical docs so I'll use those lines in it.
This is a request for
The requested changes will be implemented by
High-level concept
Add the ability to initialise an
Orbit()
object from a table/dataframe containing orbital elements.Explain the relevance to sbpy
sbpy
Orbit()
documentation only referencesfrom_mpc
andfrom_horizons
as the way to set up an orbit (unless I've missed something).Proposal details
It is possible to create an empty
Orbit()
instance and fill the fields manually, this would probably just need a wrapper function. This functionality would be handy for dealing with simulated orbits, e.g. the LINCC Simulated Solar System Products Data BaseExample (pseudo-)code
e.g. from dataframe
Fill fields (remember astropy units):
Add extra required fields:
The text was updated successfully, but these errors were encountered: