-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
Add option to add Observed Spectrum #1761
Add option to add Observed Spectrum #1761
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1761 +/- ##
==========================================
- Coverage 58.38% 58.25% -0.14%
==========================================
Files 66 66
Lines 6705 6721 +16
==========================================
Hits 3915 3915
- Misses 2790 2806 +16
Continue to review full report at Codecov.
|
aca7d56
to
1a53a16
Compare
Before a pull request is accepted, it must meet the following criteria:
|
1a53a16
to
4b5caea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start @atharva-2001 but I think there are few things unclear at your end - feel free to ask.
Also can you document this in SDEC notebook so that we can try this functionalities out?
Black check pipeline fails |
3ee40ac
to
bae1e3c
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
e726ec0
to
b039368
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to think about the colour scheme, as cyan does not look great for the observed spectrum
b039368
to
01191ac
Compare
c43f5fa
to
19dfbe5
Compare
e08bebf
to
d22e044
Compare
d22e044
to
92afff7
Compare
View / edit / reply to this conversation on ReviewNB jaladh-singhal commented on 2021-09-17T11:21:23Z Instead of this long cell, put these numbers in a csv/ascii file named "demo_observed_spectrum.csv" (at same level as demo.hdf) and read from there using pandas and then create quantitites |
There was a problem hiding this 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, colors look nice to me - it's closer to be merged.
You need to resolve merge conflict and address my comment about putting data in a file instead of cell.
946bb12
to
973d18f
Compare
@@ -13,8 +13,8 @@ | |||
"execution_count": null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not directly assign vertical slices of data
to both observed_spectrum_wavelength
and observed_spectrum_flux
. Please look into ways of indexing ndarray to learn how to do it. If that's not possible with numpy, there's always pandas to do read almost all file formats. then you can just assign series to both variables.
Always remember, iterating is the last we should do with numpy & pandas as it reduces speed.
Reply via ReviewNB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atharva-2001 thank you for reading it from file - it's much cleaner now.
I've some concerns about your implementation of reading - I guess it should be quick to address. You can always take help related to this on computing channel if you want.
PS: You forgot to hit re-request review button this time too but I did review it 😅 - make sure to remember this time.
fc6d526
to
8a0b575
Compare
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 1.32%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
@jaladh-singhal Thank you for reviewing it! |
84f01a0
to
cb30a3a
Compare
@atharva-2001 You don't really need to wait for docs to build. First, because we don't reviewe immediately anyways 😄 and second because we (atleast I) review rendered notebook using nbreview - docs build is just sanity check in this case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks neater now! Good work!
There was a problem hiding this 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 - if you fix the few minor comments then I'd be happy to merge!
907785d
to
835477b
Compare
835477b
to
bc5559f
Compare
bc5559f
to
c737c2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
This reverts commit 45bb948.
This PR adds an option to plot an observed spectrum in the SDEC plot.
Description
The option asks for a tuple of Astropy quantities, containing the wavelength and the luminosity for the observed spectrum and adds a line plot displaying the Observed Spectrum.
Motivation and context
How has this been tested?
Examples
documentation: https://atharva-2001.github.io/tardis/branch/observed_spectrum/io/visualization/sdec_plot.html
Type of change
Checklist