BAMresearch / McSAS3

Refactored McSAS for analysis of X-ray and neutron scattering data
https://bamresearch.github.io/McSAS3/
GNU General Public License v3.0
3 stars 4 forks source link

Error parsing csv files #11

Open MarcBHahn opened 1 year ago

MarcBHahn commented 1 year ago

Hi, some of the recent changes/commit seem to cause some errors when loading standard csv files which worked previously. McSas3 says ""data could not be read correctly. If csv, did you supply the right csvargs?"" Which is related to the line 80 in McData1d.py:

        assert all(
            [df[key].dtype.kind in "f" for key in ["Q", "I", "ISigma"]]
        ), "data could not be read correctly. If csv, did you supply the right csvargs?"

It doesnt change when i manually adjust column separators (, or \t) in either the input.csv or the readconfig.yaml or the column headers.

Tested on Debian stable with python from the package sources and RHEL7 with libaries from pip for python 3.6.

Thanks for having a look.

ibressler commented 1 year ago

Hi Marc, thanks for your feedback! Can you provide a CSV file which fails to load? There are some test cases implemented which read the included quickstartdemo1.csv just fine. An example file would help to investigate the issue. Best wishes Ingo