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
Added sum combiner (#500) #508
Conversation
Appveyor build fails on Python 3.6 because it fails to build Scipy. (Appveyor build and test on Python 2.7 succeed) |
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 general this looks really good, I only had a few minor comments.
However I think it should also include a test that tests for the correct uncertainty especially with some combinations of masked and unmasked pixels. Like:
- none masked except one
- none masked (already present but uncertainty isn't checked)
- all masked (already present but uncertainty isn't checked)
- all masked except one
CHANGES.rst
Outdated
@@ -26,6 +26,8 @@ New Features | |||
|
|||
- ``combine`` now accepts ``numpy.ndarray`` as the input ``img_list``. [#493, #503] | |||
|
|||
- Added ```sum``` option in method for ```combime```. [#500] |
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.
Could you also include the PR number [#500, #508]
?
A `~ccdproc.CCDData` object is returned with the data property | ||
set to the sum of the arrays. If the data was masked or any | ||
data have been rejected, those pixels will not be included in the | ||
sum. A mask will be returned, and if a pixel has been |
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.
Maybe include a sentence that if a re-scaled average sum is needed one should do average_combine
and multiply it with the number of images combined.
ccdproc/combiner.py
Outdated
# set up the deviation | ||
uncertainty = uncertainty_func(self.data_arr, axis=0) | ||
# Divide uncertainty by the number of pixel (#309) | ||
# Commented out because it cancels the effect of 'Multiply uncertainty by square root of the number of images' |
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.
I think there should be another line split. Even though 80 is just a "soft limit" I see no reason to make it much longer here.
AppVeyor build only fails on Python 3.6 because it fails to build astroscrappy. |
There seem to be 3 trailing whitespaces:
If these are removed that should fix the Travis build. |
I'm still a bit confused about uncertainty for
It seems somewhat strange that the sum uncertainty isn't a multiplicative of the average combine. In case there is no masked pixel shouldn't it be the uncertainty from average-combine times the number of "combined" pixels? |
I was wrong. Changed in 25c4e68. |
Fixed triple quotes to double quotes
Thanks @hletrd ! |
Please have a look at the following list and replace the "[ ]" with a "[x]" if
the answer to this question is yes.
For documentation changes:
Note that it should not if you changed any examples!
For bugfixes:
For new functionality:
Please note that the last point is not a requirement. It is meant as a check if
the pull request potentially breaks backwards-compatibility.