Package gda.device.detector.xmap
Class EpicsXmapController
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.detector.xmap.EpicsXmapController
- All Implemented Interfaces:
XmapController,Device,Configurable,Findable,gda.observable.IObservable
- Direct Known Subclasses:
EpicsXmapControllerROI
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected EDXDMappingControllerprotected intprotected intFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all MCAs and starts data collectionvoidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.voiddeleteROIs(int mcaIndex) Deletes all the current regions of interest on a give mca detector element.doubleReturns the time for which the detector is set to acquire dataint[][]getData()Returns the twoD data array of the all the MCAsint[]getData(int mcaNumber) Returns the data array of the specified MCAdouble[][]double[]getEnergyBins(int mcaNumber) intgetEvents(int mcaNumber) Returns the total events recordeddoublegetICR(int mcaNumber) Reads the input count rate for an element also known as the fast filter rate outside EPICSintReturns current number of Bins/channels for spectrum acquisition in each MCAintReturns the number of MCAs currently connected to the XMap detectorintReturns the roi count if they have been set, otherwise reads the total possible count from EPICSdoublegetOCR(int mcaNumber) Reads the output count rate for an element also known as the slow filter rate outside EPICSdoubleReturns the current rate at which data is read in the Epics interfacedoubleReturns the elapsed real time after a read status operationdouble[]getROICounts(int roiIndex) Returns a count for each mca for a given roi number For instance if roi=0 the first roidouble[][]getROIParameters(int mcaIndex) double[]getROIs(int mcaNumber) double[]getROIs(int mcaNumber, int[][] data) double[]Returns a sum of all rois for each mca channelintReturns the status of the detectordoubleReturns the current set rate at which status is read in the Epics interfacevoidsetAcquisitionTime(double collectionTime) Tells the detector for how many seconds to acquire datavoidsetEdxdController(EDXDMappingController edxdController) voidsetNthROI(double[][] rois, int roiIndex) Sets the specified roi for all the mcasvoidsetNumberOfBins(int numberOfBins) Sets maximum numbers of bins/channels to use for spectrum acquisition in each MCAvoidsetNumberOfElements(int numberOfElements) Sets the number of MCAs currently connected to the XMap detectorvoidsetNumberOfROIs(int numberOfROIs) Sets the Number of Regions of Interest for all MCAsvoidsetReadRate(double readRate) Sets the rate at which data is read in the Epics interfacevoidsetReadRate(String readRate) Sets the rate at which data is read in the Epics interfacevoidsetROI(double[][] actualRois, int mcaIndex) Set rois the array can be of size [maximum number rois][2] if it is lower for instance [actual number of rois][2] then the other possible rois will be set to zero.voidsetROIs(double[][] rois) Sets the all ROIs of all the MCA.voidsetStatusRate(double statusRate) Sets the rate at which status is read in the Epics interfacevoidsetStatusRate(String statusRate) Sets the rate at which status is read in the Epics interfacevoidstart()Start data acquisition in all MCA'svoidstop()Stop data acquisition in all MCA'sMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
edxdController
-
numberOfElements
protected int numberOfElements -
numberOfBins
protected int numberOfBins -
actualNumberOfROIs
protected int actualNumberOfROIs
-
-
Constructor Details
-
EpicsXmapController
public EpicsXmapController()
-
-
Method Details
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
clearAndStart
Description copied from interface:XmapControllerClears all MCAs and starts data collection- Specified by:
clearAndStartin interfaceXmapController- Throws:
DeviceException
-
deleteROIs
Description copied from interface:XmapControllerDeletes all the current regions of interest on a give mca detector element.- Specified by:
deleteROIsin interfaceXmapController- Parameters:
mcaIndex-- Throws:
DeviceException
-
getAcquisitionTime
Description copied from interface:XmapControllerReturns the time for which the detector is set to acquire data- Specified by:
getAcquisitionTimein interfaceXmapController- Returns:
- time
- Throws:
DeviceException
-
getData
Description copied from interface:XmapControllerReturns the data array of the specified MCA- Specified by:
getDatain interfaceXmapController- Parameters:
mcaNumber-- Returns:
- data array
- Throws:
DeviceException
-
getData
Description copied from interface:XmapControllerReturns the twoD data array of the all the MCAs- Specified by:
getDatain interfaceXmapController- Returns:
- data array
- Throws:
DeviceException
-
getNumberOfBins
Description copied from interface:XmapControllerReturns current number of Bins/channels for spectrum acquisition in each MCA- Specified by:
getNumberOfBinsin interfaceXmapController- Returns:
- numberOfBins
- Throws:
DeviceException
-
setNumberOfBins
Description copied from interface:XmapControllerSets maximum numbers of bins/channels to use for spectrum acquisition in each MCA- Specified by:
setNumberOfBinsin interfaceXmapController- Parameters:
numberOfBins-- Throws:
DeviceException
-
getNumberOfElements
Description copied from interface:XmapControllerReturns the number of MCAs currently connected to the XMap detector- Specified by:
getNumberOfElementsin interfaceXmapController- Returns:
- number of MCA
- Throws:
DeviceException
-
getNumberOfROIs
public int getNumberOfROIs()Returns the roi count if they have been set, otherwise reads the total possible count from EPICS- Specified by:
getNumberOfROIsin interfaceXmapController- Returns:
- roi number
-
getROICounts
Returns a count for each mca for a given roi number For instance if roi=0 the first roi- Specified by:
getROICountsin interfaceXmapController- Parameters:
roiIndex-- Returns:
- a double array, e.g if there are 4 mcas and the specified index is 1, it returns [mca1_region1_count, mca2_region1_count, mca3_region1_count, mca4_region1_count]
- Throws:
DeviceException
-
getROIs
- Specified by:
getROIsin interfaceXmapController- Parameters:
mcaNumber-- Returns:
- double array of regions of interest
- Throws:
DeviceException
-
getROIsSum
Returns a sum of all rois for each mca channel- Specified by:
getROIsSumin interfaceXmapController- Returns:
- a double array e.g if there are 4 mcas and 3 ois each , it returns [region1_sum, region2_sum, region3_sum]
- Throws:
DeviceException
-
getReadRate
Description copied from interface:XmapControllerReturns the current rate at which data is read in the Epics interface- Specified by:
getReadRatein interfaceXmapController- Returns:
- readRate
- Throws:
DeviceException
-
getRealTime
Description copied from interface:XmapControllerReturns the elapsed real time after a read status operation- Specified by:
getRealTimein interfaceXmapController- Returns:
- real time
- Throws:
DeviceException
-
getStatus
Description copied from interface:XmapControllerReturns the status of the detector- Specified by:
getStatusin interfaceXmapController- Returns:
- Detector.IDLE/BUSY
- Throws:
DeviceException
-
getStatusRate
Description copied from interface:XmapControllerReturns the current set rate at which status is read in the Epics interface- Specified by:
getStatusRatein interfaceXmapController- Returns:
- status rate
- Throws:
DeviceException
-
setAcquisitionTime
Description copied from interface:XmapControllerTells the detector for how many seconds to acquire data- Specified by:
setAcquisitionTimein interfaceXmapController- Parameters:
collectionTime-- Throws:
DeviceException
-
setNthROI
Description copied from interface:XmapControllerSets the specified roi for all the mcas- Specified by:
setNthROIin interfaceXmapController- Parameters:
rois- array. Each roi should have a low and high value.roiIndex-- Throws:
DeviceException
-
setNumberOfElements
Description copied from interface:XmapControllerSets the number of MCAs currently connected to the XMap detector- Specified by:
setNumberOfElementsin interfaceXmapController- Parameters:
numberOfElements-- Throws:
DeviceException
-
setNumberOfROIs
public void setNumberOfROIs(int numberOfROIs) Description copied from interface:XmapControllerSets the Number of Regions of Interest for all MCAs- Specified by:
setNumberOfROIsin interfaceXmapController- Parameters:
numberOfROIs-
-
setROI
Set rois the array can be of size [maximum number rois][2] if it is lower for instance [actual number of rois][2] then the other possible rois will be set to zero. The actual number of rois is also taken from the length of the first dimension of this array so it should always be passed in with size of the actual number of rois.- Specified by:
setROIin interfaceXmapController- Parameters:
actualRois- array. Each roi should have a low and high value.mcaIndex-- Throws:
DeviceException
-
setROIs
Description copied from interface:XmapControllerSets the all ROIs of all the MCA. All mcas will be set the same roi- Specified by:
setROIsin interfaceXmapController- Parameters:
rois- array. Each roi should have a low and high value.- Throws:
DeviceException
-
setReadRate
Description copied from interface:XmapControllerSets the rate at which data is read in the Epics interface- Specified by:
setReadRatein interfaceXmapController- Parameters:
readRate-- Throws:
DeviceException
-
setReadRate
Description copied from interface:XmapControllerSets the rate at which data is read in the Epics interface- Specified by:
setReadRatein interfaceXmapController- Parameters:
readRate-- Throws:
DeviceException
-
setStatusRate
Description copied from interface:XmapControllerSets the rate at which status is read in the Epics interface- Specified by:
setStatusRatein interfaceXmapController- Parameters:
statusRate-- Throws:
DeviceException
-
setStatusRate
Description copied from interface:XmapControllerSets the rate at which status is read in the Epics interface- Specified by:
setStatusRatein interfaceXmapController- Parameters:
statusRate-- Throws:
DeviceException
-
start
Description copied from interface:XmapControllerStart data acquisition in all MCA's- Specified by:
startin interfaceXmapController- Throws:
DeviceException
-
stop
Description copied from interface:XmapControllerStop data acquisition in all MCA's- Specified by:
stopin interfaceXmapController- Throws:
DeviceException
-
getEvents
Returns the total events recorded- Specified by:
getEventsin interfaceXmapController- Parameters:
mcaNumber-- Returns:
- the total count for the last element
- Throws:
DeviceException
-
getICR
Description copied from interface:XmapControllerReads the input count rate for an element also known as the fast filter rate outside EPICS- Specified by:
getICRin interfaceXmapController- Parameters:
mcaNumber-- Returns:
- rate
- Throws:
DeviceException
-
getOCR
Description copied from interface:XmapControllerReads the output count rate for an element also known as the slow filter rate outside EPICS- Specified by:
getOCRin interfaceXmapController- Parameters:
mcaNumber-- Returns:
- rate
- Throws:
DeviceException
-
getROIs
- Specified by:
getROIsin interfaceXmapController- Parameters:
mcaNumber-- Returns:
- double array of regions of interest
- Throws:
DeviceException
-
getROIParameters
- Specified by:
getROIParametersin interfaceXmapController- Throws:
DeviceException
-
getEdxdController
-
setEdxdController
-
getEnergyBins
- Throws:
DeviceException
-
getEnergyBins
- Throws:
DeviceException
-