Skip to content

ARC Instrument SDK¤

Wrapper around the ARC_Instrument.dll SDK from Princeton Instruments.

The wrapper was written using v2.0.3 of the SDK.

Applicable for monochromator/spectrographs, filter wheels and readout systems (NCL/NCL-Lite) from Princeton Instruments.

PrincetonInstruments (Interface) ¤

PrincetonInstruments(equipment: Equipment)

              flowchart LR
              msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments[PrincetonInstruments]
              msl.equipment.schema.Interface[Interface]

                              msl.equipment.schema.Interface --> msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments
                


              click msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments href "" "msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments"
              click msl.equipment.schema.Interface href "" "msl.equipment.schema.Interface"
            

Wrapper around the ARC_Instrument.dll SDK from Princeton Instruments.

Regular-expression patterns that are used to select this Resource when connect() is called.

manufacturer=r"Princeton Instruments"
model=r""

Parameters:

Name Type Description Default
equipment Equipment

An Equipment instance.

required

A Connection instance supports the following properties for the ARC_Instrument wrapper.

Connection Properties:

Name Type Description
sdk_path str

The path to the SDK library. Default: "ARC_Instrument_x64.dll"

open bool

Whether to automatically open the connection. Default: True

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
def __init__(self, equipment: Equipment) -> None:
    """Wrapper around the `ARC_Instrument.dll` SDK from Princeton Instruments.

    Regular-expression patterns that are used to select this Resource when
    [connect()][msl.equipment.schema.Equipment.connect] is called.
    ```python
    manufacturer=r"Princeton Instruments"
    model=r""
    ```

    Args:
        equipment: An [Equipment][] instance.

    A [Connection][msl.equipment.schema.Connection] instance supports the following _properties_
    for the `ARC_Instrument` wrapper.

    Attributes: Connection Properties:
        sdk_path (str): The path to the SDK library. _Default: `"ARC_Instrument_x64.dll"`_
        open (bool): Whether to automatically open the connection. _Default: `True`_
    """
    self._mono_enum: int = -1
    self._ncl_enum: int = -1
    self._filter_enum: int = -1
    super().__init__(equipment)

    assert equipment.connection is not None  # noqa: S101
    p = equipment.connection.properties

    _load_sdk(p.get("sdk_path", "ARC_Instrument_x64.dll"))
    assert PrincetonInstruments._SDK is not None  # noqa: S101

    self._sdk: CDLL = PrincetonInstruments._SDK
    if p.get("open", True):
        num_found = self.get_num_found_inst_ports()
        if num_found == 0:
            num_found = self.search_for_inst()

        for enum in range(num_found):
            port = self.get_enum_preopen_com(enum)
            if not equipment.connection.address.endswith(str(port)):
                continue

            try:
                self.open_mono(enum)
            except MSLConnectionError:
                try:
                    self.open_filter(enum)
                except MSLConnectionError:
                    try:
                        _ = self.open_readout(enum)
                    except MSLConnectionError:
                        msg = "Could not open port {port!r}"
                        raise MSLConnectionError(self, msg) from None

calc_mono_slit_bandpass ¤

calc_mono_slit_bandpass(slit_num: int, width: float) -> float

Calculates the band pass for the provided slit width.

Parameters:

Name Type Description Default
slit_num int

The slit number.

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
required
width float

The slit width that the band pass is being calculated for.

required

Returns:

Type Description
float

The calculated band pass for the slit, in nm.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
def calc_mono_slit_bandpass(self, slit_num: int, width: float) -> float:
    """Calculates the band pass for the provided slit width.

    Args:
        slit_num: The slit number.

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

        width: The slit width that the band pass is being calculated for.

    Returns:
        The calculated band pass for the slit, in nm.
    """
    bp = c_double()
    error_code = c_long()
    self._sdk.ARC_Calc_Mono_Slit_BandPass(self._mono_enum, slit_num, width, bp, error_code)
    return bp.value

close_enum staticmethod ¤

close_enum(enum: int) -> None

Function to close an open enumeration.

Parameters:

Name Type Description Default
enum int

A handle defined in ARC_Open_xxxx by which the instrument is to be addressed.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
117
118
119
120
121
122
123
124
125
126
127
128
129
130
@staticmethod
def close_enum(enum: int) -> None:
    """Function to close an open enumeration.

    Args:
        enum: A handle defined in *ARC_Open_xxxx* by which the instrument is to be addressed.
    """
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    if enum > -1:
        error_code = c_long()
        PrincetonInstruments._SDK.ARC_Close_Enum(enum, error_code)

det_nonblock_read_done ¤

det_nonblock_read_done(det_num: int) -> float

Returns the detector value.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
float

The value of the detector.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
168
169
170
171
172
173
174
175
176
177
178
179
180
def det_nonblock_read_done(self, det_num: int) -> float:
    """Returns the detector value.

    Args:
        det_num: The detector to be addressed.

    Returns:
        The value of the detector.
    """
    value = c_double()
    error_code = c_long()
    self._sdk.ARC_Det_NonBlock_Read_Done(self._ncl_enum, det_num, value, error_code)
    return value.value

det_read ¤

det_read(det_num: int) -> float

Readout a single detector.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
float

Reading value for the selected detector.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
132
133
134
135
136
137
138
139
140
141
142
143
144
def det_read(self, det_num: int) -> float:
    """Readout a single detector.

    Args:
        det_num: The detector to be addressed.

    Returns:
        Reading value for the selected detector.
    """
    read = c_double()
    error_code = c_long()
    self._sdk.ARC_Det_Read(self._ncl_enum, det_num, read, error_code)
    return read.value

det_readall ¤

det_readall() -> tuple[float, float, float]

Readout all detectors.

Returns:

Type Description
tuple[float, float, float]

The reading of each detector.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
146
147
148
149
150
151
152
153
154
155
156
157
def det_readall(self) -> tuple[float, float, float]:
    """Readout all detectors.

    Returns:
        The reading of each detector.
    """
    det1 = c_double()
    det2 = c_double()
    det3 = c_double()
    error_code = c_long()
    self._sdk.ARC_Det_ReadAll(self._ncl_enum, det1, det2, det3, error_code)
    return det1.value, det2.value, det3.value

det_start_nonblock_read ¤

det_start_nonblock_read(det_num: int) -> None

Start to readout a single detector, but return immediately (non-blocking read).

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
159
160
161
162
163
164
165
166
def det_start_nonblock_read(self, det_num: int) -> None:
    """Start to readout a single detector, but return immediately (non-blocking read).

    Args:
        det_num: The detector to be addressed.
    """
    error_code = c_long()
    self._sdk.ARC_Det_Start_NonBlock_Read(self._ncl_enum, det_num, error_code)

disconnect ¤

disconnect() -> None

Close all open connections.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
102
103
104
105
106
107
108
109
110
111
112
113
114
115
def disconnect(self) -> None:  # pyright: ignore[reportImplicitOverride]
    """Close all open connections."""
    if self._mono_enum > -1:
        self.close_enum(self._mono_enum)
        super().disconnect()
        self._mono_enum = -1
    if self._ncl_enum > -1:
        self.close_enum(self._ncl_enum)
        super().disconnect()
        self._ncl_enum = -1
    if self._filter_enum > -1:
        self.close_enum(self._filter_enum)
        super().disconnect()
        self._filter_enum = -1

error_to_english staticmethod ¤

error_to_english(error_code: int) -> str

Convert an error code into a message.

Parameters:

Name Type Description Default
error_code int

An error code from the ARC_Instrument SDK.

required

Returns:

Type Description
str

The error message.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
@staticmethod
def error_to_english(error_code: int) -> str:
    """Convert an error code into a message.

    Args:
        error_code: An error code from the `ARC_Instrument` SDK.

    Returns:
        The error message.
    """
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    buffer = create_string_buffer(255)
    PrincetonInstruments._SDK.ARC_Error_To_English(error_code, buffer, len(buffer))
    return buffer.value.decode()

filter_home ¤

filter_home() -> None

Homes the filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
182
183
184
185
def filter_home(self) -> None:
    """Homes the filter wheel."""
    error_code = c_long()
    self._sdk.ARC_Filter_Home(self._filter_enum, error_code)

get_det_bipolar ¤

get_det_bipolar(det_num: int) -> bool

Return if a detector takes bipolar (+/-) readings.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
bool

