Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pulse_lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QuTech QDLabs
pulse_lib
Commits
c82abb0b
Commit
c82abb0b
authored
1 year ago
by
Sander de Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Added `get_channel_acquisition_mode`
parent
bbeadd9b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pulse_lib/tests/mock_m3102a.py
+13
-7
13 additions, 7 deletions
pulse_lib/tests/mock_m3102a.py
with
13 additions
and
7 deletions
pulse_lib/tests/mock_m3102a.py
+
13
−
7
View file @
c82abb0b
...
...
@@ -24,15 +24,19 @@ class MockM3102A(Instrument):
def
set_operating_mode
(
self
,
value
):
pass
def
set_acquisition_mode
(
self
,
value
):
pass
def
set_acquisition_mode
(
self
,
mode
):
for
prop
in
self
.
measure
.
_ch_properties
.
values
():
prop
.
acquisition_mode
=
mode
def
get_channel_acquisition_mode
(
self
,
ch_num
):
return
self
.
measure
.
_ch_properties
[
ch_num
].
acquisition_mode
def
set_active_channels
(
self
,
channel_list
):
self
.
measure
.
_active_channels
=
set
(
channel_list
)
def
set_data_handling_mode
(
self
,
mode
):
for
ch
in
self
.
measure
.
_
active_channels
:
self
.
measure
.
_ch_properties
[
ch
]
.
data_mode
=
mode
for
prop
in
self
.
measure
.
_
ch_properties
.
values
()
:
prop
.
data_mode
=
mode
@property
def
active_channels
(
self
):
...
...
@@ -75,12 +79,14 @@ class ChannelProperties:
t_measure
:
int
=
10
samples_per_cycle
:
int
=
1
data_mode
:
int
=
0
acquisition_mode
:
int
=
0
class
ChannelData
:
def
__init__
(
self
):
self
.
_active_channels
=
set
([
1
,
2
,
3
,
4
])
self
.
_data
=
{
i
:
None
for
i
in
self
.
_active_channels
}
self
.
_ch_properties
=
{
i
:
ChannelProperties
()
for
i
in
self
.
_active_channels
}
all_channels
=
[
1
,
2
,
3
,
4
]
self
.
_active_channels
=
set
(
all_channels
)
self
.
_data
=
{
i
:
None
for
i
in
all_channels
}
self
.
_ch_properties
=
{
i
:
ChannelProperties
()
for
i
in
all_channels
}
def
get_data
(
self
):
result
=
[]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment