tritemio / FRETBursts

Burst analysis software for smFRET. **Moved to OpenSMFS organization**
https://github.com/OpenSMFS/FRETBursts
GNU General Public License v2.0
16 stars 17 forks source link

Reading Photon-HDF5 files of 'generic' type into FRETbursts #69

Closed AndersBarth closed 6 years ago

AndersBarth commented 6 years ago

Hi,

I have data from a PIE-MFD setup (i.e. nsALEX with polarization) that I am trying to read from a Photon-HDF5 file into FRETbursts (file is attached). The file specifies the number of polarizations (/setup/num_polarization_ch = 2) and the polarization assignment (/photon_data/measurement_specs/detectors_specs/polarization_ch1-2), yet I get the following error upon trying to read the file:

Invalid_PhotonHDF5: The field/setup/num_polarization_chindicates more than one polarization. However, somedetectors_specs/polarization_ch*fields are missing.

The file was generated through phforge 0.1.1 using phconvert 0.8.2.

Since all the required fields are present when inspecting the file in HDFView, I'm confused why the error occurs. Thanks for the help!

Best, Anders

Link to File H20.h5

AndersBarth commented 6 years ago

Small update:

I looked into the code and it seems that the logic check in loader.py on line 134:

if any('polarization_ch%i' not in det_specs for i in (1, 2)):

returns True when it shouldn't.

It works if changed to:

if not (('polarization_ch1' in det_specs) and ('polarization_ch2' in det_specs)):

but there is probably a more pythonic way of solving it.

tritemio commented 6 years ago

Thanks for the report. I migrated the issue to https://github.com/OpenSMFS/FRETBursts/issues/18. See my reply there.

In the future, please open issues in the new FRETBursts repository under the OpenSMFS organization, thanks.