Closed rmjarvis closed 2 years ago
For reference, here is the size-magnitude diagram that is made by running piffify sizemag.yaml
in the tests directory.
Thanks Matt!
You may want a test where find stars total craps out with no stars found to test some of the edge cases?
I already have test cases that hit all the lines of code. Including the one you were worried about if the for loop never broke out. I'm quite sure there are cases where it won't do a good job, but I at least think I've tested all the paths through the code to make sure they are valid.
I anticipate adding some test cases from real-world data where this does terribly to try to make it behave better though.
I thought of some pathological inputs to stress test the code a bit. I'm sure there are still lots of failure modes I haven't found, but at least it's hardened to some fairly obvious pathologies now. (e.g. input has 0, 1, 3 stars, input is all galaxies). They fail for these more gracefully now, giving coherent error messages when appropriate rather than e.g. letting numpy raise an opaque exception about finding the median of 0 objects or some such.
I think this is good to go. I'll merge Friday unless anyone wants more time to look it over and give comments.
This PR add a bunch of new functionality,
allmostly related to selection based on a size-magnitude diagram.