-
Notifications
You must be signed in to change notification settings - Fork 1
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
Parallelised LIF-to-TIFF file conversion #282
Conversation
…unction; changed logic for naming and generating directories for processed files
"cyan", | ||
"green", | ||
"magenta", | ||
"red", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does yellow need to be included here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed it, oops. Will add yellow in new commit
src/murfey/util/lif.py
Outdated
import numpy as np | ||
from readlif.reader import LifFile | ||
from readlif.reader import LifFile # , LifImage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can drop commented out import
src/murfey/util/lif.py
Outdated
imwrite( | ||
save_name, | ||
arr, | ||
imagej=True, # ImageJ comppatible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo on compatible, trivial but may as well catch it
src/murfey/util/lif.py
Outdated
|
||
# Extract image data to array | ||
logger.info("Loading image stack") | ||
arr: np.ndarray = [] # Array to store frames in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't an np.ndarray
yet, it's a list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type hinting needs to be specified here, as this variable is very quickly converted into an array and used as such for the remainder of the function. MyPy throws a hissy fit when I remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised mypy doesn't complain about it because np.ndarray
has no append
method. You could make it a numpy array at initialisation and use np.append
inside the for loop
Helps with resolving #280. Part of continued work on #288.