bluesky / suitcase-tiff

http://nsls-ii.github.io/suitcase
Other
2 stars 5 forks source link

FIX: deal with descriptors that lie about the shape #45

Closed tacaswell closed 2 years ago

tacaswell commented 2 years ago

If the descriptors reports a 3D shape (e.g. (1, 2048, 2048)) and the data comes out of the filler with the leading dimension dropped, the tiff series serializer will try to write out each line of the array as its own tiff.

This is because we determined if we needed to "up cast" a 2D array to a 3D array by consulting the descriptor and then iterate over the data assuming it is definitely shaped as (frame, rows, cols).

This adds a warning we can make an error in the future.

tacaswell commented 2 years ago

Do we not have CI on these repos anymore?

mrakitin commented 2 years ago

Do we not have CI on these repos anymore?

We don't have GHA CI here yet. But I can get one here from https://github.com/bluesky/suitcase-tiff/blob/master/.travis.yml.

tacaswell commented 2 years ago

Thank you for the review @mrakitin ! There were two offsetting bugs:

  1. I did not use the right test class
  2. but the code was comparing a list to a tuple so the warning was coming out anyway
tacaswell commented 2 years ago

I just pushed a commit that passes locally for me.

tacaswell commented 2 years ago

https://github.com/tacaswell/suitcase-tiff/actions/runs/2301445745 <- and CI agrees.