parameters: (self)
docstring: Initialize the input and output properties of the algorithm.
docstring_summary: Initialize the input and output properties of the algorithm.
docstring_tokens: Initialize the input and output properties of the algorithm .
function: def PyInit(self):
          """Initialize the input and output properties of the algorithm."""
          nonnegativeInt = IntBoundedValidator(lower=0)
          wsIndexRange = IntBoundedValidator(lower=0, upper=255)
          nonnegativeIntArray = IntArrayBoundedValidator(lower=0)
          maxTwoNonnegativeInts = CompositeValidator()
          maxTwoNonnegativeInts.add(IntArrayLengthValidator(lenmin=0, lenmax=2))
          maxTwoNonnegativeInts.add(nonnegativeIntArray)
          self.declareProperty(MultipleFileProperty(Prop.RUN,
                                                    extensions=['nxs']),
                               doc='A list of input run numbers/files.')
          self.declareProperty(MatrixWorkspaceProperty(Prop.OUTPUT_WS,
                                                       defaultValue='',
                                                       direction=Direction.Output),
                               doc='The preprocessed output workspace (unit wavelength), single histogram.')
          self.declareProperty('Measurement', 'DirectBeam',
                               StringListValidator(['DirectBeam', 'ReflectedBeam']),
                               'Whether to process as direct or reflected beam.')
          self.declareProperty('AngleOption', 'SampleAngle',
                               StringListValidator(['SampleAngle', 'DetectorAngle', 'UserAngle']))
          self.setPropertySettings('AngleOption',
                                   EnabledWhenProperty('Measurement', PropertyCriterion.IsEqualTo, 'ReflectedBeam'))
          self.declareProperty(Prop.THETA,
                               defaultValue=-1.,
                               doc='The bragg angle for reflected beam [Degree], used if angle option is UserAngle.')
          self.setPropertySettings(Prop.THETA,
                                   EnabledWhenProperty('AngleOption', PropertyCriterion.IsEqualTo, 'UserAngle'))
          self.declareProperty('DirectBeamDetectorAngle', -1.,
                               'The detector angle value [Degree] for the corresponding direct beam, '
                               'used if angle option is DetectorAngle')
          self.declareProperty('DirectBeamForegroundCentre', -1.,
                               'Fractional pixel index for the direct beam, used if angle option is DetectorAngle.')
          self.setPropertySettings('DirectBeamDetectorAngle',
                                   EnabledWhenProperty('AngleOption', PropertyCriterion.IsEqualTo, 'DetectorAngle'))
          self.setPropertySettings('DirectBeamForegroundCentre',
                                   EnabledWhenProperty('AngleOption', PropertyCriterion.IsEqualTo, 'DetectorAngle'))
          self.declareProperty(Prop.SUBALG_LOGGING,
                               defaultValue=SubalgLogging.OFF,
                               validator=StringListValidator([SubalgLogging.OFF, SubalgLogging.ON]),
                               doc='Enable or disable child algorithm logging.')
          self.declareProperty(Prop.CLEANUP,
                               defaultValue=utils.Cleanup.ON,
                               validator=StringListValidator([utils.Cleanup.ON, utils.Cleanup.OFF]),
                               doc='Enable or disable intermediate workspace cleanup.')
          self.declareProperty(MatrixWorkspaceProperty(Prop.WATER_REFERENCE,
                                                       defaultValue='',
                                                       direction=Direction.Input,
                                                       validator=WorkspaceUnitValidator("TOF"),
                                                       optional=PropertyMode.Optional),
                               doc='A (water) calibration workspace (unit TOF).')
          self.declareProperty(Prop.SLIT_NORM,
                               defaultValue=SlitNorm.AUTO,
                               validator=StringListValidator([SlitNorm.AUTO, SlitNorm.OFF, SlitNorm.ON]),
                               doc='Enable or disable slit normalisation.')
          self.declareProperty(Prop.FLUX_NORM_METHOD,
                               defaultValue=FluxNormMethod.TIME,
                               validator=StringListValidator([FluxNormMethod.TIME,
                                                              FluxNormMethod.MONITOR,
                                                              FluxNormMethod.OFF]),
                               doc='Neutron flux normalisation method.')
          self.declareProperty(IntArrayProperty(Prop.FOREGROUND_HALF_WIDTH,
                                                validator=maxTwoNonnegativeInts),
                               doc='Number of foreground pixels at lower and higher angles from the centre pixel.')
          self.declareProperty(Prop.BKG_METHOD,
                               defaultValue=BkgMethod.AVERAGE,
                               validator=StringListValidator([BkgMethod.AVERAGE, BkgMethod.CONSTANT, BkgMethod.LINEAR, BkgMethod.OFF]),
                               doc='Flat background calculation method for background subtraction.')
          self.declareProperty(Prop.LOW_BKG_OFFSET,
                               defaultValue=7,
                               validator=nonnegativeInt,
                               doc='Distance of flat background region towards smaller detector angles from the '
                                   + 'foreground centre, in pixels.')
          self.declareProperty(Prop.LOW_BKG_WIDTH,
                               defaultValue=5,
                               validator=nonnegativeInt,
                               doc='Width of flat background region towards smaller detector angles from the '
                                   + 'foreground centre, in pixels.')
          self.declareProperty(Prop.HIGH_BKG_OFFSET,
                               defaultValue=7,
                               validator=nonnegativeInt,
                               doc='Distance of flat background region towards larger detector angles from the '
                                   + 'foreground centre, in pixels.')
          self.declareProperty(Prop.HIGH_BKG_WIDTH,
                               defaultValue=5,
                               validator=nonnegativeInt,
                               doc='Width of flat background region towards larger detector angles from the '
                                   + 'foreground centre, in pixels.')
          self.declareProperty(Prop.START_WS_INDEX,
                               validator=wsIndexRange,
                               defaultValue=0,
                               doc='Start workspace index used for peak fitting.')
          self.declareProperty(Prop.END_WS_INDEX,
                               validator=wsIndexRange,
                               defaultValue=255,
                               doc='Last workspace index used for peak fitting.')
          self.declareProperty(Prop.XMIN,
                               defaultValue=-1.,
                               doc='Minimum wavelength [Angstrom] used for peak fitting.')
          self.declareProperty(Prop.XMAX,
                               defaultValue=-1.,
                               doc='Maximum wavelength [Angstrom] used for peak fitting.')
