Open luiztauffer opened 4 years ago
I have a similar question.
Using pynwb
, it is possible to create an ImagingPlane with multiple OpticalChannels (this is also explicitly mentioned in the documentation and type checks). However, reading this with matnwb
fails -- as far as I could tell from debugging it, this is because it does not expect the extra OpticalChannel. Looking at the schema, it also seems to me that an ImagingPlane should have exactly one associated OpticalChannel, as there is no quantity specified.
It seems that there is a discrepancy between the schema and what the two APIs allow.
If only one channel is allowed, then the TwoPhotonSeries also doesn't need a direct link to the OpticalChannel.
@ageorgou and @luiztauffer are right. The API documentation allows you to enter a list of OpticalChannel objects:
https://pynwb.readthedocs.io/en/stable/pynwb.ophys.html#pynwb.ophys.ImagingPlane
but the nwb-schema only allows one:
We should allow more than one. That would be a non-breaking schema change.
For an Ophys dataset, I have: 2 OpticalChannels (Yellow and Red wavelenghts) 2 TwoPhotonSeries to be stored in acquisitions (Yellow and Red wavelenghts) 1 DfOverF signal to be stored in processing, that’s composed out of a ratio between the two channels raw signals
How many ImagingPlane objects should I have?
As I understand it, only one ImagingPlane would be necessary, since it accepts a list of OpticalChannels. Also, that would be the ImagingPlane associated with the ROIs in the processing modules. TwoPhotonSeries, however, do not specify which OpticalChannel was used to record the data, so if the 2 TwoPhotonSeries above would have the same ImagingPlane, it would not be possible to tell which comes from Red and which comes from Yellow.
Should TwoPhotonSeries have a field linking it to a specific OpticalChannel?