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

Fix incomplete_fov_check to not require a channel named Au #474

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

alex-l-kong
Copy link
Contributor

What is the purpose of this PR?

Closes #473.

How did you implement your changes

Remove the addition of the "Au" channel in incomplete_fov_check.

Add specific lists in the 3a and 3b notebooks to allow the user to change their intensity channels they wish to extract (or leave as blank of none specified).

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@alex-l-kong alex-l-kong self-assigned this Nov 21, 2024
@alex-l-kong alex-l-kong requested a review from srivarra December 10, 2024 19:49
Copy link
Contributor

@camisowers camisowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just have one note that we shouldn't completely remove the Au channel check when looking for incomplete images.

channels = io_utils.list_files(os.path.join(extraction_dir, fovs[0]), ".tiff")
channels_subset = channels[:num_channels]
if "Au.tiff" not in channels_subset:
channels_subset = channels_subset[:-1] + ["Au.tiff"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noah specifically noted here that Au should always be a default channel when checking for incomplete fovs. So if some panels don't have gold, then we need this if statement to change instead of removing it completely.
if "Au.tiff" in channels and not in channels_subset:

Copy link
Contributor Author

@alex-l-kong alex-l-kong Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@camisowers in line with adding an explicit argument to set intensity_channels to the callback creation function, what about adding another explicit argument defining a custom name for the gold channel? By default, it will be set to "Au", and even if the user leaves it as None, it'll still assume an "Au.tiff" is found.

In cases where some channels fail to load, instead of erroring out completely, check if the error is specifically caused by a failure to load in gold, and if so, throw a warning that the specific gold channel could not be located and to ask the user to double-check that this is indeed correct.

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.

incomplete_fov_check errors out if gold mass not specified or not named Au
3 participants