AllenNeuralDynamics / aind-ophys-utils

Repo for Ophys utils
MIT License
0 stars 0 forks source link

New summary images, color videos, smarter downscaling #52

Closed j-friedrich closed 2 months ago

j-friedrich commented 4 months ago

Adds efficient parallelized computation of mean and max summary images without loading the entire movie in RAM.

Adds support for colored movies to video_utils.encode_video(), e.g. for overlaying colorful ROI contours.

The returned output.dtype of array_utils.downsample_array() had the odd behavior to differ dependent on serial or parallel processing. With this PR the output.dtype is always the same as the input.dtype except for the 'mean' and 'median' strategy. In the latter cases, an array of type float32 will be created if the input precision is less than 32 bits; otherwise, it will be float64. 'Mean' downscaling is often applied to uint16 movies for which float64 precision (the old default) is unnecessary but would require large RAM.

j-friedrich commented 2 months ago

This branch is outdated and has evolved into the new dev branch