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

adding ability to extract an arbitrary subset of a MEDS file #4

Merged
merged 3 commits into from
Jan 27, 2015
Merged

adding ability to extract an arbitrary subset of a MEDS file #4

merged 3 commits into from
Jan 27, 2015

Conversation

beckermr
Copy link
Collaborator

I have added code to extract an arbitrary subset of a MEDS file. The code is smart enough to concatenate adjacent reads from the fits image data extensions. I doubled checked the code by comparing the subset MEDS file to the original. Everything appears to work just fine.

@esheldon
Copy link
Owner

Thanks for the PR. I think this shares a lot of code with the range extractor doesn't it? Should it inherit?

@esheldon
Copy link
Owner

Actually MEDSCatalogExtractor also shares some code....

@beckermr
Copy link
Collaborator Author

The shared code is boilerplate code and not essential to what the routine does. It seemed more complicated to change the call of the subroutine and have to deal with the init of the parent than to just rewrite what I needed and duplicate a few lines which open and close files, etc.

We could refactor the whole thing so that both can inherit from a single parent, but this seems like a waste of time.

@beckermr
Copy link
Collaborator Author

OK. I have pushed a fix to issue #3.

@esheldon
Copy link
Owner

I'm going to pull, thanks for this. This is core production code for ngmix and im3shape, please do some stress testing to make sure all is OK.

esheldon added a commit that referenced this pull request Jan 27, 2015
adding ability to extract an arbitrary subset of a MEDS file
@esheldon esheldon merged commit f530aa6 into esheldon:master Jan 27, 2015
@beckermr
Copy link
Collaborator Author

Do you have suggestions?

I have a test script which makes a subset and reads from the subset file comparing every postage stamp image by image to the original MEDS file using numpy.array_equal. This passed for different arbitrary sets of inds I passed it.

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.

2 participants