-
Notifications
You must be signed in to change notification settings - Fork 116
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
Pull request to solve issue #82. #83
Pull request to solve issue #82. #83
Conversation
0.9.25 patch pypi deployment
Hello @adityabharadwaj198 , thanks for submitting! Tests fail for the moment. Don't worry about the Code Quality Checks, we'll fix that at the end. But you should have a look at the "Test and Coverage" one: seems there is a syntax error ! Fix and re-push! |
radis/test/spectrum/test_compare.py
Outdated
s=Radiance_noslit(s) | ||
s._q['radiance_noslit'][0] = np.nan | ||
|
||
plot_diff(s, s*1.2, normalize=True) |
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.
in the test can you also try some other normalization options? Like, "max", "area", etc.
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.
Sure
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.
Hi,
You even added a test! Very good :)
I just suggest you remove the lines you commented.
Minou
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.
Hi,
You even added a test! Very good :)
I just suggest you remove the lines you commented.
Minou
Hey there, I did what you suggested and pushed changes. I also used black to format the code, hope the code quality checks pass this time.
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.
in the test can you also try some other normalization options? Like, "max", "area", etc.
I'm a bit confused about that, I've tried setting normalization_how
manually, and it works, but how can I write a method to test that? Since normalization_how
is an argument of the get_residual
method, and that method is called from plot_diff
method, and there's no normalization_how
argument in that.
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're right! So far I'd include a get_residual(s)
test line in the test file!
@minouHub do we want to have more normalization options in plot_diff ? ("normalize=" could be given the "area" keywords, or a tuple to normalize on a certain range, like in plot ). In any case that would be a separate Issue!
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.
Well, I've never used that in post-processing, so I'm not sure it is necessary.
Codecov Report
@@ Coverage Diff @@
## develop #83 +/- ##
===========================================
+ Coverage 71.16% 71.51% +0.34%
===========================================
Files 113 111 -2
Lines 13517 13545 +28
===========================================
+ Hits 9620 9687 +67
+ Misses 3897 3858 -39 |
Hey there, I fixed the 'Test and Coverage' test, it was indeed a syntax error. |
…8/radis stay update d
Well done with the improvements @adityabharadwaj198
we also have some calls to
Last point is a bigger suggestion:
We may want to use that PR to improve that aswell. In that case I would suggest to:
|
Hey @erwanp , so I was trying to change the max and mean method calls here also, and from what I understand, to check if it's working I should be calling
So a tuple is passed as an argument and |
I agree with @erwanp that normalizing with a tupple is very useful. I did it last week, but I did not realize there was an option for that!!! As @adityabharadwaj198, I have some problems using this option. Here is a simple code that does not work:
The problem comes from the units: 'cm-1' are converted to 'nm' at some points. Therefore, the line 356 in compare.py |
Okay, I'll look into other suggestions @erwanp made. |
I tried to add my test to your branch using this: https://tighten.co/blog/adding-commits-to-a-pull-request |
@minouHub , I checked and it is enabled |
Fixed this. I had to use
Yes, just replacing
As you said, this worked without any problems. And I added the above as a test. |
Thanks for reporting, I opened a different Issue : #85 . We'll remember to activate @adityabharadwaj198 once that Issue is fixed. Also, you are now officially a Maintainer :) |
Well done ! I approved all changes. I'll let @minouHub approve too and then we can merge! |
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 to me :)
Description
This pull request is to address ... the issue here #82.
I've made the changes suggested in the comments related to the issue and pushed them to my forked repo. If anyone wants to run a test to see if the changes fix the issue, they can run this:
Fixes #82