Skip to content

Create Better Visualise Functionality#303

Open
astjoephysics wants to merge 5 commits intomainfrom
layup_better_visualise
Open

Create Better Visualise Functionality#303
astjoephysics wants to merge 5 commits intomainfrom
layup_better_visualise

Conversation

@astjoephysics
Copy link
Collaborator

Addresses #17, #18, #32, #69 (sort of, we can tweak what's on the tool-tip specifically if needs be), #295

The previous branch and PR #111 is a) out of date, b) calculates orbits incorrectly, c) only handles BKEP input, and d) is just ugly. Made a whole new branch and PR now that creates much nicer and wider scope visualisation tools. Features include:

  • Run in either CLI or Jupyter Notebook (see demo notebook for instructions)
  • Swap between day/night modes
  • Detect input format, infer a reference plane (but with sufficient warning we are doing this), infer an origin (helio vs bary)
  • Convert under the hood into all 4 variants of equatorial vs ecliptic, heliocentric vs barycentric via Sorcha universal_cartesian functions and drawing as generic conic sections, and..
  • ..provide the user with toggles to easily swap between all of these varieties
  • Change reference plane (equatorial or ecliptic) opacity and colour easily
  • Toggle between 2D (choose either 2 side-by-side panes or 1 pane, and choose with of XY/XZ/YZ planes to display) or 3D
  • Uses Assist to plot planet orbit lines (but not markers, we assume there may be multiple input epochs and we don't do any integration of orbits to one common epoch...yet?)
  • Edit the objects being displayed, including planets and input orbits
  • Also created a quick and dirty orbit classifier tag for ease of table sorting (e.g. one of hyperbolic/Inner Oort Cloud/LPC/JFC/NEO/MBA/Mars-crosser/Centaur/TNO/other)
  • Create tool-tips to hover over per orbit to get quick-look orbital element info for that object
  • Support for all orbits from circular to elliptical to hyperbolic
  • Made a demo notebook to showcase how to use it

This all utilises only Plotly and Dash to create an interactive way of visualising plots, much nicer than Matplot itself. Code is (I think) vectorised as far as possible, and up to ~1000 orbits can be plotted before performance starts taking a hit (but at 1000 orbits are you really getting any info?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant