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

Fixes to cosmic ray tasks and closes #76, closes #57, and closes #17 #94

Merged
merged 1 commit into from
May 28, 2014

Conversation

crawfordsm
Copy link
Member

This is a number of minor fixes to the cosmic ray task to address issues #76, #57, and #17.

In cosmicray_median, the background value has been made to match the documentation so that if None is given, the std is calculated.

A test was added for gbox.

cosmicray_clean now returns a copy of the passed ccddata object with the data and mask values updated accordingly.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.18%) when pulling d081889 on crawfordsm:cosmicray_fixes into 9dcf927 on astropy:master.

# Only look at the data array
if isinstance(data, np.ma.MaskedArray):
data = data.data

Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason not to use the mask here?

Copy link
Member Author

Choose a reason for hiding this comment

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

The masked array makes a difference to the background calculation and the median filter calculation. However, after that, individual pixels are being looked at so using a masked array doesn't make a difference. The reason to switch to mask is so that the object returned is just a normal boolean array so that it is easily integrated back into ccddata.mask. I actually struggled with this a bit as I went back and forth but think this is the best method.

@mwcraig
Copy link
Member

mwcraig commented May 28, 2014

@crawfordsm -- lookss great, just the one question above.

crawfordsm added a commit that referenced this pull request May 28, 2014
Fixes to cosmic ray tasks and closes #76, closes #57, and closes #17
@crawfordsm crawfordsm merged commit d358277 into astropy:master May 28, 2014
@crawfordsm crawfordsm deleted the cosmicray_fixes branch February 16, 2016 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants