-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Cosmic ray detection. #1
Conversation
@eteq @astrofrog @crawfordsm @cdeil @larrybradley As per discussion offline, we decided that it would be best to make my cosmic ray detection code an affiliated package and not pull it into the core at this time. As such, I have ported it here and have renamed it. Would you be willing to do a quick code review on this? I think most of the hard work is done from discussion here: astropy/imageutils#35. However, I thought it could still be useful to have it looked at one more time. Once we are happy, I will pull this in and would like to release this on PyPi. Thanks for all of your help with this. P.S. Can someone turn on the Travis build for this repo? |
@cmccully - Thanks! Currently the repo is called The name My suggestion would also be to rename the repo ... I always find it confusing if people use different names (e.g. .... ah, better not point fingers here ...). |
You have a lot of information duplicated in |
return (crmask.astype(np.bool), cleanarr) | ||
|
||
|
||
def updatemask(np.ndarray[np.float32_t, ndim=2, mode='c', cast=True] data, |
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.
updatemask
-> update_mask
(I think that's a PEP8 rule or at least common in Python, plus consistent with clean_meanmask
below)
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.
Done.
On the point about naming, this is tricky. I was aware that scrappy exists on PyPi. That is why the repo has a different name. One convention is that we could have the pip name be astro-scrappy and the package name be astro_scrappy. This makes the package name a little long, but would maybe less confusing. I am open to discussion on this, but would not be too happy about going back to the drawing board on names. There has already been a lot of email traffic about what to call this. If someone has a good suggestion for a name I am will consider it. |
My 2 cents: I hate it when it's That's kind of what we did here: https://github.com/astroplanners/astroplan |
I would be ok with astroscrappy or astro_scrappy. I think pip automatically changes underscores to dashes: http://stackoverflow.com/questions/16385099/why-does-pip-convert-underscores-to-dashes. Other thoughts? |
@eteq @astrofrog @crawfordsm @cdeil @larrybradley Any other comments before I pull this in and release it? I am leaning towards converting the name from astro-scrappy to astroscrappy. Any other comments on the name? As for the duplication with astropy-core, I think I would like to release this basically as is, but then do a 1.1 release with astropy 1.1 that removes the duplication. Does this sound reasonable? Any other comments before I release this? |
With this branch, I see one test error on my Macbook (with latest Mac OS X and clang): For the docs there's this warning:
and the I think it would be nice if the repo is also renamed from |
@cdeil Sorry about that. I had fixed that issue on my local machine, but forgot to push the update. I just pushed the update and removed the incorrect syntax markup. Can you test it again? Thanks. |
@cmccully – Now tests pass. One more think I'd suggest is to make the code Py 2/3 compatible without |
Note that not everything needs to be done in this PR by the way - for example the 2to3 could probably be left to another PR. It would be good to set up appveyor too, and that's also something that can be done in another PR. |
Fortunately I don't need 2to3 so I just changed that flag. Anything else, before I should release it? |
@astrofrog or @embray --could you flip the switch for this on travis? |
'optmed25', 'medfilt3', 'medfilt5', 'medfilt7', | ||
'sepmedfilt3', 'sepmedfilt5', 'sepmedfilt7', 'sepmedfilt9', | ||
'subsample', 'rebin', 'convolve', 'laplaceconvolve', | ||
'dilate3', 'dilate5'] |
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 can add a newline here (there is one missing) to trigger a new Travis build
@astrofrog I triggered the Travis build. Question: For some of my tests, I cross check my utility functions against scipy routines. I don't use scipy anywhere else. Should scipy still be considered a dependency? I added it to the travis file, but do I need to add it under the pip release requirements (or a requirements.txt file)? @astrofrog or @eteq do you have an opinion about astroscrappy vs astro-scrappy? |
@cmccully - indeed I would add it to .travis.yml but not worry about adding it in the requirements file (though you might add a note somewhere in the docs that scipy is required for the tests) I don't have any strong preference for the module name, though hyphens always make it harder to have the package name patch the module name (i.e. one can't import astro-scrappy, only astro_scrappy). |
@astrofrog Thanks. You make a good point. Can you please rename this repo without the dash then? I will update the name in the docs. |
@cmccully - done! |
@astrofrog Thanks! Can you update travis so it does the build test? Also, should I uncomment the coveralls line in the travis file? |
@cmccully - yes, I have enabled coveralls, so you can enable it in the travis file. Ignore the latest failure, I think it was because of the repo name change. I think when you push the change to travis.yml it should work. |
Any other comments before I pull this in? |
👍 Thanks! |
👍 |
@astrofrog @larrybradley @cdeil @eteq @crawfordsm @mwcraig Thanks for all of your help with this. I am pulling in this request. I am going to wait a little longer before I release it on PyPi. Please feel free to continue testing this. Thanks again! |
Excellent! Once you release it on PyPI would you mind opening a pull request on https://github.com/astropy/conda-builder-affiliated to get it build as a conda package? |
Full working version.