44 Commits

Author SHA1 Message Date
Dr.-Ing. Johannes Pohl
cb88c5f0a0 Migrate to PyQt6 (#1072) 2025-12-16 15:24:57 +01:00
Dr. Johannes Pohl
aa95d20b9b Blacken code (#1076) 2023-10-30 17:51:41 +01:00
Johannes Pohl
889dd05f25 proper support for complex16u (2xuint8) signals (#772)
* proper support for complex16 (2xint8) signals
  * fix Modulator: give correct iq type
  * fix View: Use general min/max and not from signal
  * Remove Padding

* fix requirements.txt (skip PyQt5.14.2 on Windows)

* fix noise area drawing

* fix demod view range for FSK and PSK

* Autofit signal in ModulatorDialog.py

* optimize Unittests
2020-05-01 13:49:32 +02:00
Johannes Pohl
454abd522c improve waiting in unittests 2020-03-07 22:59:56 +01:00
Johannes Pohl
197a4f0afc Speed up unittests 2020-03-07 11:18:42 +01:00
Johannes Pohl
f24d10b3af fix message break plugin (#739) 2020-03-06 10:53:07 +01:00
Johannes Pohl
90d82463ab Improve tests (#730)
Improve performance of tests and fix some minor bugs in insert sine dialog and "apply to all" action
2020-03-03 22:06:18 +01:00
Johannes Pohl
1e90427655 Use SDR native IQ formats (#652) 2019-05-29 13:22:53 +02:00
Johannes Pohl
e633a788ad Enhance accuracy of automatic interpretation (#550)
* rename signalFunctions -> signal_functions

* basic methods for auto interpretation

* cythonize k means

* reorder tests

* remove check and update gitignore

* estimate tolerance and implement score for choosing modulation type

* use absdiff

* remove comment

* cythonize messsage segmentation

* improve message segementation and add test for xavax

* integrate OOK special case

* add check if psk is possible

* integrate xavax and improve score

* improve noise detection

* add test for noise detection multiple messages

* improve noise detection

* homematic fix: use percetange of signal length instead of num flanks

* homematic has some trash at start of messages, which counts as flanks
* additonally set score to 0 if found only one bit length lower 5

* calculate minimum bit length from tolerance

* improve noise noise detection

* refactor limit and propose new limit calculation

* improve minimum bit length penalty

* only increase score for mod_type if bit length surpasses a minimum
* this way scoring loop later becomes easier and
* score is more accurate as there is no division needed which does
  not scale well with the length of message vectors

* remove demodulated complex files and demod live in tests

* remove enocean.coco

* add a new check to prevent PSK misclassification

* add tolerance unit test
* use z=2 for finding outlier free max in tolerance estimation

* prevent numpy warnings

* adapt threshold of unit test

* normalize the score by dividing by plateau vector length

* improve OOK segmentation:

Use minimum pulse length instead pause length for reference

* use 50 percentile for detecting n_digits in plateau rounding

* add elektromaten integration test

* improve center detection to deal with varying signal power levels
* use 10% clustering for rect signal
* calculate min and max of each cluster
* return max(minima) + min(maxima) / 2

* improve the center aggregation, separate between modulation types

* add validity checks if message can be ASK or FSK modulated

* use a weighted mean for center estimation: 60/40 for high/low

* improve bit length estimation: use decimal deviation for filtering

* add scislo test

* improve tolerance estimation: use 50 percentile + revert to normal mean for bitlength estimation

* add haar wavelet transform

* add median filter

* rename to Wavelet

* add signal generation with configurable snr for lab test

* add method for testdata generation

* prepare fsk test: generate messages and estimate parameters

* improve performance of plateau length filtering

* remove unused import

* improve robustness

* improve robustness

* add fsk error plot

* only append bit length if it surpasses minimum

* fix plot title

* improve noise level detection, prevent it from being too low

* integrate all modulations to test

* increase pause threshold for ook

* improve tolerance estimation

* improve noise detection: take maximum of all maxima of noise clusters

* improve scoring algorithm to prevent PSK misclassify as FSK

* use histogram based approach for center detection

* modulation detection with wavelets

* fix median filter when at end of data

* integrate modulation detection with wavelets

* improve robustness

* improve psk parameters

* improve psk threshold

* improve robustness

* swap psk angles for easier demod

* better xticks

* add message segmentation test and fix noise generation snr

* add error print

* update audi test

* fix runtime warning

* improve accuracy of center detection

* avoid warning

* remove unused functions

* fine tune fsk fft threshold

* update esaver test

* improve fsk fft threshold

* change test order

* update enocean test signal

* update enocean test signal

* enhance bit length estimation: use a threshold divisor histogram

* improve noise estimation: round to fourth digit

* update enocean signal

* consider special case if message pause is 0

* remove unused

* improve noise detection

* improve center detection

* improve center detection

* prevent warning

* refactor

* cythonize get_plateau_lengths

* improve syntax

* use c++ sort

* optimize PSK threshold

* optimize coverage

* fix buffer types

* integrate new auto detection routine

* update test

* remove unused stuff

* fix tests

* backward compat

* backward compat

* update test

* add threshold for large signals for performance

* update changelog

* make algorithm more robust against short bit length outliers

* make multi button for selecting auto detect options

* update unittest
2018-10-18 18:59:04 +02:00
Johannes Pohl
543d7f3b5e compress larger test signals 2018-06-18 20:26:13 +02:00
Johannes Pohl
7024c7aa00 resume on receive buffer full for protocol sniffer 2017-05-12 09:43:26 +02:00
Johannes Pohl
49a0115bbb remove unused attributes 2017-03-28 00:15:42 +02:00
Johannes Pohl
745d351b2c remove unused signal references 2017-03-28 00:11:23 +02:00
Johannes Pohl
a05f181657 close insert sine dialog after test 2017-03-27 19:18:34 +02:00
Johannes Pohl
7a37a7dcba refactor close timeout 2017-03-27 15:10:50 +02:00
jopohl
612dcdf38c centralize add signal to form 2017-03-27 10:58:13 +02:00
jopohl
fc793e2e71 add common base class for test cases 2017-03-27 10:16:43 +02:00
Johannes Pohl
37a92f8683 write settings 2017-03-26 22:19:28 +02:00
Johannes Pohl
574c8b92ee add dedicated app context for tests 2017-03-26 22:03:35 +02:00
Johannes Pohl
a41e1a7be4 set settings for tests in central place 2017-03-26 12:49:44 +02:00
Johannes Pohl
48e476607b improve stability 2017-03-26 01:35:23 +01:00
Johannes Pohl
286b5bc1b9 refactor test timeouts 2017-03-20 18:53:47 +01:00
Johannes Pohl
576835bed5 use QApplication.instance() 2017-03-20 16:52:54 +01:00
Johannes Pohl
4229688594 increase timeout after close 2017-03-19 15:54:59 +01:00
Johannes Pohl
526deb0bc8 improve test stability 2017-03-19 15:44:57 +01:00
jopohl
3c6dbd18c4 increase timeout for tests 2017-03-19 02:54:49 +01:00
jopohl
d18934b6d3 improve stability 2017-03-18 17:28:08 +01:00
Johannes Pohl
689471ff1f increase timeout for travis 2017-02-22 21:22:29 +01:00
Johannes Pohl
2a1e17a17b add indicator for inserted wave 2017-02-19 15:20:36 +01:00
Johannes Pohl
8b8882e458 pass insert position to plugin 2017-02-19 14:59:56 +01:00
Johannes Pohl
9805d41f76 pass original data to sine wave plugin 2017-02-19 14:54:12 +01:00
Johannes Pohl
2c6c83248e replace show_insert_sine_dialog with get_insert_sine_dialog 2017-02-19 14:44:41 +01:00
Johannes Pohl
6178cbd9dc test dialogs without showing them in foreground 2017-02-11 22:20:48 +01:00
Johannes Pohl
313ad63669 wait for sine wave to be drawn in test 2017-02-10 20:59:03 +01:00
Johannes Pohl
8c5fd0e751 make test locale aware 2017-02-10 16:43:10 +01:00
Johannes Pohl
54e0aaa616 make time in insert sine dialog editable 2017-02-10 15:52:29 +01:00
Johannes Pohl
9f973496b5 add unittest for insert sine dialog 2017-02-06 07:20:08 +01:00
Johannes Pohl
bb94ad6cf1 absolute paths in testing, to start tests from any directory 2017-01-31 15:12:08 +01:00
Johannes Pohl
bb4a35d07f remove unneeded qwaits in tests 2017-01-31 13:04:10 +01:00
jopohl
6adabb0f4a enhance unittest 2017-01-21 17:40:59 +01:00
jopohl
6c5e4135d8 simplify bit str to bytearray method by directly padding 2017-01-21 10:04:57 +01:00
jopohl
82d2bdf35f methods for bits to bytearray for sending/receiving + unittest 2017-01-21 09:59:12 +01:00
jopohl
773611d450 Rename all occurences of block in code to message or msg 2016-08-24 11:16:31 +02:00
jopohl
08094dab26 Rename tests to be compatible with pytest 2016-07-05 16:32:36 +02:00