tardis icon indicating copy to clipboard operation
tardis copied to clipboard

adding RPacketPlotter to TARDIS

Open jayantbhakar opened this issue 2 years ago • 30 comments

:pencil: Description

Type: :rocket: feature

This PR is based on the Montecarlo 2D packet visualization project. It aims to write a module for the RPacketPlotter tool which creates a 2D animated graph of the RPackets or the real packets used in the Montecarlo simulation.

Example code to plot is shown below:

rpacket_plotter = RPacketPlotter.from_simulation(sim, no_of_packets=10) rpacket_plotter.generate_plot()

Here's how the plot looks like:

Light Theme:

Screencast-from-02-09-22-12-47-5

Dark theme:

darktheme_PR

Also, link issues affected by this pull request by using the keywords: close, closes, closed, fix, fixes, fixed, resolve, resolves or resolved.

:pushpin: Resources

Examples, notebooks, and links to useful references.

:vertical_traffic_light: Testing

How did you test these changes?

  • [ ] Testing locally: Here is the log of pytests that I have run locally.

Screenshot from 2022-10-10 10-05-38

:ballot_box_with_check: Checklist

  • [ ] I requested two reviewers for this pull request
  • [ ] I updated the documentation according to my changes
  • [ ] I built the documentation by applying the build_docs label

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

jayantbhakar avatar Aug 21 '22 07:08 jayantbhakar

Codecov Report

Attention: Patch coverage is 98.54369% with 3 lines in your changes missing coverage. Please review.

Project coverage is 69.67%. Comparing base (e88a31a) to head (d83ceae). Report is 1 commits behind head on master.

Files Patch % Lines
tardis/visualization/tools/rpacket_plot.py 96.73% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2119      +/-   ##
==========================================
+ Coverage   69.25%   69.67%   +0.42%     
==========================================
  Files         179      181       +2     
  Lines       14262    14468     +206     
==========================================
+ Hits         9877    10081     +204     
- Misses       4385     4387       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 21 '22 07:08 codecov[bot]

Yeah, I think before writing tests and docs, I should work on adding some functionalities that are left. Today I am working on the dark theme.

jayantbhakar avatar Aug 23 '22 12:08 jayantbhakar

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

*beep* *bop*

Hi, human.

The docs workflow has succeeded :heavy_check_mark:

Click here to see your results.

tardis-bot avatar Sep 06 '22 17:09 tardis-bot

image in here, change it from ```ith`` to ```i-th```

sonachitchyan avatar Sep 06 '22 20:09 sonachitchyan

View / edit / reply to this conversation on ReviewNB

MarkMageeAstro commented on 2022-09-07T09:54:57Z ----------------------------------------------------------------

properties (specifically...

with respect to the x-axis...

used (along...

calculate the x and y...


View / edit / reply to this conversation on ReviewNB

MarkMageeAstro commented on 2022-09-07T09:54:58Z ----------------------------------------------------------------

Here the theme parameter...

Remove only

By default the light theme


View / edit / reply to this conversation on ReviewNB

MarkMageeAstro commented on 2022-09-07T09:54:59Z ----------------------------------------------------------------

Is there supposed to be something here? It doesn't show anything for me even in the docs preview


View / edit / reply to this conversation on ReviewNB

MarkMageeAstro commented on 2022-09-07T09:55:00Z ----------------------------------------------------------------

The Play button

The animation

to reach any


View / edit / reply to this conversation on ReviewNB

MarkMageeAstro commented on 2022-09-07T09:55:01Z ----------------------------------------------------------------

Does hovering need to be highlighted like this?

will show its properties


View / edit / reply to this conversation on ReviewNB

jaladh-singhal commented on 2022-09-07T15:04:34Z ----------------------------------------------------------------

Excellent! This was much needed


@jayantbhakar could you please rerun these tests?

atharva-2001 avatar Jan 20 '23 15:01 atharva-2001

/azp run compare-refdata

jayantbhakar avatar May 24 '23 08:05 jayantbhakar

Commenter does not have sufficient privileges for PR 2119 in repo tardis-sn/tardis

azure-pipelines[bot] avatar May 24 '23 08:05 azure-pipelines[bot]

/azp run compare-refdata

andrewfullard avatar May 24 '23 12:05 andrewfullard

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar May 24 '23 12:05 azure-pipelines[bot]

We would like to resume this and get it merged. We need to investigate why some tests are failing -- any ideas?

jamesgillanders avatar Nov 10 '23 15:11 jamesgillanders

@jayantbhakar Can you try rebasing this PR? There have been changes to the testing framework, and we would like to see if we can get these outstanding failing tests resolved.

jamesgillanders avatar Nov 10 '23 15:11 jamesgillanders

@jayantbhakar Are you still able to work on this, or should we close the PR?

jamesgillanders avatar Jan 19 '24 15:01 jamesgillanders

I am trying to rebase it and I am facing some conflicts in the file "docs/io/visualization/montecarlo_packet_visualization.ipynb". Would appreciate some help.

jayantbhakar avatar Jan 19 '24 19:01 jayantbhakar

Hi Jayant, thanks for the reply. I will take a look soon and get back with some guidance!

jamesgillanders avatar Jan 23 '24 17:01 jamesgillanders

Hi @jayantbhakar, what's the issue you're running into?

MarkMageeAstro avatar Feb 02 '24 12:02 MarkMageeAstro

I am getting merge conflicts in the file "montecarlo_packet_visualization.ipynb". I don't think anyone else has worked on it, cuz this was related to my project.

jayantbhakar avatar Feb 04 '24 06:02 jayantbhakar

There may have been some changes to some of the properties you were tracking due to the ongoing restructure work. What are the conflicts you're finding?

MarkMageeAstro avatar Feb 06 '24 12:02 MarkMageeAstro

After resolving the conflics in rebasing, why are these tests failing now?

jayantbhakar avatar Feb 10 '24 18:02 jayantbhakar

Hmm, I'm not very familiar with the tests, but it looks like it's something to do with the atomic data. Maybe it's changed? @andrewfullard might know

MarkMageeAstro avatar Feb 14 '24 17:02 MarkMageeAstro

Tests are failing due to changes in the structure of the code. We no longer have a simulation.runner object. Instead we have advance_state() and iterate() functions, and a simulation.simulation_state object. I think the simulation_state object is where the packet tracking information is located and is what should be tested against.

Docs are failing because of an intermittent error with loading the atom data. It's not caused by this PR.

andrewfullard avatar Feb 14 '24 18:02 andrewfullard

@jamesgillanders do you or @MarkMageeAstro have time to rebase this?

andrewfullard avatar Apr 12 '24 14:04 andrewfullard

Okay, I did the rebase so now it just needs some cleanup to the current code structure.

andrewfullard avatar Apr 15 '24 16:04 andrewfullard

@jayantbhakar What is left for us to check/review with this PR? I haven't seen any updates since Andrew's rebasing -- did that resolve the issues you were facing, or is there more work needed?

jamesgillanders avatar Jun 26 '24 14:06 jamesgillanders