@@ -52,13 +52,13 @@ def __init__(self, device: packet_handler.Handler = None):
52
52
self ._channels = {
53
53
d : digital_channel .DigitalInput (d ) for d in digital_channel .DIGITAL_INPUTS
54
54
}
55
- self .trigger_channel = "ID1 "
56
- self ._trigger_channel = self ._channels ["ID1 " ]
55
+ self .trigger_channel = "LA1 "
56
+ self ._trigger_channel = self ._channels ["LA1 " ]
57
57
self .trigger_mode = "disabled"
58
58
self ._trigger_mode = 0
59
59
self ._prescaler = 0
60
- self ._channel_one_map = "ID1 "
61
- self ._channel_two_map = "ID2 "
60
+ self ._channel_one_map = "LA1 "
61
+ self ._channel_two_map = "LA2 "
62
62
self ._trimmed = 0
63
63
64
64
def measure_frequency (
@@ -68,7 +68,7 @@ def measure_frequency(
68
68
69
69
Parameters
70
70
----------
71
- channel : {"ID1 ", "ID2 ", "ID3 ", "ID4 "}
71
+ channel : {"LA1 ", "LA2 ", "LA3 ", "LA4 "}
72
72
Name of the digital input channel in which to measure the frequency.
73
73
simultaneous_oscilloscope: bool, optional
74
74
Set this to True if you need to use the oscilloscope at the same time.
@@ -145,7 +145,7 @@ def measure_interval(
145
145
Parameters
146
146
----------
147
147
channels : List[str]
148
- A pair of digital inputs, ID1, ID2, ID3 , or ID4 . Both can be the same.
148
+ A pair of digital inputs, LA1, LA2, LA3 , or LA4 . Both can be the same.
149
149
modes : List[str]
150
150
Type of logic event to listen for on each channel. See
151
151
:class:`DigitalInput` for available modes.
@@ -209,7 +209,7 @@ def measure_duty_cycle(self, channel: str, timeout: float = 1) -> Tuple[float]:
209
209
210
210
Parameters
211
211
----------
212
- channel : {"ID1 ", "ID2 ", "ID3 ", "ID4 "}
212
+ channel : {"LA1 ", "LA2 ", "LA3 ", "LA4 "}
213
213
Digital input on which to measure.
214
214
timeout : float, optional
215
215
Timeout in seconds before cancelling measurement. The default value is
@@ -251,8 +251,8 @@ def capture(
251
251
Parameters
252
252
----------
253
253
channels : {1, 2, 3, 4}
254
- Number of channels to capture events on. Events will be captured on ID1 ,
255
- ID2, ID3 , and ID4 , in that order.
254
+ Number of channels to capture events on. Events will be captured on LA1 ,
255
+ LA2, LA3 , and LA4 , in that order.
256
256
events : int, optional
257
257
Number of logic events to capture on each channel. The default and maximum
258
258
value is 2500.
@@ -302,7 +302,7 @@ def capture(
302
302
start_time = time .time ()
303
303
304
304
for e , c in enumerate (
305
- [self ._channel_one_map , self ._channel_two_map , "ID3 " , "ID4 " ][:channels ]
305
+ [self ._channel_one_map , self ._channel_two_map , "LA3 " , "LA4 " ][:channels ]
306
306
):
307
307
c = self ._channels [c ]
308
308
c .events_in_buffer = events
@@ -396,10 +396,10 @@ def _capture_four(self, e2e_time: float):
396
396
self ._device .send_byte (CP .START_FOUR_CHAN_LA )
397
397
self ._device .send_int (CP .MAX_SAMPLES // 4 )
398
398
self ._device .send_int (
399
- self ._channels ["ID1 " ]._logic_mode
400
- | (self ._channels ["ID2 " ]._logic_mode << 4 )
401
- | (self ._channels ["ID3 " ]._logic_mode << 8 )
402
- | (self ._channels ["ID4 " ]._logic_mode << 12 )
399
+ self ._channels ["LA1 " ]._logic_mode
400
+ | (self ._channels ["LA2 " ]._logic_mode << 4 )
401
+ | (self ._channels ["LA3 " ]._logic_mode << 8 )
402
+ | (self ._channels ["LA4 " ]._logic_mode << 12 )
403
403
)
404
404
self ._device .send_byte (self ._prescaler )
405
405
@@ -408,7 +408,7 @@ def _capture_four(self, e2e_time: float):
408
408
self ._trigger_channel .number
409
409
] | self ._trigger_mode
410
410
except KeyError :
411
- e = "Triggering is only possible on ID1, ID2 , or ID3 ."
411
+ e = "Triggering is only possible on LA1, LA2 , or LA3 ."
412
412
raise NotImplementedError (e )
413
413
414
414
self ._device .send_byte (trigger )
@@ -433,7 +433,7 @@ def fetch_data(self) -> List[np.ndarray]:
433
433
counter_values = []
434
434
channels = list (
435
435
OrderedDict .fromkeys (
436
- [self ._channel_one_map , self ._channel_two_map , "ID3 " , "ID4 " ]
436
+ [self ._channel_one_map , self ._channel_two_map , "LA3 " , "LA4 " ]
437
437
)
438
438
)
439
439
for c in channels :
@@ -530,7 +530,7 @@ def get_initial_states(self) -> Dict[str, bool]:
530
530
-------
531
531
dict of four str: bool pairs
532
532
Dictionary containing pairs of channel names and the corresponding initial
533
- state, e.g. {'ID1 ': True, 'ID2 ': True, 'ID3 ': True, 'ID4 ': False}.
533
+ state, e.g. {'LA1 ': True, 'LA2 ': True, 'LA3 ': True, 'LA4 ': False}.
534
534
True means HIGH, False means LOW.
535
535
"""
536
536
return self ._get_initial_states_and_progress ()[0 ]
@@ -552,7 +552,7 @@ def get_xy(self, timestamps: List[np.ndarray]) -> List[np.ndarray]:
552
552
xy = []
553
553
554
554
for e , c in enumerate (
555
- [self ._channel_one_map , self ._channel_two_map , "ID3 " , "ID4 " ][
555
+ [self ._channel_one_map , self ._channel_two_map , "LA3 " , "LA4 " ][
556
556
: len (timestamps )
557
557
]
558
558
):
@@ -575,10 +575,10 @@ def _get_initial_states_and_progress(self) -> Tuple[Dict[str, bool], List[int]]:
575
575
progress [3 ] = (self ._device .get_int () - initial ) // 2 - 3 * CP .MAX_SAMPLES // 4
576
576
s = self ._device .get_byte ()
577
577
initial_states = {
578
- "ID1 " : (s & 1 != 0 ),
579
- "ID2 " : (s & 2 != 0 ),
580
- "ID3 " : (s & 4 != 0 ),
581
- "ID4 " : (s & 8 != 0 ),
578
+ "LA1 " : (s & 1 != 0 ),
579
+ "LA2 " : (s & 2 != 0 ),
580
+ "LA3 " : (s & 4 != 0 ),
581
+ "LA4 " : (s & 8 != 0 ),
582
582
}
583
583
self ._device .get_byte () # INITIAL_DIGITAL_STATES_ERR
584
584
self ._device .get_ack ()
@@ -596,7 +596,7 @@ def configure_trigger(self, trigger_channel: str, trigger_mode: str):
596
596
597
597
Parameters
598
598
----------
599
- trigger_channel : {"ID1 ", "ID2 ", "ID3 ", "ID4 "}
599
+ trigger_channel : {"LA1 ", "LA2 ", "LA3 ", "LA4 "}
600
600
The digital input on which to trigger.
601
601
trigger_condition : {"disabled", "falling", "rising"}
602
602
The type of logic level change on which to trigger.
@@ -640,18 +640,18 @@ def get_states(self) -> Dict[str, bool]:
640
640
-------
641
641
dict of four str: bool pairs
642
642
Dictionary containing pairs of channel names and the corresponding current
643
- state, e.g. {'ID1 ': True, 'ID2 ': True, 'ID3 ': True, 'ID4 ': False}.
643
+ state, e.g. {'LA1 ': True, 'LA2 ': True, 'LA3 ': True, 'LA4 ': False}.
644
644
True means HIGH, False means LOW.
645
645
"""
646
646
self ._device .send_byte (CP .DIN )
647
647
self ._device .send_byte (CP .GET_STATES )
648
648
s = self ._device .get_byte ()
649
649
self ._device .get_ack ()
650
650
return {
651
- "ID1 " : (s & 1 != 0 ),
652
- "ID2 " : (s & 2 != 0 ),
653
- "ID3 " : (s & 4 != 0 ),
654
- "ID4 " : (s & 8 != 0 ),
651
+ "LA1 " : (s & 1 != 0 ),
652
+ "LA2 " : (s & 2 != 0 ),
653
+ "LA3 " : (s & 4 != 0 ),
654
+ "LA4 " : (s & 8 != 0 ),
655
655
}
656
656
657
657
def count_pulses (
@@ -664,7 +664,7 @@ def count_pulses(
664
664
665
665
Parameters
666
666
----------
667
- channel : {"ID1 ", "ID2 ", "ID3 ", "ID4 "}
667
+ channel : {"LA1 ", "LA2 ", "LA3 ", "LA4 "}
668
668
Digital input on which to count pulses.
669
669
interval : float, optional
670
670
Time in seconds during which to count pulses. The default value is
0 commit comments