SilverLabUCL / PySilverLabNWB

Python tools for working with Silver Lab data in the NWB2 format
MIT License
1 stars 0 forks source link

Processing ROI data appropriately #59

Open alessandrofelder opened 4 years ago

alessandrofelder commented 4 years ago

The z position of each imaging plane is used as it's identifier, and is read both from ROI.dat and Zplane_Pockels_values.dat. For the former, the data is read as float16 by pandas, but as the default float64 for the latter. This wasn't a problem previously, as all z values were multiples of 0.5, and usually integers, which can be accurately represented with 16 bits.

More modern data (e.g. LabViewData2020\HG_30_exp01\200107_13_13_33 FunctAcq) has z values that don't follow this pattern anymore, which causes differences between the 16 and 64 bit data that break our code (We use the z-position from ROI.dat as a key in a dictionary for a zplane from Zplane_Pockels_values.dat, so those values need to match).

I will fix this for now by reading as float64 in both cases, but we should have a discussion about what precision we need for this and other columns in both .dat files.

ageorgou commented 4 years ago

Will confirm with the group, but from memory:

alessandrofelder commented 4 years ago

That's what I remember too. Sameer was going to send us an updated sheet that included types for all the columns of ROI.dat.