Package gda.device
Interface Attenuator
- All Superinterfaces:
Configurable,Findable
- All Known Implementing Classes:
BinaryFilterSetAttenuators,DummyMultiFilterAttenuator,EpicsAttenuatorBase,MultiFilterAttenuator,WheelAttenuators
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 Summary
Modifier and TypeMethodDescriptiondoubledoublegetClosestMatchTransmission(double transmission) Using the current beam energy, calculates the closest achievable transmission value to the given value with the set of filtersgetClosestMatchTransmission(double transmission, double energyInKeV) Uses the given energy in the calculationdoubleboolean[]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 thegetClosestMatchTransmission(double)method.doubleReturns the stored desired transmission value.String[]Names available filtersboolean[]Returns array (indexing over filter elements) answering the question:
"Is filter (presently) in the beam?".intCounts the filters availabledoubleThe current transmission, assuming the energy has not changed since the last filter adjustment.booleanisReady()Determines if correct filters are in place (as attenuator makes a change of transmission): Compares the results ofgetFilterPositions()withgetDesiredFilterPositions().doublesetTransmission(double transmission) Changes the attenuation level to the closest achievable transmission to the given value.Methods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigure
-
Method Details
-
setTransmission
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
The current transmission, assuming the energy has not changed since the last filter adjustment.- Returns:
- the current actual transmission
- Throws:
DeviceException
-
getDesiredTransmission
Returns the stored desired transmission value.- Returns:
- the stored desired transmission value
- Throws:
DeviceException
-
getDesiredEnergy
- Returns:
- double - the desired energy to use in calculations to determine the filter set to achieve the desired transmission
- Throws:
DeviceException
-
getClosestMatchEnergy
- Returns:
- double - the actual energy used in calculations to determine the filter set to achieve the desired transmission
- Throws:
DeviceException
-
getClosestMatchTransmission
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
Determines if correct filters are in place (as attenuator makes a change of transmission): Compares the results ofgetFilterPositions()withgetDesiredFilterPositions().- Throws:
DeviceException
-
getFilterPositions
Returns array (indexing over filter elements) answering the question:
"Is filter (presently) in the beam?".- Throws:
DeviceException
-
getDesiredFilterPositions
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 thegetClosestMatchTransmission(double)method.- Throws:
DeviceException
-
getNumberFilters
Counts the filters available- Returns:
- the number of filters in this attenuator
- Throws:
DeviceException
-
getFilterNames
Names available filters- Returns:
- the names of the filters in this attenuator
- Throws:
DeviceException
-