function_tokens: def PyInit ( self ) : nonnegativeInt = IntBoundedValidator ( lower = 0 ) wsIndexRange = IntBoundedValidator ( lower = 0 , upper = 255 ) nonnegativeIntArray = IntArrayBoundedValidator ( lower = 0 ) maxTwoNonnegativeInts = CompositeValidator ( ) maxTwoNonnegativeInts . add ( IntArrayLengthValidator ( lenmin = 0 , lenmax = 2 ) ) maxTwoNonnegativeInts . add ( nonnegativeIntArray ) self . declareProperty ( MultipleFileProperty ( Prop . RUN , extensions = [ 'nxs' ] ) , doc = 'A list of input run numbers/files.' ) self . declareProperty ( MatrixWorkspaceProperty ( Prop . OUTPUT_WS , defaultValue = '' , direction = Direction . Output ) , doc = 'The preprocessed output workspace (unit wavelength), single histogram.' ) self . declareProperty ( 'Measurement' , 'DirectBeam' , StringListValidator ( [ 'DirectBeam' , 'ReflectedBeam' ] ) , 'Whether to process as direct or reflected beam.' ) self . declareProperty ( 'AngleOption' , 'SampleAngle' , StringListValidator ( [ 'SampleAngle' , 'DetectorAngle' , 'UserAngle' ] ) ) self . setPropertySettings ( 'AngleOption' , EnabledWhenProperty ( 'Measurement' , PropertyCriterion . IsEqualTo , 'ReflectedBeam' ) ) self . declareProperty ( Prop . THETA , defaultValue = - 1. , doc = 'The bragg angle for reflected beam [Degree], used if angle option is UserAngle.' ) self . setPropertySettings ( Prop . THETA , EnabledWhenProperty ( 'AngleOption' , PropertyCriterion . IsEqualTo , 'UserAngle' ) ) self . declareProperty ( 'DirectBeamDetectorAngle' , - 1. , 'The detector angle value [Degree] for the corresponding direct beam, ' 'used if angle option is DetectorAngle' ) self . declareProperty ( 'DirectBeamForegroundCentre' , - 1. , 'Fractional pixel index for the direct beam, used if angle option is DetectorAngle.' ) self . setPropertySettings ( 'DirectBeamDetectorAngle' , EnabledWhenProperty ( 'AngleOption' , PropertyCriterion . IsEqualTo , 'DetectorAngle' ) ) self . setPropertySettings ( 'DirectBeamForegroundCentre' , EnabledWhenProperty ( 'AngleOption' , PropertyCriterion . IsEqualTo , 'DetectorAngle' ) ) self . declareProperty ( Prop . SUBALG_LOGGING , defaultValue = SubalgLogging . OFF , validator = StringListValidator ( [ SubalgLogging . OFF , SubalgLogging . ON ] ) , doc = 'Enable or disable child algorithm logging.' ) self . declareProperty ( Prop . CLEANUP , defaultValue = utils . Cleanup . ON , validator = StringListValidator ( [ utils . Cleanup . ON , utils . Cleanup . OFF ] ) , doc = 'Enable or disable intermediate workspace cleanup.' ) self . declareProperty ( MatrixWorkspaceProperty ( Prop . WATER_REFERENCE , defaultValue = '' , direction = Direction . Input , validator = WorkspaceUnitValidator ( "TOF" ) , optional = PropertyMode . Optional ) , doc = 'A (water) calibration workspace (unit TOF).' ) self . declareProperty ( Prop . SLIT_NORM , defaultValue = SlitNorm . AUTO , validator = StringListValidator ( [ SlitNorm . AUTO , SlitNorm . OFF , SlitNorm . ON ] ) , doc = 'Enable or disable slit normalisation.' ) self . declareProperty ( Prop . FLUX_NORM_METHOD , defaultValue = FluxNormMethod . TIME , validator = StringListValidator ( [ FluxNormMethod . TIME , FluxNormMethod . MONITOR , FluxNormMethod . OFF ] ) , doc = 'Neutron flux normalisation method.' ) self . declareProperty ( IntArrayProperty ( Prop . FOREGROUND_HALF_WIDTH , validator = maxTwoNonnegativeInts ) , doc = 'Number of foreground pixels at lower and higher angles from the centre pixel.' ) self . declareProperty ( Prop . BKG_METHOD , defaultValue = BkgMethod . AVERAGE , validator = StringListValidator ( [ BkgMethod . AVERAGE , BkgMethod . CONSTANT , BkgMethod . LINEAR , BkgMethod . OFF ] ) , doc = 'Flat background calculation method for background subtraction.' ) self . declareProperty ( Prop . LOW_BKG_OFFSET , defaultValue = 7 , validator = nonnegativeInt , doc = 'Distance of flat background region towards smaller detector angles from the ' + 'foreground centre, in pixels.' ) self . declareProperty ( Prop . LOW_BKG_WIDTH , defaultValue = 5 , validator = nonnegativeInt , doc = 'Width of flat background region towards smaller detector angles from the ' + 'foreground centre, in pixels.' ) self . declareProperty ( Prop . HIGH_BKG_OFFSET , defaultValue = 7 , validator = nonnegativeInt , doc = 'Distance of flat background region towards larger detector angles from the ' + 'foreground centre, in pixels.' ) self . declareProperty ( Prop . HIGH_BKG_WIDTH , defaultValue = 5 , validator = nonnegativeInt , doc = 'Width of flat background region towards larger detector angles from the ' + 'foreground centre, in pixels.' ) self . declareProperty ( Prop . START_WS_INDEX , validator = wsIndexRange , defaultValue = 0 , doc = 'Start workspace index used for peak fitting.' ) self . declareProperty ( Prop . END_WS_INDEX , validator = wsIndexRange , defaultValue = 255 , doc = 'Last workspace index used for peak fitting.' ) self . declareProperty ( Prop . XMIN , defaultValue = - 1. , doc = 'Minimum wavelength [Angstrom] used for peak fitting.' ) self . declareProperty ( Prop . XMAX , defaultValue = - 1. , doc = 'Maximum wavelength [Angstrom] used for peak fitting.' )