Skip to content

Fix broken default behavior for --object_range in ngmixer-meds-mof-nbrs-correct - #78

Open
sweverett wants to merge 1 commit into
esheldon:masterfrom
sweverett:master
Open

Fix broken default behavior for --object_range in ngmixer-meds-mof-nbrs-correct#78
sweverett wants to merge 1 commit into
esheldon:masterfrom
sweverett:master

Conversation

@sweverett

Copy link
Copy Markdown

Matt added the optional parameter --object_range in ngmixer-meds-mof-nbrs-correct which would overwrite mstart and mend in _main_ if a value was passed. However the input parsing was incorrectly wrapped into the function get_range() in the later commit 809bd6b.

The takeaway is that the ngmixer-meds-mof-nbrs-correct script will fail if nothing is passed for --object_range. I added a possible fix here that decouples computing mstart and mend from _get_corr_files() and instead handles the default case in get_range() - as well as checks to see that all passed MEDS files have an equal number of objects.

I also modified get_band() to check for both _{band}_ as well as -{band}- since the underscore version is now common.

…fault value of `object_range` fail. Added an additional check in `get_band()` to allow for files in `_{band}_` format.
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.

1 participant