lightlab.equipment.lab_instruments.ILX_7900B_LS module

Summary

Classes:

ILX_7900B_LS The laser banks (ILX 7900B laser source).
ILX_Module Handles 0 to 1 indexing

Reference

class ILX_Module(channel, **kwargs)[source]

Bases: lightlab.equipment.abstract_drivers.multimodule_configurable.ConfigModule

Handles 0 to 1 indexing

class ILX_7900B_LS(name='The laser source', address=None, useChans=None, **kwargs)[source]

Bases: lightlab.equipment.visa_bases.visa_driver.VISAInstrumentDriver, lightlab.equipment.abstract_drivers.multimodule_configurable.MultiModuleConfigurable

The laser banks (ILX 7900B laser source). Provides array-based and dict-based setters/getters for

  • whether laser is on or off (enableState)
  • tunable wavelength output (wls)
  • output power in dBm (powers)

Setting/getting logic is implemented in MultiModuleConfigurable, which treats the channels as independent ConfigModules’s. This means that hardware communication is lazy – parameter values are cached, and messages are only sent when they are unknown or when they change.

Manual

Usage: Instrument: LaserSource

Todo

Multiple users at the same time is desirable. We are close. Non blocked-out channels are never touched, but there are still two issues

  • Fundamental: VISA access with two python processes could collide
  • Inconvenience: Have to create two different labstate instruments
    with different useChans for what is actually one instrument – maybe a slice method?
instrument_category

alias of lightlab.laboratory.instruments.interfaces.LaserSource

maxChannel = 8
sleepOn = {'LEVEL': 5, 'OUT': 3, 'WAVE': 30}
powerRange = <MagicMock name='mock()' id='140227825154256'>
startup()[source]
dfbChans

Returns the blocked out channels as a list

Currently, this is not an essentialProperty, so you have to access like:

ch = LS.driver.dfbChans
Returns:channel numbers, 0-indexed
Return type:(list)
setConfigArray(cStr, newValArr, forceHardware=False)[source]

When any configuration is set, there is an equilibration time.

This adds sleep functionality, only when there is a change, for an amount determined by the sleepOn class attribute.

enableState

**Returns* – (np.ndarray)* – enable states ordered like useChans

setChannelEnable(chanEnableDict)[source]

Sets only some channel values with dict keyed by useChans, e.g. chanEnableDict={0: 1, 2: 0}

Parameters:chanEnableDict (dict) – A dictionary keyed by channel with values 0 or 1
getChannelEnable()[source]
Returns:all channel enable states, keyed by useChans
Return type:(dict)
wls

**Returns* – (np.ndarray)* – laser wavelengths in nanometers ordered like useChans

setChannelWls(chanWavelengthDict)[source]

Sets only some channel values with dict keyed by useChans, e.g. chanWavelengthDict={0: 1550.5, 2: 1551}

Parameters:chanWavelengthDict (dict) – A dictionary keyed by channel with nanometer values
getChannelWls()[source]
Returns:all channel wavelengths, keyed by useChans
Return type:(dict)
powers

Laser powers

Returns:laser output powers in dBm, ordered like useChans
Return type:(np.ndarray)
setChannelPowers(chanPowerDict)[source]

Sets only some channel values with dict keyed by useChans, e.g. chanPowerDict={0: 13, 2: -10}

Parameters:chanPowerDict (dict) – A dictionary keyed by channel with dBm values
getChannelPowers()[source]
Returns:all channel powers, keyed by useChans
Return type:(dict)
wlRanges

Min/max wavelengths than can be covered by each channl. Wavelengths in nm.

Returns:maximum ranges starting from lower wavelength
Return type:(list(tuple))
getAsSpectrum()[source]

Gives a spectrum of power vs. wavelength, which has the wavelengths present as an abscissa, and their powers as ordinate (-120dBm if disabled)

It starts in dBm, but you can change to linear with the Spectrum.lin method

Returns:The WDM spectrum of the present outputs
Return type:(Spectrum)
allOff()[source]
allOn()[source]
off()[source]