qmi.instruments.anapico.apsin
Instrument driver for the Anapico APSIN Series signal generators.
Classes
|
Instrument driver for the Anapico APSIN Series signal generators. |
- class qmi.instruments.anapico.apsin.Anapico_APSIN(context: QMI_Context, name: str, transport: str)
Instrument driver for the Anapico APSIN Series signal generators.
This driver has been developed for and tested with the Anapico APSIN2010, but is expected to also work with other APSIN models.
A subset of the instrument functionality is supported. Continuous wave, pulse modulation, amplitude modulation and frequency modulation are supported. Triggering, sweeping and multipurpose output are not supported.
- open() None
Connect to the instrument hardware.
When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.
Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call
super().open()as a last statement.
- close() None
Close the connection to the instrument hardware and release associated resources.
When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.
Subclasses can extend this method if they have specific resources to close. If they do, they should call
super().close()as a last statement.
- reset() None
Reset the instrument, returning most settings to their defaults.
- get_idn() QMI_InstrumentIdentification
Read instrument type and version and return QMI_InstrumentIdentification instance.
- get_output_enabled() bool
Return True if the RF output is enabled, False if disabled.
- set_output_enabled(enable: bool) None
Enable or disable the RF output.
- get_frequency() float
Return the current RF frequency in Hz.
- set_frequency(frequency: float) None
Set the RF frequency in Hz.
The instrument supports a limited frequency range. If the specified frequency is outside the supported range, the instrument will select the closest supported frequency.
- get_phase() float
Return the current phase adjustment in radians.
- set_phase(phase: float) None
Set the current phase adjustment in radians.
- get_power() float
Return the current RF output power in dBm.
- set_power(power: float) None
Set the RF output power in dBm.
- get_pulsemod_enabled() bool
Return True if pulse modulation is enabled, False if disabled.
- set_pulsemod_enabled(enable: bool) None
Enable or disable pulse modulation.
- get_pulsemod_ext_source() bool
Return True if pulse modulation uses an external source, False when using the internal source.
- set_pulsemod_ext_source(ext: bool) None
Enable or disable the external pulse modulation source.
When set to True, pulse modulation is controlled by an external pulse generator connected to the PULSE port of the instrument. When set to False, pulse modulation is controlled by an internal pulse generator.
- get_pulsemod_polarity() bool
Return True if the external pulse modulation polarity is inverted; False if it is normal.
- set_pulsemod_polarity(inverted: bool) None
Enable or disable inverted polarity for external modulation.
- get_am_enabled() bool
Return True if amplitude modulation is enabled, False if disabled.
- set_am_enabled(enable: bool) None
Enable or disable amplitude modulation.
- get_am_ext_source() bool
Return True if amplitude modulation uses an external source, False when using the internal source.
- set_am_ext_source(ext: bool) None
Enable or disable the external amplitude modulation source.
When set to True, amplitude modulation is controlled by an external signal connected to the PULSE port of the instrument. Note the external amplitude modulation signal is AC coupled.
When set to False, amplitude modulation is controlled by an internal signal.
- get_am_sensitivity() float
Return the amplitude modulation sensitivity as a fraction of nominal amplitude per Volt.
- set_am_sensitivity(sensitivity: float) None
Set the sensitivity for external amplitude modulation.
- Parameters:
sensitivity – Modulation sensitivity per Volt external input (range 0 … 3).
- get_fm_enabled() bool
Return True if frequency modulation is enabled, False if disabled.
- set_fm_enabled(enable: bool) None
Enable or disable frequency modulation.
- get_fm_ext_source() bool
Return True if frequency modulation uses an external source, False when using the internal source.
- set_fm_ext_source(ext: bool) None
Enable or disable the external frequency modulation source.
When set to True, frequency modulation is controlled by an external signal connected to the Phi-M port of the instrument. When set to False, frequency modulation is controlled by an internal signal.
- get_fm_sensitivity() float
Return the frequency modulation sensitivity in Hz/Volt.
- set_fm_sensitivity(sensitivity: float) None
Set the sensitivity for external frequency modulation.
- Parameters:
sensitivity – Frequency modulation deviation per one Volt peak amplitude of external input.
- get_fm_coupling() str
Return the input coupling for external frequency modulation.
- Returns:
Input coupling, either “AC” or “DC”.
- set_fm_coupling(coupling: str) None
Select AC or DC coupling for the external frequency modulation input.
- Parameters:
coupling – Input coupling, either “AC” or “DC”.
- get_reference_source() str
Return the current reference clock source.
- Returns:
“INT” if the internal reference is used; “EXT” if the external reference is used.
- set_reference_source(source: str) None
Set the reference clock source.
- Parameters:
source – “INT” to select the internal reference; “EXT” to select the external reference.
- get_external_reference_frequency() float
Return the configured external reference input frequency in Hz.
- set_external_reference_frequency(frequency: float) None
Set the expected external reference input frequency in Hz.
The instrument supports a limited range of reference frequencies. If the specified frequency is outside the supported range, the instrument will select the closest supported frequency.
The instrument has a very narrow reference lock range. The external reference frequency must match the configured frequency within 1 ppm to ensure a proper lock.
- get_reference_is_locked() bool
Return True if the instrument is locked to the internal or external reference clock.
- get_reference_output_enabled() bool
Return True if the 10 MHz reference clock output is enabled, False if disabled.
- set_reference_output_enabled(enable: bool) None
Enable or disable the 10 MHz reference clock output signal.
- force_unlock() None
Forcefully unlock the remote object.
This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.
Use this with care.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- classmethod get_category() str | None
Return the optional name of the category this object belongs to.
A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.
- get_name() str
Return the name of this object.
- Returns:
name attribute.
- get_signals() list[SignalDescription]
Return a list of signals that can be published by this object.
- Returns:
List consisting of qmi_signals attributes.
- is_locked() bool
Query if the remote object is locked.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- is_open() bool
Return True if the instrument is open (ready for interaction).
- lock(timeout: float = 0.0, lock_token: str | None = None) bool
Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.
If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- release_rpc_object() None
Give a warning if the instrument is removed while still open.
- unlock(lock_token: str | None = None) bool
Unlock the remote object.
Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.