Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Added gabbard.py in poliastro.plotting #1464

Merged
merged 6 commits into from
Feb 10, 2022
Merged

Conversation

TheBuffer
Copy link
Contributor

Tried adding a Static Gabbard Plotter as described in #1431
and tested it out with the COSMOS 1408 DEB data
Screenshot from 2022-02-04 14-12-07

Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @TheBuffer for this contribution! 🎉 I rebased your branch and everything looks good initially. I'm going to review this in depth in a few hours.

@codecov
Copy link

codecov bot commented Feb 7, 2022

Codecov Report

Merging #1464 (7d2760b) into main (a1d8c24) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1464      +/-   ##
==========================================
+ Coverage   91.83%   91.91%   +0.07%     
==========================================
  Files          97       98       +1     
  Lines        4459     4500      +41     
  Branches      426      431       +5     
==========================================
+ Hits         4095     4136      +41     
  Misses        274      274              
  Partials       90       90              
Impacted Files Coverage Δ
src/poliastro/plotting/gabbard.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1d8c24...7d2760b. Read the comment docs.

@TheBuffer
Copy link
Contributor Author

Should I try adding the Dynamic Gabbard Plots and maybe integrating something which takes in the Debris Ephemerides as an input?

Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good, thanks @TheBuffer for your contribution! I'd say let's focus on static Gabbard plots for now to make things simpler, we can expand it later.

I left some comments, but most importantly this will need some tests. You can take inspiration from the image tests we have for other plotters, that compare an expected outcome with the actual one:

https://github.com/poliastro/poliastro/tree/main/tests/tests_plotting

src/poliastro/plotting/gabbard.py Outdated Show resolved Hide resolved
src/poliastro/plotting/gabbard.py Outdated Show resolved Hide resolved
src/poliastro/plotting/gabbard.py Outdated Show resolved Hide resolved
src/poliastro/plotting/gabbard.py Outdated Show resolved Hide resolved
src/poliastro/plotting/gabbard.py Outdated Show resolved Hide resolved
and added baseline image test_static_gabbard_plotting.png.
Added a small Orbit List of COSMOS 1408 Debris Orbits in poliastro/examples.py
to test the Gabbard Plot
Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting to look good! Left only one comment. With that, I'm 👍🏽 as soon as the tests pass.

src/poliastro/examples.py Outdated Show resolved Hide resolved
@astrojuanlu
Copy link
Member

There seem to be some subtle (unimportant) typography differences between the baseline image and the result. I downloaded result.png via SSH, it's this:

result

and the difference is this:

result-failed-diff

You can probably just download result.png and commit it as the baseline.

… list

from examples.py to test_static_gabbard_plotting.py
Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks again @TheBuffer !

@astrojuanlu astrojuanlu merged commit eaff92a into poliastro:main Feb 10, 2022
@astrojuanlu astrojuanlu mentioned this pull request Feb 10, 2022
@TheBuffer
Copy link
Contributor Author

:))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants