-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Initial laydown of comparison plots for TestW7. #566
Conversation
4be6db9
to
9365b03
Compare
# for different spectrum quantities all in one figure. | ||
ldl_ax = plt.subplot(111) | ||
ldl_ax.set_title("Deviation in luminosity_density_lambda") | ||
ldl_ax.set_xlabel("N-th packet") |
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.
You are plotting the luminosity density which is used together with the wavelength to form the spectrum.
labeling the x axis N-th packet is wrong.
Plot the data as (x,y) where x is the wavelength and y the luminosity density at that x and call the x-label Wavelength.
@yeganer @unoebauer is this mergeable - with the notice that we will change the plots later? Are there any serious issues left? |
@wkerzendorf, @karandesai-96 - fine with me. The PR looks good and some aesthetic details or additional plotting capabilities can be added later. Merge at will! |
@wkerzendorf @unoebauer Yes I think we can merge this (I'd autosquash it because of all the back and forth during the PR) |
- A call to this method is made by test_spectrum method which asserts spectrum quantities. - The pass / fail status is mentioned on the plot itself, by passing a boolean parameter 'passed' to plot_spectrum. - plot_spectrum is called in different ways from try and except blocks of test_spectrum, for the same.
- Rename obtained_radial1d_model -> result. - Remove semilog scale from plot due to ValueError.
- Use this fixture in TestW7, by creating per-setup subdirectories (currently only W7, would be enhanced by parametrization later). - Directories are named as per git commit hashes.
* Add plot_spectrum method in TestW7 class. - A call to this method is made by test_spectrum method which asserts spectrum quantities. - The pass / fail status is mentioned on the plot itself, by passing a boolean parameter 'passed' to plot_spectrum. - plot_spectrum is called in different ways from try and except blocks of test_spectrum, for the same. * Cosmetic improvements. - Rename obtained_radial1d_model -> result. - Remove semilog scale from plot due to ValueError. * Add fixture for base directory of saving plots. - Use this fixture in TestW7, by creating per-setup subdirectories (currently only W7, would be enhanced by parametrization later). - Directories are named as per git commit hashes.
This PR implements a new design pattern - having a
plot_foo
method inTestW7
class, for eachtest_foo
method. As a first prototype,plot_spectrum
has been added.Checklist holds a track of work done so far and work TODO:
plot_spectrum
to generate a plot for deviation inspectrum.luminosity_density_lambda
againstspectrum.wavelength
is added within.try-except
and make suitable calls.Future enhancements