DSA815
- class tam.DSA815(visa_rm, visa_id)[source]
Create an instance of
DSA815
.- Parameters:
visa_rm – A reference to a Visa resource manager. As returned (for example) by a call to
pyvisa.ResourceManager()
.visa_id (str) – The ID of the analyzer to connect with.
- property atten
The analyzer input attenuator setting in dB.
- property atten_auto
The auto setting mode for the analyzer input attenuation.
- property detector_mode
The analyzer detector type. This should be one of
['NEG', 'NORM', 'POS', 'RMS', 'SAMP', 'VAV', 'QPE']
- property freq
The analyzer sweep centre frequency in MHz.
- property fspan
The analyzer sweep frequency span in MHz.
- initialize()[source]
Initialize the analyzer state.
Sets the analyzer to single sweep mode, sets the sweep averaging mode and number of sweeps to average over. Also sets the reference level to the default value.
- measure_next_pwr()[source]
Measure the power and freq. of the next highest peak.
This assumes that the
measure_pwr
method has already been called. For example:>>> sa.vavg = 5 >>> sa.fspan = 0.1 >>> sa.ref_level = 10.0 >>> sa.measure_pwr(250.0) (2.732128, 250.000166) >>> sa.measure_next_pwr() (1.986321, 250.050134)
Note that if the analyzer cannot find another peak the cal to
measure_next_pwr
will return the power and frequency values for the first peak.- Returns:
A tuple of two floats with the power (in dBm) of next highest peak being first and the second being the frequency (in MHz) of the peak.
- measure_pwr(freq)[source]
Measure the signal power of the peak near the specified frequency.
This makes use of the spectrum analyzer peak search function to find the maximum signal value in the currently set span. This assumes that the relevant spectrum analyzer configuration has already been set. For example:
>>> sa.vavg = 5 >>> sa.fspan = 0.1 >>> sa.ref_level = 10.0 >>> sa.measure_pwr(250.0) (2.732128, 250.000166)
- Parameters:
freq (float) – The centre frequency to make the measurement (in MHz).
- Returns:
A tuple of
(pwr, freq)
wherepwr
is the measured power (in dBm) of the signal at frequencyfreq
(in MHz).
- property mixer_level
The maximum power (in dBm) at the input mixer. The valid range of values is -30 to 0 dBm in increments of 10 dB.
- property rbw
The analyzer resolution bandwidth in Hz.
- property rbw_auto
The auto setting mode for the resolution bandwidth.
- property ref_level
The analyzer reference level in dBm.
- property scale
The scale of the analyzer power axis in dB. The valid range of values is 0.1 to 20 dB.
- property start_freq
The analyzer sweep start frequency in MHz.
- property stop_freq
The analyzer sweep stop frequency in MHz.
- property sweep_time
The analyzer sweep time in seconds.
- property unit
The unit of measurement for the analyzer y-axis. This should be one of
[DBM, DBMV, DBUV, V, W]
.
- property vavg
The number of sweeps to average over.
- property vbw
The analyzer video bandwidth in Hz.