DefaultLaser

public class DefaultLaser extends AbstractObservable implements Laser

A source of light for illuminating the sample.

Methods

getPower

public double getPower()

Returns the current power.

Returns:current laser power

getWavelength

public double getWavelength()

Returns the wavelength of the laser.

Returns:The laser’s wavelength.

setPower

public void setPower(double newPower)

Sets the light source’s power. If the value is not within the limits, set it to the the closest allowed value.

Parameters:
  • newPower – The power of the light source.

toJson

public JsonElement toJson()

Outputs the laser’s properties as a JSON element.

Returns:A JSON tree describing the laser’s properties.