Package gda.device

Interface Attenuator

All Superinterfaces:
Configurable, Findable
All Known Implementing Classes:
BinaryFilterSetAttenuators, DummyMultiFilterAttenuator, EpicsAttenuatorBase, MultiFilterAttenuator, WheelAttenuators

public interface Attenuator extends Findable, Configurable
Interface for a distributed object which operates an array of filters which attenuate the beam. All methods take and return transmissions as decimal values (0 to 1), not percentages (0 to 100).
  • Method Details

    • setTransmission

      double setTransmission(double transmission) throws DeviceException
      Changes the attenuation level to the closest achievable transmission to the given value. This uses the current beam energy in its calculations.
      Parameters:
      transmission - the desired transmission
      Returns:
      the actual transmission value achieved
      Throws:
      DeviceException
    • getTransmission

      double getTransmission() throws DeviceException
      The current transmission, assuming the energy has not changed since the last filter adjustment.
      Returns:
      the current actual transmission
      Throws:
      DeviceException
    • getDesiredTransmission

      double getDesiredTransmission() throws DeviceException
      Returns the stored desired transmission value.
      Returns:
      the stored desired transmission value
      Throws:
      DeviceException
    • getDesiredEnergy

      double getDesiredEnergy() throws DeviceException
      Returns:
      double - the desired energy to use in calculations to determine the filter set to achieve the desired transmission
      Throws:
      DeviceException
    • getClosestMatchEnergy

      double getClosestMatchEnergy() throws DeviceException
      Returns:
      double - the actual energy used in calculations to determine the filter set to achieve the desired transmission
      Throws:
      DeviceException
    • getClosestMatchTransmission

      double getClosestMatchTransmission(double transmission) throws DeviceException
      Using the current beam energy, calculates the closest achievable transmission value to the given value with the set of filters
      Parameters:
      transmission -
      Returns:
      double the closest transmission value that could be achieved
      Throws:
      DeviceException
    • getClosestMatchTransmission

      ClosestMatchTransmission getClosestMatchTransmission(double transmission, double energyInKeV) throws DeviceException
      Uses the given energy in the calculation
      Parameters:
      transmission - transmission (0 to 1)
      energyInKeV - x-ray energy in the stated units
      Throws:
      DeviceException
    • isReady

      boolean isReady() throws DeviceException
      Determines if correct filters are in place (as attenuator makes a change of transmission): Compares the results of getFilterPositions() with getDesiredFilterPositions().
      Throws:
      DeviceException
    • getFilterPositions

      boolean[] getFilterPositions() throws DeviceException
      Returns array (indexing over filter elements) answering the question:
      "Is filter (presently) in the beam?".
      Throws:
      DeviceException
    • getDesiredFilterPositions

      boolean[] getDesiredFilterPositions() throws DeviceException
      Returns array (indexing over filter elements) answering the question:
      "Is this filter required to be in the beam (to achieve the closest match transmission)?",

      as per the requested transmission most recently supplied to the getClosestMatchTransmission(double) method.
      Throws:
      DeviceException
    • getNumberFilters

      int getNumberFilters() throws DeviceException
      Counts the filters available
      Returns:
      the number of filters in this attenuator
      Throws:
      DeviceException
    • getFilterNames

      String[] getFilterNames() throws DeviceException
      Names available filters
      Returns:
      the names of the filters in this attenuator
      Throws:
      DeviceException