Osa Instrument

This is the osa instrument, created to be able to indirectly talk to the device through controller and get data which can be shown in the gui. So request for doing things go view > instrument > controller

This class uses pint to give units to the variables.

class hyperion.instrument.spectrum.osa_instrument.OsaInstrument(settings)

OsaInstrument class

finalize()

Closes the connection to the osa machine

idn()

Identify command

Returns:identification for the device
Return type:string
initialize()

Starts the connection to the osa machine

is_end_wav_bigger_than_start_wav(end_wav, start_wav)

Check to see if end_wav is bigger than the start_wav

Parameters:
  • end_wav – a pint quantity
  • start_wav – a pint quantity
Type:

pint nm quantity

Type:

pint nm quantity

Returns:

true if condition passed, false if condition failed.

:rtype boolean

is_end_wav_value_correct(end_wav)

Is end_wav in range between 600 and 1750

Parameters:end_wav – a pint quantity
Type:pint nm quantity
Returns:true if condition passed, false if condition failed.

:rtype boolean

is_start_wav_value_correct(start_wav)

Is start_wav in range between 600 and 1750 nm

Parameters:start_wav – the startwavelength
Type:pint nm quantity
Returns:true if condition passed, false if condition failed.

:rtype boolean

load_config(filename=None)

Loads the configuration file to generate the properties of the Scan and Monitor.

Parameters:filename – Path to the filename. Default is: ‘Config/experiment.yml’ if not specified.

:type string

take_spectrum()

Method where a spectrum will be taken using the osa machine.

Returns:wav, spec: two list containing the data from the taken spectrum.
Rtype wav, sepec:
 wav(a list of floats), spec(a list of floats)