toor.Device package#

Submodules#

toor.Device.device module#

Author: “P. M. C. C. Encarnação” Email: “pedro.encarnacao@ua.pt” Date: “2023-10-10” Description: “This file is used to create a device object. This object is used to store the information about the device.

class toor.Device.device.Device[source]#

Bases: object

Class that represents a device. It contains the information about the device.

example:

print(“Device UUID: “, device.deviceUUID)

createDirectory()[source]#

Create the directory for the device

Returns:

property deviceDirectory#
property deviceName#
property deviceType#
property deviceUUID#

Returns the device UUID

Returns:

deviceUUID

property energyResolutionFunction#
generateDeviceUUID()[source]#

Generate a device Universally Unique Identifier (UUID) according to version 4

Returns:

property geometryObject#
property geometryType#
getDeviceName()[source]#
getFWHMSystemEnergyResponse(energy)[source]#
readDeviceProperties(objectName=None)[source]#

Read the device properties from a file

Parameters:

objectName (str) – name of the object to read the properties from (folder name)

Deprecated

setDeviceName(deviceName)[source]#
setDeviceType(deviceType)[source]#
setDeviceUUID(deviceUUID)[source]#

Sets the device UUID

Parameters:

deviceUUID (str)

setEnergyResolutionFunction(energyResolutionFunction)[source]#
setGeometryObject(geometryObject)[source]#

Set the geometry object (ex. SPECTGeometry object)

Parameters:

geometryObject (object)

Returns:

setGeometryType(geometry_type)[source]#

toor.Device.energy_resolution_function module#

Brief description of the file.

class toor.Device.energy_resolution_function.EnergyResolutionFunction(p1=None, p2=None)[source]#

Bases: object

run(E)[source]#

toor.Device.storedeviceInfo module#

class toor.Device.storedeviceInfo.StoreDeviceInFo(device_directory=None)[source]#

Bases: object

createDeviceInDirectory(object)[source]#

Create a device :param device_directory: directory of the device :type device_directory: str :type object: :param object: object device :type object: Device

readDeviceFromDirectory()[source]#

Read a device from a directory :param device_directory: directory of the device :type device_directory: str

Module contents#