SAObackend

class MonitorControl.BackEnds.ROACH1.simulator.SAObackend(name, roaches={}, roachlist=['roach1', 'roach2', 'roach3', 'roach4'], template='roach', synth=None, write_to_disk=False, TAMS_logging=False)

Bases: support.PropertiedClass

A simulated multi-ROACH 32k-channel x 4-IF spectrometer

An SAO back end normally comprises four ROACH boards using TAMS 32K channel firmware. We will generalize it, though, to use any number of ROACH boards.

Attributes:

logger       - logging.Logger instance
name         - name for the backend
reader       - dict of DeviceReadThread objects keyed to roach names
roach        - dict of SAOfwif objects keyed to their names

The backend manages the scans for the child ROACH objects. Their scan numbers are updated when the required number of records have been recorded.

Typically, the SAO client is an attribute of the main client so that the server’s methods are called with:

client.spectrometer.hardware.method()

Attributes Summary

bandwidth

bitstream

firmware

freqlist

roachnames

template

Methods Summary

calibrate(n, *args)

check_fans(n, *args)

check_temperatures(n, *args)

clock_synth_status(n, *args)

fft_shift_set(n, *args)

freqs(n, *args)

get_ADC_input(n, *args)

get_ADC_samples(n, *args)

get_adc_temp(n, *args)

get_ambient_temp(n, *args)

get_bandwidth(n, *args)

get_clk(n, *args)

get_current_accums()

get_current_scans()

report the current scan number for each ROACH

get_firmware(n, *args)

help()

initialize(n, *args)

last_spectra([dolog, squish])

Get the current spectrum from each ROACH

quit()

read_register(n, *args)

reset_scans()

rf_gain_get(n, *args)

rf_gain_set(n, *args)

rf_state(n, *args)

set_integration(int_time)

Sets all ROACHes to the same integration time.

start([n_accums, integration_time, callback])

start a scan consisting of ‘n_accums’ accumulations

sync_start(n, *args)

Attributes Documentation

bandwidth
bitstream
firmware
freqlist
roachnames
template

Methods Documentation

calibrate(n, *args)
check_fans(n, *args)
check_temperatures(n, *args)
clock_synth_status(n, *args)
fft_shift_set(n, *args)
freqs(n, *args)
get_ADC_input(n, *args)
get_ADC_samples(n, *args)
get_adc_temp(n, *args)
get_ambient_temp(n, *args)
get_bandwidth(n, *args)
get_clk(n, *args)
get_current_accums()
get_current_scans()

report the current scan number for each ROACH

get_firmware(n, *args)
help()
initialize(n, *args)
last_spectra(dolog=True, squish=16)

Get the current spectrum from each ROACH

Returns a list of lists that is compatible with Google Charts LineChart

We cheat a little in assuming that each ROACH has the same scan and spectrum numbers.

Parameters
  • - return log10 of data if True; negative number become 0 (dolog) –

  • - number of channels to average (squish) –

quit()
read_register(n, *args)
reset_scans()
rf_gain_get(n, *args)
rf_gain_set(n, *args)
rf_state(n, *args)
set_integration(int_time)

Sets all ROACHes to the same integration time.

start(n_accums=120, integration_time=10.0, callback=None)

start a scan consisting of ‘n_accums’ accumulations

Adapted from SAObackend.start and SAObackend.action

sync_start(n, *args)