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 for additional channels with same name #185

Merged
merged 5 commits into from
Mar 15, 2024
Merged

Conversation

alessandrofelder
Copy link
Member

@alessandrofelder alessandrofelder commented Mar 13, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Folders/files containing additional channels to register currently can't have the same name.
Registered additional channels get overwritten.

What does this PR do?
Allows users to pass additional channel folder/file with the same name.
The files that will be written will be the first unique set of names going up the levels of the file tree.
This means that the current behaviour is preserved for unique sets of additional channel names.

This PRs also adds tests for this, and sensible error raising if you pass the same additional channel multiple times.
This PR also adds a docstring to the prep_registration function.

References

Closes #183

How has this PR been tested?

New tests added.
Manual checking on real life data shows that for two additional channel tiff files with same names but in different folders (025_micron/same_file_name.tif and 025_micron_dummy/same_file_name.tif, the files are named after the folders:
image

Is this a breaking change?

No

Does this PR require an update to the documentation?

Docstring added/updated.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

must have different parent folder name
otherwise error is thrown
tests for this added
@alessandrofelder alessandrofelder marked this pull request as ready for review March 14, 2024 17:58
@alessandrofelder alessandrofelder requested a review from a team March 14, 2024 17:58
@adamltyson adamltyson merged commit 31e2111 into main Mar 15, 2024
12 checks passed
@adamltyson adamltyson deleted the additional-channels branch March 15, 2024 08:55
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.

[BUG] Doublecheck additional channels don't overwrite each other
2 participants