* change masked pixel sampling to use rejection sampling instead of torch.nonzero
* black reformat code
* pyright unbound variable num_valid
* pyright type issues with num_valid
* add configuration settings for rejection sampling masks
* black reformat
* maybe this fixes it?
* revert behavior if mask sampling failed, still raise warning
* on iteration failure, use non-rejection sampling to generate indices
* ruff
---------
Co-authored-by: adrian_chang <adrian.chang@visionsystemsinc.com>
Co-authored-by: Alexander Kristoffersen <akristoffersen@berkeley.edu>