Fix broken default behavior for --object_range in ngmixer-meds-mof-nbrs-correct - #78
Open
sweverett wants to merge 1 commit into
Open
Fix broken default behavior for --object_range in ngmixer-meds-mof-nbrs-correct#78sweverett wants to merge 1 commit into
--object_range in ngmixer-meds-mof-nbrs-correct#78sweverett wants to merge 1 commit into
Conversation
…fault value of `object_range` fail. Added an additional check in `get_band()` to allow for files in `_{band}_` format.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Matt added the optional parameter
--object_rangeinngmixer-meds-mof-nbrs-correctwhich would overwritemstartandmendin_main_if a value was passed. However the input parsing was incorrectly wrapped into the functionget_range()in the later commit 809bd6b.The takeaway is that the
ngmixer-meds-mof-nbrs-correctscript will fail if nothing is passed for--object_range. I added a possible fix here that decouples computingmstartandmendfrom_get_corr_files()and instead handles the default case inget_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.