undark-lab / swyft

A system for scientific simulation-based inference at scale.
Other
161 stars 14 forks source link

error handling in store #66

Closed bkmi closed 3 years ago

bkmi commented 3 years ago

When this function requests too many samples from the store it returns an empty list. https://github.com/undark-lab/swyft/blob/0ab5832ff8a50d6e68abcebeeaa195abdd6d6835/swyft/store/store.py#L282-L320

The problem is that this function, when receiving an empty list, says that there are not enough indices. https://github.com/undark-lab/swyft/blob/0ab5832ff8a50d6e68abcebeeaa195abdd6d6835/swyft/store/dataset.py#L47-L49

This can also happen when there is an intensity function mismatch. It's not a very helpful error.

bkmi commented 3 years ago

I believe this is handled in #82