Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow tiffs with npages not dividing pageCount to be loaded #279

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

sofroniewn
Copy link

Currently if npages did not divide pageCount a value error was raised.

This PR changes the behaviour of fromtiff such that now all the data apart from the last few remaining pages will be loaded. These remaining pages are ignored.

@boazmohar
Copy link
Contributor

But will it raise a warning?
We had this happen to us, and we used it as an indication that something went wrong with the acquisition.

@sofroniewn
Copy link
Author

Currently it does not raise a warning - I can amend the PR such that it does.

Alternatively we could keep the default behaviour the same and add some form of keyword argument that tells you to discard the remaining frames if you want.

Thoughts? Curious what @freeman-lab thinks is best too

@boazmohar
Copy link
Contributor

Thinking about at, I am still not sure what would happen if there is a missing volume in the middle of an acquisition, would the keys skip that time point?
I think it would be helpful to have a keyword argument to discard the frames, but in a way that we would know what happened.
Maybe for each dropped volume a warning would display (In file xxx.tif dropped y frames) or the key would be skipped.

# Conflicts:
#	thunder/images/readers.py
This reverts commit 9a9486d, reversing
changes made to 1f05535.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants