Skip to content

Commit

Permalink
Merge pull request #4 from qutech/feature/revised-mapping
Browse files Browse the repository at this point in the history
Add latest changes for mapping gui
  • Loading branch information
grothe6 authored Jul 19, 2023
2 parents c6ef911 + f1210d5 commit 688ecad
Show file tree
Hide file tree
Showing 4 changed files with 327 additions and 196 deletions.
5 changes: 4 additions & 1 deletion docs/mapping_gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ Monitoring is a feature, which repeatedly calls the **get** command (or optional

The **Reset mapping** button resets all mappings. The **Unfold** button folds all terminals in the tree representation (toggling if pressed repeatedly).

The **Map automatically** button maps all uniquely mappable parameters.
The **Map automatically** button applies a heuristic for mapping the available terminals.
The algorithm used is (almost) equivalent to selecting the first terminal and repeatedly pressing the enter key until the last terminal (in the tree) is mapped.
This works best if the terminals are in the same order as the instruments that they should be mapped to.
Additionally the terminals mapping to channels of an instrument should be ordered the same as the channels (up to the driver but usually something like 0,1,2,...)


.. image:: images/mapping_gui.png
15 changes: 15 additions & 0 deletions src/examples/mapping_gui_test.ipy
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dci = DummyChannelInstrument("dci")
add_mapping_to_instrument(dci, path=DUMMY_CHANNEL_MAPPING)
station.add_component(dci)

# "good" ordering (for mapping suggestions / auto mapping) (for station with order dmm/dac/dci)
parameters: TerminalParameters = {
"dmm": {"voltage": {"type": "gettable"}, "current": {"type": "gettable"}},
"dac": {
Expand All @@ -56,6 +57,20 @@ parameters: TerminalParameters = {
"T1": {"test_parameter": {"type": "gettable"}},
"T2": {"test_parameter": {"type": "gettable"}},
}

# "bad" ordering (for mapping suggestions / auto mapping)
# parameters: TerminalParameters = {
# "dac": {
# "voltage": {
# "type": "dynamic",
# "setpoints": [0, 5],
# }
# },
# "dmm": {"voltage": {"type": "gettable"}, "current": {"type": "gettable"}},
# "T1": {"test_parameter": {"type": "gettable"}},
# "T2": {"test_parameter": {"type": "gettable"}},
# }

# parameters: TerminalParameters = {
# "dmm": {"voltage": {"type": "gettable"}, "current": {"type": "gettable"}},
# }
Expand Down
Loading

0 comments on commit 688ecad

Please sign in to comment.