Skip to content

Commit 266dbf8

Browse files
committed
add docs
1 parent 1965e1c commit 266dbf8

File tree

2 files changed

+77
-5
lines changed

2 files changed

+77
-5
lines changed

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ sigui --mode=web --root-folder path-to-my-analyzers
222222
![launcher_web](docs/source/images/launcher_web.png)
223223

224224

225-
## Customizing the layout
225+
## Customizing layout and settings
226226

227227
You can create your own custom layout by specifying which views you'd like
228228
to see, and where they go. The basic window layout supports eight "zones",
@@ -248,7 +248,7 @@ E.g. suppose your layout is only non-empty in zones 1, 4, 5, 6 and 7:
248248
+---------------+--------------+
249249
```
250250

251-
Then zone1 will stretch right-wards to make a three-zone view. Zone4 will stretch
251+
Then zone1 will stretch right-wards to make a two-zone view. Zone4 will stretch
252252
downwards to make a long two-zone view.
253253

254254
To specify your own layout, put the specification in a `.json` file. This should
@@ -278,6 +278,41 @@ sigui --layout_file=path/to/my_layout.json path/to/sorting_analyzer
278278

279279
Find a list of available views [in this file](https://github.com/SpikeInterface/spikeinterface-gui/blob/main/spikeinterface_gui/viewlist.py).
280280

281+
You can also edit the initial settings for each view. There are two ways to do this.
282+
First, you can open the gui, edit the settings of any or all views, then press the
283+
"Save as default settings" button in the `mainsettings` view. This will save a
284+
`settings.json` file in your spikeinterface-gui config (saved in `~/.config/spikeinterface_gui/`).
285+
The saved settings will automatically load next time you start the gui.
286+
287+
If you want more direct control, you can pass your own setting json file
288+
to the `settings-file` flag (or by passing a `user_settings` dict to `run_mainwindow`).
289+
The settings file should contain a settings dict for each view. The view names are the
290+
same as used in the layout file, and each setting name can be seen in the settings
291+
tab of each view. Below is an example settings file:
292+
293+
**my_settings.json**
294+
295+
``` json
296+
{
297+
"probe": {
298+
"show_channel_id": true
299+
},
300+
"waveform": {
301+
"overlap": false,
302+
"plot_std": false
303+
},
304+
"spikeamplitude": {
305+
"max_spikes_per_unit": 1000,
306+
"alpha": 0.2
307+
}
308+
}
309+
```
310+
311+
You can then use this file by running e.g.
312+
313+
```bash
314+
sigui --settings_file=path/to/my_settings.json path/to/sorting_analyzer
315+
```
281316

282317
## Deploy the GUI in web mode
283318

docs/source/custom_layout.rst renamed to docs/source/custom_layout_settings.rst

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Customizing the layout
2-
======================
1+
Customizing layout and settings
2+
===============================
33

44
You can create your own custom layout by specifying which views you'd like
55
to see, and where they go. The basic window layout supports eight "zones",
@@ -26,7 +26,7 @@ E.g. suppose your layout is only non-empty in zones 1, 4, 5, 6 and 7:
2626
+---------------+--------------+
2727
2828
29-
Then zone1 will stretch right-wards to make a three-zone view. Zone4 will stretch
29+
Then zone1 will stretch right-wards to make a two-zone view. Zone4 will stretch
3030
downwards to make a long two-zone view.
3131

3232
To specify your own layout, put the specification in a ``.json`` file. This should
@@ -55,3 +55,40 @@ using the ``--layout_file`` flag:
5555
sigui --layout_file=path/to/my_layout.json path/to/sorting_analyzer
5656
5757
Find a list of available views `in this file <https://github.com/SpikeInterface/spikeinterface-gui/blob/main/spikeinterface_gui/viewlist.py>`_.
58+
59+
You can also edit the initial settings for each view. There are two ways to do this.
60+
First, you can open the gui, edit the settings of any or all views, then press the
61+
"Save as default settings" button in the ``mainsettings`` view. This will save a
62+
``settings.json`` file in your spikeinterface-gui config (saved in ``~/.config/spikeinterface_gui/``).
63+
The saved settings will automatically load next time you start the gui.
64+
65+
If you want more direct control, you can pass your own setting json file
66+
to the ``settings-file`` flag (or by passing a ``user_settings`` dict to ``run_mainwindow``).
67+
The settings file should contain a settings dict for each view. The view names are the
68+
same as used in the layout file, and each setting name can be seen in the settings
69+
tab of each view. Below is an example settings file:
70+
71+
**my_settings.json**
72+
73+
.. code-block:: json
74+
75+
{
76+
"probe": {
77+
"show_channel_id": true
78+
},
79+
"waveform": {
80+
"overlap": false,
81+
"plot_std": false
82+
},
83+
"spikeamplitude": {
84+
"max_spikes_per_unit": 1000,
85+
"alpha": 0.2
86+
}
87+
}
88+
89+
90+
You can then use this file by running e.g.
91+
92+
.. code-block:: bash
93+
94+
sigui --settings_file=path/to/my_settings.json path/to/sorting_analyzer

0 commit comments

Comments
 (0)