|
26 | 26 |
|
27 | 27 | from typing_extensions import Buffer, Unpack |
28 | 28 |
|
| 29 | + from qcodes.instrument.channel import ChannelTuple |
| 30 | + |
29 | 31 |
|
30 | 32 | def _read_curve_file(curve_file: TextIO) -> dict[Any, Any]: |
31 | 33 | """ |
@@ -583,31 +585,53 @@ def __init__( |
583 | 585 | self, "sensor", LakeshoreModel325Sensor, snapshotable=False |
584 | 586 | ) |
585 | 587 |
|
586 | | - for inp in ["A", "B"]: |
587 | | - sensor = LakeshoreModel325Sensor(self, f"sensor_{inp}", inp) |
588 | | - sensors.append(sensor) |
589 | | - self.add_submodule(f"sensor_{inp}", sensor) |
| 588 | + self.sensor_A: LakeshoreModel325Sensor = self.add_submodule( |
| 589 | + "sensor_A", LakeshoreModel325Sensor(self, "sensor_A", "A") |
| 590 | + ) |
| 591 | + """Sensor A""" |
| 592 | + sensors.append(self.sensor_A) |
| 593 | + self.sensor_B: LakeshoreModel325Sensor = self.add_submodule( |
| 594 | + "sensor_B", LakeshoreModel325Sensor(self, "sensor_B", "B") |
| 595 | + ) |
| 596 | + """Sensor B""" |
| 597 | + sensors.append(self.sensor_B) |
590 | 598 |
|
591 | | - self.add_submodule("sensor", sensors.to_channel_tuple()) |
| 599 | + self.sensor: ChannelTuple[LakeshoreModel325Sensor] = self.add_submodule( |
| 600 | + "sensor", sensors.to_channel_tuple() |
| 601 | + ) |
| 602 | + """ChannelTuple of sensors""" |
592 | 603 |
|
593 | 604 | heaters = ChannelList( |
594 | 605 | self, "heater", LakeshoreModel325Heater, snapshotable=False |
595 | 606 | ) |
596 | 607 |
|
597 | | - for loop in [1, 2]: |
598 | | - heater = LakeshoreModel325Heater(self, f"heater_{loop}", loop) |
599 | | - heaters.append(heater) |
600 | | - self.add_submodule(f"heater_{loop}", heater) |
| 608 | + self.heater_1: LakeshoreModel325Heater = self.add_submodule( |
| 609 | + "heater_1", LakeshoreModel325Heater(self, "heater_1", 1) |
| 610 | + ) |
| 611 | + """Heater 1""" |
| 612 | + heaters.append(self.heater_1) |
601 | 613 |
|
602 | | - self.add_submodule("heater", heaters.to_channel_tuple()) |
| 614 | + self.heater_2: LakeshoreModel325Heater = self.add_submodule( |
| 615 | + "heater_2", LakeshoreModel325Heater(self, "heater_2", 2) |
| 616 | + ) |
| 617 | + """Heater 2""" |
| 618 | + heaters.append(self.heater_2) |
| 619 | + |
| 620 | + self.heater: ChannelTuple[LakeshoreModel325Heater] = self.add_submodule( |
| 621 | + "heater", heaters.to_channel_tuple() |
| 622 | + ) |
| 623 | + """ChannelTuple of heaters""" |
603 | 624 |
|
604 | 625 | curves = ChannelList(self, "curve", LakeshoreModel325Curve, snapshotable=False) |
605 | 626 |
|
606 | 627 | for curve_index in range(1, 35): |
607 | 628 | curve = LakeshoreModel325Curve(self, curve_index) |
608 | 629 | curves.append(curve) |
609 | 630 |
|
610 | | - self.add_submodule("curve", curves) |
| 631 | + self.curve: ChannelList[LakeshoreModel325Curve] = self.add_submodule( |
| 632 | + "curve", curves |
| 633 | + ) |
| 634 | + """ChannelList of curves""" |
611 | 635 |
|
612 | 636 | self.connect_message() |
613 | 637 |
|
|
0 commit comments