Skip to content

Commit

Permalink
counting instrument
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbarrier committed Nov 17, 2021
1 parent 3f5bcc9 commit 3800fdb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mesoscopy/instrument/lockin.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def init_lockin(


def enable_DC(station: Station):
for lockin in _list_lockins(station):
lockins = _list_lockins(station)
for lockin in lockins:
station.__getattr__(lockin).oscs[1].freq(0)
station.__getattr__(lockin).demods[2].adcselect(0)
station.__getattr__(lockin).demods[2].oscselect(1)
Expand Down
19 changes: 19 additions & 0 deletions mesoscopy/measurement/parameters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from time import time
from qcodes import Parameter
from typing import Tuple
from qcodes import Instrument
from qcodes.utils.validators import Ints
from qcodes.instrument.parameter import _BaseParameter
from qcodes.instrument.specialized_parameters import ElapsedTimeParameter as \
Expand Down Expand Up @@ -38,6 +39,24 @@ def reset_count(self) -> None:
self._count = 0


class Counter(Instrument):
'''an instrument to use as counter'''
def __init__(self, name: str = 'counter',
**kwargs):
super().__init__(name, **kwargs)

self.add_parameter(
'counter',
parameter_class=Parameter,
initial_value=0,
label=f"counter",
unit="#",
vals=Numbers(min_value=0),
get_cmd=None,
set_cmd=None,
)


class TimestampParameter(Parameter):
'''parameter to keep track of time, gives a timestamp'''

Expand Down
1 change: 1 addition & 0 deletions mesoscopy/measurement/sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def sweep2d(
measure_retrace: Optional[bool] = False,
num_retrace: Optional[str] = 201,
additional_setpoints: Sequence[doNd.ParamMeasT] = tuple(),
force: Optional[bool] = False,
):

sweep2d_time(param_setx, xarray, inner_delay,
Expand Down

0 comments on commit 3800fdb

Please sign in to comment.