True if the detector is bipolar (+/-), False if unipolar.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
623
624
625
626
627
628
629
630
631
632
633
def get_det_bipolar(self, det_num: int) -> bool:
    """Return if a detector takes bipolar (+/-) readings.

    Args:
        det_num: The detector to be addressed.

    Returns:
        `True` if the detector is bipolar (+/-), `False` if unipolar.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Det_BiPolar(self._ncl_enum, det_num, error_code))

get_det_bipolar_str ¤

get_det_bipolar_str(det_num: int) -> str

Return the description of the detector polarity.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
str

A description of whether the detector is unipolar or bipolar.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
635
636
637
638
639
640
641
642
643
644
645
646
647
def get_det_bipolar_str(self, det_num: int) -> str:
    """Return the description of the detector polarity.

    Args:
        det_num: The detector to be addressed.

    Returns:
        A description of whether the detector is unipolar or bipolar.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_Det_BiPolar_CharStr(self._ncl_enum, det_num, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_det_hv_on ¤

get_det_hv_on(det_num: int) -> bool

Return if the high voltage for a detector is turned on.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
bool

Whether the high voltage is turned on.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
661
662
663
664
665
666
667
668
669
670
671
def get_det_hv_on(self, det_num: int) -> bool:
    """Return if the high voltage for a detector is turned on.

    Args:
        det_num: The detector to be addressed.

    Returns:
        Whether the high voltage is turned on.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Det_HV_on(self._ncl_enum, det_num, error_code))

get_det_hv_volts ¤

get_det_hv_volts(det_num: int) -> int

Return the high voltage volts setting.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
int

High voltage volts that the detector is set to.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
649
650
651
652
653
654
655
656
657
658
659
def get_det_hv_volts(self, det_num: int) -> int:
    """Return the high voltage volts setting.

    Args:
        det_num: The detector to be addressed.

    Returns:
        High voltage volts that the detector is set to.
    """
    error_code = c_long()
    return int(self._sdk.ARC_get_Det_HV_Volts(self._ncl_enum, det_num, error_code))

get_det_num_avg_read ¤

get_det_num_avg_read() -> int

Return the number of readings that are averaged.

Returns:

Type Description
int

Number of readings averaged into a single reading.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
673
674
675
676
677
678
679
680
def get_det_num_avg_read(self) -> int:
    """Return the number of readings that are averaged.

    Returns:
        Number of readings averaged into a single reading.
    """
    error_code = c_long()
    return int(self._sdk.ARC_get_Det_NumAvgRead(self._ncl_enum, error_code))

get_det_range ¤

get_det_range(det_num: int) -> int

Return the detector range factor.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
int

The detector gain range.

  • 0 — 1x
  • 1 — 2x
  • 2 — 4x
  • 3 — 50x
  • 4 — 200x
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
def get_det_range(self, det_num: int) -> int:
    """Return the detector range factor.

    Args:
        det_num: The detector to be addressed.

    Returns:
        The detector gain range.

            * `0` — 1x
            * `1` — 2x
            * `2` — 4x
            * `3` — 50x
            * `4` — 200x

    """
    gain_range = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Det_Range(self._ncl_enum, det_num, gain_range, error_code)
    return gain_range.value

get_det_range_factor ¤

get_det_range_factor(det_num: int) -> int

Return the detector range multiplier.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
int

The detector range multiplier.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
703
704
705
706
707
708
709
710
711
712
713
714
715
def get_det_range_factor(self, det_num: int) -> int:
    """Return the detector range multiplier.

    Args:
        det_num: The detector to be addressed.

    Returns:
        The detector range multiplier.
    """
    range_factor = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Det_Range_Factor(self._ncl_enum, det_num, range_factor, error_code)
    return range_factor.value

get_det_type ¤

get_det_type(det_num: int) -> int

Return the detector readout type (Current, Voltage, Photon Counting).

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
int

The detector readout type.

  • 1 — Current
  • 2 — Voltage
  • 3 — Photon Counting
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
def get_det_type(self, det_num: int) -> int:
    """Return the detector readout type (Current, Voltage, Photon Counting).

    Args:
        det_num: The detector to be addressed.

    Returns:
        The detector readout type.

            * `1` — Current
            * `2` — Voltage
            * `3` — Photon Counting

    """
    det_type = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Det_Type(self._ncl_enum, det_num, det_type, error_code)
    return det_type.value

get_det_type_str ¤

get_det_type_str(det_num: int) -> str

Return a description of the detector readout type.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
str

The detector readout type (Current, Voltage, Photon Counting).

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
736
737
738
739
740
741
742
743
744
745
746
747
748
def get_det_type_str(self, det_num: int) -> str:
    """Return a description of the detector readout type.

    Args:
        det_num: The detector to be addressed.

    Returns:
        The detector readout type (Current, Voltage, Photon Counting).
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_Det_Type_CharStr(self._ncl_enum, det_num, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_enum_preopen_com staticmethod ¤

get_enum_preopen_com(enum: int) -> int

Returns the COM port number of an instrument not yet opened.

Note, search_for_inst needs to be called prior to this call.

Parameters:

Name Type Description Default
enum int

The enumeration for the unopened instrument.

required

Returns:

Type Description
int

The COM port number.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
@staticmethod
def get_enum_preopen_com(enum: int) -> int:
    """Returns the COM port number of an instrument not yet opened.

    Note, [search_for_inst][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.search_for_inst]
    needs to be called prior to this call.

    Args:
        enum: The enumeration for the unopened instrument.

    Returns:
        The COM port number.
    """  # noqa: E501
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    com = c_long()
    error_code = c_long()
    PrincetonInstruments._SDK.ARC_get_Enum_preOpen_COM(enum, com, error_code)
    return com.value

get_enum_preopen_model staticmethod ¤

get_enum_preopen_model(enum: int) -> str

Returns the model number of an instrument not yet opened.

Note, search_for_inst needs to be called prior to this call.

Parameters:

Name Type Description Default
enum int

The enumeration for the unopened instrument.

required

Returns:

Type Description
str

The model number of the Princeton Instruments device.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
@staticmethod
def get_enum_preopen_model(enum: int) -> str:
    """Returns the model number of an instrument not yet opened.

    Note, [search_for_inst][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.search_for_inst]
    needs to be called prior to this call.

    Args:
        enum: The enumeration for the unopened instrument.

    Returns:
        The model number of the Princeton Instruments device.
    """  # noqa: E501
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    buffer = create_string_buffer(255)
    error_code = c_long()
    PrincetonInstruments._SDK.ARC_get_Enum_preOpen_Model(enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_enum_preopen_serial staticmethod ¤

get_enum_preopen_serial(enum: int) -> str

Returns the serial number of an instrument not yet opened.

Note, search_for_inst needs to be called prior to this call.

Parameters:

Name Type Description Default
enum int

The enumeration for the unopened instrument.

required

Returns:

Type Description
str

The serial number of the Princeton Instruments device.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
@staticmethod
def get_enum_preopen_serial(enum: int) -> str:
    """Returns the serial number of an instrument not yet opened.

    Note, [search_for_inst][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.search_for_inst]
    needs to be called prior to this call.

    Args:
        enum: The enumeration for the unopened instrument.

    Returns:
        The serial number of the Princeton Instruments device.
    """  # noqa: E501
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    serial = c_long()
    error_code = c_long()
    PrincetonInstruments._SDK.ARC_get_Enum_preOpen_Serial_int32(enum, serial, error_code)
    return str(serial.value)

get_filter_max_pos ¤

get_filter_max_pos() -> int

Returns the maximum filter position.

Returns:

Type Description
int

Returns the maximum position possible with the filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
750
751
752
753
754
755
756
757
758
759
def get_filter_max_pos(self) -> int:
    """Returns the maximum filter position.

    Returns:
        Returns the maximum position possible with the filter wheel.
    """
    position = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Filter_Max_Pos(self._filter_enum, position, error_code)
    return position.value

get_filter_min_pos ¤

get_filter_min_pos() -> int

Returns the minimum filter position.

Returns:

Type Description
int

Returns the minimum position possible with the filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
761
762
763
764
765
766
767
768
769
770
def get_filter_min_pos(self) -> int:
    """Returns the minimum filter position.

    Returns:
        Returns the minimum position possible with the filter wheel.
    """
    position = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Filter_Min_Pos(self._filter_enum, position, error_code)
    return position.value

get_filter_model ¤

get_filter_model() -> str

Returns the model string from the instrument.

Returns:

Type Description
str

The model string of the instrument.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
772
773
774
775
776
777
778
779
780
781
def get_filter_model(self) -> str:
    """Returns the model string from the instrument.

    Returns:
        The model string of the instrument.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_Filter_Model_CharStr(self._filter_enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_filter_position ¤

get_filter_position() -> int

Returns the current filter position.

Returns:

Type Description
int

The current filter wheel position.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
783
784
785
786
787
788
789
790
791
792
def get_filter_position(self) -> int:
    """Returns the current filter position.

    Returns:
        The current filter wheel position.
    """
    position = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Filter_Position(self._filter_enum, position, error_code)
    return position.value

get_filter_preopen_model staticmethod ¤

get_filter_preopen_model(filter_enum: int) -> str

Returns the model string of an instrument not yet opened.

Note, search_for_inst needs to be called prior to this call. In the case of multiple filter wheel/spectrographs attached, it allows the user to sort, which instruments are to be opened before opening them.

Parameters:

Name Type Description Default
filter_enum int

A filter enumeration value.

required

Returns:

Type Description
str

The model string of the unopened filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
@staticmethod
def get_filter_preopen_model(filter_enum: int) -> str:
    """Returns the model string of an instrument not yet opened.

    Note, [search_for_inst][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.search_for_inst]
    needs to be called prior to this call. In the case of multiple filter wheel/spectrographs attached, it allows
    the user to sort, which instruments are to be opened before opening them.

    Args:
        filter_enum: A filter enumeration value.

    Returns:
        The model string of the unopened filter wheel.
    """  # noqa: E501
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    buffer = create_string_buffer(255)
    error_code = c_long()
    PrincetonInstruments._SDK.ARC_get_Filter_preOpen_Model_CharStr(filter_enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_filter_present ¤

get_filter_present() -> bool

Returns if the instrument has a filter wheel.

Returns:

Type Description
bool

Whether an integrated filter wheel is present on the filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
794
795
796
797
798
799
800
801
def get_filter_present(self) -> bool:
    """Returns if the instrument has a filter wheel.

    Returns:
        Whether an integrated filter wheel is present on the filter wheel.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Filter_Present(self._filter_enum, error_code))

get_filter_serial ¤

get_filter_serial() -> str

Returns the serial number of the filter wheel.

Returns:

Type Description
str

The serial number of the filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
803
804
805
806
807
808
809
810
811
812
def get_filter_serial(self) -> str:
    """Returns the serial number of the filter wheel.

    Returns:
        The serial number of the filter wheel.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_Filter_Serial_CharStr(self._filter_enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_mono_backlash_steps ¤

get_mono_backlash_steps() -> int

Returns the number of backlash steps used when reversing the wavelength drive.

Returns:

Type Description
int

The number of steps the instrument backlash corrects. Not valid on older instruments.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
903
904
905
906
907
908
909
910
911
912
def get_mono_backlash_steps(self) -> int:
    """Returns the number of backlash steps used when reversing the wavelength drive.

    Returns:
        The number of steps the instrument backlash corrects. Not valid on older instruments.
    """
    backlash = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Backlash_Steps(self._mono_enum, backlash, error_code)
    return backlash.value

get_mono_detector_angle ¤

get_mono_detector_angle() -> float

Returns the default detector angle of the instrument in radians.

Returns:

Type Description
float

The default detector angle of the instrument in radians.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
914
915
916
917
918
919
920
921
922
923
def get_mono_detector_angle(self) -> float:
    """Returns the default detector angle of the instrument in radians.

    Returns:
        The default detector angle of the instrument in radians.
    """
    angle = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_DetectorAngle(self._mono_enum, angle, error_code)
    return angle.value

get_mono_diverter_pos ¤

get_mono_diverter_pos(diverter_num: int) -> int

Returns the slit that the diverter mirror is pointing to.

Parameters:

Name Type Description Default
diverter_num int

The diverter to be queried.

  • 1 — Motorized entrance diverter mirror.
  • 2 — Motorized exit diverter mirror.
  • 3 — Motorized entrance diverter on a double slave unit.
  • 4 — Motorized exit diverter on a double slave unit.
required

Returns:

Type Description
int

The slit port that the diverter mirror is currently pointing at.

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
def get_mono_diverter_pos(self, diverter_num: int) -> int:
    """Returns the slit that the diverter mirror is pointing to.

    Args:
        diverter_num: The diverter to be queried.

            * `1` — Motorized entrance diverter mirror.
            * `2` — Motorized exit diverter mirror.
            * `3` — Motorized entrance diverter on a double slave unit.
            * `4` — Motorized exit diverter on a double slave unit.

    Returns:
        The slit port that the diverter mirror is currently pointing at.

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

    """
    diverter_pos = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Diverter_Pos(self._mono_enum, diverter_num, diverter_pos, error_code)
    return diverter_pos.value

get_mono_diverter_pos_str ¤

get_mono_diverter_pos_str(diverter_num: int) -> str

Returns a string describing the port the mirror is pointing to.

Parameters:

Name Type Description Default
diverter_num int

The diverter to be queried.

  • 1 — Motorized entrance diverter mirror.
  • 2 — Motorized exit diverter mirror.
  • 3 — Motorized entrance diverter on a double slave unit.
  • 4 — Motorized exit diverter on a double slave unit.
required

Returns:

Type Description
str

A string describing which port the diverter is pointing at.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
def get_mono_diverter_pos_str(self, diverter_num: int) -> str:
    """Returns a string describing the port the mirror is pointing to.

    Args:
        diverter_num: The diverter to be queried.

            * `1` — Motorized entrance diverter mirror.
            * `2` — Motorized exit diverter mirror.
            * `3` — Motorized entrance diverter on a double slave unit.
            * `4` — Motorized exit diverter on a double slave unit.

    Returns:
        A string describing which port the diverter is pointing at.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_Mono_Diverter_Pos_CharStr(self._mono_enum, diverter_num, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_mono_diverter_valid ¤

get_mono_diverter_valid(diverter_num: int) -> bool

Returns if a motorized diverter position is valid for an instrument.

Parameters:

Name Type Description Default
diverter_num int

The diverter to be queried.

  • 1 — Motorized entrance diverter mirror.
  • 2 — Motorized exit diverter mirror.
  • 3 — Motorized entrance diverter on a double slave unit.
  • 4 — Motorized exit diverter on a double slave unit.
required

Returns:

Type Description
bool

Whether the diverter mirror is valid.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
def get_mono_diverter_valid(self, diverter_num: int) -> bool:
    """Returns if a motorized diverter position is valid for an instrument.

    Args:
        diverter_num: The diverter to be queried.

            * `1` — Motorized entrance diverter mirror.
            * `2` — Motorized exit diverter mirror.
            * `3` — Motorized entrance diverter on a double slave unit.
            * `4` — Motorized exit diverter on a double slave unit.

    Returns:
        Whether the diverter mirror is valid.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Mono_Diverter_Valid(self._mono_enum, diverter_num, error_code))

get_mono_double ¤

get_mono_double() -> bool

Returns if the instrument is a double monochromator.

Returns:

Type Description
bool

Whether the instrument is a double monochromator.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
990
991
992
993
994
995
996
997
998
999
def get_mono_double(self) -> bool:
    """Returns if the instrument is a double monochromator.

    Returns:
        Whether the instrument is a double monochromator.
    """
    double_present = c_bool()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Double(self._mono_enum, double_present, error_code)
    return double_present.value

get_mono_double_intermediate_slit ¤

get_mono_double_intermediate_slit() -> int

If a monochromator is a double, return the intermediate slit position.

Returns:

Type Description
int

The intermediate slit of the double monochromator

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
def get_mono_double_intermediate_slit(self) -> int:
    """If a monochromator is a double, return the intermediate slit position.

    Returns:
        The intermediate slit of the double monochromator

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

    """
    slit_pos = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Double_Intermediate_Slit(self._mono_enum, slit_pos, error_code)
    return slit_pos.value

get_mono_double_subtractive ¤

get_mono_double_subtractive() -> bool

Returns if a double monochromator is subtractive instead of additive.

Returns:

Type Description
bool

Whether the double monochromator is subtractive.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
def get_mono_double_subtractive(self) -> bool:
    """Returns if a double monochromator is subtractive instead of additive.

    Returns:
        Whether the double monochromator is subtractive.
    """
    double_subtractive = c_bool()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Double_Subtractive(self._mono_enum, double_subtractive, error_code)
    return double_subtractive.value

get_mono_exit_slit ¤

get_mono_exit_slit() -> int

Return the exit slit position for a monochromator.

Function works with a single and double monochromator.

Returns:

Type Description
int

The intermediate slit of the double monochromator

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
def get_mono_exit_slit(self) -> int:
    """Return the exit slit position for a monochromator.

    Function works with a single and double monochromator.

    Returns:
        The intermediate slit of the double monochromator

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

    """
    slit_pos = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Exit_Slit(self._mono_enum, slit_pos, error_code)
    return slit_pos.value

get_mono_filter_max_pos ¤

get_mono_filter_max_pos() -> int

Returns the maximum filter position.

Returns:

Type Description
int

The maximum position possible with the filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
def get_mono_filter_max_pos(self) -> int:
    """Returns the maximum filter position.

    Returns:
        The maximum position possible with the filter wheel.
    """
    position = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Filter_Max_Pos(self._mono_enum, position, error_code)
    return position.value

get_mono_filter_min_pos ¤

get_mono_filter_min_pos() -> int

Returns the minimum filter position.

Returns:

Type Description
int

The minimum position possible with the filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
def get_mono_filter_min_pos(self) -> int:
    """Returns the minimum filter position.

    Returns:
        The minimum position possible with the filter wheel.
    """
    position = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Filter_Min_Pos(self._mono_enum, position, error_code)
    return position.value

get_mono_filter_position ¤

get_mono_filter_position() -> int

Returns the current filter position.

Returns:

Type Description
int

The current filter wheel position.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
def get_mono_filter_position(self) -> int:
    """Returns the current filter position.

    Returns:
        The current filter wheel position.
    """
    position = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Filter_Position(self._mono_enum, position, error_code)
    return position.value

get_mono_filter_present ¤

get_mono_filter_present() -> bool

Returns if the instrument has an integrated filter wheel.

Note, is a new option and not available on most instruments. All filter functions call this function before proceeding.

Returns:

Type Description
bool

Whether an integrated filter wheel is present on the monochromator.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
def get_mono_filter_present(self) -> bool:
    """Returns if the instrument has an integrated filter wheel.

    Note, is a new option and not available on most instruments. All filter
    functions call this function before proceeding.

    Returns:
        Whether an integrated filter wheel is present on the monochromator.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Mono_Filter_Present(self._mono_enum, error_code))

get_mono_focal_length ¤

get_mono_focal_length() -> float

Returns the default focal length of the instrument.

Returns:

Type Description
float

The focal length of the instrument in millimetres.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
def get_mono_focal_length(self) -> float:
    """Returns the default focal length of the instrument.

    Returns:
        The focal length of the instrument in millimetres.
    """
    focal_length = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Focallength(self._mono_enum, focal_length, error_code)
    return focal_length.value

get_mono_gear_steps ¤

get_mono_gear_steps() -> tuple[int, int]

Returns the number of steps in a set of sine drive gears.

Returns:

Type Description
tuple[int, int]

The number of steps per rev on the (minor, major) gear of a sine wavelength drive.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
def get_mono_gear_steps(self) -> tuple[int, int]:
    """Returns the number of steps in a set of sine drive gears.

    Returns:
        The number of steps per rev on the `(minor, major)` gear of a sine wavelength drive.
    """
    minor = c_long()
    major = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Gear_Steps(self._mono_enum, minor, major, error_code)
    return minor.value, major.value

get_mono_grating ¤

get_mono_grating() -> int

Returns the current grating.

Returns:

Type Description
int

The current grating. This assumes the correct turret has been inserted in the instrument.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
def get_mono_grating(self) -> int:
    """Returns the current grating.

    Returns:
        The current grating. This assumes the correct turret has been inserted in the instrument.
    """
    grating = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Grating(self._mono_enum, grating, error_code)
    return grating.value

get_mono_grating_blaze ¤

get_mono_grating_blaze(grating: int) -> str

Returns the blaze of a given grating.

Parameters:

Name Type Description Default
grating int

Which grating to request the information about. Validates the request by calling get_mono_grating_installed.

required

Returns:

Type Description
str

The blaze of the grating.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
def get_mono_grating_blaze(self, grating: int) -> str:
    """Returns the blaze of a given grating.

    Args:
        grating: Which grating to request the information about. Validates the request by calling
            [get_mono_grating_installed][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.get_mono_grating_installed].

    Returns:
        The blaze of the grating.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_Mono_Grating_Blaze_CharStr(self._mono_enum, grating, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_mono_grating_density ¤

get_mono_grating_density(grating: int) -> int

Returns the groove density (grooves per millimetre) of a given grating.

Parameters:

Name Type Description Default
grating int

Which grating to request the information about. Validates the request by calling get_mono_grating_installed.

required

Returns:

Type Description
int

The groove density of the grating in grooves per millimetre. For a mirror, this function will return 1200 grooves per millimetre.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
def get_mono_grating_density(self, grating: int) -> int:
    """Returns the groove density (grooves per millimetre) of a given grating.

    Args:
        grating: Which grating to request the information about. Validates the request by calling
            [get_mono_grating_installed][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.get_mono_grating_installed].

    Returns:
        The groove density of the grating in grooves per millimetre. For a mirror,
            this function will return 1200 grooves per millimetre.
    """
    groove_mm = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Grating_Density(self._mono_enum, grating, groove_mm, error_code)
    return groove_mm.value

get_mono_grating_gadjust ¤

get_mono_grating_gadjust(grating: int) -> int

Returns the GAdjust of a grating.

Parameters:

Name Type Description Default
grating int

Which grating to request the information about.

required

Returns:

Type Description
int

The grating GAdjust. Note, this value is specific to a specific instrument grating combination and not transferable between instruments.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
def get_mono_grating_gadjust(self, grating: int) -> int:
    """Returns the GAdjust of a grating.

    Args:
        grating: Which grating to request the information about.

    Returns:
        The grating GAdjust. Note, this value is specific to a specific instrument
            grating combination and not transferable between instruments.
    """
    g_adjust = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Grating_Gadjust(self._mono_enum, grating, g_adjust, error_code)
    return g_adjust.value

get_mono_grating_installed ¤

get_mono_grating_installed(grating: int) -> bool

Returns if a grating is installed.

Parameters:

Name Type Description Default
grating int

Which grating we are requesting the information about.

required

Returns:

Type Description
bool

Whether the grating requested is installed.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
def get_mono_grating_installed(self, grating: int) -> bool:
    """Returns if a grating is installed.

    Args:
        grating: Which grating we are requesting the information about.

    Returns:
        Whether the grating requested is installed.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Mono_Grating_Installed(self._mono_enum, grating, error_code))

get_mono_grating_max ¤

get_mono_grating_max() -> int

Get the maximum grating position installed.

This is usually the number of gratings installed.

Returns:

Type Description
int

The number of gratings installed.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
def get_mono_grating_max(self) -> int:
    """Get the maximum grating position installed.

    This is usually the number of gratings installed.

    Returns:
        The number of gratings installed.
    """
    num = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Grating_Max(self._mono_enum, num, error_code)
    return num.value

get_mono_grating_offset ¤

get_mono_grating_offset(grating: int) -> int

Returns the offset of a grating.

Parameters:

Name Type Description Default
grating int

The number of the grating that is to be addressed.

required

Returns:

Type Description
int

The grating offset. Note, this value is specific to a specific instrument grating combination and not transferable between instruments.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
def get_mono_grating_offset(self, grating: int) -> int:
    """Returns the offset of a grating.

    Args:
        grating: The number of the grating that is to be addressed.

    Returns:
        The grating offset. Note, this value is specific to a specific instrument
            grating combination and not transferable between instruments.
    """
    offset = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Grating_Offset(self._mono_enum, grating, offset, error_code)
    return offset.value

get_mono_half_angle ¤

get_mono_half_angle() -> float

Returns the default half angle of the instrument in radians.

Returns:

Type Description
float

The half angle of the instrument in radians.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
def get_mono_half_angle(self) -> float:
    """Returns the default half angle of the instrument in radians.

    Returns:
        The half angle of the instrument in radians.
    """
    half_angle = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_HalfAngle(self._mono_enum, half_angle, error_code)
    return half_angle.value

get_mono_init_grating ¤

get_mono_init_grating() -> int

Returns the initial grating (on instrument reboot).

Returns:

Type Description
int

The power-up grating number.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
def get_mono_init_grating(self) -> int:
    """Returns the initial grating (on instrument reboot).

    Returns:
        The power-up grating number.
    """
    init_grating = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Init_Grating(self._mono_enum, init_grating, error_code)
    return init_grating.value

get_mono_init_scan_rate_nm ¤

get_mono_init_scan_rate_nm() -> float

Returns the initial wavelength scan rate (on instrument reboot).

Returns:

Type Description
float

The power-up scan rate in nm / minute.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
def get_mono_init_scan_rate_nm(self) -> float:
    """Returns the initial wavelength scan rate (on instrument reboot).

    Returns:
        The power-up scan rate in nm / minute.
    """
    init_scan_rate = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Init_ScanRate_nm(self._mono_enum, init_scan_rate, error_code)
    return init_scan_rate.value

get_mono_init_wave_nm ¤

get_mono_init_wave_nm() -> float

Returns the initial wavelength (on instrument reboot).

Returns:

Type Description
float

The power-up wavelength in nm.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
def get_mono_init_wave_nm(self) -> float:
    """Returns the initial wavelength (on instrument reboot).

    Returns:
        The power-up wavelength in nm.
    """
    init_wave = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Init_Wave_nm(self._mono_enum, init_wave, error_code)
    return init_wave.value

get_mono_int_led_on ¤

get_mono_int_led_on() -> bool

Checks if the interrupter LED is on.

Returns:

Type Description
bool

Whether the interrupter LED is on.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1265
1266
1267
1268
1269
1270
1271
1272
def get_mono_int_led_on(self) -> bool:
    """Checks if the interrupter LED is on.

    Returns:
        Whether the interrupter LED is on.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Mono_Int_Led_On(self._mono_enum, error_code))

get_mono_model ¤

get_mono_model() -> str

Returns the model number of the monochromator.

Returns:

Type Description
str

The model number of the monochromator.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
def get_mono_model(self) -> str:
    """Returns the model number of the monochromator.

    Returns:
        The model number of the monochromator.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_Mono_Model_CharStr(self._mono_enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_mono_motor_int ¤

get_mono_motor_int() -> bool

Read the motor gear interrupter.

Returns:

Type Description
bool

Whether the motor gear was interrupted.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1285
1286
1287
1288
1289
1290
1291
1292
def get_mono_motor_int(self) -> bool:
    """Read the motor gear interrupter.

    Returns:
        Whether the motor gear was interrupted.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Mono_Motor_Int(self._mono_enum, error_code))

get_mono_nm_rev_ratio ¤

get_mono_nm_rev_ratio() -> float

Returns the number of stepper steps per rev of the wavelength drive motor.

Returns:

Type Description
float

The ratio of nm per rev in a linear wavelength drive.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
def get_mono_nm_rev_ratio(self) -> float:
    """Returns the number of stepper steps per rev of the wavelength drive motor.

    Returns:
        The ratio of nm per rev in a linear wavelength drive.
    """
    ratio = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_nmRev_Ratio(self._mono_enum, ratio, error_code)
    return ratio.value

get_mono_precision ¤

get_mono_precision() -> int

Returns the nm-decimal precision of the wavelength drive.

Note, this is independent of the wavelength step resolution whose coarseness is defined by the grating being used.

Returns:

Type Description
int

The number of digits after the decimal point the instrument uses. Note, the true precision is limited by the density of the grating and can be much less than the instruments wavelength precision.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
def get_mono_precision(self) -> int:
    """Returns the nm-decimal precision of the wavelength drive.

    Note, this is independent of the wavelength step resolution whose coarseness
    is defined by the grating being used.

    Returns:
        The number of digits after the decimal point the instrument uses.
            Note, the true precision is limited by the density of the grating and can
            be much less than the instruments wavelength precision.
    """
    error_code = c_long()
    return int(self._sdk.ARC_get_Mono_Precision(self._mono_enum, error_code))

get_mono_preopen_model staticmethod ¤

get_mono_preopen_model(mono_enum: int) -> str

Returns the model of an instrument not yet opened.

Note, search_for_inst needs to be called prior to this call. In the case of multiple Monochromator/Spectrographs attached, it allows the user to sort, which instruments are to be opened before opening them.

Parameters:

Name Type Description Default
mono_enum int

A monochromator enumeration.

required

Returns:

Type Description
str

The model of the unopened monochromator.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
@staticmethod
def get_mono_preopen_model(mono_enum: int) -> str:
    """Returns the model of an instrument not yet opened.

    Note, [search_for_inst][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.search_for_inst]
    needs to be called prior to this call. In the case of multiple Monochromator/Spectrographs attached, it allows
    the user to sort, which instruments are to be opened before opening them.

    Args:
        mono_enum: A monochromator enumeration.

    Returns:
        The model of the unopened monochromator.
    """  # noqa: E501
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    buffer = create_string_buffer(255)
    error_code = c_long()
    PrincetonInstruments._SDK.ARC_get_Mono_preOpen_Model_CharStr(mono_enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_mono_scan_rate_nm_min ¤

get_mono_scan_rate_nm_min() -> float

Return the current wavelength scan rate.

Returns:

Type Description
float

Scan rate in nm per minute.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
def get_mono_scan_rate_nm_min(self) -> float:
    """Return the current wavelength scan rate.

    Returns:
        Scan rate in nm per minute.
    """
    scan_rate = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Scan_Rate_nm_min(self._mono_enum, scan_rate, error_code)
    return scan_rate.value

get_mono_serial ¤

get_mono_serial() -> str

Returns the serial number of the instrument.

Returns:

Type Description
str

The serial number of the instrument as a string.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
def get_mono_serial(self) -> str:
    """Returns the serial number of the instrument.

    Returns:
        The serial number of the instrument as a string.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_Mono_Serial_CharStr(self._mono_enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_mono_shutter_open ¤

get_mono_shutter_open() -> bool

Returns if the integrated shutter is open.

Returns:

Type Description
bool

Whether the shutter is open.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1330
1331
1332
1333
1334
1335
1336
1337
def get_mono_shutter_open(self) -> bool:
    """Returns if the integrated shutter is open.

    Returns:
        Whether the shutter is open.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Mono_Shutter_Open(self._mono_enum, error_code))

get_mono_shutter_valid ¤

get_mono_shutter_valid() -> bool

Returns if the instrument has an integrated shutter.

Returns:

Type Description
bool

Whether a shutter is present.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1339
1340
1341
1342
1343
1344
1345
1346
def get_mono_shutter_valid(self) -> bool:
    """Returns if the instrument has an integrated shutter.

    Returns:
        Whether a shutter is present.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Mono_Shutter_Valid(self._mono_enum, error_code))

get_mono_sine_drive ¤

get_mono_sine_drive() -> bool

Returns if the gearing system has sine instead of a linear drive system.

Returns:

Type Description
bool

Whether the gearing is sine based verses linear gearing.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1348
1349
1350
1351
1352
1353
1354
1355
def get_mono_sine_drive(self) -> bool:
    """Returns if the gearing system has sine instead of a linear drive system.

    Returns:
        Whether the gearing is sine based verses linear gearing.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Mono_Sine_Drive(self._mono_enum, error_code))

get_mono_slit_type ¤

get_mono_slit_type(slit_pos: int) -> int

Returns the slit type for a given slit.

Parameters:

Name Type Description Default
slit_pos int

The slit to be addressed.

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
required

Returns:

Type Description
int

The type of slit attached.

  • 0 — No slit, older instruments that do will only return a slit type of zero.
  • 1 — Manual Slit.
  • 2 — Fixed Slit Width.
  • 3 — Focal Plane adapter.
  • 4 — Continuous Motor.
  • 5 — Fibre Optic.
  • 6 — Index able Slit.
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
def get_mono_slit_type(self, slit_pos: int) -> int:
    """Returns the slit type for a given slit.

    Args:
        slit_pos: The slit to be addressed.

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

    Returns:
        The type of slit attached.

            * `0` — No slit, older instruments that do will only return a slit type of zero.
            * `1` — Manual Slit.
            * `2` — Fixed Slit Width.
            * `3` — Focal Plane adapter.
            * `4` — Continuous Motor.
            * `5` — Fibre Optic.
            * `6` — Index able Slit.

    """
    slit_type = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Slit_Type(self._mono_enum, slit_pos, slit_type, error_code)
    return slit_type.value

get_mono_slit_type_str ¤

get_mono_slit_type_str(slit_pos: int) -> str

Returns a string descriptor of a given slit.

Parameters:

Name Type Description Default
slit_pos int

The slit to be addressed.

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
required

Returns:

Type Description
str

The description of the slit.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
def get_mono_slit_type_str(self, slit_pos: int) -> str:
    """Returns a string descriptor of a given slit.

    Args:
        slit_pos: The slit to be addressed.

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

    Returns:
        The description of the slit.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_Mono_Slit_Type_CharStr(self._mono_enum, slit_pos, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_mono_slit_width ¤

get_mono_slit_width(slit_pos: int) -> int

Returns the slit width of a motorized slit.

Parameters:

Name Type Description Default
slit_pos int

The slit to be addressed.

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
required

Returns:

Type Description
int

The width of the slit, if the slit is motorized.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
def get_mono_slit_width(self, slit_pos: int) -> int:
    """Returns the slit width of a motorized slit.

    Args:
        slit_pos: The slit to be addressed.

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

    Returns:
        The width of the slit, if the slit is motorized.
    """
    slit_width = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Slit_Width(self._mono_enum, slit_pos, slit_width, error_code)
    return slit_width.value

get_mono_slit_width_max ¤

get_mono_slit_width_max(slit_pos: int) -> int

Returns the maximum width of a motorized slit.

Parameters:

Name Type Description Default
slit_pos int

The slit to be addressed.

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
required

Returns:

Type Description
int

The maximum width of the slit, if the slit is motorized.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
def get_mono_slit_width_max(self, slit_pos: int) -> int:
    """Returns the maximum width of a motorized slit.

    Args:
        slit_pos: The slit to be addressed.

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

    Returns:
        The maximum width of the slit, if the slit is motorized.
    """
    slit_width = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Slit_Max(self._mono_enum, slit_pos, slit_width, error_code)
    return slit_width.value

get_mono_turret ¤

get_mono_turret() -> int

Returns the current grating turret number.

Returns:

Type Description
int

The current turret number.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
def get_mono_turret(self) -> int:
    """Returns the current grating turret number.

    Returns:
        The current turret number.
    """
    turret = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Turret(self._mono_enum, turret, error_code)
    return turret.value

get_mono_turret_gratings ¤

get_mono_turret_gratings() -> int

Returns the number of gratings per turret.

Returns:

Type Description
int

The number of gratings that can be placed on a single turret. This number can be one, two or three depending on the monochromator model.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
def get_mono_turret_gratings(self) -> int:
    """Returns the number of gratings per turret.

    Returns:
        The number of gratings that can be placed on a single turret. This number can be one,
            two or three depending on the monochromator model.
    """
    gratings_per_turret = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Turret_Gratings(self._mono_enum, gratings_per_turret, error_code)
    return gratings_per_turret.value

get_mono_turret_max ¤

get_mono_turret_max() -> int

Returns the number of turrets installed.

Returns:

Type Description
int

The number of turrets installed.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
def get_mono_turret_max(self) -> int:
    """Returns the number of turrets installed.

    Returns:
        The number of turrets installed.
    """
    turret = c_long()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Turret_Max(self._mono_enum, turret, error_code)
    return turret.value

get_mono_wavelength_abs_cm ¤

get_mono_wavelength_abs_cm() -> float

Returns the current center wavelength of instrument in absolute wavenumber.

Returns:

Type Description
float

The current wavelength of the instrument in absolute wavenumber.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
def get_mono_wavelength_abs_cm(self) -> float:
    """Returns the current center wavelength of instrument in absolute wavenumber.

    Returns:
        The current wavelength of the instrument in absolute wavenumber.
    """
    wavelength = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Wavelength_absCM(self._mono_enum, wavelength, error_code)
    return wavelength.value

get_mono_wavelength_ang ¤

get_mono_wavelength_ang() -> float

Returns the current center wavelength of instrument in Angstroms.

Returns:

Type Description
float

The current wavelength of the instrument in Angstroms.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
def get_mono_wavelength_ang(self) -> float:
    """Returns the current center wavelength of instrument in Angstroms.

    Returns:
        The current wavelength of the instrument in Angstroms.
    """
    wavelength = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Wavelength_ang(self._mono_enum, wavelength, error_code)
    return wavelength.value

get_mono_wavelength_cutoff_nm ¤

get_mono_wavelength_cutoff_nm() -> float

Returns, in nm, the max wavelength achievable by the instrument using the current grating.

Returns:

Type Description
float

The maximum center wavelength in nanometres for the current grating. On SpectraPro's this value equals 1400 nm * grating density / 1200 g/mm. On AM/VM products, this value is limited by the sine bar and will vary.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
def get_mono_wavelength_cutoff_nm(self) -> float:
    """Returns, in nm, the max wavelength achievable by the instrument using the current grating.

    Returns:
        The maximum center wavelength in nanometres for the current grating.
            On SpectraPro's this value equals 1400 nm * grating density / 1200 g/mm.
            On AM/VM products, this value is limited by the sine bar and will vary.
    """
    wavelength = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Wavelength_Cutoff_nm(self._mono_enum, wavelength, error_code)
    return wavelength.value

get_mono_wavelength_ev ¤

get_mono_wavelength_ev() -> float

Returns the current center wavelength of instrument in electron volts.

Returns:

Type Description
float

The current wavelength of the instrument in electron volts.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
def get_mono_wavelength_ev(self) -> float:
    """Returns the current center wavelength of instrument in electron volts.

    Returns:
        The current wavelength of the instrument in electron volts.
    """
    wavelength = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Wavelength_eV(self._mono_enum, wavelength, error_code)
    return wavelength.value

get_mono_wavelength_micron ¤

get_mono_wavelength_micron() -> float

Returns the current center wavelength of instrument in microns.

Returns:

Type Description
float

The current wavelength of the instrument in microns.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
def get_mono_wavelength_micron(self) -> float:
    """Returns the current center wavelength of instrument in microns.

    Returns:
        The current wavelength of the instrument in microns.
    """
    wavelength = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Wavelength_micron(self._mono_enum, wavelength, error_code)
    return wavelength.value

get_mono_wavelength_min_nm ¤

get_mono_wavelength_min_nm() -> float

Returns, in nm, the min wavelength achievable by the instrument using the current grating.

Returns:

Type Description
float

The minimum center wavelength in nanometres for the current grating. On SpectraPro's it is usually -10 nm, on linear AM/VM instruments this value will vary.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
def get_mono_wavelength_min_nm(self) -> float:
    """Returns, in nm, the min wavelength achievable by the instrument using the current grating.

    Returns:
        The minimum center wavelength in nanometres for the current grating.
            On SpectraPro's it is usually -10 nm, on linear AM/VM instruments this value will vary.
    """
    wavelength = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Wavelength_Min_nm(self._mono_enum, wavelength, error_code)
    return wavelength.value

get_mono_wavelength_nm ¤

get_mono_wavelength_nm() -> float

Returns the current center wavelength of instrument in nm.

Returns:

Type Description
float

The current wavelength of the instrument.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
def get_mono_wavelength_nm(self) -> float:
    """Returns the current center wavelength of instrument in nm.

    Returns:
        The current wavelength of the instrument.
    """
    wavelength = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Wavelength_nm(self._mono_enum, wavelength, error_code)
    return wavelength.value

get_mono_wavelength_rel_cm ¤

get_mono_wavelength_rel_cm(center_nm: int) -> float

Returns the current center wavelength of instrument in relative wavenumber.

Parameters:

Name Type Description Default
center_nm int

The wavelength, in nm, that the relative wavenumber is centred around.

required

Returns:

Type Description
float

The current wavelength of the instrument in relative wavenumber.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
def get_mono_wavelength_rel_cm(self, center_nm: int) -> float:
    """Returns the current center wavelength of instrument in relative wavenumber.

    Args:
        center_nm: The wavelength, in nm, that the relative wavenumber is centred around.

    Returns:
        The current wavelength of the instrument in relative wavenumber.
    """
    wavelength = c_double()
    error_code = c_long()
    self._sdk.ARC_get_Mono_Wavelength_relCM(self._mono_enum, center_nm, wavelength, error_code)
    return wavelength.value

get_mono_wheel_int ¤

get_mono_wheel_int() -> bool

Read the wheel gear interrupter.

Returns:

Type Description
bool

Whether the wheel gear was interrupted.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1586
1587
1588
1589
1590
1591
1592
1593
def get_mono_wheel_int(self) -> bool:
    """Read the wheel gear interrupter.

    Returns:
        Whether the wheel gear was interrupted.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_Mono_Wheel_Int(self._mono_enum, error_code))

get_ncl_filter_max_pos ¤

get_ncl_filter_max_pos() -> int

Returns the maximum filter position.

Returns:

Type Description
int

The maximum filter position.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
def get_ncl_filter_max_pos(self) -> int:
    """Returns the maximum filter position.

    Returns:
        The maximum filter position.
    """
    position = c_long()
    error_code = c_long()
    self._sdk.ARC_get_NCL_Filter_Max_Pos(self._ncl_enum, position, error_code)
    return position.value

get_ncl_filter_min_pos ¤

get_ncl_filter_min_pos() -> int

Returns the minimum filter position.

Returns:

Type Description
int

The minimum filter position.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
def get_ncl_filter_min_pos(self) -> int:
    """Returns the minimum filter position.

    Returns:
        The minimum filter position.
    """
    position = c_long()
    error_code = c_long()
    self._sdk.ARC_get_NCL_Filter_Min_Pos(self._ncl_enum, position, error_code)
    return position.value

get_ncl_filter_position ¤

get_ncl_filter_position() -> int

Return the current filter position.

Returns:

Type Description
int

The current filter position.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
def get_ncl_filter_position(self) -> int:
    """Return the current filter position.

    Returns:
        The current filter position.
    """
    position = c_long()
    error_code = c_long()
    self._sdk.ARC_get_NCL_Filter_Position(self._ncl_enum, position, error_code)
    return position.value

get_ncl_filter_present ¤

get_ncl_filter_present() -> bool

Returns if the instrument has an integrated filter wheel setup.

Returns:

Type Description
bool

Whether a NCL filter wheel is setup and present.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1662
1663
1664
1665
1666
1667
1668
1669
def get_ncl_filter_present(self) -> bool:
    """Returns if the instrument has an integrated filter wheel setup.

    Returns:
        Whether a NCL filter wheel is setup and present.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_NCL_Filter_Present(self._ncl_enum, error_code))

get_ncl_mono_enum ¤

get_ncl_mono_enum(mono_num: int) -> int

Return the enumeration of the attached monochromator.

Parameters:

Name Type Description Default
mono_num int

The readout system monochromator port being addressed.

required

Returns:

Type Description
int

The enumeration of the monochromator. Check the value returned with valid_mono_enum.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
def get_ncl_mono_enum(self, mono_num: int) -> int:
    """Return the enumeration of the attached monochromator.

    Args:
        mono_num: The readout system monochromator port being addressed.

    Returns:
        The enumeration of the monochromator. Check the value returned with
            [valid_mono_enum][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.valid_mono_enum].
    """
    error_code = c_long()
    return int(self._sdk.ARC_get_NCL_Mono_Enum(self._ncl_enum, mono_num, error_code))

get_ncl_mono_setup ¤

get_ncl_mono_setup(mono_num: int) -> bool

Return if the open NCL port has a Monochromator attached.

Parameters:

Name Type Description Default
mono_num int

The readout system monochromator port being addressed.

required

Returns:

Type Description
bool

Whether a monochromator is attached to the port and it is set up.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
def get_ncl_mono_setup(self, mono_num: int) -> bool:
    """Return if the open NCL port has a Monochromator attached.

    Args:
        mono_num: The readout system monochromator port being addressed.

    Returns:
        Whether a monochromator is attached to the port and it is set up.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_NCL_Mono_Setup(self._ncl_enum, mono_num, error_code))

get_ncl_shutter_open ¤

get_ncl_shutter_open(shutter_num: int) -> bool

Return if an NCL Readout shutter is open.

Parameters:

Name Type Description Default
shutter_num int

The shutter being addressed (1 or 2 on an NCL).

required

Returns:

Type Description
bool

Whether the shutter is in the open position.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
def get_ncl_shutter_open(self, shutter_num: int) -> bool:
    """Return if an NCL Readout shutter is open.

    Args:
        shutter_num: The shutter being addressed (1 or 2 on an NCL).

    Returns:
        Whether the shutter is in the open position.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_NCL_Shutter_Open(self._ncl_enum, shutter_num, error_code))

get_ncl_shutter_valid ¤

get_ncl_shutter_valid(shutter_num: int) -> bool

Return if a NCL Readout shutter number is valid.

Parameters:

Name Type Description Default
shutter_num int

The shutter being addressed (1 or 2 on an NCL).

required

Returns:

Type Description
bool

Whether the shutter number is valid.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
def get_ncl_shutter_valid(self, shutter_num: int) -> bool:
    """Return if a NCL Readout shutter number is valid.

    Args:
        shutter_num: The shutter being addressed (1 or 2 on an NCL).

    Returns:
        Whether the shutter number is valid.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_NCL_Shutter_Valid(self._ncl_enum, shutter_num, error_code))

get_ncl_ttl_in ¤

get_ncl_ttl_in(ttl_line: int) -> bool

Return if an input TTL line is being pulled on by an outside connection.

Parameters:

Name Type Description Default
ttl_line int

The TTL line number being addressed.

required

Returns:

Type Description
bool

Whether ttl_line is being pulled to TTL high.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
def get_ncl_ttl_in(self, ttl_line: int) -> bool:
    """Return if an input TTL line is being pulled on by an outside connection.

    Args:
        ttl_line: The TTL line number being addressed.

    Returns:
        Whether `ttl_line` is being pulled to TTL high.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_NCL_TTL_In(self._ncl_enum, ttl_line, error_code))

get_ncl_ttl_out ¤

get_ncl_ttl_out(ttl_line: int) -> bool

Return if an output TTL line is on.

Parameters:

Name Type Description Default
ttl_line int

The TTL line number being addressed.

required

Returns:

Type Description
bool

Whether the output ttl_line is set to TTL high.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
def get_ncl_ttl_out(self, ttl_line: int) -> bool:
    """Return if an output TTL line is on.

    Args:
        ttl_line: The TTL line number being addressed.

    Returns:
        Whether the output `ttl_line` is set to TTL high.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_NCL_TTL_Out(self._ncl_enum, ttl_line, error_code))

get_ncl_ttl_valid ¤

get_ncl_ttl_valid(ttl_line: int) -> bool

Return if a TTL line is a valid line.

Parameters:

Name Type Description Default
ttl_line int

The TTL line number being addressed.

required

Returns:

Type Description
bool

Whether ttl_line is a valid line number.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
def get_ncl_ttl_valid(self, ttl_line: int) -> bool:
    """Return if a TTL line is a valid line.

    Args:
        ttl_line: The TTL line number being addressed.

    Returns:
        Whether `ttl_line` is a valid line number.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_get_NCL_TTL_Valid(self._ncl_enum, ttl_line, error_code))

get_num_det ¤

