ilyasst / pydictoolkit

Toolkit to further analyze 2D and 3D Digital Image Correlation results. The current work focuses on strain evolution at the surface of growing biological materials.
MIT License
10 stars 4 forks source link

Issue on converting the data frame into floats #3

Open Stefhu67 opened 2 years ago

Stefhu67 commented 2 years ago

Screenshot 2022-11-09 at 10 50 40 Screenshot 2022-11-09 at 10 51 10

Hello, It seems that there is still an issue in the line 14 of the class: DIC_measurements:

Thanks

ilyasst commented 1 year ago

https://github.com/ilyasst/pydictoolkit/blob/27b83647105bee64225086c21ab5a1f4bb5cf935/pydictoolkit/dic/measurements.py#L13 I don't think the issue is with line 13 and 14. The problem from your screenshot is that the first line of the dataset (the header with the name of columns, "X", "Y", etc...) is also considered within the dataset and it cannot be converted to a float because it's a string. The problem I believe is in function "preprocess_csv" right here: https://github.com/ilyasst/pydictoolkit/blob/27b83647105bee64225086c21ab5a1f4bb5cf935/pydictoolkit/dic/data.py#L30 It seems like the header is not properly cleaned and still contains spaces and ' and " characters that need to be removed. You should have a csv file that ends with _clean.csv in your folder, can you check what the header looks like for that file?