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

Add ability to group channels by modality #11

Open
psavery opened this issue Oct 5, 2024 · 0 comments
Open

Add ability to group channels by modality #11

psavery opened this issue Oct 5, 2024 · 0 comments
Assignees

Comments

@psavery
Copy link
Collaborator

psavery commented Oct 5, 2024

We always normalize the data to be between 0 and 1. However, normalizing channels in multimodal data can be somewhat complicated.

For some of our examples, we have several channels of one modality, and another channel of a different modality. For example, for one dataset, we have three XRF channels (Au, Fe, and Pt) and one ptychography channel.

What we should do is normalize the three XRF channels together, and normalize the ptychography channel separately. Assuming the first three channels are XRF, that might look something like this in the code:

data[:, :, :, :3] = _normalize_data(data[:, :, :, :3])  # Normalize the three XRF channels together
data[:, :, :, 3] = _normalize_data(data[:, :, :, 3])  # Normalize the ptychography channel by itself

So, we need a way to group together channels by modality so we can normalize them together.

It might actually be easiest to do this from the command line, rather than adding a UI option, because it would make sense to set this initially and not change it.

But I'm not sure what this would look like. Maybe adding a command line flag where you identify channels as being part of the same modality, like `--modalities "[Au, Fe, Pt], [Recon]"

Then we'll match these to labels in the code to translate them into indices. I can provide an example.

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

No branches or pull requests

2 participants