# Yokogawa¶

## Yokogawa6370 Optical Spectrum Analyzer¶

class instruments.yokogawa.Yokogawa6370(*args, **kwargs)[source]

The Yokogawa 6370 is a optical spectrum analyzer.

Example usage:

>>> import instruments as ik
>>> import quantities as pq
>>> inst = ik.yokogawa.Yokogawa6370.open_visa('TCPIP0:192.168.0.35')
>>> inst.start_wl = 1030e-9 * pq.m

class Channel(parent, idx)[source]

Class representing the channels on the Yokogawa 6370.

This class inherits from OSAChannel.

Warning

This class should NOT be manually created by the user. It is designed to be initialized by the Yokogawa6370 class.

data(bin_format=True)[source]

Gets the y-axis of the specified data source channel. This is an abstract property.

Parameters: bin_format (bool) – If the waveform should be transfered in binary (True) or ASCII (False) formats. The y-component of the waveform. numpy.ndarray
wavelength(bin_format=True)[source]

Gets the x-axis of the specified data source channel. This is an abstract property.

Parameters: bin_format (bool) – If the waveform should be transfered in binary (True) or ASCII (False) formats. The wavelength component of the waveform. numpy.ndarray
class SweepModes[source]

Enum containing valid output modes for the Yokogawa 6370

AUTO = 3
REPEAT = 2
SINGLE = 1
class Traces[source]

Enum containing valid Traces for the Yokogawa 6370

A = 'TRA'
B = 'TRB'
C = 'TRC'
D = 'TRD'
E = 'TRE'
F = 'TRF'
G = 'TRG'
data()[source]

Function to query the active Trace data of the OSA.

start_sweep()[source]

Triggering function for the Yokogawa 6370.

After changing the sweep mode, the device needs to be triggered before it will update.

wavelength()[source]

Query the wavelength axis of the active trace.

active_trace

The active trace of the OSA of enum Yokogawa6370.Traces. Determines the result of Yokogawa6370.data() and Yokogawa6370.wavelength().

bandwidth

The bandwidth in m.

center_wl

A floating point property that controls the center wavelength m.

channel

Gets the specific channel object. This channel is accessed as a list in the following manner:

>>> import instruments as ik
>>> osa = ik.yokogawa.Yokogawa6370.open_gpibusb('/dev/ttyUSB0')
>>> dat = osa.channel["A"].data # Gets the data of channel 0

Return type: list[~Yokogawa6370.Channel]
points

An integer property that controls the number of points in a trace.

span

A floating point property that controls the wavelength span in m.

start_wl

The start wavelength in m.

start_wl_max
start_wl_min
stop_wl

The stop wavelength in m.

stop_wl_max
stop_wl_min
sweep_mode

A property to control the Sweep Mode as one of Yokogawa6370.SweepMode. Effective only after a self.start_sweep().

## Yokogawa7651 Power Supply¶

class instruments.yokogawa.Yokogawa7651(filelike)[source]

The Yokogawa 7651 is a single channel DC power supply.

Example usage:

>>> import instruments as ik
>>> import quantities as pq
>>> inst = ik.yokogawa.Yokogawa7651.open_gpibusb("/dev/ttyUSB0", 1)
>>> inst.voltage = 10 * pq.V

class Channel(parent, name)[source]

Class representing the only channel on the Yokogawa 7651.

This class inherits from PowerSupplyChannel.

Warning

This class should NOT be manually created by the user. It is designed to be initialized by the Yokogawa7651 class.

current

Sets the current of the specified channel. This device has an max setting of 100mA.

Querying the current is not supported by this instrument.

Units: As specified (if a Quantity) or assumed to be of units Amps. Quantity with units Amp
mode

Sets the output mode for the power supply channel. This is either constant voltage or constant current.

Querying the mode is not supported by this instrument.

output

Sets the output status of the specified channel. This either enables or disables the output.

Querying the output status is not supported by this instrument.

Type: bool
voltage

Sets the voltage of the specified channel. This device has a voltage range of 0V to +30V.

Querying the voltage is not supported by this instrument.

Units: As specified (if a Quantity) or assumed to be of units Volts. Quantity with units Volt
class Mode[source]

Enum containing valid output modes for the Yokogawa 7651

current = 5
voltage = 1
trigger()[source]

Triggering function for the Yokogawa 7651.

After changing any parameters of the instrument (for example, output voltage), the device needs to be triggered before it will update.

channel

Gets the specific power supply channel object. Since the Yokogawa7651 is only equiped with a single channel, a list with a single element will be returned.

This (single) channel is accessed as a list in the following manner:

>>> import instruments as ik
>>> yoko = ik.yokogawa.Yokogawa7651.open_gpibusb('/dev/ttyUSB0', 10)
>>> yoko.channel[0].voltage = 1 # Sets output voltage to 1V

Return type: Channel
current

Sets the current. This device has an max setting of 100mA.

Querying the current is not supported by this instrument.

Units: As specified (if a Quantity) or assumed to be of units Amps. Quantity with units Amp
voltage

Sets the voltage. This device has a voltage range of 0V to +30V.

Querying the voltage is not supported by this instrument.

Units: As specified (if a Quantity) or assumed to be of units Volts. Quantity with units Volt