-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Question]: Assigning two PhotonSeries
to the same ImagingPlane
#575
Comments
It is also confusing for me that the indicator is in the To prove the last point in my first comment, this works: from pynwb.testing.mock.file import mock_NWBFile
from pynwb.testing.mock.ophys import mock_OpticalChannel
from pynwb.testing.mock.device import mock_Device
from pynwb.ophys import ImagingPlane
nwbfile = mock_NWBFile()
device = mock_Device(name='test_device')
test_optical_channel = mock_OpticalChannel(name='test_optical_channel')
another_optical_channel = mock_OpticalChannel(name='another_optical_channel')
optical_channel = [test_optical_channel, another_optical_channel]
imaging_plane = ImagingPlane(name="imaging_plane", description="", device=device, optical_channel=optical_channel, excitation_lambda=253.0, location="here", indicator="indicator")
imaging_plane.optical_channel Output: [test_optical_channel pynwb.ophys.OpticalChannel at 0x140450769060528
Fields:
description: description
emission_lambda: 500.0,
another_optical_channel pynwb.ophys.OpticalChannel at 0x140450720627008
Fields:
description: description
emission_lambda: 500.0] |
@h-mayorquin Propagating the neuroconv/src/neuroconv/tools/roiextractors/roiextractors.py Lines 363 to 365 in 6164f98
So basically I have a different example that we can think about; for the Pinto lab we have the raw and the motion corrected |
Another great point that @alessandratrapani can add to their ongoing list of improvements to implement to our ophys modalities 😃 |
@h-mayorquin Can this issue be closed? It's technically possible as @weiglszonja pointed out, even if not that ideal of a design (but that improvement is already a part of some older issues |
PhotonSeries
to the same ImagingPlane
PhotonSeries
to the same ImagingPlane
@h-mayorquin @CodyCBakerPhD Now to think of it, how would you feel about changing
so "photon_series_key" might be misleading there. (I started drafting for #581 and realised if I wanted to test if we have raw and processed (e.g. downsampled) two photon series data that we add to acquisition and processing it could only be done by duplicating the metadata as @h-mayorquin pointed out) |
Yes, the plan is always to swap from indexing of a list to string key identifier of a dictionary |
The metadata for the
TwoPhotonSeries
and theImagingPlane
are lists (as we can have more than one).Example from the current Clandinin conversion:
When writing a conversion with multiple interfaces we use the conversion options in
BaseImagingExtractorInterface
to specify which metadata belongs to a specific interface:neuroconv/src/neuroconv/datainterfaces/ophys/baseimagingextractorinterface.py
Lines 101 to 109 in 6164f98
The argument is called
photon_series_index
and is used here:neuroconv/src/neuroconv/tools/roiextractors/roiextractors.py
Lines 355 to 356 in 6164f98
To my surprise, I realized that the the same index is used to determine which metadata is used to build the corresponding
image_plane_index
:neuroconv/src/neuroconv/tools/roiextractors/roiextractors.py
Lines 364 to 365 in 6164f98
Which, if I understand well, means that if I want to assign TwoPhotonSeries to the same imaging series I need to duplicated my metadata.
Maybe this work as intended and each
TwoPhotonSeries
should have onyImagingPlane
assigned? I think this is the decision that we did for Brucker.I think this all comes from my confusion about the intent behind the
ImagingPlane
. When I first heard about volumetric data I was expecting that that would need multiple ImagingPlanes, one for every dimension of depth but this turned out to be false. On the other hand, I kind of expected that for formats with multiple channels (like Brucker) we could save one imagine plane with twoTwoPhotonSeries
referencing it and eachTwoPhotonSeries
somehow linked to their respectiveOpticalChannel
. However, it seems that there is no way of doing this, as there is no way to directly linkOpticalChannel
back to theTwoPhotonSeries
...This is strange because
OpticalChannel
as an argument ofImagingPlane
has a list type which I thought was meant to be used for ImagingPlanes with multiple channels but then how to disambiguate which series belongs to which channels?TwoPhotonSeries
can only store one channel, either images or volumetric but not multiple channels.The text was updated successfully, but these errors were encountered: