Discussion:
[Kst] NAN and filters
Gunter Koenigsmann
2016-06-29 13:34:35 UTC
Permalink
Dear all,

I've just encountered a problem that technically is no bug but as I
have spent about an hour in tracking it down I thought I'd better report
it to the developers:

My Tektronix scope is willing to save the acquired data in a CSV
formats. The first few lines are headers. Then there is data - and the
very last line of the file consists of only a newline with no characters
besides that.

kst knows how to skip headers and even knows how to extract information
from them. It also is real fast in reading the data. But the completely
empty line at the end of the file by default is interpreted as NaN.

Everything now looks fine. Curves are drawn, but if I try to
low-pass-filter them the result is a vector of the size 0:
The filter tried to fourier-transform a curve containing a NaN and the
result was all NaNs.

Don't kow if in the case that the filter generated zero data a test if
this was the cause would be a good idea or a mechanism that ignores a
totally empty line at the end of a file. But I at least wanted to report
that I found this.

Kind regards,

Gunter.

Gunter Königsmann
R&D/RDSSD

Tel: +49 911-6559-6025
Fax: +49 911-6559-776747

www.semikron.com
***@semikron.com

SEMIKRON Elektronik GmbH & Co. KG
Sigmundstrasse 200, 90431 Nürnberg, Germany
Amtsgericht Nürnberg HRA 13650
Komplementär:
SEMIKRON Elektronik Verwaltungs GmbH
Amtsgericht Nürnberg HRB 21338
Geschäftsführer:
Harald Jäger
Christian Müller
Peter Sontheimer


IMPORTANT NOTICE - The contents of this email and attachments are
confidential. If you are not the intended recipient you must not use,
copy, distribute or rely on this email and should please return it
immediately or notify us by telephone. While we take every reasonable
precaution to screen out computer viruses from emails, attachments to
this email may contain such viruses. We cannot accept liability for loss
or damage resulting from such viruses. The integrity of email across
the Internet cannot be guaranteed and SEMIKRON will not accept liability
for any claims arising as a result of the use of this medium for
transmissions by or to SEMIKRON.

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
______________________________________________________________________
Ben Lewis
2016-06-29 23:26:07 UTC
Permalink
Hi Gunter,

Have you tried "Interpret empty value as" *zero* or *previous value*?

Regards, Ben
Post by Gunter Koenigsmann
Dear all,
I've just encountered a problem that technically is no bug but as I
have spent about an hour in tracking it down I thought I'd better report
My Tektronix scope is willing to save the acquired data in a CSV
formats. The first few lines are headers. Then there is data - and the
very last line of the file consists of only a newline with no characters
besides that.
kst knows how to skip headers and even knows how to extract information
from them. It also is real fast in reading the data. But the completely
empty line at the end of the file by default is interpreted as NaN.
Everything now looks fine. Curves are drawn, but if I try to
The filter tried to fourier-transform a curve containing a NaN and the
result was all NaNs.
Don't kow if in the case that the filter generated zero data a test if
this was the cause would be a good idea or a mechanism that ignores a
totally empty line at the end of a file. But I at least wanted to report
that I found this.
Kind regards,
Gunter.
Gunter Königsmann
R&D/RDSSD
Tel: +49 911-6559-6025
Fax: +49 911-6559-776747
www.semikron.com
SEMIKRON Elektronik GmbH & Co. KG
Sigmundstrasse 200, 90431 NÃŒrnberg, Germany
Amtsgericht NÃŒrnberg HRA 13650
SEMIKRON Elektronik Verwaltungs GmbH
Amtsgericht NÃŒrnberg HRB 21338
Harald JÀger
Christian MÃŒller
Peter Sontheimer
IMPORTANT NOTICE - The contents of this email and attachments are
confidential. If you are not the intended recipient you must not use,
copy, distribute or rely on this email and should please return it
immediately or notify us by telephone. While we take every reasonable
precaution to screen out computer viruses from emails, attachments to
this email may contain such viruses. We cannot accept liability for loss
or damage resulting from such viruses. The integrity of email across
the Internet cannot be guaranteed and SEMIKRON will not accept liability
for any claims arising as a result of the use of this medium for
transmissions by or to SEMIKRON.
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
______________________________________________________________________
_______________________________________________
Kst mailing list
https://mail.kde.org/mailman/listinfo/kst
Gunter Koenigsmann
2016-07-13 08:58:22 UTC
Permalink
Dear Ben,
Post by Ben Lewis
Have you tried "Interpret empty value as" *zero* or *previous value*?
That works fine - and since a NaN cannot give a meaningful result in an
FFT I am happy with the results of especially the second of these
options. But since there is no warning why the filter did only output
zeros finding out that one has to select this option currently tends to
need loads of troubleshooting => I wouldn't be too unhappy if a filter
would output a warning message telling why it has failed. In order to
keep the impact low I assume it is best to just test if one byte the FFT
has returned is a NaN.
And since the specific case feels like it were potentially common I
wonder if it would make sense to handle the case that the last line of a
file only contains a CR, but no data and no time information
separately.

I will attach a simple test file to this e-mail that makes the low-pass
filter fail without looking too suspicious as long as your text editor
doesn't provide line numbering.

---

A few days ago I have tested the current nightly build. With the
official release there were frequent crashes both on Windows and on
Linux (KST is being so fast that even having to redo the last minute's
work every now and then doesn't stop it from saving time). The current
nightly build no more crashes for me => wanted to report this positive
news, too.

Kind regards,

Gunter.

Gunter Königsmann
R&D/RDSSD

Tel: +49 911-6559-6025
Fax: +49 911-6559-776747

www.semikron.com
***@semikron.com

SEMIKRON Elektronik GmbH & Co. KG
Sigmundstrasse 200, 90431 NÃŒrnberg, Germany
Amtsgericht NÃŒrnberg HRA 13650
KomplementÀr:
SEMIKRON Elektronik Verwaltungs GmbH
Amtsgericht NÃŒrnberg HRB 21338
GeschÀftsfÌhrer:
Harald JÀger
Christian MÃŒller
Peter Sontheimer


IMPORTANT NOTICE - The contents of this email and attachments are
confidential. If you are not the intended recipient you must not use,
copy, distribute or rely on this email and should please return it
immediately or notify us by telephone. While we take every reasonable
precaution to screen out computer viruses from emails, attachments to
this email may contain such viruses. We cannot accept liability for loss
or damage resulting from such viruses. The integrity of email across
the Internet cannot be guaranteed and SEMIKRON will not accept liability
for any claims arising as a result of the use of this medium for
transmissions by or to SEMIKRON.


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
______________________________________________________________________
Loading...