Skip to content

Add ability to group channels by modality #11

Open
@psavery

Description

@psavery

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions