parameters: (self, ws)
return_statement: return normalisedWS
docstring: Normalise ws to slit opening and update slit widths.
docstring_summary: Normalise ws to slit opening and update slit widths.
docstring_tokens: Normalise ws to slit opening and update slit widths .
function: def _normaliseToSlits(self, ws):
          """Normalise ws to slit opening and update slit widths."""
          # Update slit width in any case for later re-use.
          common.slitSizes(ws)
          slitNorm = self.getProperty(Prop.SLIT_NORM).value
          if slitNorm == SlitNorm.OFF:
              return ws
          elif slitNorm == SlitNorm.AUTO and self._instrumentName != 'D17':
              return ws
          run = ws.run()
          slit2width = run.get(common.SampleLogs.SLIT2WIDTH).value
          slit3width = run.get(common.SampleLogs.SLIT3WIDTH).value
          if slit2width == '-' or slit3width == '-':
              self.log().warning('Slit information not found in sample logs. Slit normalisation disabled.')
              return ws
          f = slit2width * slit3width
          normalisedWSName = self._names.withSuffix('normalised_to_slits')
          normalisedWS = Scale(
              InputWorkspace=ws,
              OutputWorkspace=normalisedWSName,
              Factor=1.0 / f,
              EnableLogging=self._subalgLogging
          )
          self._cleanup.cleanup(ws)
          return normalisedWS
function_tokens: def _normaliseToSlits ( self , ws ) : # Update slit width in any case for later re-use. common . slitSizes ( ws ) slitNorm = self . getProperty ( Prop . SLIT_NORM ) . value if slitNorm == SlitNorm . OFF : return ws elif slitNorm == SlitNorm . AUTO and self . _instrumentName != 'D17' : return ws run = ws . run ( ) slit2width = run . get ( common . SampleLogs . SLIT2WIDTH ) . value slit3width = run . get ( common . SampleLogs . SLIT3WIDTH ) . value if slit2width == '-' or slit3width == '-' : self . log ( ) . warning ( 'Slit information not found in sample logs. Slit normalisation disabled.' ) return ws f = slit2width * slit3width normalisedWSName = self . _names . withSuffix ( 'normalised_to_slits' ) normalisedWS = Scale ( InputWorkspace = ws , OutputWorkspace = normalisedWSName , Factor = 1.0 / f , EnableLogging = self . _subalgLogging ) self . _cleanup . cleanup ( ws ) return normalisedWS