From 6a74851e0c43a290c90ce6a687e51f3f1bba9177 Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Fri, 28 Aug 2020 12:21:07 +0200 Subject: [PATCH] enums --- docs/src/pygettingstarted.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/src/pygettingstarted.rst b/docs/src/pygettingstarted.rst index 3f15d73b2..40ca78677 100644 --- a/docs/src/pygettingstarted.rst +++ b/docs/src/pygettingstarted.rst @@ -134,3 +134,29 @@ while find returns a list of names. 'getSubExptime', 'setExptime', 'setSubExptime', 'subexptime'] +---------------------- +Where are the ENUMs? +---------------------- + +To set some of the detector settings like file format you have +to pass in an enum. + +:: + + >>> d.setFileFormat(fileFormat.BINARY) + +The enums can be found in slsdet.enums + +:: + + import slsdet + >>> [e for e in dir(slsdet.enums) if not e.startswith('_')] + ['burstMode', 'clockIndex', 'dacIndex', 'detectorModeType', + 'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag', + 'fileFormat', 'frameDiscardPolicy', 'frameModeType', 'masterFlags', + 'readoutMode', 'runStatus', 'speedLevel', 'timingMode', + 'timingSourceType'] + + # Even though importing using * is not recommended one could + # get all the enums like this: + >>> from slsdet.enums import *