get_num_det() -> int

Return the number of single point detectors in the Readout System.

Returns:

Type Description
int

Number of single point detectors the readout system supports. (1 NCL-Lite, 2,3 NCL).

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1756
1757
1758
1759
1760
1761
1762
1763
def get_num_det(self) -> int:
    """Return the number of single point detectors in the Readout System.

    Returns:
        Number of single point detectors the readout system supports. (1 NCL-Lite, 2,3 NCL).
    """
    error_code = c_long()
    return int(self._sdk.ARC_get_Num_Det(self._ncl_enum, error_code))

get_num_found_inst_ports staticmethod ¤

get_num_found_inst_ports() -> int

Returns the value last returned by search_for_inst.

Can be called multiple times.

Returns:

Type Description
int

The number of instruments found.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
@staticmethod
def get_num_found_inst_ports() -> int:
    """Returns the value last returned by [search_for_inst][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.search_for_inst].

    Can be called multiple times.

    Returns:
        The number of instruments found.
    """  # noqa: E501
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    return int(PrincetonInstruments._SDK.ARC_get_Num_Found_Inst_Ports())

get_readout_itime_ms ¤

get_readout_itime_ms() -> int

Return the integration time used for taking a reading.

Returns:

Type Description
int

The integration time used for taking a reading, in milliseconds.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1780
1781
1782
1783
1784
1785
1786
1787
def get_readout_itime_ms(self) -> int:
    """Return the integration time used for taking a reading.

    Returns:
        The integration time used for taking a reading, in milliseconds.
    """
    error_code = c_long()
    return int(self._sdk.ARC_get_ReadOut_ITime_ms(self._ncl_enum, error_code))

get_readout_model ¤

get_readout_model() -> str

Returns the model string from the instrument.

Returns:

Type Description
str

The model string of the instrument.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
def get_readout_model(self) -> str:
    """Returns the model string from the instrument.

    Returns:
        The model string of the instrument.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_ReadOut_Model_CharStr(self._ncl_enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_readout_preopen_model staticmethod ¤

get_readout_preopen_model(enum: int) -> str

Returns the model string of an instrument not yet opened.

Note, search_for_inst needs to be called prior to this call. In the case of multiple Readout Systems attached, it allows the user to sort, which instruments are to be opened before opening them.

Parameters:

Name Type Description Default
enum int

The instrument enumeration.

required

Returns:

Type Description
str

The model string of the unopened instrument.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
@staticmethod
def get_readout_preopen_model(enum: int) -> str:
    """Returns the model string of an instrument not yet opened.

    Note, [search_for_inst][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.search_for_inst]
    needs to be called prior to this call. In the case of multiple Readout Systems attached, it allows the user
    to sort, which instruments are to be opened before opening them.

    Args:
        enum: The instrument enumeration.

    Returns:
        The model string of the unopened instrument.
    """  # noqa: E501
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    buffer = create_string_buffer(255)
    error_code = c_long()
    PrincetonInstruments._SDK.ARC_get_ReadOut_preOpen_Model_CharStr(enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

get_readout_serial ¤

get_readout_serial() -> str

Returns the serial number from the instrument.

Returns:

Type Description
str

The serial number of the instrument as a string.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
def get_readout_serial(self) -> str:
    """Returns the serial number from the instrument.

    Returns:
        The serial number of the instrument as a string.
    """
    buffer = create_string_buffer(255)
    error_code = c_long()
    self._sdk.ARC_get_ReadOut_Serial_CharStr(self._ncl_enum, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

init staticmethod ¤

init(path: PathLike = 'ARC_Instrument_x64.dll') -> None

Initialize the SDK.

Parameters:

Name Type Description Default
path PathLike

The path to the SDK.

'ARC_Instrument_x64.dll'
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2250
2251
2252
2253
2254
2255
2256
2257
@staticmethod
def init(path: PathLike = "ARC_Instrument_x64.dll") -> None:
    """Initialize the SDK.

    Args:
        path: The path to the SDK.
    """
    _load_sdk(os.fsdecode(path))

is_inited staticmethod ¤

is_inited() -> bool

Check if the init method was called.

Returns:

Type Description
bool

Whether the method was called.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
@staticmethod
def is_inited() -> bool:
    """Check if the [init][msl.equipment_resources.princeton_instruments.arc_instrument.PrincetonInstruments.init] method was called.

    Returns:
        Whether the method was called.
    """  # noqa: E501
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    return bool(PrincetonInstruments._SDK.ARC_IsInited())

mono_filter_home ¤

mono_filter_home() -> None

Homes the filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
187
188
189
190
def mono_filter_home(self) -> None:
    """Homes the filter wheel."""
    error_code = c_long()
    self._sdk.ARC_Mono_Filter_Home(self._mono_enum, error_code)

mono_grating_calc_gadjust ¤

mono_grating_calc_gadjust(grating: int, wave: float, ref_wave: float) -> int

Calculate a new grating GAdjust.

Parameters:

Name Type Description Default
grating int

The number of the grating that is to be addressed.

required
wave float

The wavelength, in nm, on which a peak is currently falling.

required
ref_wave float

The wavelength, in nm, on which the peak should fall.

required

Returns:

Type Description
int

The calculated grating GAdjust. Note, this value is specific to a specific instrument-grating combination and not transferable between instruments.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
def mono_grating_calc_gadjust(self, grating: int, wave: float, ref_wave: float) -> int:
    """Calculate a new grating GAdjust.

    Args:
        grating: The number of the grating that is to be addressed.
        wave: The wavelength, in nm, on which a peak is currently falling.
        ref_wave: The wavelength, in nm, on which the peak should fall.

    Returns:
        The calculated grating GAdjust. Note, this value is specific to a specific
            instrument-grating combination and not transferable between instruments.
    """
    new_gadjust = c_long()
    error_code = c_long()
    self._sdk.ARC_Mono_Grating_Calc_Gadjust(self._mono_enum, grating, wave, ref_wave, new_gadjust, error_code)
    return new_gadjust.value

mono_grating_calc_offset ¤

mono_grating_calc_offset(grating: int, wave: float, ref_wave: float) -> int

Calculate a new grating offset.

Parameters:

Name Type Description Default
grating int

The number of the grating that is to be addressed.

required
wave float

The wavelength, in nm, on which a peak is currently falling.

required
ref_wave float

The wavelength, in nm, on which the peak should fall.

required

Returns:

Type Description
int

The calculated grating offset. Note, this value is specific to a specific instrument-grating combination and not transferable between instruments.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
def mono_grating_calc_offset(self, grating: int, wave: float, ref_wave: float) -> int:
    """Calculate a new grating offset.

    Args:
        grating: The number of the grating that is to be addressed.
        wave: The wavelength, in nm, on which a peak is currently falling.
        ref_wave: The wavelength, in nm, on which the peak should fall.

    Returns:
        The calculated grating offset. Note, this value is specific to a specific
            instrument-grating combination and not transferable between instruments.
    """
    new_offset = c_long()
    error_code = c_long()
    self._sdk.ARC_Mono_Grating_Calc_Offset(self._mono_enum, grating, wave, ref_wave, new_offset, error_code)
    return new_offset.value

mono_grating_install ¤

mono_grating_install(
    *,
    grating: int,
    density: int,
    blaze: str,
    nm_blaze: bool,
    um_blaze: bool,
    hol_blaze: bool,
    mirror: bool,
    reboot: bool
) -> None

Install a new grating.

Parameters:

Name Type Description Default
grating int

The number of the grating that is to be addressed.

required
density int

The groove density in grooves per mm of the grating.

required
blaze str

The Blaze string.

required
nm_blaze bool

Whether the grating has a nm blaze.

required
um_blaze bool

Whether the grating has a um blaze.

required
hol_blaze bool

Whether the grating has a holographic blaze.

required
mirror bool

Whether the grating position is a mirror.

required
reboot bool

Whether to reboot the monochromator after installing.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
def mono_grating_install(  # noqa: PLR0913
    self,
    *,
    grating: int,
    density: int,
    blaze: str,
    nm_blaze: bool,
    um_blaze: bool,
    hol_blaze: bool,
    mirror: bool,
    reboot: bool,
) -> None:
    """Install a new grating.

    Args:
        grating: The number of the grating that is to be addressed.
        density: The groove density in grooves per mm of the grating.
        blaze: The Blaze string.
        nm_blaze: Whether the grating has a nm blaze.
        um_blaze: Whether the grating has a um blaze.
        hol_blaze: Whether the grating has a holographic blaze.
        mirror: Whether the grating position is a mirror.
        reboot: Whether to reboot the monochromator after installing.
    """
    bb = create_string_buffer(blaze.encode())
    error_code = c_long()
    self._sdk.ARC_Mono_Grating_Install_CharStr(
        self._mono_enum, grating, density, bb, len(bb), nm_blaze, um_blaze, hol_blaze, mirror, reboot, error_code
    )

mono_grating_uninstall ¤

mono_grating_uninstall(grating: int, *, reboot: bool) -> None

Uninstall a grating.

Parameters:

Name Type Description Default
grating int

The number of the grating that is to be uninstalled.

required
reboot bool

Whether to reboot the monochromator after uninstalling.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
256
257
258
259
260
261
262
263
264
def mono_grating_uninstall(self, grating: int, *, reboot: bool) -> None:
    """Uninstall a grating.

    Args:
        grating: The number of the grating that is to be uninstalled.
        reboot: Whether to reboot the monochromator after uninstalling.
    """
    error_code = c_long()
    self._sdk.ARC_Mono_Grating_UnInstall(self._mono_enum, grating, reboot, error_code)

mono_move_steps ¤

mono_move_steps(num_steps: int) -> None

Move the grating a set number of steps.

Parameters:

Name Type Description Default
num_steps int

Number of steps to move the wavelength drive.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
266
267
268
269
270
271
272
273
def mono_move_steps(self, num_steps: int) -> None:
    """Move the grating a set number of steps.

    Args:
        num_steps: Number of steps to move the wavelength drive.
    """
    error_code = c_long()
    self._sdk.ARC_Mono_Move_Steps(self._mono_enum, num_steps, error_code)

mono_reset ¤

mono_reset() -> None

Reset the monochromator.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
275
276
277
278
def mono_reset(self) -> None:
    """Reset the monochromator."""
    error_code = c_long()
    self._sdk.ARC_Mono_Reset(self._mono_enum, error_code)

mono_restore_factory_settings ¤

mono_restore_factory_settings() -> None

Restore the instrument factory settings.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
280
281
282
283
def mono_restore_factory_settings(self) -> None:
    """Restore the instrument factory settings."""
    error_code = c_long()
    self._sdk.ARC_Mono_Restore_Factory_Settings(self._mono_enum, error_code)

mono_scan_done ¤

mono_scan_done() -> tuple[bool, float]

Check if a scan has completed.

Returns:

Type Description
tuple[bool, float]

Whether the scan finished (the scan ended or the grating wavelength limit was reached) and the current wavelength, in nm, of the grating.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
285
286
287
288
289
290
291
292
293
294
295
296
def mono_scan_done(self) -> tuple[bool, float]:
    """Check if a scan has completed.

    Returns:
        Whether the scan finished (the scan ended or the grating wavelength limit was reached) and
            the current wavelength, in nm, of the grating.
    """
    done = c_bool()
    nm = c_double()
    error_code = c_long()
    self._sdk.ARC_Mono_Scan_Done(self._mono_enum, done, nm, error_code)
    return done.value, nm.value

mono_slit_home ¤

mono_slit_home(slit_num: int) -> None

Homes a motorized slit.

Parameters:

Name Type Description Default
slit_num int

The slit to be homed.

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
def mono_slit_home(self, slit_num: int) -> None:
    """Homes a motorized slit.

    Args:
        slit_num: The slit to be homed.

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

    """
    error_code = c_long()
    self._sdk.ARC_Mono_Slit_Home(self._mono_enum, slit_num, error_code)

mono_slit_name staticmethod ¤

mono_slit_name(slit_num: int) -> str

Returns a text description of a slit position.

Parameters:

Name Type Description Default
slit_num int

The slit to be addressed.

required

Returns:

Type Description
str

The description of the slit port location.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
@staticmethod
def mono_slit_name(slit_num: int) -> str:
    """Returns a text description of a slit position.

    Args:
        slit_num: The slit to be addressed.

    Returns:
        The description of the slit port location.
    """
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    buffer = create_string_buffer(255)
    error_code = c_long()
    PrincetonInstruments._SDK.ARC_Mono_Slit_Name_CharStr(slit_num, buffer, len(buffer), error_code)
    return bytes(buffer.value).decode()

mono_start_jog ¤

mono_start_jog(*, jog_max_rate: bool, jog_forwards: bool) -> None

Start jogging the wavelength of the monochromator.

Parameters:

Name Type Description Default
jog_max_rate bool

Whether to jog at the max scan rate or at the current scan rate.

  • False — Current Scan Rate.
  • True — Max Scan Rate.
required
jog_forwards bool

Whether to jog forward (increasing nm) or backwards (decreasing nm).

  • False — Jog Backwards (decreasing nm).
  • True — Jog Forwards (increasing nm).
required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
def mono_start_jog(self, *, jog_max_rate: bool, jog_forwards: bool) -> None:
    """Start jogging the wavelength of the monochromator.

    Args:
        jog_max_rate: Whether to jog at the max scan rate or at the current scan rate.

            * `False` — Current Scan Rate.
            * `True` — Max Scan Rate.

        jog_forwards: Whether to jog forward (increasing nm) or backwards (decreasing nm).

            * `False` — Jog Backwards (decreasing nm).
            * `True` — Jog Forwards (increasing nm).

    """
    error_code = c_long()
    self._sdk.ARC_Mono_Start_Jog(self._mono_enum, jog_max_rate, jog_forwards, error_code)

mono_start_scan_to_nm ¤

mono_start_scan_to_nm(wavelength_nm: float) -> None

Start a wavelength scan.

Parameters:

Name Type Description Default
wavelength_nm float

Wavelength in nm we are to scan to. Note, the value should not be lower than the current wavelength and should not exceed the current grating wavelength limit.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
354
355
356
357
358
359
360
361
362
def mono_start_scan_to_nm(self, wavelength_nm: float) -> None:
    """Start a wavelength scan.

    Args:
        wavelength_nm: Wavelength in nm we are to scan to. Note, the value should not be lower than the
            current wavelength and should not exceed the current grating wavelength limit.
    """
    error_code = c_long()
    self._sdk.ARC_Mono_Start_Scan_To_nm(self._mono_enum, wavelength_nm, error_code)

mono_stop_jog ¤

mono_stop_jog() -> None

End a wavelength jog.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
364
365
366
367
def mono_stop_jog(self) -> None:
    """End a wavelength jog."""
    error_code = c_long()
    self._sdk.ARC_Mono_Stop_Jog(self._mono_enum, error_code)

ncl_filter_home ¤

ncl_filter_home() -> None

Home the filter wheel.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
394
395
396
397
def ncl_filter_home(self) -> None:
    """Home the filter wheel."""
    error_code = c_long()
    self._sdk.ARC_NCL_Filter_Home(self._ncl_enum, error_code)

open_filter ¤

open_filter(enum: int) -> None

Function to open a filter wheel.

Parameters:

Name Type Description Default
enum int

Number in the enumeration list to open.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
399
400
401
402
403
404
405
406
407
408
def open_filter(self, enum: int) -> None:
    """Function to open a filter wheel.

    Args:
        enum: Number in the enumeration list to open.
    """
    handle = c_long()
    error_code = c_long()
    self._sdk.ARC_Open_Filter(enum, handle, error_code)
    self._filter_enum = handle.value

open_filter_port ¤

open_filter_port(port: str) -> None

Function to open a filter wheel on a specific COM Port.

Parameters:

Name Type Description Default
port str

The COM port (e.g., "COM5").

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
444
445
446
447
448
449
450
451
452
453
def open_filter_port(self, port: str) -> None:
    """Function to open a filter wheel on a specific COM Port.

    Args:
        port: The COM port (e.g., `"COM5"`).
    """
    handle = c_long()
    error_code = c_long()
    self._sdk.ARC_Open_Filter_Port(int(port[3:]), handle, error_code)
    self._filter_enum = handle.value

open_filter_serial ¤

open_filter_serial(serial: str) -> None

Function to open a filter wheel with a specific serial number.

Parameters:

Name Type Description Default
serial str

The serial number of the filter wheel.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
455
456
457
458
459
460
461
462
463
464
465
def open_filter_serial(self, serial: str) -> None:
    """Function to open a filter wheel with a specific serial number.

    Args:
       serial: The serial number of the filter wheel.
    """
    handle = c_long()
    model = c_long()
    error_code = c_long()
    self._sdk.ARC_Open_Filter_Serial(int(serial), handle, model, error_code)
    self._filter_enum = handle.value

open_mono ¤

open_mono(enum: int) -> None

Function to open a Monochromator.

Parameters:

Name Type Description Default
enum int

Number in the enumeration list to open.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
410
411
412
413
414
415
416
417
418
419
def open_mono(self, enum: int) -> None:
    """Function to open a Monochromator.

    Args:
        enum: Number in the enumeration list to open.
    """
    handle = c_long()
    error_code = c_long()
    self._sdk.ARC_Open_Mono(enum, handle, error_code)
    self._mono_enum = handle.value

open_mono_port ¤

open_mono_port(port: str) -> None

Function to open a Monochromator on a specific COM Port.

Parameters:

Name Type Description Default
port str

The COM port (e.g., "COM5").

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
421
422
423
424
425
426
427
428
429
430
def open_mono_port(self, port: str) -> None:
    """Function to open a Monochromator on a specific COM Port.

    Args:
        port: The COM port (e.g., `"COM5"`).
    """
    handle = c_long()
    error_code = c_long()
    self._sdk.ARC_Open_Mono_Port(int(port[3:]), handle, error_code)
    self._mono_enum = handle.value

open_mono_serial ¤

open_mono_serial(serial: str) -> None

Function to open a Monochromator with a specific serial number.

Parameters:

Name Type Description Default
serial str

The serial number of the Monochromator.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
432
433
434
435
436
437
438
439
440
441
442
def open_mono_serial(self, serial: str) -> None:
    """Function to open a Monochromator with a specific serial number.

    Args:
        serial: The serial number of the Monochromator.
    """
    handle = c_long()
    model = c_long()
    error_code = c_long()
    self._sdk.ARC_Open_Mono_Serial(int(serial), handle, model, error_code)
    self._mono_enum = handle.value

open_readout ¤

open_readout(port: int) -> tuple[int, int]

Function to open a Readout System (NCL/NCL-Lite).

Parameters:

Name Type Description Default
port int

Number in the enumeration list to open.

required

Returns:

Type Description
tuple[int, int]

The first int is the enum by which to address the first mono attached to an NCL on port 1. The second int is the enum by which to address the second mono attached to an NCL on port 2.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
def open_readout(self, port: int) -> tuple[int, int]:
    """Function to open a Readout System (NCL/NCL-Lite).

    Args:
        port: Number in the enumeration list to open.

    Returns:
        The first [int][] is the enum by which to address the first mono attached to an NCL on port 1.
            The second [int][] is the enum by which to address the second mono attached to an NCL on port 2.
    """
    handle = c_long()
    mono1 = c_long()
    mono2 = c_long()
    error_code = c_long()
    self._sdk.ARC_Open_ReadOut(port, handle, mono1, mono2, error_code)
    self._ncl_enum = handle.value
    return mono1.value, mono2.value

open_readout_port ¤

open_readout_port(port: str) -> tuple[int, int]

Function to open a Readout System (NCL/NCL-Lite) on a specific COM Port.

Parameters:

Name Type Description Default
port str

The COM port (e.g., "COM5").

required

Returns:

Type Description
tuple[int, int]

The first int is the enum by which to address the first mono attached to an NCL on port 1. The second int is the enum by which to address the second mono attached to an NCL on port 2.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
def open_readout_port(self, port: str) -> tuple[int, int]:
    """Function to open a Readout System (NCL/NCL-Lite) on a specific COM Port.

    Args:
        port: The COM port (e.g., `"COM5"`).

    Returns:
        The first [int][] is the enum by which to address the first mono attached to an NCL on port 1.
            The second [int][] is the enum by which to address the second mono attached to an NCL on port 2.
    """
    handle = c_long()
    mono1 = c_long()
    mono2 = c_long()
    error_code = c_long()
    self._sdk.ARC_Open_ReadOut_Port(int(port[3:]), handle, mono1, mono2, error_code)
    self._ncl_enum = handle.value
    return mono1.value, mono2.value

search_for_inst staticmethod ¤

search_for_inst() -> int

Search for all attached Princeton Instruments.

Returns:

Type Description
int

The number of Princeton Instruments found and enumerated. Enumeration list starts with zero and ends with the number found minus one.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
@staticmethod
def search_for_inst() -> int:
    """Search for all attached Princeton Instruments.

    Returns:
        The number of Princeton Instruments found and enumerated.
            Enumeration list starts with zero and ends with the *number found* minus one.
    """
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    num_found = c_long()
    PrincetonInstruments._SDK.ARC_Search_For_Inst(num_found)
    return num_found.value

set_det_bipolar ¤

set_det_bipolar(det_num: int) -> None

Set the detector readout to bipolar (+/-).

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1834
1835
1836
1837
1838
1839
1840
1841
def set_det_bipolar(self, det_num: int) -> None:
    """Set the detector readout to bipolar (+/-).

    Args:
        det_num: The detector to be addressed.
    """
    error_code = c_long()
    self._sdk.ARC_set_Det_BiPolar(self._ncl_enum, det_num, error_code)

set_det_current ¤

set_det_current(det_num: int) -> None

Set the detector readout type to Current.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1843
1844
1845
1846
1847
1848
1849
1850
def set_det_current(self, det_num: int) -> None:
    """Set the detector readout type to Current.

    Args:
        det_num: The detector to be addressed.
    """
    error_code = c_long()
    self._sdk.ARC_set_Det_Current(self._ncl_enum, det_num, error_code)

set_det_hv_off ¤

set_det_hv_off(det_num: int) -> bool

Set the detector high voltage to off.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
bool

Whether the high voltage has been turned off.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
def set_det_hv_off(self, det_num: int) -> bool:
    """Set the detector high voltage to off.

    Args:
        det_num: The detector to be addressed.

    Returns:
        Whether the high voltage has been turned off.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_set_Det_HV_off(self._ncl_enum, det_num, error_code))

set_det_hv_on ¤

set_det_hv_on(det_num: int) -> bool

Set the detector high voltage to on.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required

Returns:

Type Description
bool

Whether the high voltage has been turned on.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
def set_det_hv_on(self, det_num: int) -> bool:
    """Set the detector high voltage to on.

    Args:
        det_num: The detector to be addressed.

    Returns:
        Whether the high voltage has been turned on.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_set_Det_HV_on(self._ncl_enum, det_num, error_code))

set_det_hv_volts ¤

set_det_hv_volts(det_num: int, hv_volts: int) -> None

Set the value of the high voltage.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required
hv_volts int

The high-voltage value.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1852
1853
1854
1855
1856
1857
1858
1859
1860
def set_det_hv_volts(self, det_num: int, hv_volts: int) -> None:
    """Set the value of the high voltage.

    Args:
        det_num: The detector to be addressed.
        hv_volts: The high-voltage value.
    """
    error_code = c_long()
    self._sdk.ARC_set_Det_HV_Volts(self._ncl_enum, det_num, hv_volts, error_code)

set_det_num_avg_read ¤

set_det_num_avg_read(num_reads_avg: int) -> None

Set the number of readings to average.

Parameters:

Name Type Description Default
num_reads_avg int

The number reads that will be required to acquire a single read.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1886
1887
1888
1889
1890
1891
1892
1893
def set_det_num_avg_read(self, num_reads_avg: int) -> None:
    """Set the number of readings to average.

    Args:
        num_reads_avg: The number reads that will be required to acquire a single read.
    """
    error_code = c_long()
    self._sdk.ARC_set_Det_NumAvgRead(self._ncl_enum, num_reads_avg, error_code)

set_det_photon ¤

set_det_photon(det_num: int) -> None

Set the detector readout type to Photon Counter.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1895
1896
1897
1898
1899
1900
1901
1902
def set_det_photon(self, det_num: int) -> None:
    """Set the detector readout type to Photon Counter.

    Args:
        det_num: The detector to be addressed.
    """
    error_code = c_long()
    self._sdk.ARC_set_Det_Photon(self._ncl_enum, det_num, error_code)

set_det_range ¤

set_det_range(det_num: int, gain_range: int) -> None

Set the detector gain-range factor.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required
gain_range int

The detector gain range.

  • 0 — 1x
  • 1 — 2x
  • 2 — 4x
  • 3 — 50x
  • 4 — 200x
required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
def set_det_range(self, det_num: int, gain_range: int) -> None:
    """Set the detector gain-range factor.

    Args:
        det_num: The detector to be addressed.
        gain_range: The detector gain range.

            * `0` — 1x
            * `1` — 2x
            * `2` — 4x
            * `3` — 50x
            * `4` — 200x

    """
    error_code = c_long()
    self._sdk.ARC_set_Det_Range(self._ncl_enum, det_num, gain_range, error_code)

set_det_type ¤

set_det_type(det_num: int, det_type: int) -> None

Set the detector readout type.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required
det_type int

The detector readout type.

  • 1 — Current
  • 2 — Voltage
  • 3 — Photon Counting
required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
def set_det_type(self, det_num: int, det_type: int) -> None:
    """Set the detector readout type.

    Args:
        det_num: The detector to be addressed.
        det_type: The detector readout type.

            * `1` — Current
            * `2` — Voltage
            * `3` — Photon Counting

    """
    error_code = c_long()
    self._sdk.ARC_set_Det_Type(self._ncl_enum, det_num, det_type, error_code)

set_det_unipolar ¤

set_det_unipolar(det_num: int) -> None

Set the detector readout to unipolar (-).

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1936
1937
1938
1939
1940
1941
1942
1943
def set_det_unipolar(self, det_num: int) -> None:
    """Set the detector readout to unipolar (-).

    Args:
        det_num: The detector to be addressed.
    """
    error_code = c_long()
    self._sdk.ARC_set_Det_UniPolar(self._ncl_enum, det_num, error_code)

set_det_voltage ¤

set_det_voltage(det_num: int) -> None

Set the detector readout type to voltage.

Parameters:

Name Type Description Default
det_num int

The detector to be addressed.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1945
1946
1947
1948
1949
1950
1951
1952
def set_det_voltage(self, det_num: int) -> None:
    """Set the detector readout type to voltage.

    Args:
        det_num: The detector to be addressed.
    """
    error_code = c_long()
    self._sdk.ARC_set_Det_Voltage(self._ncl_enum, det_num, error_code)

set_filter_position ¤

set_filter_position(position: int) -> None

Sets the current filter position.

Parameters:

Name Type Description Default
position int

Position the filter is to be set to.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1954
1955
1956
1957
1958
1959
1960
1961
def set_filter_position(self, position: int) -> None:
    """Sets the current filter position.

    Args:
        position: Position the filter is to be set to.
    """
    error_code = c_long()
    self._sdk.ARC_set_Filter_Position(self._filter_enum, position, error_code)

set_mono_diverter_pos ¤

set_mono_diverter_pos(diverter_num: int, diverter_pos: int) -> None

Sets the port that the unit is to point to.

Parameters:

Name Type Description Default
diverter_num int

The diverter to be modified.

  • 1 — Motorized entrance diverter mirror.
  • 2 — Motorized exit diverter mirror.
  • 3 — Motorized entrance diverter on a double slave unit.
  • 4 — Motorized exit diverter on a double slave unit.
required
diverter_pos int

The slit port that the diverter mirror is to be set to. Not all ports are valid for all diverter's.

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
def set_mono_diverter_pos(self, diverter_num: int, diverter_pos: int) -> None:
    """Sets the port that the unit is to point to.

    Args:
        diverter_num: The diverter to be modified.

            * `1` — Motorized entrance diverter mirror.
            * `2` — Motorized exit diverter mirror.
            * `3` — Motorized entrance diverter on a double slave unit.
            * `4` — Motorized exit diverter on a double slave unit.

        diverter_pos: The slit port that the diverter mirror is to be set to. Not all ports are valid
            for all diverter's.

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Diverter_Pos(self._mono_enum, diverter_num, diverter_pos, error_code)

