DataLab-Platform / DataLab

Open-source Platform for Scientific and Technical Data Processing and Visualization
https://datalab-platform.com
BSD 3-Clause "New" or "Revised" License
43 stars 4 forks source link

Error when trying to open a (UTF-8 BOM) text file as an image #49

Closed emarin2642 closed 8 months ago

emarin2642 commented 8 months ago

Hello, I have issues when open either signals or images in text format (csv or txt). The issues are quite simple because it is simply an error message without any import. The file used is attached E.M. potentiel_condensateur_2.csv

PierreRaybaut commented 8 months ago

Yes, trying to open this file from the Signal Panel would lead to:

image

Actually, from a certain point of view, that is the expected behavior because - as implied in the dialog box above - the data sets must have 2, 3 or 4 columns:

To be able to open arbitrary text files, we would have to implement something like the data import wizard in Spyder:

image

So that would be a feature request... but a very interesting one indeed!

PierreRaybaut commented 8 months ago

In the meantime, I think that we could try to transpose the data before throwing this error message.

PierreRaybaut commented 8 months ago

In the meantime, I think that we could try to transpose the data before throwing this error message.

Actually, my mistake: it's currently not possible to create multiple signals from one text file. The import wizard will take care of this too.

In the meantime, when opening this kind of text file, we could simple ask the user about what will be considered as curve data (rows or columns).

emarin2642 commented 8 months ago

Thank you for your responses. My first goal was to test the representation like an image because these data are the potential measured at different locations in the horizontal plane. The potential is created by a dipole. The idea is to put in evidence the equipotentials (see the image attached) for the students during a lab. Equipotential

PierreRaybaut commented 8 months ago

OK, so my remarks are still valid but somehow out of context. So, you were trying to open this text file as an image, which is still leading to an error but different from the one I was referring to.

In that case, you have a text file with UTF-8 BOM encoding - that is not the standard encoding expected from such a file (standard is UTF-8). But let's take care of it.