...
 
Commits (4)
......@@ -440,6 +440,7 @@ class LimaCCDs(PyTango.Device_4Impl) :
self.__Attribute2FunctionBase = {'acq_trigger_mode':'TriggerMode',
'saving_overwrite_policy' : 'OverwritePolicy',
'saving_format' : 'Format',
'saving_managed_mode' : 'ManagedMode',
'shutter_mode' : 'Mode',
'image_rotation':'Rotation',
......@@ -468,8 +469,29 @@ class LimaCCDs(PyTango.Device_4Impl) :
self.__SavingManagedMode = {'SOFTWARE' : Core.CtSaving.Software,
'HARDWARE' : Core.CtSaving.Hardware}
saving = self.__control.saving()
self.__SavingFormat = saving.getFormatListAsString()
self.__SavingFormat = {'RAW' : Core.CtSaving.RAW,
'EDF' : Core.CtSaving.EDF,
'CBF' : Core.CtSaving.CBFFormat}
self.__SavingFormatDefaultSuffix = {Core.CtSaving.RAW : '.raw',
Core.CtSaving.EDF : '.edf',
Core.CtSaving.CBFFormat : '.cbf'}
if SystemHasFeature('Core.CtSaving.TIFFFormat'):
self.__SavingFormat['TIFF'] = Core.CtSaving.TIFFFormat
self.__SavingFormatDefaultSuffix[Core.CtSaving.TIFFFormat] = '.tiff'
if SystemHasFeature('Core.CtSaving.EDFGZ'):
self.__SavingFormat['EDFGZ'] = Core.CtSaving.EDFGZ
self.__SavingFormatDefaultSuffix[Core.CtSaving.EDFGZ] = '.edfgz'
if SystemHasFeature('Core.CtSaving.HDF5'):
self.__SavingFormat['HDF5'] = Core.CtSaving.HDF5
self.__SavingFormatDefaultSuffix[Core.CtSaving.HDF5] = '.h5'
if SystemHasFeature('Core.CtSaving.EDFConcat'):
self.__SavingFormat['EDFCONCAT'] = Core.CtSaving.EDFConcat
self.__SavingFormatDefaultSuffix[Core.CtSaving.EDFConcat] = '.edf'
if SystemHasFeature('Core.CtSaving.EDFLZ4'):
self.__SavingFormat['EDFLZ4'] = Core.CtSaving.EDFLZ4
self.__SavingFormatDefaultSuffix[Core.CtSaving.EDFLZ4] = '.edf.lz4'
self.__SavingMode = {'MANUAL' : Core.CtSaving.Manual,
'AUTO_FRAME' : Core.CtSaving.AutoFrame,
......@@ -1366,27 +1388,23 @@ class LimaCCDs(PyTango.Device_4Impl) :
saving = self.__control.saving()
saving.setFramesPerFile(data)
@Core.DEB_MEMBER_FUNCT
def read_saving_format(self,attr) :
saving = self.__control.saving()
attr.set_value(saving.getFormatAsString())
## @brief Change the saving Format
#
@Core.DEB_MEMBER_FUNCT
def write_saving_format(self,attr) :
data = attr.get_write_value()
value = data.upper()
saving = self.__control.saving()
if not value in self.__SavingFormat:
value = getDictValue(self.__SavingFormat,data.upper())
if value is None:
PyTango.Except.throw_exception('WrongData',\
'Wrong value %s: %s'%('saving_format', value),\
'Wrong value %s: %s'%('saving_format',data.upper()),\
'LimaCCD Class')
else:
saving.setFormatAsString(value)
saving.setFormatSuffix()
saving.setFormat(value)
defaultSuffix = self.__SavingFormatDefaultSuffix.get(value,'.unknown')
saving.setSuffix(defaultSuffix)
## @brief get the maximum number of task for concurrent writing (saving)
......@@ -1601,8 +1619,6 @@ class LimaCCDs(PyTango.Device_4Impl) :
valueList = [getDictKey(self.__AcqTriggerMode,val) for val in values]
except:
valueList = self.__AcqTriggerMode.keys()
elif attr_name == "saving_format":
return self.__SavingFormat
else:
dict_name = '_' + self.__class__.__name__ + '__' + ''.join([x.title() for x in attr_name.split('_')])
d = getattr(self,dict_name,None)
......
This diff is collapsed.
......@@ -112,6 +112,7 @@ maxNbImages ro DevLong The maximum number of im
pixelRate ro DevLong Actual Pixel Rate (Hz)
pixelRateInfo ro DevString Pixel Rate information
pixelRateValidValues ro DevString Allowed Pixel Rates
recorderForcedFifo rw DevLong Forced Fifo Mode (**only for recording cams**)
roiInfo ro DevString PCO ROI info
roiLastFixed ro DevString Last fixed ROI info
rollingShutter rw DevLong Rolling Shutter Mode (**only for some types of EDGE**)
......
......@@ -522,22 +522,12 @@ class LimaTacoCCDs(PyTango.Device_4Impl, object):
pars.fileFormat = Core.CtSaving.CBFFormat
elif pars.suffix.lower()[-3:] == '.h5':
pars.fileFormat = Core.CtSaving.HDF5
elif pars.suffix.lower()[-5:] == '.h5gz':
pars.fileFormat = Core.CtSaving.HDF5GZ
elif pars.suffix.lower()[-5:] == '.h5bs':
pars.fileFormat = Core.CtSaving.HDF5BS
elif pars.suffix.lower()[-5:] == '.hdf5':
pars.fileFormat = Core.CtSaving.HDF5
elif pars.suffix.lower()[-7:] == '.hdf5gz':
pars.fileFormat = Core.CtSaving.HDF5GZ
elif pars.suffix.lower()[-7:] == '.hdf5bs':
pars.fileFormat = Core.CtSaving.HDF5BS
elif pars.suffix.lower()[-5:] == '.tiff':
pars.fileFormat = Core.CtSaving.TIFFFormat
elif pars.suffix.lower()[-8:] == '.edf.lz4':
pars.fileFormat = Core.CtSaving.EDFLZ4
elif pars.suffix.lower()[-7:] == '.edflz4':
pars.fileFormat = Core.CtSaving.EDFLZ4
else:
pars.fileFormat = Core.CtSaving.RAW
saving.setParameters(pars)
......