Page 1 of 1

bad sampling frequency

Posted: Tue May 26, 2020 1:51 am
by enzo ternavasio
When i load a file.saf, i get this error: bad samplig frequency

I have the geopsy version 3.2.0 geopsypack 3.2.2

The file.saf has been sent by email beacouse i cannot attach it, even zipped.
Best regards, Enzo

Re: bad sampling frequency

Posted: Tue May 26, 2020 7:05 am
by admin
Good news... I encounter the same error even with the latest release under preparation.
Usually under Windows, text files have their lines that end with the two characters CR and LF. Under Linux, only LF. In your file there is only CR at the end of each line. So geopsy considers your file as a single line and it cannot parse the header.

If you open your file under MS Word and if you save it as a txt file, you can load it in geopsy.

I checked how geopsy can support also these CR only lines but it is not simple. For reading these files geopsy uses the function QTextStream::readline() from Qt library which support only CR/LF and LF. Supporting only CR would require a different strategy.

How did you generate this file?

Marc

Re: bad sampling frequency

Posted: Fri May 29, 2020 5:21 am
by enzo ternavasio
Hy, thanks for your reply.

In the meanwhile, after a lot of investigation, i've found exactely what you are saying.
I've have found that even the START_TIME must be in the correct format:
yar, month, day,hour seconds
and these values must be consistent.

The file has been generated by Dolang devices such as "Jeatrom".

I fixed this bug reading it and writing it again with CR ad LF at each line.

Regards, Enzo

Re: bad sampling frequency

Posted: Fri May 29, 2020 11:48 am
by admin
CR alone as an end of line marker is the standard for some old systems (MacOS9, Commodore64 & 128,...) according to wikipedia. If is a systematic output of Dolang SAF files, it might be worth to send them a bug report and to fix it with a CR/LF or LF only.