set_mono_filter_position ¤

set_mono_filter_position(position: int) -> None

Sets the current filter position.

Parameters:

Name Type Description Default
position int

Position the filter is to be set to.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1990
1991
1992
1993
1994
1995
1996
1997
def set_mono_filter_position(self, position: int) -> None:
    """Sets the current filter position.

    Args:
        position: Position the filter is to be set to.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Filter_Position(self._mono_enum, position, error_code)

set_mono_grating ¤

set_mono_grating(grating: int) -> None

Sets the current grating.

Parameters:

Name Type Description Default
grating int

Set the current grating. This assumes the correct turret is inserted in the instrument and grating selected is a valid grating. This function will change to current turret in the firmware, but needs user interaction to install the correct turret.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
def set_mono_grating(self, grating: int) -> None:
    """Sets the current grating.

    Args:
        grating: Set the current grating. This assumes the correct turret is inserted in the
            instrument and grating selected is a valid grating. This function will change to
            current turret in the firmware, but needs user interaction to install the correct turret.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Grating(self._mono_enum, grating, error_code)

set_mono_grating_gadjust ¤

set_mono_grating_gadjust(grating: int, gadjust: int) -> None

Sets the grating GAdjust.

Parameters:

Name Type Description Default
grating int

The number of the grating that is to be addressed.

required
gadjust int

The grating GAdjust. Note, this value is specific to a specific instrument-grating combination and not transferable between instruments.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
def set_mono_grating_gadjust(self, grating: int, gadjust: int) -> None:
    """Sets the grating GAdjust.

    Args:
        grating: The number of the grating that is to be addressed.
        gadjust: The grating GAdjust. Note, this value is specific to a specific
            instrument-grating combination and not transferable between instruments.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Grating_Gadjust(self._mono_enum, grating, gadjust, error_code)

set_mono_grating_offset ¤

set_mono_grating_offset(grating: int, offset: int) -> None

Sets the grating offset.

Parameters:

Name Type Description Default
grating int

The number of the grating that is to be addressed.

required
offset int

The grating offset. Note, this value is specific to a specific instrument-grating combination and not transferable between instruments.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
def set_mono_grating_offset(self, grating: int, offset: int) -> None:
    """Sets the grating offset.

    Args:
        grating: The number of the grating that is to be addressed.
        offset: The grating offset. Note, this value is specific to a specific
            instrument-grating combination and not transferable between instruments.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Grating_Offset(self._mono_enum, grating, offset, error_code)

set_mono_init_grating ¤

set_mono_init_grating(init_grating: int) -> None

Sets the initial grating (on instrument reboot).

Parameters:

Name Type Description Default
init_grating int

The power-up grating number.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2032
2033
2034
2035
2036
2037
2038
2039
def set_mono_init_grating(self, init_grating: int) -> None:
    """Sets the initial grating (on instrument reboot).

    Args:
        init_grating: The power-up grating number.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Init_Grating(self._mono_enum, init_grating, error_code)

set_mono_init_scan_rate_nm ¤

set_mono_init_scan_rate_nm(init_scan_rate: float) -> None

Sets the initial wavelength scan rate (on instrument reboot).

Parameters:

Name Type Description Default
init_scan_rate float

The power-up scan rate in nm / minute.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2041
2042
2043
2044
2045
2046
2047
2048
def set_mono_init_scan_rate_nm(self, init_scan_rate: float) -> None:
    """Sets the initial wavelength scan rate (on instrument reboot).

    Args:
        init_scan_rate: The power-up scan rate in nm / minute.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Init_ScanRate_nm(self._mono_enum, init_scan_rate, error_code)

set_mono_init_wave_nm ¤

set_mono_init_wave_nm(init_wave: float) -> None

Sets the initial wavelength (on instrument reboot).

Parameters:

Name Type Description Default
init_wave float

The power-up wavelength in nm.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2050
2051
2052
2053
2054
2055
2056
2057
def set_mono_init_wave_nm(self, init_wave: float) -> None:
    """Sets the initial wavelength (on instrument reboot).

    Args:
        init_wave: The power-up wavelength in nm.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Init_Wave_nm(self._mono_enum, init_wave, error_code)

set_mono_int_led ¤

set_mono_int_led(*, enable: bool) -> None

Turns on and off the interrupter LED.

Parameters:

Name Type Description Default
enable bool

Indicates whether the LED should be on or off.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2059
2060
2061
2062
2063
2064
2065
2066
def set_mono_int_led(self, *, enable: bool) -> None:
    """Turns on and off the interrupter LED.

    Args:
        enable: Indicates whether the LED should be on or off.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Int_Led(self._mono_enum, bool(enable), error_code)

set_mono_scan_rate_nm_min ¤

set_mono_scan_rate_nm_min(scan_rate: float) -> None

Set the wavelength scan rate.

Parameters:

Name Type Description Default
scan_rate float

The rate to scan the wavelength in nm/minute.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2068
2069
2070
2071
2072
2073
2074
2075
def set_mono_scan_rate_nm_min(self, scan_rate: float) -> None:
    """Set the wavelength scan rate.

    Args:
        scan_rate: The rate to scan the wavelength in nm/minute.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Scan_Rate_nm_min(self._mono_enum, scan_rate, error_code)

set_mono_shutter_closed ¤

set_mono_shutter_closed() -> bool

Sets the integrated shutter position to closed.

Returns:

Type Description
bool

Whether the shutter has been closed.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2077
2078
2079
2080
2081
2082
2083
2084
def set_mono_shutter_closed(self) -> bool:
    """Sets the integrated shutter position to closed.

    Returns:
        Whether the shutter has been closed.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_set_Mono_Shutter_Closed(self._mono_enum, error_code))

set_mono_shutter_open ¤

set_mono_shutter_open() -> bool

Sets the integrated shutter position to open.

Returns:

Type Description
bool

Whether the shutter has been opened.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2086
2087
2088
2089
2090
2091
2092
2093
def set_mono_shutter_open(self) -> bool:
    """Sets the integrated shutter position to open.

    Returns:
        Whether the shutter has been opened.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_set_Mono_Shutter_Open(self._mono_enum, error_code))

set_mono_slit_width ¤

set_mono_slit_width(slit_pos: int, slit_width: int) -> None

Sets the slit width of a motorized slit (Types 4, 6 and 9).

Parameters:

Name Type Description Default
slit_pos int

The slit to be addressed.

  • 1 — Side entrance slit.
  • 2 — Front entrance slit.
  • 3 — Front exit slit.
  • 4 — Side exit slit.
  • 5 — Side entrance slit on a double slave unit.
  • 6 — Front entrance slit on a double slave unit.
  • 7 — Front exit slit on a double slave unit.
  • 8 — Side exit slit on a double slave unit.
required
slit_width int

The width to which the slit is to be set to. Note valid ranges are 10 to 3000 microns in one-micron increments for normal continuous motor slits (type 4 and 9), 10 to 12000 microns in five-micron increments for large continuous motor slits (type 4) and 25, 50, 100, 250, 500, 1000 microns for indexable slits (Type 6).

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
def set_mono_slit_width(self, slit_pos: int, slit_width: int) -> None:
    """Sets the slit width of a motorized slit (Types 4, 6 and 9).

    Args:
        slit_pos: The slit to be addressed.

            * `1` — Side entrance slit.
            * `2` — Front entrance slit.
            * `3` — Front exit slit.
            * `4` — Side exit slit.
            * `5` — Side entrance slit on a double slave unit.
            * `6` — Front entrance slit on a double slave unit.
            * `7` — Front exit slit on a double slave unit.
            * `8` — Side exit slit on a double slave unit.

        slit_width: The width to which the slit is to be set to. Note valid ranges are
            10 to 3000 microns in one-micron increments for normal continuous
            motor slits (type 4 and 9), 10 to 12000 microns in five-micron
            increments for large continuous motor slits (type 4) and
            25, 50, 100, 250, 500, 1000 microns for indexable slits (Type 6).
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Slit_Width(self._mono_enum, slit_pos, slit_width, error_code)

set_mono_turret ¤

set_mono_turret(turret: int) -> None

Sets the current grating turret.

Parameters:

Name Type Description Default
turret int

Set the current turret. This will change the grating to Turret number minus one times gratings per turret plus the one plus the current grating number minus one mod gratings per turret. The user must insert the correct turret into the instrument when using this function.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
def set_mono_turret(self, turret: int) -> None:
    """Sets the current grating turret.

    Args:
        turret: Set the current turret. This will change the grating to Turret number
            minus one times gratings per turret plus the one plus the current grating
            number minus one mod gratings per turret. The user must insert the correct
            turret into the instrument when using this function.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Turret(self._mono_enum, turret, error_code)

set_mono_wavelength_abs_cm ¤

set_mono_wavelength_abs_cm(wavelength: float) -> None

Sets the center wavelength of the instrument in absolute wavenumber's.

Parameters:

Name Type Description Default
wavelength float

The wavelength in absolute wavenumber that the instrument is to be moved to.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2131
2132
2133
2134
2135
2136
2137
2138
def set_mono_wavelength_abs_cm(self, wavelength: float) -> None:
    """Sets the center wavelength of the instrument in absolute wavenumber's.

    Args:
        wavelength: The wavelength in absolute wavenumber that the instrument is to be moved to.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Wavelength_absCM(self._mono_enum, wavelength, error_code)

set_mono_wavelength_ang ¤

set_mono_wavelength_ang(wavelength: float) -> None

Sets the center wavelength of the instrument in angstroms.

Parameters:

Name Type Description Default
wavelength float

The wavelength in Angstroms that the instrument is to be moved to.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2140
2141
2142
2143
2144
2145
2146
2147
def set_mono_wavelength_ang(self, wavelength: float) -> None:
    """Sets the center wavelength of the instrument in angstroms.

    Args:
        wavelength: The wavelength in Angstroms that the instrument is to be moved to.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Wavelength_ang(self._mono_enum, wavelength, error_code)

set_mono_wavelength_ev ¤

set_mono_wavelength_ev(wavelength: float) -> None

Sets the center wavelength of the instrument in Electron Volts.

Parameters:

Name Type Description Default
wavelength float

The wavelength in Electron Volts that the instrument is to be moved to.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2149
2150
2151
2152
2153
2154
2155
2156
def set_mono_wavelength_ev(self, wavelength: float) -> None:
    """Sets the center wavelength of the instrument in Electron Volts.

    Args:
        wavelength: The wavelength in Electron Volts that the instrument is to be moved to.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Wavelength_eV(self._mono_enum, wavelength, error_code)

set_mono_wavelength_micron ¤

set_mono_wavelength_micron(wavelength: float) -> None

Sets the center wavelength of the instrument in microns.

Parameters:

Name Type Description Default
wavelength float

The wavelength in microns that the instrument is to be moved to.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2158
2159
2160
2161
2162
2163
2164
2165
def set_mono_wavelength_micron(self, wavelength: float) -> None:
    """Sets the center wavelength of the instrument in microns.

    Args:
        wavelength: The wavelength in microns that the instrument is to be moved to.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Wavelength_micron(self._mono_enum, wavelength, error_code)

set_mono_wavelength_nm ¤

set_mono_wavelength_nm(wavelength: float) -> None

Sets the center wavelength of the instrument in nm.

Parameters:

Name Type Description Default
wavelength float

The wavelength in nm that the instrument is to be moved to.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2167
2168
2169
2170
2171
2172
2173
2174
def set_mono_wavelength_nm(self, wavelength: float) -> None:
    """Sets the center wavelength of the instrument in nm.

    Args:
        wavelength: The wavelength in nm that the instrument is to be moved to.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Wavelength_nm(self._mono_enum, wavelength, error_code)

set_mono_wavelength_rel_cm ¤

set_mono_wavelength_rel_cm(center_nm: float, wavelength: float) -> None

Sets the center wavelength of the instrument in relative wavenumber's.

Parameters:

Name Type Description Default
center_nm float

The wavelength in nanometres that 0 relative Wavenumber is centred around.

required
wavelength float

The wavelength in relative Wavenumber that the instrument is to be moved to.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2176
2177
2178
2179
2180
2181
2182
2183
2184
def set_mono_wavelength_rel_cm(self, center_nm: float, wavelength: float) -> None:
    """Sets the center wavelength of the instrument in relative wavenumber's.

    Args:
        center_nm: The wavelength in nanometres that 0 relative Wavenumber is centred around.
        wavelength: The wavelength in relative Wavenumber that the instrument is to be moved to.
    """
    error_code = c_long()
    self._sdk.ARC_set_Mono_Wavelength_relCM(self._mono_enum, center_nm, wavelength, error_code)

set_ncl_filter_position ¤

set_ncl_filter_position(position: int) -> None

Set the current filter position.

Parameters:

Name Type Description Default
position int

The current filter position.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2186
2187
2188
2189
2190
2191
2192
2193
def set_ncl_filter_position(self, position: int) -> None:
    """Set the current filter position.

    Args:
        position: The current filter position.
    """
    error_code = c_long()
    self._sdk.ARC_set_NCL_Filter_Position(self._ncl_enum, position, error_code)

set_ncl_filter_present ¤

set_ncl_filter_present(min_filter: int, max_filter: int) -> None

Set the instrument filter wheel to active (NCL only).

Parameters:

Name Type Description Default
min_filter int

Minimum filter position (on an NCL with the standard filter wheel 1).

required
max_filter int

Maximum filter position (on an NCL with the standard filter wheel 6).

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2195
2196
2197
2198
2199
2200
2201
2202
2203
def set_ncl_filter_present(self, min_filter: int, max_filter: int) -> None:
    """Set the instrument filter wheel to active (NCL only).

    Args:
        min_filter: Minimum filter position (on an NCL with the standard filter wheel 1).
        max_filter: Maximum filter position (on an NCL with the standard filter wheel 6).
    """
    error_code = c_long()
    self._sdk.ARC_set_NCL_Filter_Present(self._ncl_enum, min_filter, max_filter, error_code)

set_ncl_shutter_closed ¤

set_ncl_shutter_closed(shutter_num: int) -> None

Set a NCL Readout shutter to a closed state.

Parameters:

Name Type Description Default
shutter_num int

The shutter being addressed (1 or 2 on an NCL).

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2205
2206
2207
2208
2209
2210
2211
2212
def set_ncl_shutter_closed(self, shutter_num: int) -> None:
    """Set a NCL Readout shutter to a closed state.

    Args:
        shutter_num: The shutter being addressed (1 or 2 on an NCL).
    """
    error_code = c_long()
    self._sdk.ARC_set_NCL_Shutter_Closed(self._ncl_enum, shutter_num, error_code)

set_ncl_shutter_open ¤

set_ncl_shutter_open(shutter_num: int) -> None

Set a NCL Readout shutter to a closed state.

Parameters:

Name Type Description Default
shutter_num int

The shutter being addressed (1 or 2 on an NCL).

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2214
2215
2216
2217
2218
2219
2220
2221
def set_ncl_shutter_open(self, shutter_num: int) -> None:
    """Set a NCL Readout shutter to a closed state.

    Args:
        shutter_num: The shutter being addressed (1 or 2 on an NCL).
    """
    error_code = c_long()
    self._sdk.ARC_set_NCL_Shutter_Open(self._ncl_enum, shutter_num, error_code)

set_ncl_ttl_out_off ¤

set_ncl_ttl_out_off(ttl_line: int) -> None

Turn a TTL line off.

Parameters:

Name Type Description Default
ttl_line int

The TTL line number being addressed.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2223
2224
2225
2226
2227
2228
2229
2230
def set_ncl_ttl_out_off(self, ttl_line: int) -> None:
    """Turn a TTL line off.

    Args:
        ttl_line: The TTL line number being addressed.
    """
    error_code = c_long()
    self._sdk.ARC_set_NCL_TTL_Out_Off(self._ncl_enum, ttl_line, error_code)

set_ncl_ttl_out_on ¤

set_ncl_ttl_out_on(ttl_line: int) -> None

Turn a TTL line on.

Parameters:

Name Type Description Default
ttl_line int

The TTL line number being addressed.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2232
2233
2234
2235
2236
2237
2238
2239
def set_ncl_ttl_out_on(self, ttl_line: int) -> None:
    """Turn a TTL line on.

    Args:
        ttl_line: The TTL line number being addressed.
    """
    error_code = c_long()
    self._sdk.ARC_set_NCL_TTL_Out_On(self._ncl_enum, ttl_line, error_code)

set_readout_itime_ms ¤

set_readout_itime_ms(itime_ms: int) -> None

Set the integration time used for taking a reading.

Parameters:

Name Type Description Default
itime_ms int

The integration time in milliseconds to be used when reading out a detector.

required
Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
2241
2242
2243
2244
2245
2246
2247
2248
def set_readout_itime_ms(self, itime_ms: int) -> None:
    """Set the integration time used for taking a reading.

    Args:
        itime_ms: The integration time in milliseconds to be used when reading out a detector.
    """
    error_code = c_long()
    self._sdk.ARC_set_ReadOut_ITime_ms(self._ncl_enum, itime_ms, error_code)

valid_det_num ¤

valid_det_num(det_num: int) -> bool

Check if the detector number is valid on the Readout System.

Parameters:

Name Type Description Default
det_num int

The detector number to check.

required

Returns:

Type Description
bool

Whether the detector number is valid on the Readout System.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
519
520
521
522
523
524
525
526
527
528
529
def valid_det_num(self, det_num: int) -> bool:
    """Check if the detector number is valid on the Readout System.

    Args:
        det_num: The detector number to check.

    Returns:
        Whether the detector number is valid on the Readout System.
    """
    error_code = c_long()
    return bool(self._sdk.ARC_Valid_Det_Num(self._ncl_enum, det_num, error_code))

valid_enum staticmethod ¤

valid_enum(enum: int) -> bool

Check if an enumeration (handle) is valid and the instrument is open.

Parameters:

Name Type Description Default
enum int

The enumeration to check.

required

Returns:

Type Description
bool

Whether the enumeration is valid and the instrument is open.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
@staticmethod
def valid_enum(enum: int) -> bool:
    """Check if an enumeration (handle) is valid and the instrument is open.

    Args:
        enum: The enumeration to check.

    Returns:
        Whether the enumeration is valid and the instrument is open.
    """
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    error_code = c_long()
    return bool(PrincetonInstruments._SDK.ARC_Valid_Enum(enum, error_code))

valid_filter_enum staticmethod ¤

valid_filter_enum(filter_enum: int) -> bool

Check if a filter wheel enumeration (handle) is valid and the instrument is open.

Parameters:

Name Type Description Default
filter_enum int

The enumeration to check.

required

Returns:

Type Description
bool

Whether the enumeration is valid and the instrument is open.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
@staticmethod
def valid_filter_enum(filter_enum: int) -> bool:
    """Check if a filter wheel enumeration (handle) is valid and the instrument is open.

    Args:
        filter_enum: The enumeration to check.

    Returns:
        Whether the enumeration is valid and the instrument is open.
    """
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    error_code = c_long()
    return bool(PrincetonInstruments._SDK.ARC_Valid_Filter_Enum(filter_enum, error_code))

valid_mono_enum staticmethod ¤

valid_mono_enum(mono_enum: int) -> bool

Check if a monochromator enumeration (handle) is valid and the instrument is open.

All functions call this function to verify that the requested action is valid.

Parameters:

Name Type Description Default
mono_enum int

The enumeration to check.

required

Returns:

Type Description
bool

Whether the enumeration is valid and the instrument is open.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
@staticmethod
def valid_mono_enum(mono_enum: int) -> bool:
    """Check if a monochromator enumeration (handle) is valid and the instrument is open.

    All functions call this function to verify that the requested action is valid.

    Args:
        mono_enum: The enumeration to check.

    Returns:
        Whether the enumeration is valid and the instrument is open.
    """
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    error_code = c_long()
    return bool(PrincetonInstruments._SDK.ARC_Valid_Mono_Enum(mono_enum, error_code))

valid_readout_enum staticmethod ¤

valid_readout_enum(readout_enum: int) -> bool

Check if a Readout System (NCL/NCL-Lite) enumeration (handle) is valid and the instrument is open.

Args: readout_enum: The enumeration to check.

Returns:

Type Description
bool

Whether the enumeration is valid and the instrument is open.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
@staticmethod
def valid_readout_enum(readout_enum: int) -> bool:
    """Check if a Readout System (NCL/NCL-Lite) enumeration (handle) is valid and the instrument is open.

    Args:
    readout_enum: The enumeration to check.

    Returns:
        Whether the enumeration is valid and the instrument is open.
    """
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    error_code = c_long()
    return bool(PrincetonInstruments._SDK.ARC_Valid_ReadOut_Enum(readout_enum, error_code))

ver staticmethod ¤

ver() -> tuple[int, int, int]

Get the DLL version number.

It is the only function that can be called at any time.

Returns:

Type Description
tuple[int, int, int]

The (major, minor, build) version number.

Source code in packages/resources/src/msl/equipment_resources/princeton_instruments/arc_instrument.py
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
@staticmethod
def ver() -> tuple[int, int, int]:
    """Get the DLL version number.

    It is the only function that can be called at any time.

    Returns:
        The `(major, minor, build)` version number.
    """
    if PrincetonInstruments._SDK is None:
        msg = "PrincetonInstrumentsError: You must first call PrincetonInstruments.init()"
        raise RuntimeError(msg)

    major = c_long()
    minor = c_long()
    build = c_long()
    if not PrincetonInstruments._SDK.ARC_Ver(major, minor, build):
        msg = "PrincetonInstrumentsError: Cannot get the DLL version number"
        raise RuntimeError(msg)

    return major.value, minor.value, build.value