If you haven't already, please read through our contributing guidelines before opening your PR
What is the purpose of this PR?
Closes #1016. Implement intermediate saving of per image 99.9th percent values.
In addition, two small corrections were made to the pixie code.
adds a new channel_percentile_postnorm argument to create_pixel_matrix(), rather than hard coding 0.999.
add fix for the edge case where an image has no positive pixels (previously would error out)
(@HPiyadasa ran into this issue when trying to pixels cluster only SMA+ pixels within a mask)
Should also close #900.
How did you implement your changes
Add image values to quantile_data.csv as they are processed. Also check the FOVs included in the file upon a restart, on the off chance a FOV had a feather file written, but the quantile data failed to be saved. Such images will be re-processed.
Set default channel_percentile_postnorm=0.999.
If there are no pixel cluster labels in an image, simply return an empty array rather than trying to concatenate an empty list (this causes an error).
Remaining issues
Long term, we could probably prevent zero positive pixel images from attempting to be processed at all, but that likely requires a more in depth fix and the above solution works fine for now.
If you haven't already, please read through our contributing guidelines before opening your PR
What is the purpose of this PR?
In addition, two small corrections were made to the pixie code.
channel_percentile_postnorm
argument tocreate_pixel_matrix()
, rather than hard coding 0.999.How did you implement your changes
channel_percentile_postnorm=0.999
.Remaining issues Long term, we could probably prevent zero positive pixel images from attempting to be processed at all, but that likely requires a more in depth fix and the above solution works fine for now.