Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstrating the nelements and the species_list functionality in the SDEC plot notebook #1665

Merged
merged 4 commits into from
Jul 16, 2021

Conversation

atharva-2001
Copy link
Member

@atharva-2001 atharva-2001 commented Jun 24, 2021

This PR adds documentation for nelements and species_list options in the SDEC plot notebook.

Description

The nelements functionality was added in PR #1506
The species_list functionality was added in PR #1539
This PR demonstrates these two functionalities in the notebook.

Motivation and context

How has this been tested?

  • Testing pipeline.
  • Other.

Examples

Here is the link to the notebook in my documentation
Link to the notebook on nbviewer

Type of change

  • Bug fix.
  • New feature.
  • Breaking change.
  • None of the above.

Checklist

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
    • (optional) I have built the documentation on my fork following the instructions.
  • I have assigned and requested two reviewers for this pull request.

…lots notebook

and fixing the link to the configuration schema
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@atharva-2001 atharva-2001 changed the title demonstrating the nelements and the species_list option in the SDEC p… Demonstrating the nelements and the species_list functionality in the SDEC plot notebook Jun 24, 2021
@tardis-bot
Copy link
Contributor

Before a pull request is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be close to 100%.
  • Is the code tidy?
    • No unnecessary print lines or code comments.

2 similar comments
@tardis-bot
Copy link
Contributor

Before a pull request is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be close to 100%.
  • Is the code tidy?
    • No unnecessary print lines or code comments.

@tardis-bot
Copy link
Contributor

Before a pull request is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be close to 100%.
  • Is the code tidy?
    • No unnecessary print lines or code comments.

@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #1665 (553ef19) into master (05f759a) will decrease coverage by 0.63%.
The diff coverage is n/a.

❗ Current head 553ef19 differs from pull request most recent head 29706dc. Consider uploading reports for the commit 29706dc to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1665      +/-   ##
==========================================
- Coverage   61.89%   61.26%   -0.64%     
==========================================
  Files          62       63       +1     
  Lines        5732     5798      +66     
==========================================
+ Hits         3548     3552       +4     
- Misses       2184     2246      +62     
Impacted Files Coverage Δ
tardis/tardis/montecarlo/spectrum.py 65.51% <0.00%> (-3.72%) ⬇️
tardis/tardis/simulation/base.py 83.33% <0.00%> (-1.84%) ⬇️
tardis/tardis/model/base.py 88.29% <0.00%> (ø)
tardis/tardis/model/density.py 92.53% <0.00%> (ø)
tardis/tardis/montecarlo/montecarlo_numba/base.py 28.73% <0.00%> (ø)
...rdis/tardis/montecarlo/montecarlo_numba/vpacket.py 18.36% <0.00%> (ø)
...dis/tardis/montecarlo/montecarlo_numba/r_packet.py 25.43% <0.00%> (ø)
.../tardis/montecarlo/montecarlo_numba/interaction.py 29.72% <0.00%> (ø)
...dis/montecarlo/montecarlo_numba/formal_integral.py 49.82% <0.00%> (ø)
tardis/tardis/scripts/tardis.py 0.00% <0.00%> (ø)
... and 1 more

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 05f759a...29706dc. Read the comment docs.

@atharva-2001 atharva-2001 marked this pull request as ready for review June 25, 2021 14:10
Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

Thanks for making this PR - it was long due!

Few suggestions:

  • Add these two sections also on matplotlib section (besides plotly) because that is shown first and is preferred in research papers
  • Why have you used real packets_mode? SDEC plot looks better with virtual packets mode as you might have noticed (due to noise reduction) and it's also default, please change that. I guess it's possibly because you're using tardis_example.yml that have virt packet logging disabled but SDEC plot and line info widget expects opposite - create an issue for that and work on it if you like :)

@jaladh-singhal
Copy link
Member

Also please check what happens when both nelments and species_list are specified - AFAIR one takes precedence over other and it should be documented as well

Copy link
Contributor

@MarkMageeAstro MarkMageeAstro left a comment

Choose a reason for hiding this comment

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

Good job, @atharva-2001. My only comment is that I think for the nelements/ion plots we should set the wavelength range. It'll make it easier to see the different colours.

Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. One minor but thing: it'll be better if you put 3 cells you added in matpltolib section, before "plotting flux instead of luminosity" since it and hiding spectrum are not as important as nelments and species_list is

Also I see you're using virtual packets now - that's good but don't forget creating issue for this:

I guess it's possibly because you're using tardis_example.yml that have virt packet logging disabled but SDEC plot and line info widget expects opposite - create an issue for that and work on it if you like :)

Copy link
Contributor

@MarkMageeAstro MarkMageeAstro left a comment

Choose a reason for hiding this comment

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

I can't leave comments on the notebook, so I'm just putting them all here. A few small grammar changes.

  1. There are a few instances throughout where the plot is just referred to as 'SDEC plot', but there should be either 'an' or 'the' in front of it. These are two examples:
  • "Now, import the plotting interface for SDEC plot..." should be "Now, import the plotting interface for the SDEC plot..."
  • "By default, SDEC plot is produced..." should be "By default, an SDEC plot is produced..."
  1. "Since packets_mode is 1st argument..." -> "Since packets_mode is the first argument..."
  2. "By default, modeled spectrum is shown in SDEC plot." -> "By default, the model spectrum is shown in SDEC plot."
  3. "This method takes exact same arguments" -> "This method takes the exact same arguments"
  4. "In similar manner" -> "In a similar manner"
  5. " thereby providing you more" -> " thereby providing you with more"

Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

Thanks for all the changes. Looks good to me!

@marxwillia marxwillia merged commit d3f13ed into tardis-sn:master Jul 16, 2021
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
Demonstrating the `nelements` and the `species_list` functionality in the SDEC plot notebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants