AOTF instrument

This class (aa_aotf.py) is the model to connect to the AOTF using the controller aa_mod18012.py

The model is similar to the controller, but it adds specific functionalities such as units with Pint and some calibrations.

  • Wavelength calibration: you can directly set the desired wavelength. For this it uses a look-up table and interpolation.

With this the class knows what voltages should be set when changing the wavelength.

copyright:by Hyperion Authors, see AUTHORS for more details.
license:BSD, see LICENSE for more details.
class hyperion.instrument.polarization.aa_aotf.AaAotf(settings)

This class is the instrument class for the AOTF driver.

It implements another layer in the MVC design, adding calibration and units functionality.

blanking(state, mode='internal')

Define the blanking state. If True (False), all channels are on (off). It can be set to ‘internal’ or ‘external’, where external means that the modulation voltage of the channel will be used to define the channel output.

Parameters:
  • state (logical) – State of the blanking
  • mode (string) – external or internal. external is used to follow TTL external modulation
choose_channel(freq)

This function selects an appropriated channel for a given frequency in the range supported by the device.

It returns channel 1 or 7 depending on the desired frequency.

  • Channel 1 range: 82-151 MHz.
  • Channel 7 range: 68-82 MHz.
Parameters:freq (pint Quantity) – Frequency
Returns:Channel number needed for the Frequency requested
Return type:int
finalize()

To close the connection to the device

get_status()

Gets the status of all channels in the controller

load_calibration(cal_file)

This method loads the calibration file cal_file

Parameters:cal_file (string) – calibration file complete path, including extension (txt expected)
set_all_values(channel, freq, power, state=True, mode='internal')

Sets the values for freq, power, state and mode for channel. It can be used to turn in to or off, with state.

Parameters:
  • channel (int) – channel to use (can be from 1 to 8 inclusive)
  • freq (float) – Frequency. Channels 1-6 supports(82,151)MHz and Channels 7 and 8, (68,82)MHz
  • power (float) – Power to set in dBm (0 to 22 )
  • state (logical) – True for on and False for off
  • mode (string) – ‘internal’ or ‘external’
Returns:

Response from the driver

Return type:

string

set_defaults(channel)

Sets channel to default values given in the dictionary at the beginning of the class.

Parameters:channel (int) – channel value to put to default settings.
set_frequency_all_range(freq, power, state=True, mode='internal')

Automatically chooses channel 1 or 7 depending on the frequency requested and sets it.

Parameters:
  • freq (pint Quantity) – Frequency. Supported range (68,151) MHz
  • power (float) – Power to set in dBm (0 to 22 )
  • state (logical) – True for on and False for off
  • mode (string) – ‘internal’ or ‘external’
set_wavelength(wl, power, state=True, mode='internal')

This sets the wavelength wl by using the calibration file.

Parameters:
  • wl (pint Quantity) – This is the wavelength to set (it has to be in the range supported by the calibration file)
  • power (float) – Power for the RF in the AOTF, in dBm. range = (0,22) dBm
  • state (logical) – to turn the output on or off
  • mode (string) – ‘internal’ or ‘external’
Returns:

output from the driver.

Return type:

string

wavelength_to_frequency(wl, method='interp')

uses the calibration file to calculate the frequency needed to get the wavelength wl.

Parameters:
  • wl (pint Quantity) – Wavelength (distance)
  • method (string) – interpolation method (‘interp’ by default)
Returns:

Frequency value

Return type:

pint Quantity