Welcome to Instruments Automatisation Libraries’s documentation!
This is a python Library that allow the users to controll the following Instruments:
Anrtisu Spectrum Analyzer MS2760A
Anritsu Signal Generator MG3694C
Anritsu Vectro Analyzer MS4647B
Yokogawa Optical Spectrum Analyzer AQ6370D
Power Meter ThorLabs PM100D
KEITHLEY Source Meter 2612
Novoptel Laser LU1000
CoBrite Tunable Laser
Power Supply RD3005
Power Supply KA3005
Power Supply KA3005p
4 Channels Power Suppy GPP4323
AnaPico AG APPH20G
Python Libraries
This Python Librarys can be used with Python Version 3.10.0 or newr. For the Moment you will need the following python Libraries.
pip install ftd2xx
pip install oct2py
pip install pyserial
pip install python-vxi11
pip install PyVISA
pip install sockets
pip install pandas
pip install matplotlib
pip install numpy
How to use
Python code example to how to connect to ThorLabs Power Meter PM100D
Here’s a simple Python code example how to connect and disconnect from an instrument:
from PM100D import PM100D
PM = PM100D("Serial Number Of the ThorLabs Power Meter PM100D")
PM.getIdn()
PM.Close()
Instruments
Anritsu Vectro Analyzer MS2760A module
Created on Wed Dec 1 13:11:32 2021
@author: Martin.Mihaylov
- class MS2760A.MS2760A(resource_str)[source]
Bases:
object
- ExtractTtraceData(value)[source]
- Parameters:
value (int) –
function (!!!!!USE IT AT YOUR OWN RISK is not an official) –
- Trace Number from which the data is taken:
Can be set to [1,2,3,4,5,6].
1 - This Function will set the continues measurment to ‘OFF’. 2 - Will set the Data Format to ASCii. This is needed since :TREACE:DATA? <num> is defect!! 3 - Will write TRACE:DATA? <num>. Will return only 3 bits. The rest will be packed in the next command asked. 4 - Will ask for the Data Format. This is dummy command that will have the data and the Data Format. 5 - Make manupulations to separate the actual data from the rest and return the data in Output np.array() form.
workaround!!!!! (but a) –
- Trace Number from which the data is taken:
Can be set to [1,2,3,4,5,6].
1 - This Function will set the continues measurment to ‘OFF’. 2 - Will set the Data Format to ASCii. This is needed since :TREACE:DATA? <num> is defect!! 3 - Will write TRACE:DATA? <num>. Will return only 3 bits. The rest will be packed in the next command asked. 4 - Will ask for the Data Format. This is dummy command that will have the data and the Data Format. 5 - Make manupulations to separate the actual data from the rest and return the data in Output np.array() form.
- Returns:
Output – DESCRIPTION.
- Return type:
TYPE
- OPC()[source]
- Returns:
Places a “1” into the output queue when all device operations have been completed
- Return type:
TYPE str
- abort()[source]
Description: Resets the trigger system. This has the effect of aborting the sweep or any measurement that is currently in progress. Additionally, any pending operation flags that were set by initiation of the trigger system will be set to false. If :INITiate:CONTinuous is OFF (i.e. the instrument is in single sweep mode), send the command :INITiate[:IMMediate] to trigger the next sweep. If :INITiate:CONTinuous is ON (i.e. the instrument is in continuous sweep mode) a new sweep will start immediately
- ask_CHPowerState(state)[source]
- Parameters:
state (str/int) – Channel Power State Sets the state of the channel power measurement, ON or OFF. When using :CONFigure:CHPower,the state is automatically set to ON state = [‘ON’,’OFF’,1,0]
- Returns:
State ON or OFF
- Return type:
str
- ask_Configuration()[source]
- Returns:
Title: Option Configuration Description: This command returns a quoted string of characters readable only by Anritsu Customer Service. Only instrument configuration information is returned. No setup information is included.
- Return type:
TYPE str
- ask_DataPointCount()[source]
- Returns:
Query the data point count. Title: Display Point Count Query Return: Numeric
- Return type:
TYPE str
- ask_MarkerExcursion()[source]
- Returns:
Query the excursion for a marker. The excursion is the vertical distance from the peak to the next highest valley which must be exceeded for a peak to be considered a peak in marker max commands
- Return type:
TYPE str
- ask_MarkerExcursionState()[source]
- Returns:
Turn on/off excursion checking for marker max commands
- Return type:
str
- ask_ResBwidth()[source]
- Returns:
Ask the resolution bandwidth. Query Return: Numeric (Hz)
- Return type:
TYPE str
- ask_ResBwidthAuto()[source]
- Returns:
val – Query the resolution bandwidth. Defaoulf: ON
- Return type:
str
- ask_SingleOrContinuesMeas()[source]
- Returns:
data – The query version of the command returns a 1 if the instrument is continuously sweeping/measuring and returns a 0 if the instrument is in single sweep/measurement mode.
- Return type:
str
- ask_TraceData(traceNumber)[source]
!!!!!DONT USE IT!!!!!
- Parameters:
traceNumber (int) – Description: This command transfers trace data from the instrument to the controller. Data are transferred from the instrument as an IEEE definite length arbitrary block response, which has the form <header><block>.
- Returns:
Trace Data
- Return type:
TYPE str
- ask_TraceSelected()[source]
- Returns:
Query selected trace will be used by operations that use a single trace. The max number of traces available to select is model specific
- Return type:
TYPE str
- ask_TraceState(number)[source]
- Parameters:
number (int) –
Description: The trace visibility state. If it is OFF, the :TRAC:DATA? command will return nan. Trace Number:
int. [1,2,3,4,5,6]
- Raises:
ValueError – Error message
- Returns:
State ON or OFF
- Return type:
str
- ask_TraceType(number)[source]
- Parameters:
number (int) – Specifies how successive sweeps are combined to produce the resulting display value. Setting the TYPE to NORMal will cause the displayed value for a point to be the current measured value for that point. Setting the TYPE to AVERage will cause the displayed value for a point to be the average of the last <integer> measured values where <integer> is set by [:SENSe]:AVERage:COUNt. Setting the TYPE to MAXimum will cause the displayed value for a point is the maximum measured value for that point over sweeps. Setting the TYPE to MINimum will cause the displayed value for a point is the minimum measured value for that point over sweeps.Setting the TYPE to RMAXimum will cause the displayed value for a point to be the maximum of the last <integer> measured values where <integer> is set by [:SENSe]:AVERage:COUNt.Setting the TYPE to RMINimum will cause the displayed value for a point to be the minimum of the last <integer> measured values where <integer> is set by [:SENSe]:AVERage:COUNt. This command will be ignored when spectrogram is disabled by DISPlay:VIEW.
- Raises:
ValueError – Error message
- Returns:
Query Return: NORM|MIN|MAX|AVER|RMAX|RMIN|RAV
- Return type:
TYPE str
- ask_freq_Start()[source]
- Returns:
Query return set start Frequency. Numeric (Hz)
- Return type:
TYPE str
- ask_freq_Stop()[source]
- Returns:
Query return set stop Frequency. Numeric (Hz)
- Return type:
TYPE str
- ask_sweepTime()[source]
- Returns:
Title: Measured Sweep Time Description: This command queries the measured sweep time, in number of milliseconds. This command will return “nan” if no measured sweep time is available, which happens if the sweep was reset and the instrument has not yet swept enough to measure a full sweep.
- Return type:
TYPE str
- get_Data()[source]
This function will stop temporally set Continuous Measurment to OFF, extract the max.peak value and frequency and restore the Continuous Measurment to ON. :returns: OutPut – Return a dictionary whit the measured voltage and current. :rtype: dict
- set_CHPowerState(state)[source]
- Parameters:
state (str) – Sets the state of the channel power measurement, ON or OFF. When using :CONFigure:CHPower,the state is automatically set to ON state = [‘ON’,’OFF’,1,0]
- Raises:
ValueError – Error message
- Return type:
None.
- set_CenterFreq(value, unit)[source]
- Parameters:
value (float) – Sets the center frequency. Note that changing the value of the center frequency will change the value of the coupled parameters Start Frequency and Stop Frequency. It might also change the value of the span.
unit (str) – Unit value. Can be [‘HZ’,’KHZ’,’MHZ’,’GHZ’]
- Raises:
ValueError – Error message
- Return type:
None.
- set_Continuous(status)[source]
- Parameters:
status (str/int) – Stop/start Sweep. Can be [‘ON’, ‘OFF’, 1, 0]
- Raises:
ValueError – Error message
- Return type:
None.
- set_ContinuousMeas(state)[source]
- Parameters:
state (str/int) – Title: Sweep Type Description: Specifies whether the sweep/measurement is triggered continuously. If the value is set to ON or 1, another sweep/measurement is triggered as soon as the current one completes. If continuous is set to OFF or 0, the instrument remains initiated until the current sweep/measurement completes, then enters the ‘idle’ state and waits for the :INITiate[:IMMediate] command or for :INITiate:CONTinuous ON.
- Raises:
ValueError – Error message
- Return type:
None.
- set_DataFormat(status)[source]
- Parameters:
status (str) – Set Data Format status = [‘ASCii’,’INTeger’,’REAL’]
- Raises:
ValueError – Error message
- Return type:
None.
- set_DataPointCount(value)[source]
- Parameters:
value (int) –
- Title: Display Point Count
Description: Changes the number of display points the instrument currently measures. Increasing the number of display points can improve the resolution of measurements but will also increase sweep time.
Default Value: 501 Range: 10 to 10001
- Raises:
ValueError – Error message
- Return type:
None.
- set_MarkerExcursion(value)[source]
- Parameters:
value (float) – Sets the excursion for a marker. The excursion is the vertical distance from the peak to the next highest valley which must be exceeded for a peak to be considered a peak in marker max commands
- Return type:
None.
- set_MarkerExcursionState(state)[source]
- Parameters:
state (str/int) – Turn on/off excursion checking for marker max commands. Can be state = [‘ON’,’OFF’,1,0]
- Raises:
ValueError – Error message
- Return type:
None.
- set_MaxPeak()[source]
- Returns:
Moves the marker X value to the point in the marker’s assigned trace that has the highest peak.
- Return type:
None.
- set_NextPeak()[source]
- Returns:
Moves the marker X value to the point in the marker’s assigned trace that is the next highest peak
- Return type:
None.
- set_ResBwidth(value, unit)[source]
- Parameters:
value (int/float) – Description: Sets the resolution bandwidth. Note that using this command turns the automatic resolution bandwidth setting OFF. In Zero Span, the range will change to allow a mininum of 5 KHz to the maximum of 20 MHz.
unit (str) – Parameters: <numeric_value> {HZ | KHZ | MHZ | GHZ} Default Unit: Hz
- Raises:
ValueError – Error message
- Return type:
None.
- set_ResBwidthAuto(state)[source]
- Parameters:
state (int/str) – Title:RBW AutoDescription:Sets the state of the coupling of the resolution bandwidth to the frequency span. Setting the value to ON or 1 will result in the resolution bandwidth being coupled to the span. That is, when the span changes, the resolution bandwidth changes. Setting the value to OFF or 0 will result in the resolution bandwidth being decoupled from the span. That is, changing the span will not change the resolution bandwidth. When this command is issued, the resolution bandwidth setting itself will not change. Parameters:<1 | 0 | ON | OFF> Default Value:ON
- Raises:
ValueError – Error message
- Return type:
None.
- set_TraceSelected(number)[source]
- Parameters:
number (int) –
The selected trace will be used by operations that use a single trace. The max number of traces available to select is model specific. Trace number:
Can be set to [1,2,3,4,5,6]
- Raises:
ValueError – Error message
- Return type:
None.
- set_TraceState(state, number)[source]
- Parameters:
state (str) – The trace visibility state status. If it is OFF, the :TRAC:DATA? command will return NaN. [‘ON’,’OFF’,0,1]
number (int) –
- Trace Number:
Can be set to [1,2,3,4,5,6]
- Raises:
ValueError – Error message
- Return type:
None.
- set_TraceType(state, number)[source]
- Parameters:
state (str) –
- Sets Trace Type:
Normal - NORM Hold the Minimmum - MIN Hold the Maximum - MAX Average - AVER Rolling Max Hold - RMAX Rolling Min Hold - RMIN Rolling Avarage - RAV
number (int) –
- Trace number:
Can be set to [1,2,3,4,5,6]
- Raises:
ValueError – Error message
- Return type:
None.
- set_freq_Start(value, unit)[source]
- Parameters:
value (int/float) – Description: Sets the start frequency. Note that in the spectrum analyzer, changing the value of the start frequency will change the value of the coupled parameters, Center Frequency and Span.
unit (str) – Parameters: <numeric_value> {HZ | KHZ | MHZ | GHZ}
- Raises:
ValueError – Error message
- Return type:
None.
- set_freq_Stop(value, unit)[source]
- Parameters:
value (int/float) – Description: Sets the start frequency. Note that in the spectrum analyzer, changing the value of the start frequency will change the value of the coupled parameters, Center Frequency and Span.
unit (str) – Parameters: <numeric_value> {HZ | KHZ | MHZ | GHZ}
- Raises:
ValueError – Error message
- Return type:
None.
Anritsu Signal Generator MG3694C module
Created on Wed Dec 1 07:00:19 2021
@author: Martin.Mihylov
- class MG3694C.MG3694C(hostname)[source]
Bases:
Instrument
A class thats uses vxi11 library to interface a Anritsu MG3694C. Need to have python ‘vxi11’ library installed!
- abort()[source]
Description: Forces the trigger system to the idle state. Any sweep in progress is aborted as soon as possible
Parameters: None
- ask_MaximalPowerLevel()[source]
- Returns:
Requests the maximum RF output power level value that can be programmed for the particular MG369xC model
- Return type:
TYPE Query str
- ask_OutputPowerLevel()[source]
- Returns:
Requests the value currently programmed for the RF output power level
- Return type:
TYPE Query str
- ask_am_internalFreq()[source]
- Returns:
Requests the currently programmed modulating waveform frequency value for the internal AM function.
- Return type:
TYPE Query str
- ask_am_internalWave()[source]
- Returns:
Requests the currently selected modulating waveform for the internal AM function.
- Return type:
TYPE Query str
- ask_am_logDepth()[source]
- Returns:
Requests the currently programmed modulation depth value for the internal AM Log mode.
- Return type:
TYPE Query str
- ask_am_logsens()[source]
- Returns:
Requests the currently programmed AM sensitivity value for the external AM Log mode.
- Return type:
TYPE Query
- ask_am_state()[source]
- Returns:
Requests currently programmed amplitude modulation state (on/off)
- Return type:
TYPE Query str
- ask_am_type()[source]
- Returns:
Requests the currently programmed AM operating mode.
- Return type:
TYPE Query str
- ask_fm_Bwidth()[source]
- Returns:
Requests the currently programmed Unlocked FM synthesis mode of operation (narrow or wide)
- Return type:
TYPE Query str
- ask_fm_internalFreq()[source]
- Returns:
Requests the currently programmed modulating waveform frequency value for the internal FM function.
- Return type:
TYPE Query str
- ask_fm_internalWave()[source]
- Returns:
Requests the currently selected modulating waveform for the internal FM function.
- Return type:
TYPE Query str
- ask_fm_mode()[source]
- Returns:
Requests the currently programmed synthesis mode used to generate the FM signal.
- Return type:
TYPE Query str
- ask_fm_state()[source]
- Returns:
Requests the currently programmed frequency modulation state (on/off).
- Return type:
TYPE Query str
- ask_freq_CW()[source]
- Returns:
Requests the current value of the frequency parameter.
- Return type:
TYPE Query str
- ask_freq_centerFreq()[source]
- Returns:
Requests the current value of the RF output center frequency.
- Return type:
TYPE Query str
- ask_freq_mode()[source]
- Returns:
Requests the currently selected programming mode for frequency control.
- Return type:
TYPE Query str
- ask_freq_span()[source]
- Returns:
Requests the current value for SWEep[1] sweep span
- Return type:
TYPE Query str
- ask_freq_start()[source]
- Returns:
Requests the current value for SWEep[1] start frequency.
- Return type:
TYPE Query str
- ask_freq_step()[source]
- Returns:
Requests the current step increment value of the frequency parameter.
- Return type:
TYPE Query str
- ask_freq_stop()[source]
- Returns:
Requests the current value for SWEep[1] stop frequency.
- Return type:
Query str
- ask_freq_unit()[source]
- Returns:
Requests the currently selected frequency unit.
- Return type:
Query str
- ask_output_impedance()[source]
- Returns:
Description: Queries the MG369xC RF output impedance. The impedance is nominally 50 ohms and is not settable.
- Return type:
TYPE Query str
- ask_output_protection()[source]
- Returns:
Requests the currently programmed state of the MG369xC RF output during frequency changes in CW or step sweep mode.
- Return type:
TYPE Query str
- ask_output_retrace()[source]
- Returns:
Requests the currently programmed state of the MG369xC RF output during sweep retrace
- Return type:
TYPE Query str
- ask_pm_Bwidth()[source]
- Returns:
Requests the currently programmed phase modulation operating mode.
- Return type:
TYPE Query str
- ask_pm_internalFreq()[source]
- Returns:
Requests the currently programmed modulating waveform frequency value for the internal phase modulation function.
- Return type:
TYPE Query str
- ask_pm_internalWave()[source]
- Returns:
Requests the currently selected modulating waveform for the internal phase modulation function.
- Return type:
TYPE Query str
- ask_pm_state()[source]
- Returns:
Requests the currently programmed phase modulation state (on/off).
- Return type:
TYPE Query str
- get_Data()[source]
- Returns:
OutPut – Return a dictionary whit the measured Power and CW Frequency.
- Return type:
dict
- set_OutputPowerLevel(value)[source]
- Parameters:
value (float/int) – Description: Sets the power level of the unswept RF output signal. Parameters: Power level (in dBm) | UP | DOWN | MIN | MAX Range: MIN to MAX (see notes below) Default: 0 dBm
- Returns:
DESCRIPTION.
- Return type:
TYPE
- set_am_internalFreq(value, unit)[source]
- Parameters:
value (str) – Description: Sets the frequency of the modulating waveform for the internal AM function (see :AM:INTernal:WAVE). Parameters: Frequency
unit (int/float) –
- Range: 0.1 Hz to 1 MHz for sine wave
0.1 Hz to 100 kHz for square, triangle, and ramp waveforms Default: 1 kHz
Raises
------ –
ValueError – Error message
- Return type:
None.
- set_am_internalWave(state)[source]
- Parameters:
state (str) – Description: Selects the modulating waveform (from the internal AM generator) for the internal AM function, as follows: SINE = Sine wave GAUSsian = Guassian noise RDOWn = Negative ramp RUP = Positive ramp SQUare = Square wave TRIangle = Triangle wave UNIForm = Uniform noiseParameters: Parameters: SINE | GAUSsian | RDOWn | RUP | SQUare | TRIangle | UNIForm Default: SINE
- Raises:
ValueError – Error message
- Return type:
None.
- set_am_logDepth(value)[source]
- Parameters:
value (int/float) – Description: Sets the modulation depth of the AM signal in the internal AM Log mode. Parameters: Modulation depth (in dB) Range: 0 to 25 dB Default: 3 dB
- Raises:
ValueError – Error message
- Return type:
None.
- set_am_logsens(value)[source]
- Parameters:
value (int/float) – Description: Sets the AM sensitivity for the external AM Log mode. Parameters: Sensitivity (in dB/V) Range: 0 to 25 dB/V Default: 3 dB/V
- Raises:
ValueError – Error message
- Return type:
None.
- set_am_state(state)[source]
- Parameters:
state (str/int) – Description: Enable/disable amplitude modulation of MG369xC RF output signal. Parameters: ON | OFF | 1 | 0 Default: OFF
- Raises:
ValueError – Error message
- Return type:
None.
- set_am_type(state)[source]
- Parameters:
state (str) – Description: Selects the AM operating mode. Parameters: LINear | LOGarithmic Default: LINear
- Raises:
ValueError – Error message
- Return type:
None.
- set_correctionCommands(state)[source]
- Parameters:
state (str/int) – Description: Turns the selected user level flatness correction power-offset table on/off. Parameters: ON | OFF | 1 | 0 Default: OFF
- Raises:
ValueError – Error message
- Return type:
None.
- set_fm_Bwidth(state)[source]
- Parameters:
state (str) – Description: Sets the Unlocked FM synthesis mode to wide or narrow mode of operation. The Unlocked Wide FM synthesis mode allows maximum deviations of ±100 MHz for DC to 100 Hz rates. The Unlocked Narrow FM synthesis mode allows maximum deviations of ±10 MHz for DC to 8 MHz rates. Parameters: MIN | MAX Range: MIN = narrow mode; MAX = wide mode Default: MIN
- Raises:
ValueError – Error message
- Return type:
None.
- set_fm_internalFreq(value, unit)[source]
- valueint/float
Range: 0.1 Hz to 1 MHz for sine wave
- unitstr
Parameters: Frequency Description: Sets the frequency of the modulating waveform for the internal FM function (see :FM:INTernal:WAVE). Default: 1 kHz
- Raises
- ValueError
Error message
None.
- set_fm_internalWave(state)[source]
- Parameters:
state (str) – Description: Selects the modulating waveform (from the internal FM generator) for the internal FM function, as follows: SINE = Sine wave GAUSsian = Guassian noise RDOWn = Negative ramp RUP =Positive ramp SQUare = Square wave TRIangle = Triangle wave UNIForm = Uniform noise Parameters: SINE | GAUSsian | RDOWn | RUP | SQUare | TRIangle | UNIForm Default: SINE
- Raises:
ValueError – Error message
- Return type:
None.
- set_fm_mode(state)[source]
- Parameters:
state (str) – Description: Sets the synthesis mode employed in generating the FM signal, as follows: LOCKed[1] = Locked Narrow FM LOCKed2 = Locked Narrow Low-Noise FM UNLocked = Unlocked FM If LOCKed[1] or LOCKed2 is set, the YIG phase-locked loop is used in synthesizing the FM signal. If UNLocked is set, the YIG phase-lock loop is disabled and the FM signal is obtained by applying the modulating signal to the tuning coils of the YIG-tuned oscillator. Parameters: LOCKed[1] | LOCKed2 | UNLocked Default: UNLocked
- Raises:
ValueError – Error message
- Return type:
None.
- set_fm_steta(state)[source]
- Parameters:
state (str/int) – Description: Enable/disable frequency modulation of MG369xC RF output signal. Parameters: ON | OFF | 1 | 0 Default: OFF
- Raises:
ValueError – Error message
- Return type:
None.
- set_freq_CW(value, unit)[source]
- Parameters:
value (int/float) –
Description: Sets the RF output frequency of the MG369xC to the value entered. Parameters UP | DOWN increment/decrement the frequency by the value set by [:SOURce]:FREQuency:STEP:INCRement command. Parameters: Frequency (in Hz) | UP | DOWN | MIN | MAX Range: MIN to MAX (see note below) Default: (MIN + MAX) / 2
Model Minimum Frequency* Maximum Frequency MG3691C 10 MHz 10 GHz MG3692C 10 MHz 20 GHz MG3693C 10 MHz 31.8 GHz MG3694C 10 MHz 40 GHz MG3695C 10 MHz 50 GHz MG3697C 10 MHz 70 GHz
unit (str) – Parameter Frequency.
- Return type:
None.
- set_freq_cent(value, unit)[source]
- Parameters:
value (int/float) – Description: Sets the MG369xC RF output center frequency to the value entered. :CENTER and :SPAN frequencies are coupled values. Entering the value for one will cause the other to be recalculated. (See notes under :FREQuency:SPAN)
unit (str) – Parameters: Frequency (in Hz)
- Raises:
ValueError – Error message
- Return type:
None.
- set_freq_mode(state)[source]
- Parameters:
state (str) –
Description: Specifies which command subsystem controls the MG369xC frequency, as follows: CW|FIXed = [:SOURce]:FREQuency:CW|FIXed SWEep[1] = [:SOURce]:SWEep[1] (see Datasheet) SWCW = (see notes) ALSW = (see notes) LIST<n> = [:SOURce]:LIST<n> (see DataSheet) :SWEep and :SWEep1may be used interchangeably
Parameters: CW | FIXed | SWEep[1] | SWCW | ALSW | LIST[1] | LIST2 | LIST3 | LIST4 Default: CW
- Raises:
ValueError – Error message
- Return type:
None.
- set_freq_span(value, unit)[source]
- Parameters:
value (int/float) – Description: Sets sweep span for SWEep[1] to value entered. :SPAN and :CENTer are coupled values Range: 1 kHz to (MAX MIN) Default: MAX MIN
unit (str) – Parameters: Frequency (in Hz)
- Raises:
ValueError – Error message
- Return type:
None.
- set_freq_start(value, unit)[source]
- Parameters:
value (int/float) –
- Description: Sets start frequency for SWEep[1] to the value entered. (MIN is defined in the notes
Range: MIN to MAX Default: MIN
unit (str) – Parameters: Frequency (in Hz) | MIN
- Raises:
ValueError – Error message
- Return type:
None.
- set_freq_step(value, unit)[source]
- Parameters:
value (int/float) – Description: Sets the step increment size used with the :FREQuency:CW command. Range: 0.01 Hz to (MAX MIN) Default: 0.1 GHz
unit (str) – Parameters: Frequency (in Hz)
- Raises:
ValueError – Error message
- Return type:
None.
- set_freq_stop(value, unit)[source]
- Parameters:
value (int/float) – Description: Sets stop frequency for SWEep[1] to the value entered. (MAX is defined in the notes under [:SOURce]:FREQuency:CW|FIXed). Range: MIN to MAX Default: MAX
unit (str) – Parameters: Frequency (in Hz) | MAX
- Raises:
ValueError – Error message
- Return type:
None.
- set_output(state)[source]
- Parameters:
state (str/int) – Description: Turns MG369xC RF output power on/off. Parameters: ON | OFF | 1 | 0 Default: OFF
- Raises:
ValueError – Error message
- Return type:
None.
- set_output_protection(state)[source]
- Parameters:
state (str/int) – Description: ON causes the MG369xC RF output to be turned off (blanked) during frequency changes in CW or step sweep mode. OFF leaves RF output turned on (unblanked). Parameters: ON | OFF | 1 | 0 Default: ON
- Raises:
ValueError – Error message
- Return type:
None.
- set_output_retrace(state)[source]
- Parameters:
state (str/int) – Description: ON causes the MG369xC RF output to be turned off during sweep retrace. OFF leaves RF output turned on Parameters: ON | OFF | 1 | 0 Default: OFF
- Raises:
ValueError – Error message
- Return type:
None.
- set_pm_Bwidth(state)[source]
- Parameters:
state (str) – Description: Selects the phase modulation (ΦM) operating mode. The Narrow ΦM mode allows maximum deviations of ±3 radians for DC to 8 MHz rates. The Wide ΦM mode allows maximum deviations of ±400 radians for DC to 1 MHz rates. Parameters: MIN | MAX Range: MIN = narrow mode MAX = wide mode Default: MIN
- Raises:
ValueError – Error message
- Return type:
None.
- set_pm_internalFreq(value, unit)[source]
- Parameters:
value (str) – Parameter: Frequency (in Hz)
unit (int/float) – Description: Sets the frequency of the modulating waveform for the internal phase modulation (see :PM:INTernal:WAVE) Range: 0.1 Hz to 1 MHz for sine wave; 0.1 Hz to 100 kHz for square, triangle, and ramp waveforms. Default: 1 kHz
- Raises:
ValueError – Error message
- Return type:
None.
- set_pm_internalWave(state)[source]
- Parameters:
state (str) – Description: Selects the modulating waveform (from the internal ΦM generator) for the internal phase modulation function, as follows: SINE = Sine wave GAUSsian = Gaussian noise RDOWn = Negative ramp RUP = Positive ramp SQUare = Square wave TRIangle = Triangle wave UNIForm = Uniform noise Parameters: SINE | GAUSsian | RDOWn | RUP | SQUare | TRIangle | UNIForm Default: SINE
- Raises:
ValueError – Error message
- Return type:
None.
Anritsu Vectro Analyzer MS4647B module
Created on Mon Dec 13 10:40:31 2021
@author: Martin.Mihaylov
- class MS4647B.MS4647B(resource_str)[source]
Bases:
object
- DeleteData(name, portNumb)[source]
- Parameters:
name (str) – File Name
portNumb – The N(ports number) for the .sNp data output. Delete a disk, file, or directory. Use caution with this command as there is no recovery operation in case of a user mistake or error. No query
- Return type:
None.
- DeleteDataCSV(name)[source]
- Parameters:
name (str) – File Name
portNumb – The N(ports number) for the .sNp data output. Delete a disk, file, or directory. Use caution with this command as there is no recovery operation in case of a user mistake or error. No query
- Return type:
None.
- SaveData(name, portNumb)[source]
- Parameters:
name (str) – File Name
portNumb – The N(ports number) for the .sNp data output. Description: Stores a data file of the type specified by the filename extension.No query.
- Return type:
None.
- SaveDataCSV(name)[source]
- Parameters:
name (str) – File Name
portNumb – The N(ports number) for the .sNp data output. Description: Stores a data file of the type specified by the filename extension.No query.
- Return type:
None.
- SaveImage(name)[source]
- Parameters:
name (str) – File Name
portNumb – The N(ports number) for the .sNp data output. Description: Stores a data file of the type specified by the filename extension.No query.
- Return type:
None.
- SaveTransferData(file, path, name, portNumb)[source]
- Parameters:
file (str) – File data extracted from function ask_TransferData
path (str) – Where on the PC to save the data
name (str) – Name of the File
portNumb (int/str) –
The N(ports number) for the .sNp data output.
Write a text File whit the transfered Data
- Return type:
None.
- SaveTransferDataCSV(file, path, name)[source]
- Parameters:
file (str) – File data extracted from function ask_TransferData
path (str) – Where on the PC to save the data
name (str) – Name of the File
portNumb (int/str) –
The N(ports number) for the .sNp data output.
Write a text File whit the transfered Data
- Return type:
None.
- ask_AssignetDataPort(value)[source]
- Parameters:
value (int/float) – the N(ports number) for the .sNp data output.
- Raises:
ValueError – Error message
- Returns:
TYPE – Outputs the data port pair assigned to use when creating an sNp data file on the indicated channel.
- Return type:
str
- ask_AverageCount(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
TYPE – Outputs the averaging count for the indicated channel.
- Return type:
float
- ask_AverageFunctionType(ChanNumber)[source]
Parameters
- Raises:
ValueError – Error message
- Returns:
TYPE – Outputs the averaging function type of point-by-point or sweep-by-sweep.
- Return type:
str
- ask_CWFreq(ChanNumber)[source]
Parameters
- Raises:
ValueError – Error message
- Returns:
TYPE – Sets the CW frequency of the indicated channel. Outputs the CW frequency of the indicated channel.
The output parameter is in Hertz.
- Return type:
float
- ask_CenterFreq(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
TYPE – Optional query. Center frequency is automatically calculated using Stop Frequency and Start Frequency as:
Fc = ((Fstop - Fstart)/2) + Fstart
- Return type:
float
- ask_DataFreq(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
TYPE – Outputs the frequency list for the indicated channel
- Return type:
str
- ask_DisplayTitle()[source]
- Returns:
Outputs the user title for the channel indicated
- Return type:
TYPE
- ask_DisplayTrace()[source]
- Returns:
Query only. Outputs the Active Channel number.
- Return type:
TYPE
- ask_FreqSpan(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
TYPE – Optional query. Span is automatically calculated as Stop Frequency minus Start Frequency. The query returns the resulting span in Hertz.
- Return type:
float
- ask_PowerOnPort(segment, ChanNumber)[source]
- Parameters:
segment (int) – Selected Source. Can be from 1-16
ChanNumber (int) – Channel Number 1,2,3…
- Returns:
Value – Outputs the power level of the indicated port on the indicated channel.
- Return type:
flaot
- ask_ResolutionBW(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Returns:
TYPE – The command sets the IF bandwidth for the indicated channel. The query outputs the IF bandwidth for the indicated channel.
- Return type:
float
- ask_SetAverageState(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
TYPE – Outputs the averaging function on/off status on the indicated channel.
- Return type:
str
- ask_SmoothingState(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Returns:
Query outputs the smoothing on/off status for the indicated channel and active trace. 1 = ON 2 = OFF
- Return type:
TYPE
- ask_StatOperation()[source]
- Returns:
Description: Query only. Outputs the value of the operation status condition reg. Range: 0 to 32767 Default Value: 0
- Return type:
TYPE
- ask_StatOperationRegister()[source]
- Returns:
Sets the value of the operation status enable register. Outputs the value of the operation status enable register.
- Return type:
TYPE str
- ask_SubSystem()[source]
- Returns:
The :SENSe:HOLD subsystem command sets the hold function for all channels on a per-instrument basis
- Return type:
TYPE str
- ask_SweepChannelStatus()[source]
- Returns:
TYPE – The query outputs the On/Off state of the option to sweep only the active channel
- Return type:
str
- ask_SweepCount(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
- Description: Query only. Outputs the averaging sweep count for the
indicated channel.
- Return type:
TYPE
- ask_SysErrors()[source]
- Returns:
Description: Query only. Outputs the number of errors in the error queue.
- Return type:
TYPE
- ask_TestSet(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
Query State of TS3739.
- Return type:
TYPE
- ask_TransferData(name, portNumb)[source]
- Parameters:
name (str) – File Name
portNumb (int) – the N(ports number) for the .sNp data output.
- Returns:
TYPE – The query outputs the disk file data to the GPIB. The file must exist
- Return type:
str
Hard coded path on the VNA = ‘C:/tmp/’
- ask_TransferDataCSV(name)[source]
- Parameters:
name (str) – File Name
portNumb (int) – the N(ports number) for the .sNp data output.
- Returns:
TYPE – The query outputs the disk file data to the GPIB. The file must exist
- Return type:
str
Hard coded path on the VNA = ‘C:/tmp/’
- set_AssignetDataPort(ChanNumber, value1, value2)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
value1 (int) –
value2 (int) –
The command assigns the data port pair to use when creating an sNp data file on the indicated channel. The use of Port 3 and/or Port 4 requires a 4-port VNA instrument
PORT12 | PORT13 | PORT14 | PORT23 | PORT24 | PORT34
- Raises:
ValueError – Error message
- Return type:
None.
- set_AverageCount(ChanNumber, value)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
value (int) – Sets the averaging count for the indicated channel. The channel must be turned on. The input parameter is a unitless number. Range: 1 to 1024 Default Value: 1
- Raises:
ValueError – Error message
- Return type:
None.
- set_AverageFunctionType(ChanNumber, state)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
state (str) – Sets the averaging function type to point-by-point or sweep-by-sweep. POIN | SWE Default Value: POIN
- Raises:
ValueError – Error message
- Return type:
None.
- set_CWFreq(ChanNumber, value)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
value (int/str in form - 10E+9) – Sets the CW frequency of the indicated channel. Outputs the CW frequency of the indicated channel.
- Raises:
ValueError – Error message
- Return type:
None.
- set_CenterFreq(ChanNumber, value)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
value (int/str in form - 10E+9) – Sets the center value of the sweep range of the indicated channel. Outputs the center value of the sweep range of the indicated channel
- Raises:
ValueError – Error message
- Return type:
None.
- set_ClearAverage(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3… Description: Clears and restarts the averaging sweep count of the indicated channel.
- Raises:
ValueError – Error message
- Return type:
None.
- set_DisplayColorReset()[source]
- Returns:
None.
Resets all colors and inverted colors to their normal default values.
- set_DisplayCount(ChannelNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
None (Sets the number of displayed channels. When the VNA is in 25,000 point mode, the)
number of channels can only be 1 (one), 2, 3, 4, 6, 8, 9, 10, 12, or 16 channels. If the
channel display is set to a non-listed number (5, 7, 11, 13, 14, 15), the instrument is set to
the next higher channel number. If a number of greater than 16 is entered, the
instrument is set to 16 channels. If the instrument is set to 100,000 points, any input
results in 1 (one) channel. Outputs the number of displayed channels.
- set_DisplayTitle(ChannelName)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
None
- Return type:
Sets the user title for the channel indicated.
- set_DisplayTrace(ChanNumber)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
- Raises:
ValueError – Error message
- Returns:
The command sets the active channel to the indicated number. When the VNA is set to
100,000 point mode, the number of channels is
- set_ParamFormInFile(unit)[source]
- Parameters:
unit (str) –
Sets the parameter format displayed in an SNP data file. Where:
LINPH = Linear and Phase
LOGPH = Log and Phase
REIM = Real and Imaginary Numbers
- Raises:
ValueError – Error message
- Return type:
None.
- set_PowerOnPort(segment, ChanNumber, value)[source]
- Parameters:
segment (int) – Selected Source. Can be from 1-16
ChanNumber (int) – Channel Number 1,2,3…
value (int/floa/str) – Sets the power level of the indicated port on the indicated channel.
- Raises:
ValueError – Error message
- Return type:
None.
- set_RFState(state)[source]
- Parameters:
state (str/int) – Sets the RF on/off state in Hold.
- Raises:
ValueError – Error message
- Return type:
None.
- set_ResolutionBW(ChanNumber, value)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
value (int/floa/str) – The command sets the IF bandwidth for the indicated channel. The query outputs the IF bandwidth for the indicated channel.
- Raises:
ValueError – Error message
- Return type:
None.
- set_SelectParameter(S_Param)[source]
- Parameters:
S_Param (str) – S-Parameter selected.
- Raises:
ValueError – Error message
- Returns:
None
- Return type:
Select an S-Parameter. 16 S-Parameters for 4 Ports config can be selected.
- set_SetAverageState(ChanNumber, state)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
state (int/str) – Turns averaging on/off for the indicated channel (Turns on and Off the averaging for all channels).
- Raises:
ValueError – Error message
- Return type:
None.
- set_SmoothingAPERture(ChanNumber, value)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
value (int) – Procentge smoothing between 0 to 100
- Raises:
ValueError – Error message
- Return type:
The command sets the smoothing aperture for the indicated channel and active trace.
- set_SmoothingState(ChanNumber, state)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
state (str/int) – can be int or str form the list [‘ON’,’OFF’,1,0]
- Raises:
ValueError – Error message
- Return type:
The command sets the smoothing aperture for the indicated channel and active trace.
- set_StartFreq(ChanNumber, value)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
value (int/str in form - 10E+9) – Sets the start value of the sweep range of the indicated channel. The input parameter is in Hertz, Meters, or Seconds.
- Raises:
ValueError – Error message
- Return type:
None.
- set_StatOperationRegister(value)[source]
- Parameters:
value (TYPE) –
Sets the value of the operation status enable register. Outputs the value of the operation status enable register. The input parameter is a unitless number.
Range: 0 to 65535
- Return type:
None.
- set_StopFreq(ChanNumber, value)[source]
- Parameters:
ChanNumber (int) – Channel Number 1,2,3…
value (int/str in form - 10E+9) – Sets the stop value of the sweep range of the indicated channel. The input parameter is in Hertz, Meters, or Seconds.
- Raises:
ValueError – Error message
- Return type:
None.
- set_SubSystemHold()[source]
- Returns:
None.
Sets the hold function for all channels on a per-instrument basis.
The sweep is stopped.
- set_SubSystemSing()[source]
- Returns:
None.
The sweep restarts and sweeps until the end of the
sweep, at which point it sets the end of sweep status bit and
stops.
- set_SweepChannelStatus(state)[source]
- Parameters:
state (str/int) – The command turns On/Off the option to sweep only the active channel
- Raises:
ValueError – Error message
- Return type:
None.
- set_SweepDelay(time)[source]
- Parameters:
time (float) – Sets the sweep delay time of the indicated channel.
- Return type:
None.
- set_SweepTime(time)[source]
- Parameters:
time (float) – Sets the Sweep Time of the indicated channel.
- Return type:
None.
Yokogawa Optical Spectrum Analyzer AQ6370D module
Created on Tue Dec 14 12:58:27 2021
@author: Martin.Mihaylov
- class AQ6370D.AQ6370D(hostname)[source]
Bases:
Instrument
A class thats uses vxi11 library to interface a Yokogawa AQ6370D. Need to have python ‘vxi11’, ‘pandas’ and ‘numpy’ librarys installed!
- ask_AverageCount()[source]
- Returns:
Queries the number of times averaging for each measured point.
- Return type:
float
- ask_CentralWavelenght()[source]
- Returns:
Queries the center wavelength of the X-axis of the display scale
- Return type:
str
- ask_DataFormat()[source]
- Returns:
Queries the format used for data transfer via GP-IB.
ASCii = ASCII format (default) REAL[,64] = REAL format (64bits) REAL,32 = REAL format (32bits)
- Return type:
str
- ask_DisplayAutoY()[source]
- Returns:
Queries the automatic setting function of the sub scale of the level axis. Response 0 = OFF, 1 = ON
- Return type:
str
- ask_DisplayYUnit()[source]
- Returns:
Queries the units of the main scale of the level axis. DBM = dBm W = W DBM/NM = dBm/nm or dBm/THz W/NM = W/nm or W/THz Response 0 = dBm
1 = W 2 = DBM/NM 3 = W/NM
- Return type:
str
- ask_SamplePointsAuto()[source]
- Returns:
Queries the function of automatically setting the sampling number to be measured
Response 0 = OFF, 1 = ON
- Return type:
str
- ask_SegmentPoints()[source]
- Returns:
Queries the number of sampling points to be measured at one time when performing SEGMENT MEASURE.
- Return type:
float
- ask_SweepMode()[source]
- Returns:
Queries the sweep mode [‘SINGle’,’REPeat’,’AUTO’,’SEGMent’]
- Return type:
str
- ask_SweepSpeed()[source]
- Returns:
Queries the sweep speed 1x|0: Standard 2x|1: Twice as fast as standard
- Return type:
str
- ask_TraceActive()[source]
- Returns:
Queries the trace to be transferred.
Outputs - (TRA|TRB|TRC|TRD|TRE|TRF|TRG)
- Return type:
str
- ask_TraceAttribute(state)[source]
- Parameters:
state (str) – Name of the trace that should be extractselected. sState = [‘TRA’,’TRB’,’TRC’,’TRD’,’TRE’,’TRF’,’TRG’]
- Raises:
ValueError – Error message
- Returns:
Queries the attributes of the specified trace [‘WRITe’,’FIX’,’MAX’,’MIN’,’RAVG’,’CALC’] WRITe = WRITE FIX = FIX MAX = MAX HOLD MIN = MIN HOLD RAVG = ROLL AVG CALC = CALC
- Return type:
str
- ask_TraceDataX(state)[source]
- Parameters:
state (str) – Name of the trace that should be extractselected. state = [TRA|TRB|TRC|TRD|TRE|TRF|TRG]
- Raises:
ValueError – Error message
- Returns:
Queries the wavelength axis data of the specified trace.
- Return type:
list of floats
- ask_TraceDataY(state)[source]
- Parameters:
state (str) – Name of the trace that should be extractselected. state = [TRA|TRB|TRC|TRD|TRE|TRF|TRG]
- Raises:
ValueError – Error message
- Returns:
data – Queries the level axis data of specified trace.
- Return type:
list of floats
- ask_TraceResolution(state)[source]
- Parameters:
state (str) – Trace selected - [‘TRA’,’TRB’,’TRC’,’TRD’,’TRE’,’TRF’,’TRG’]
- Raises:
ValueError – Error message
- Returns:
Queries the actual resolution data of the specified trace.
- Return type:
list of floats
- ask_TraceState()[source]
- Returns:
Queries the display status of the specified trace.
- Return type:
str
- ask_UnitX()[source]
- Returns:
Queries the units for the X axis.
- Return type:
str
For AQ6370C, AQ6373 or AQ6373B WAVelength = Wavelength FREQuency = Frequency
- ask_WavelengthStart()[source]
- Returns:
Queries the measurement condition measurement start wavelength
- Return type:
float
- ask_WavelengthStop()[source]
- Returns:
Queries the measurement condition measurement start wavelength
- Return type:
dloat
- get_Data(state)[source]
Get data on X and Y Traces from OSA. Data Output is CST File. Data is Saved in X Column and Y Column state = ‘TRA’,’TRB’,’TRC’,’TRD’,’TRE’,’TRF’,’TRG’
- set_AverageCount(value)[source]
- Parameters:
value (int) – Set the number of times averaging for each measured point.
- Return type:
None.
- set_BWResolution(value, unit)[source]
- Parameters:
value (int/float) – Set the measurment resolution
unit (str) – sUnit = [‘M’,’HZ’]
- Raises:
ValueError – Error message
- Return type:
None.
- set_CenterWavelenght(value, unit)[source]
- Parameters:
value (int/float) – Set the center wavelength of the X-axis of the display scale
unit (str) – sUnits = [‘M’,’HZ’]
- Raises:
ValueError – Error message
- Return type:
None.
- set_DataFormat(unit)[source]
- Parameters:
unit – sUnit = [‘ASCii’, ‘REAL[,64]’, ‘REAL,32’]
- Raises:
ValueError – Error message
- Return type:
None.
- set_DisplayYUnit(state)[source]
- Parameters:
state (str) – Set the units of the main scale of the level axis [‘dBm’,’W’,’DBM/NM’,’W/NM’]
- Raises:
ValueError – Error message
- Return type:
None.
- set_SamplePoints(value)[source]
- Parameters:
value (int) – Set the number of samples measured
- Return type:
None.
- set_SamplePointsAuto(state)[source]
- Parameters:
state (str) – Set the function of automatically setting the sampling number to be measured [‘ON’|’OFF’]
- Raises:
ValueError – Error message
- Return type:
None.
- set_SegmentPoints(value)[source]
- Parameters:
value (int) – Set the number of sampling points to be measured at one time when performing SEGMENT MEASURE.
- Return type:
None.
- set_Sensitivity(unit)[source]
- Parameters:
unit (str) –
- Set the measurement sensitivity.
NHLD = NORMAL HOLD NAUT = NORMAL AUTO NORMal = NORMAL MID = MID HIGH1 = HIGH1 or HIGH1/CHOP HIGH2 = HIGH2 or HIGH2/CHOP HIGH3 = HIGH3 or HIGH3/CHOP
- Raises:
ValueError – Error message
- Return type:
None.
- set_Span(value, unit)[source]
- Parameters:
value (int/float) – Set the measurement condition
span. (measurement) –
unit (str) – sUnits = [‘M’,’HZ’]
- Return type:
None.
- set_SweepMode(state)[source]
- Parameters:
state (str) – Set the sweep mode [‘SINGle’,’REPeat’,’AUTO’,’SEGMent’]
- Raises:
ValueError – Error message
- Return type:
None.
- set_SweepSpeed(value)[source]
- Parameters:
value (int) – Set the sweep speed. 1 - Standard 2 - Twice as fast as standard
- Return type:
None.
- set_TraceActive(state)[source]
- Parameters:
state (str) – Sets the active trace. sState = [‘TRA’,’TRB’,’TRC’,’TRD’,’TRE’,’TRF’,’TRG’]
- Raises:
ValueError – Error message
- Return type:
None.
- set_TraceAttribute(trace, state)[source]
- Parameters:
trace (str) – Sets the active trace. sState = [‘TRA’,’TRB’,’TRC’,’TRD’,’TRE’,’TRF’,’TRG’]
state (str) –
Set the attributes of the specified trace [‘WRITe’,’FIX’,’MAX’,’MIN’,’RAVG’,’CALC’]
WRITe = WRITE FIX = FIX MAX = MAX HOLD MIN = MIN HOLD RAVG = ROLL AVG CALC = CALC
- Raises:
ValueError – Error message
- Return type:
None.
- set_UnitX(unit)[source]
- Parameters:
unit (str) – Set the units for the X axis. sUnit = [‘WAV’,’FREQ’,’WNUM’]
- Raises:
ValueError – Error message
- Return type:
None.
Power Meter ThorLabs PM100D module
Created on Thu Dec 2 08:27:01 2021
@author: MartinMihaylov
- class PM100D.PM100D(resource_str)[source]
Bases:
object
- ConfigResistance()[source]
- Returns:
Configure for sensor presence resistance measurement
- Return type:
None.
- DefaultPowerMeas(WaveLength)[source]
- Returns:
Performs a power measurement whit hard codded parameter!.
- Return type:
TYPE Data from the measurment
- DisplayParam(Type)[source]
- Parameters:
Type (str) – This function will print all the adjusted parameters. Can be set to Type = [‘Power’,’Energy’,’Current’,’Voltage’]
- Return type:
None.
- DisplayParamDict(Type)[source]
- Parameters:
Type (str) – This function will print all the adjusted parameters. Can be set to Type = [‘Power’,’Energy’,’Current’,’Voltage’]
- Returns:
Headers (str) – String with [‘Power’,’Energy’,’Current’,’Voltage’]
Data (lidt) – Data from the instrument.
Params (list) – List with str for different data that are extractet from the instrument.
- MeasResistance()[source]
- Returns:
Performs a sensor presence resistance measurement
- Return type:
None.
- PowerMeas()[source]
- Returns:
data – Performs a power measurement
- Return type:
Data from the measurment
- ask_AutoCurrentRange()[source]
- Returns:
Queries the auto-ranging function state
- Return type:
TYPE str
- ask_AutoPowerRange()[source]
- Returns:
status – Queries the auto-ranging function state
- Return type:
print massage str
- ask_AutoVoltageRange()[source]
- Returns:
Queries the auto-ranging function state
- Return type:
TYPE str
- ask_calibration()[source]
- Returns:
Returns a human readable calibration string. This is a query only command. The response is formatted as string response data.
- Return type:
TYPE str
- ask_freqRange(state)[source]
- Parameters:
state (str) – Queries the frequency range. Can be [‘MAX’,’MIN’]
- Raises:
ValueError – Error message.
- Returns:
Queries the frequency range
- Return type:
TYPE
- fetchData()[source]
- Returns:
Read last measurement data. WILL NOT START THE MEASURMENT
- Return type:
TYPE float
- self_test()[source]
- Returns:
Use this query command to perform the instrument self-test routine. The command places the coded result in the Output Queue. A returned value of zero (0) indicates that the test passed, other values indicate that the test failed.
- Return type:
TYPE
- set_AdapterType(state)[source]
- Parameters:
state (str) –
- Sets default sensor adapter type:
Allow senor types are: [‘PHOTodiode’,’THERmal’,’PYRo’]
- Raises:
ValueError – Error message.
- Return type:
None.
- set_AutoCurrentRange(state)[source]
- Parameters:
state (str) – Switches the auto-ranging function on and off. Can be set to [‘ON’,’OFF’,1,0].
- Raises:
ValueError – Error message.
- Return type:
None.
- set_AutoPowerRange(state)[source]
- Parameters:
state – Switches the auto-ranging function on and off. Can be set to [‘ON’,’OFF’,1,0].
- Return type:
None.
- set_AutoVoltageRange(state)[source]
- Parameters:
state (str/int) – witches the auto-ranging function on and off. Can be [‘ON’,’OFF’,1,0]
- Raises:
ValueError – Error message.
- Return type:
None.
- set_Average(value)[source]
- Parameters:
value (float) – Sets the averaging rate (1 sample takes approx. 3ms)
- Return type:
None.
- set_PD(state)[source]
- Parameters:
state (str/int) –
- Sets the bandwidth of the photodiode input stage.
Can be [‘ON’,’OFF’,1,0]
- Raises:
ValueError – Error message.
- Returns:
DESCRIPTION.
- Return type:
TYPE
- set_Parameters(Type)[source]
- Parameters:
Type (str) – This function will set the measurments parameters. Can be set to Type = [‘Power’,’Energy’,’Current’,’Voltage’]
- Return type:
None.
- set_PowerRange(value)[source]
- Parameters:
value (float) – Sets the current range in W
- Raises:
ValueError – Error message.
- Return type:
None.
- set_PowerUnits(state)[source]
- Parameters:
state (str) – Sets the power unit W or dBm. Can be [‘W’,’dBm’].
- Raises:
ValueError – Error message.
- Return type:
None.
- set_WaveLength(value)[source]
- Parameters:
value (float) – Sets the operation wavelength in nm.
- Return type:
None.
- set_currentRange(value)[source]
- Parameters:
value (float) – Sets the current range in A.
- Raises:
ValueError – Error message.
- Return type:
None.
- set_energyRange(value)[source]
- Parameters:
value (float) – Sets the voltage range in J
- Raises:
ValueError – Error message.
- Return type:
None.
KEITHLEY Source Meter 2612 module
Created on Fri Dec 10 08:39:48 2021
@author: Martin.Mihaylov
- class KEITHLEY2612.KEITHLEY2612(resource_str)[source]
Bases:
object
- Reset(chan)[source]
- Parameters:
chan (str) – Select Channel A or B and restore to defaults channel settings.
- Raises:
ValueError – Error message
- Return type:
None.
- ask_Current(chan)[source]
- Parameters:
chan (str) – Select channel A or B
- Raises:
ValueError – Error message
- Returns:
Return float whit the measured value on the channel
- Return type:
TYPE float
- ask_LimitReached(chan)[source]
- Parameters:
chan (str) – This output indicates that a configured limit has been reached. (voltage, current, or power limit)
- Returns:
DESCRIPTION.
- Return type:
TYPE
- ask_Power(chan)[source]
- Parameters:
chan (str) – Select channel A or B
- Raises:
ValueError – Error message
- Returns:
TYPE – Return float whit the measured value on the channel
- Return type:
float
- ask_Resistance(chan)[source]
- Parameters:
chan (str) – Select channel A or B
- Raises:
ValueError – Error message
- Returns:
TYPE – Return float whit the measured value on the channel
- Return type:
float
- ask_Voltage(chan)[source]
- Parameters:
chan (str) – Select channel A or B
- Raises:
ValueError – Error message
- Returns:
TYPE – Return float whit the measured value on the channel
- Return type:
float
- ask_readBuffer(chan, start, stop)[source]
- Parameters:
chan (str) – Select channel A or B
start (int) – select start value
stop (int) – select stop value
- Raises:
ValueError – Error message
- Returns:
Print the source function used
for ‘start’ - ‘stop’ readings stored in
source-measure unit (SMU)
channel A, buffer 1.
- get_Data(chan)[source]
- Parameters:
chan (str) – Select channel A or B
- Returns:
OutPut – Return a dictionary whit the measured voltage and current.
- Return type:
dict
- set_AutoCurrentRange(chan, state)[source]
- Parameters:
chan (str) – Select channel A or B
state (str) – ON/OFF current source autorange
- Raises:
ValueError – Error message
- Return type:
None.
- set_AutoVoltageRange(chan, state)[source]
- Parameters:
chan (str) – Select channel A or B
state (str) – ON/OFF voltage source autorange
- Raises:
ValueError – Error message
- Return type:
None.
- set_ChannelDisplay(chan, double=True)[source]
- Parameters:
chan (str) – Select channel A or B
double (boolen, optional) –
Displays source-measure for SMU A and SMU B. double = None per defould. if double = True:
Display Chan A and B
- else:
Display only Chan selected
- Raises:
ValueError – Error message
- Return type:
None.
- set_Current(chan, value)[source]
- Parameters:
chan (str) – Select Channel A or B
value (int/float) – Set Current on channels A and B
- Raises:
ValueError – Error message
- Return type:
None.
- set_CurrentLimit(chan, value)[source]
- Parameters:
chan (str) – Select Channel A or B
value (int/float) – Sets the current limitof channel X to V.
- Raises:
ValueError – Error message
- Return type:
None.
- set_CurrentRange(chan, value)[source]
- Parameters:
chan (str) – Select Channel A or B
value (int/float) – Set current source voltage limit
- Raises:
ValueError – Error message
- Return type:
None.
- set_DisplayMeasurementFunction(chan, typ)[source]
- Parameters:
chan (str) – Select channel A or B
typ (str) – Selects the displayed measurement function: Amperes, volts, ohms, or watts. SMU A and SMU B can be set for different measurement functions!
- Raises:
ValueError – Error message
- Return type:
None.
- set_OutputSourceFunction(chan, typ)[source]
- Parameters:
chan (str) – Select channl A or B
typ (str) – The source function. Set to one of the following values: typ = ‘volt’ for Selects voltage source function typ = ‘amp’ for Selects voltage source function
- Raises:
ValueError – Error message
- Return type:
None.
- set_PulseMeasured(chan, value, ton, toff)[source]
- Parameters:
chan (str) – Select channel A or B
value (int/float or list with curly braces for example {1,2,3....}.) –
ton (int/float) – X ms pulse on
toff (int/float) – X ms pulse off
- Raises:
ValueError – Error message
- Return type:
None.
- set_SourceOutput(chan, state)[source]
- Parameters:
chan (str) – Select channel A or B
state (str) – Set source output (CHAN A) ON and OF
- Raises:
ValueError – Error message
- Return type:
None.
- set_Voltage(chan, value)[source]
- Parameters:
chan (str) – Select Channel A or B
value (int/float) – Set voltage on channels A and B
- Raises:
ValueError – Error message
- Return type:
None.
- set_VoltageLimit(chan, value)[source]
- Parameters:
chan (str) – Select Channel A or B
value (int/float) – Sets the voltage limitof channel X to V.
- Raises:
ValueError – Error message
- Return type:
None.
Novoptel Laser LU1000 module
Created on Tue Dec 14 11:04:21 2021
@author: Martin.Mihaylov
- class LU1000.LU1000[source]
Bases:
object
- ask_ChannelFreqGHz(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
Returns channel’s frequency as GHZ*10
- Return type:
float
- ask_ChannelFreqTHz(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
Ask channel Frequency in THz
- Return type:
float
- ask_ControllerTemp(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – Controller module temperature in Celsiusx16
- Return type:
float
- ask_FirstChannFreqGHz(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – First channel’s frequency, GHz*10
- Return type:
float
- ask_FirstChannFreqTHz(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – First channel’s frequency, THz
- Return type:
float
- ask_Frequency(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
Freq – Calculate and return Frequency on the selected channel
- Return type:
float
- ask_Gridspacing(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
Grid spacing in GHz*10
- Return type:
float
- ask_LaserChannel(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – Selected Channel Number
- Return type:
foat
- ask_LaserFirstFreqGHz(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – Laser’s first frequency, GHz*10
- Return type:
float
- ask_LaserFirstFreqTHz(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – Laser’s first frequency, THz
- Return type:
float
- ask_LaserLastFreqGHz(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – Laser’s last frequency, GHz*10
- Return type:
float
- ask_LaserLastFreqTHz(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – Laser’s last frequency, THz
- Return type:
float
- ask_LaserMinGridFreq(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
Laser’s minimum supported grid spacing, GHz*10
- Return type:
float
- ask_LaserOutput(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
Laser emable(‘ON’) or laser diseble(‘OFF’)
- Return type:
str
- ask_MaxOpticalOutputPower()[source]
- Returns:
res – Maximum possible optical power setting
- Return type:
float
- ask_MinOpticalOutputPower()[source]
- Returns:
res – Ask minimum possible optical power setting
- Return type:
float
- ask_OpticalPower(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – Returns the optical power encoded as dBm*100
- Return type:
float
- ask_Power(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
Ask Sets or returns the laser module’s current optical power in dBm*100
- Return type:
float
- ask_Temperature(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – Returns the current temperature encoded as °C*100.
- Return type:
float
- ask_Whispermode(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – Whispermode Status
- Return type:
foat
- ask_maxFreqLaser(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
max possible frequency
- Return type:
float
- ask_minFreqLaser(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
min possible frequency.
- Return type:
float
- get_Data(laser)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – DESCRIPTION.
- Returns:
OutPut – Return a dictionary whit the measured power and set frequency.
- Return type:
dict
- set_FineTune(laser, value)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
value (int) – Fine tunning set the frequency in MHz steps
- Return type:
None.
- set_FirstChannFreqGHz(laser, value)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – First channel’s frequency, GHz*10
- Return type:
float
- set_FirstChannFreqTHz(laser, value)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
- Raises:
ValueError – Error message
- Returns:
res – First channel’s frequency, THz
- Return type:
float
- set_Frequency(laser, value)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
value (float) – Set Laser Frequency. value in form value = 192.876
- Return type:
None.
- set_Gridspacing(laser, value)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
value (int) – Set Grid spacing. Smalles possible value = 1
- Raises:
ValueError – Error message
- Return type:
None.
- set_LaserChannel(laser, value)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
value (int) –
- Sets or returns the laser module’s current channel
value = select channel value
- Raises:
ValueError – Error message
- Return type:
None.
- set_LaserOutput(laser, value)[source]
- Parameters:
laser (int) – Laser seleected. 1 or 2
value (int/str) – Turn Laser N output ON/OFF value = ‘ON’|’OFF’|1|0
- Raises:
ValueError – Error message
- Return type:
None.
CoBrite Tunable Laser module
Created on Mon Feb 14 13:54:49 2022
@author: Martin.Mihaylov
- class CoBrite.CoBrite(resource_str)[source]
Bases:
object
- Identification()[source]
- Returns:
Identification name and model of the instrument.
- Return type:
float
- ask_ActualPower(chan)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
- Raises:
ValueError – Error message.
- Returns:
Queries the current optical output power reading of a tunable laser port. Value format is in dBm.
- Return type:
float
- ask_Configuration(chan)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
- Raises:
ValueError – Error message.
- Returns:
DataDic – Query current configuration of Laser in location C-S-D in csv format
- Return type:
dictionary
- ask_FreqTHz(chan)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!
- Raises:
ValueError – Error message.
- Returns:
Queries the wavelength setting of a tunable laser port. Value format is in THz.
- Return type:
float
- ask_LaserLim(chan)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
- Raises:
ValueError – Error message.
- Returns:
DataDic – Query maximum tuning Parameters of Laser in location C-S-D in csv format.
- Return type:
dictionary
- ask_LaserOutput(chan)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
- Raises:
ValueError – Error message.
- Returns:
Query if laser is ON or OFF.
- Return type:
str
- ask_Offset(chan)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
- Raises:
ValueError – Error message.
- Returns:
Queries the frequency offset setting of a tunable laser port. Value format is in GHz.
- Return type:
flaot
- ask_Power(chan)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
- Raises:
ValueError – Error message.
- Returns:
Queries the optical output power target setting of a tunable laser port. Value format is in dBm.
- Return type:
float
- ask_Wavelength(chan)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
- Raises:
ValueError – Error message.
- Returns:
Queries the wavelength setting of a tunable laser port. Value format is in Nanometer.
- Return type:
float
- read()[source]
- Returns:
This function must be set after each set_() function. CoBrite writes the set_() to register and returns ;/r/n to the user. The ;/r/n command will mess up the next data sent to CoBrite from the user. An empty read() is required after each set_() function sendet to the laser.
- Return type:
None
- set_Configuration(chan, freq, power, offset)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
freq (float) – Sets frequency in Thz format. For example freq = 192.2345
power (float) – Sets the power to dBm. For example power = 9.8. min Power = 8.8 max Power = 17.8 Check ask_LaserLim() for more info.
offset (float) – Sets offset Freq in range Ghz.
- Raises:
ValueError – Error message.
- Return type:
None.
- set_FreqTHz(chan, value)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
value (float) – Sets or queries the wavelength setting of a tunable laser port. Value format is in Tera Hertz.
- Raises:
ValueError – Error message.
- Return type:
None.
- set_LaserOutput(chan, state)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
state (float/int) – Set if laser is ON or OFF. Can be integer 0 or 1, but can be a str ON and OFF.
- Raises:
ValueError – Error message.
- Return type:
None.
- set_Offset(chan, value)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
value (float) – Sets the frequency offset setting of a tunable laser port. Value format is in Giga Hertz.
- Raises:
ValueError – Error message.
- Return type:
None.
- set_Power(chan, value)[source]
- Parameters:
chan (int) – Channel number. Can be 1 or 2. CoBrite have only 2 channels!.
value (float) – Sets the optical output power target setting of a tunable laser port. Value format is in dBm.
- Raises:
ValueError – Error message.
- Return type:
None.
Power Supply KA3005 module
Created on Fri Dec 10 11:35:57 2021
@author: Martin.Mihaylov
- class KA3005.KA3005(psu_com)[source]
Bases:
object
- get_data()[source]
- Returns:
OutPut – Return a dictionary whit the measured voltage and current.
- Return type:
dict
- isConnected = False
- psu_com = None
- set_Amp(amp, delay=0.01)[source]
- Parameters:
voltage (int/float) – Set the current on the Display
delay (0.01s Delay) –
- Return type:
None
- set_Ocp(state)[source]
- Parameters:
state (str (ON/OFF)) – Set the state of the over current protection ON and OFF
- Return type:
None.
- set_Out(state)[source]
- Parameters:
state (str (ON/OFF)) – Turn Output ON and OFF
- Return type:
None.
- set_Volt(voltage, delay=0.01)[source]
- Parameters:
voltage (int/float) – Set the voltage on the Display
delay (0.01s Delay) –
- Return type:
None
- status = {}
Power Supply KA3005p module
Created on Mon Aug 1 12:15:19 2022
@author: Martin.Mihaylov
- class KA3005p.KA3005p(psu_com)[source]
Bases:
object
- get_data()[source]
- Returns:
OutPut – Return a dictionary whit the measured voltage and current.
- Return type:
dict
- isConnected = False
- psu_com = None
- set_Amp(amp, delay=0.01)[source]
- Parameters:
voltage (int/float) – Set the current on the Display
delay (0.01s Delay) –
- Return type:
None
- set_Ocp(state)[source]
- Parameters:
state (str (ON/OFF)) – Set the state of the over current protection ON and OFF
- Return type:
None.
- set_Out(state)[source]
- Parameters:
state (str (ON/OFF)) – Turn Output ON and OFF
- Return type:
None.
- set_Volt(voltage, delay=0.01)[source]
- Parameters:
voltage (int/float) – Set the voltage on the Display
delay (0.01s Delay) –
- Return type:
None
- status = {}
Power Supply RD3005 module
Created on Mon Aug 1 12:14:47 2022
@author: Martin.Mihaylov
- class RD3005.RD3005(psu_com)[source]
Bases:
object
- get_data()[source]
- Returns:
OutPut – Return a dictionary whit the measured voltage and current.
- Return type:
dict
- isConnected = False
- psu_com = None
- set_Amp(amp, delay=0.01)[source]
- Parameters:
voltage (int/float) – Set the current on the Display
delay (0.01s Delay) –
- Return type:
None
- set_Ocp(state)[source]
- Parameters:
state (str (ON/OFF)) – Set the state of the over current protection ON and OFF
- Return type:
None.
- set_Out(state)[source]
- Parameters:
state (str (ON/OFF)) – Turn Output ON and OFF
- Return type:
None.
- set_Volt(voltage, delay=0.01)[source]
- Parameters:
voltage (int/float) – Set the voltage on the Display
delay (0.01s Delay) –
- Return type:
None
- status = {}
4 Channels Power Suppy GPP4323 module
Created on Wed Feb 1 15:55:01 2023
@author: Martin.Mihaylov
- class GPP4323.GPP4323(resource_str)[source]
Bases:
object
- ask_Amp(channel)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2,3,4].
- Returns:
DESCRIPTION.
- Return type:
TYPE
- ask_ChannelLoadMode(channel)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2].
- Returns:
Queries CH1 or CH2 work mode. 6 modes below: SERies,PARallel,INDE pendent, CV Load,CC Load,CR Load
- Return type:
TYPE
- ask_LoadResistor(channel)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2].
- Returns:
Set Laod Resistance Value for given channel.
- Return type:
TYPE
- ask_Volt(channel)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2,3,4].
- Returns:
DESCRIPTION.
- Return type:
TYPE
- get_data(channel)[source]
- Returns:
OutPut – Return a dictionary whit the measured voltage and current.
- Return type:
dict
- set_Amp(channel, amp)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2,3,4].
amp (int/float) – Set Current on Channel.
- Return type:
None.
- set_ChannelLoadMode(channel, mode, status)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2].
mode (str) – Sets CH1/CH2 as Load CV, CC or CR mode.
status (str) – Possible status [“ON”, “OFF”].
- Return type:
None.
- set_ChannelToParallel(channel, status)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2].
status (str) – Sets CH1/CH2 as Tracking parallel mode.
- Return type:
None.
- set_ChannelToSerial(channel, status)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2].
status (str) – Sets CH1/CH2 as Tracking series mode.
- Return type:
None.
- set_ChannelTracking(mode)[source]
- Parameters:
mode (int) – Selects the operation mode: independent, tracking series, or tracking parallel. GPP-1326 does not have this function. Series-parallel mode is not supported under LOAD.
- Return type:
None.
- set_LoadResistor(channel, value)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2].
value (float) – Set resistance values from range 1-1000.
- Return type:
None.
- set_Out(channel, state)[source]
- Parameters:
channel (int) – Select channel from List of Channal Numbers [1,2,3,4].
state (str) – Status of power Supple output. Could be [“ON”, “OFF”]
- Return type:
None.
AnaPico AG APPH20G module
Created on Tue Feb 15 10:57:49 2022
@author: Martin.Mihaylov
- class APPH20G.APPH(resource_str)[source]
Bases:
object
- VCOMeasExample(NoieseOffset1, NoieseOffset2, measPoints, tunRangeMin, tunRangeMax, SupplyVoltage, delay)[source]
This is a small example how to make a Voltage controlled oscillator Noise measurment.
- ask_ANSpot(value)[source]
- Parameters:
value (TYPE) –
- The parameter is given as offset frequency in [Hz]
Unit Hz Value - float
- Returns:
Returns the phase noise value of the last measurement at the offset frequency defined in <value>. The parameter is given as offset frequency in [Hz] Unit Hz Value - float
- Return type:
TYPE str
- ask_ANTraceFreq()[source]
- Returns:
Returns a list of offset frequency values of the current measurement as block data. Hz
- Return type:
TYPE str
- ask_ANTraceNoise()[source]
- Returns:
Returns a list of amplitude noise spectrum values of the current measurement as block data Unit dBc/Hz
- Return type:
TYPE str
- ask_ANTraceSpurFreq()[source]
- Returns:
Returns a list of offset frequencies of the spurs in the active trace as block data. Unit Hz
- Return type:
TYPE str
- ask_ANTraceSpurPower()[source]
- Returns:
Returns a list of power values of the spurs in the active trace as block data. Unit dBc
- Return type:
TYPE str
- ask_CalcFreq()[source]
- Returns:
Reads back the detected frequency from a frequency search.
- Return type:
TYPE float
- ask_CalcPower()[source]
- Returns:
Reads back the detected power level from a frequency search.
- Return type:
TYPE float
- ask_DUTPortStatus()[source]
- Returns:
stat – Query the status of the DUT TUNE port.
- Return type:
str
- ask_DUTPortVoltage()[source]
- Returns:
Sets/gets the voltage at the DUT TUNE püort. Returns the configured value. If the output is turned off, it doesn’t necessarily return 0, as an internal voltage may be configured.
- Return type:
TYPE float
- ask_FNSpot(value)[source]
- Parameters:
value (float) –
- The parameters defines the spot noise offset frequency in [Hz].
Unit Hz Value - float
- Returns:
Returns the spot noise value at the specified offset frequency.
- Return type:
TYPE str
- ask_FNTraceFreq()[source]
- Returns:
Returns a list of offset frequency values of the current measurement as block data. Unit Hz
- Return type:
TYPE lisz
- ask_FNTraceNoise()[source]
- Returns:
Returns a list of phase noise spectrum values of the current measurement as block data. Unit Hz
- Return type:
TYPE list
- ask_FNTraceSpurFreq()[source]
- Returns:
Returns a list of offset frequencies of the spurs in the active trace as block data. Unit Hz
- Return type:
TYPE list
- ask_FNTraceSpurPower()[source]
- Returns:
Returns a list of power values of the spurs in the active trace as block data. Unit Hz
- Return type:
TYPE list
- ask_PMTraceJitter()[source]
- Returns:
Returns the RMS jitter of the current trace.
- Return type:
TYPE str
- ask_PMTraceNoise()[source]
- Returns:
Returns a list of phase noise points of the most recent measurement as block data.
- Return type:
TYPE list
- ask_PNSpot(value)[source]
- Parameters:
value (float) – The parameter is given as offset frequency in [Hz] Unit Hz Value - float
- Returns:
Returns the phase noise value of the last measurement at the offset frequency defined in <value>. The parameter is given as offset frequency in [Hz] Unit Hz Value - float
- Return type:
TYPE str
- ask_PN_IFGain()[source]
- Returns:
Range: 0-60 Query the IF gain for the measurement.
- Return type:
TYPE float
- ask_SystemError()[source]
- Returns:
Return parameters: List of integer error numbers. This query is a request for all entries in the instrument’s error queue. Error messages in the queue contain an integer in the range [-32768,32768] denoting an error code and associated descriptive text. This query clears the instrument’s error queue.
- Return type:
TYPE list
- ask_VCOKPuShing()[source]
- Returns:
Query the pushing parameter for the measurement
- Return type:
TYPE str
- ask_VCOKVCO()[source]
- Returns:
Query the tune sensitivity parameter for the measurement.
- Return type:
TYPE str
- ask_VCOTestISupply()[source]
- Returns:
Query the supply current parameter for the measurement
- Return type:
TYPE str
- ask_VCOTestPNoise()[source]
- Returns:
Query the phase noise parameter for the measurement.
- Return type:
TYPE str
- ask_VCOTestPnoiseOFFSet(state)[source]
- Parameters:
state (int) – Can be set to [1,2,3,4]
- Raises:
ValueError – Error massage
- Returns:
Query the 4 offset frequencies at which the phase noise is measured
- Return type:
TYPE str
- ask_VCOTestPoint()[source]
- Returns:
Query the number rof voltage points to use in the measurement
- Return type:
TYPE str
- ask_VCOTestPower()[source]
- Returns:
Query the power parameter for the measurement.
- Return type:
TYPE str
- ask_VCOTestStart()[source]
- Returns:
Query the start tuning voltage for the measurement. Unit V
- Return type:
TYPE str
- ask_VCOTestStop()[source]
- Returns:
Query the stop tuning voltage for the measurement. Unit V
- Return type:
TYPE str
- ask_VCOTraceFreq()[source]
- Returns:
Returns a list of frequency values measured at each tune voltage point of the current measurement as block data2.
- Return type:
TYPE list
- ask_VCOTracePNoise(chan)[source]
- Parameters:
chan (ist) – Can be set to [1,2,3,4]
- Raises:
ValueError – Error massage
- Returns:
Returns a list of phase noise values measured at each tune voltage point of the current measurement as block data. The parameter 1-4 selects the offset frequency from the set defined by the SENS:VCO:TEST:PN:OFFS <list> command
- Return type:
TYPE list
- ask_VCOTracePower()[source]
- Returns:
Returns a list of power values measured at each tune voltage point of the current measurement as block data.
- Return type:
TYPE list
- ask_VCOTraceVoltage()[source]
- Returns:
Returns a list of tune voltage values measured at each tune voltage point of the current measurement as block data.
- Return type:
TYPE list
- ask_VSOTestFreq()[source]
- Returns:
Query the frequency parameter for the measurement.
- Return type:
TYPE str
- ask_VSOTestNoise()[source]
- Returns:
Query the the phase noise parameter for the measurement.
- Return type:
TYPE str
- set_CalcAverage(event)[source]
- Parameters:
event (str) – Waits for the defined event NEXT: next iteration complete ALL: measurement complete <value>: specified iteration complete Optionally, a timeout in milliseconds can be specified as a second parameter. This command will block further SCPI requests until the specified event or the specified timeout has occurred. If no timeout is specified, the timeout will be ininite.
- Return type:
None.
- set_DUTPortStatus(state)[source]
- Parameters:
state (str) – Enables/disables the DUT TUNE port. Can be [‘ON’,’OFF’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_DUTPortVoltage(value)[source]
- Parameters:
value (float) – Sets the voltage at the DUT TUNE püort. Returns the configured value. If the output is turned off, it doesn’t necessarily return 0, as an internal voltage may be configured
- Return type:
None.
- set_FreqExecute()[source]
- Returns:
Starts the frequency search. See the CALCulate subsystem on how to read out the result.
- Return type:
None.
- set_Output(status)[source]
- Parameters:
status (str) – Set Output ON and OFF. CAn be [‘ON’,’OFF’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_PNIFGain(value)[source]
- Parameters:
value (float) – Range: 0-60 Sets the IF gain for the measurement.
- Raises:
ValueError – Error massage
- Return type:
None.
- set_PNStartFreq(value)[source]
- Parameters:
value (float) – Unit HZ Sets the start offset frequency.
- Return type:
None.
- set_PNStopFreq(value)[source]
- Parameters:
value (float) – Unit HZ Sets the stop offset frequency.
- Return type:
None.
- set_PowerExecute()[source]
- Returns:
Starts the power measurement. When performing SENS:FREQ:EXEC, this measurement will be automatically run at the end (if a signal is detected
- Return type:
None.
- set_SysMeasMode(state)[source]
- Parameters:
state (str) –
- Sets/gets the active measurement mode. Can be [‘PN’,’AN’,’FN’,’BB’,’TRAN’,’VCO’]
PN: phase noise measurement
AN: amplitude noise measurement
FN: frequency noise measurement (results are converted to phase noise)
BB: base band measurement (not yet available)
TRAN: transient analysis (not yet available)
VCO: voltage controlled oscillator characterization
- Raises:
ValueError – Error massage
- Return type:
None.
- set_VCOKPuShing(state)[source]
- Parameters:
state (str) – Enables/disables the pushing parameter for the measurement. Can be [‘ON’,’OFF’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_VCOKVCO(state)[source]
- Parameters:
state (str) – Enables/disables the tune sensitivity parameter for the measurement Can be [‘ON’,’OFF’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_VCOTYPE(typ)[source]
- Parameters:
typ (str) – Select the DUT type for the measurement. Distinguish between slow (VCXO) and fast (VCO) tuning sensitivities. Can be [‘VCO’,’VCXO’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_VCOTestFreq(state)[source]
- Parameters:
state (str) – Enables/disables the frequency parameter for the measurement. Can be [‘ON’,’OFF’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_VCOTestISupply(state)[source]
- Parameters:
state (str) – Enables/disables the supply current parameter for the measurement. Can be [‘ON’,’OFF’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_VCOTestNoise(state)[source]
- Parameters:
state (str) – Enables/disables the phase noise parameter for the measurement Can be [‘ON’,’OFF’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_VCOTestPNoise(state)[source]
- Parameters:
state (str) – Enables/disables the phase noise parameter for the measurement. CAn be set to [‘ON’,’OFF’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_VCOTestPnoiseOFFSet(value1, value2, value3, value4)[source]
- Parameters:
value1 (float) – freq val 1
value2 (float) – freq val 2
value3 (float) – freq val 3
value4 (float) – freq val 4
Sets up to 4 offset frequencies at which the phase noise is measured. At least 1 parameter is required. Blank parameters are set to 0 (disabled). The query returns the set frequency for the specified offset. The offset can be specified with the <sel> parameter and can be chosen from 1|2|3|4
Unit HZ
- Return type:
None.
- set_VCOTestPoint(value)[source]
- Parameters:
value (float) – Sets the number rof voltage points to use in the measurement
- Return type:
None.
- set_VCOTestPower(state)[source]
- Parameters:
state (str) – Enables/disables the power parameter for the measurement. Can be [‘ON’,’OFF’]
- Raises:
ValueError – Error massage
- Return type:
None.
- set_VCOTestStart(value)[source]
- Parameters:
value (float) – Sets the start tuning voltage for the measurement. Unit V
- Return type:
None.
- set_VCOTestStop(value)[source]
- Parameters:
value (float) – Sets the stop tuning voltage for the measurement. Unit V
- Return type:
None.
- set_VCOWait(state, value)[source]
- Parameters:
state (str) – Can be [‘ALL’,’NEXT’]
value (float) – This command requests a preliminary result during the measurement and blocks until the resultis ready. The first parameter (required) specifies the target iteration to be saved. NEXT specifies the next possible iteration, ALL specifies the last iteration of the measurement (i.e. waits for the measurement to finish) and an iteger specifies the specific iteration requested.The second parameter (optional) defines a timeout in milliseconds. If the command terminates without generating a preliminary result. It will produce an error. This error can be queried with SYST:ERR? or SYST:ERR:ALL?.
- Returns:
DESCRIPTION.
- Return type:
TYPE