Commit c666607c authored by ferrari's avatar ferrari
Browse files

Improve readme

parent f11056fa
......@@ -6,12 +6,12 @@ IPI extractor core
Prerequisite
------------
This program use the following libraries (other versions might work):
This program uses the following libraries (other versions might work):
* numpy              1.16
* matplotlib          3.1
* matplotlib         3.1
* pandas              0.24
* pydub                0.23
* pysoundfile        0.9
* pysoundfile       0.9
* python               3.6
* scipy                  1.2
......@@ -35,37 +35,66 @@ Usage
The GUI can be split into three parts.
At the top a segment of 20ms of sound signal is displayed.
The middle part is made of three groups of plots.
The button part is made of additional interactive buttons. The code is written in a way that allow the implementation of other widget in script that wwould import this (see [IPI_bombyx.py](IPI_bombyx.py) as an example)
The middle part is made of three groups of plots. A group is square of 2 by 2 plots, each displaying a different representation of the same click.
The button part is made of additional interactive buttons. The code is written in a way that allow the implementation of other widget in script that would import this (see [IPI_bombyx.py](IPI_bombyx.py) as an example)
The annotation are saved once the GUI is closed.
###Sectioning clicks
### Sectioning clicks
The top part is composed of two arrows and the sound signal. Clicking one of the arrow will translate the signal by 15s in the corresponding direction.
Clicking on the sound signal will select the click that will be analysed. The click selected will be at the maximum near the location clicked (0.1 s).
The click will then be displayed in one of the 3 groups of plots selected by the radio button bellow them.
While hovering above the signal, the cursor will have the color of the selected group.
Clicking on a new click will change the click to be analysed. An already analysed click can be clicked again.
*Note that a click can be assigned to two groups of plots. This currently cause desync in the display of the annotation*
*Note that a click can be assigned to two groups of plots. This currently cause desyncs in the display of the annotation.
In future an update, this might either be fixed, or the possibilities of selecting the same click for multiple groups will be removed*
### Assigning labels
Once assigned to a group, a click will be shown with 4 representation.
A group of plots is composed of the following representations:
| Signal | Spectrogram |
|:-------------------:|:---------------:|
| __Autocorrelation__ | __Cepstrum__ |
###Assigning labels
Clicking on any of the plot (meaning also in the non-current groups) will update the corresponding values.
Not all plots need to be labeled. Non label plots will have a `nan` value in the database.
####Signal and spectrogram
A vertical bar will follow the cursor while hovering above one of the plot.
On the other plots of the same groups, vertical bars are also displayed at the corresponding current hovering value.
This allows the user to see if the IPI value that is going to be selected make sense according to the other representations.
Due to the specificity of each representation, this synchronous display of the bar might change in some situations.
See bellow for these caveats.
#### Signal and spectrogram
The signal and spectrogram plots are linked, meaning that they share the same label.
The labeling of these plots alternate between two modes: the labeling of P1 and the labeling of P2.
P1 labeling is indicated with a dashed vertical bar that follow the cursor. In P2 labeling mode, the vertical bar is a full line.
Clicking will annotate the corresponding pulse, and the leave a bar behind the signal with the corresponding line style (dashed or full).
Concerning the vertical bars, the synchronous display is only possible once a first labeling of P1 has been done.
If the plots are in the P1 mode, then the synchronous display will be deactivated while hovering above the signal or the spectrogram,
but will work while hovering over the other two (One migth consider the other representation to label P2 instead of the IPI).
Hovering over a negative IPI value will still work for the autocorrelation and the cepstrum since they are symmetric in time.
*Note that since the clicks are centered with a local maximum detection, P1 should always be at 10 ms.
Thus, a future update might disable the selection of P1 or add a toggle button.*
####Autocorrelation and Cesptrum
#### Autocorrelation and Cesptrum
These two plots works in the same way. Clicking on them will set the IPI to the clicked location.
The automatic IPI set is the maximum in a range of 0.15 ms.
The automatic IPI set is the maximum in a range of 0.15 ms.
####Reset
#### Reset
Clicking on `Reset current` will set all the annotable values of the current click to `nan`.
###Other functionalities
####resizing
### Other functionalities
#### resizing
In order to have a responsive GUI, the automatic resizing of the plots have been deactivated
You can click on `resize plot` to have compute one resize for the current layout (takes ~1sec).
####Listsening to the sound
You can click on `resize plot` to compute one resize for the current layout (takes ~1sec).
#### Listening to the sound
By clicking on `Play current segment`, the sound of the current signal segment will be played.
Note that while the sound is played, the interface becomes irresponsive.
As stated above, the audio player used by pydub require additional libraries.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment