parameters: (self, mainWS)
return_statement: return correctionWS
docstring: Return the self shielding corrections.
docstring_summary: Return the self shielding corrections.
docstring_tokens: Return the self shielding corrections .
function: def _selfShielding(self, mainWS):
          """Return the self shielding corrections."""
          wavelengthWSName = self._names.withSuffix('input_in_wavelength')
          wavelengthWS = ConvertUnits(InputWorkspace=mainWS,
                                      OutputWorkspace=wavelengthWSName,
                                      Target='Wavelength',
                                      EMode='Direct',
                                      EnableLogging=self._subalgLogging)
          eventsPerPoint =self.getProperty(common.PROP_EVENTS_PER_WAVELENGTH).value
          correctionWSName = self._names.withSuffix('correction')
          useFullInstrument = self.getProperty(common.PROP_SIMULATION_INSTRUMENT).value == common.SIMULATION_INSTRUMENT_FULL
          if useFullInstrument:
              correctionWS = MonteCarloAbsorption(InputWorkspace=wavelengthWS,
                                                  OutputWorkspace=correctionWSName,
                                                  SparseInstrument=False,
                                                  Interpolation='CSpline',
                                                  EnableLogging=self._subalgLogging,
                                                  EventsPerPoint=eventsPerPoint,
                                                  SeedValue=common.SIMULATION_SEED)
          else:
              rows = self.getProperty(common.PROP_SPARSE_INSTRUMENT_ROWS).value
              columns = self.getProperty(common.PROP_SPARSE_INSTRUMENT_COLUMNS).value
              correctionWS = MonteCarloAbsorption(InputWorkspace=wavelengthWS,
                                                  OutputWorkspace=correctionWSName,
                                                  SparseInstrument=True,
                                                  NumberOfDetectorRows=rows,
                                                  NumberOfDetectorColumns=columns,
                                                  Interpolation='CSpline',
                                                  EnableLogging=self._subalgLogging,
                                                  EventsPerPoint=eventsPerPoint,
                                                  SeedValue=common.SIMULATION_SEED)
          self._cleanup.cleanup(wavelengthWS)
          correctionWS = ConvertUnits(InputWorkspace=correctionWS,
                                      OutputWorkspace=correctionWSName,
                                      Target='TOF',
                                      EMode='Direct',
                                      EnableLogging=self._subalgLogging)
          return correctionWS
function_tokens: def _selfShielding ( self , mainWS ) : wavelengthWSName = self . _names . withSuffix ( 'input_in_wavelength' ) wavelengthWS = ConvertUnits ( InputWorkspace = mainWS , OutputWorkspace = wavelengthWSName , Target = 'Wavelength' , EMode = 'Direct' , EnableLogging = self . _subalgLogging ) eventsPerPoint = self . getProperty ( common . PROP_EVENTS_PER_WAVELENGTH ) . value correctionWSName = self . _names . withSuffix ( 'correction' ) useFullInstrument = self . getProperty ( common . PROP_SIMULATION_INSTRUMENT ) . value == common . SIMULATION_INSTRUMENT_FULL if useFullInstrument : correctionWS = MonteCarloAbsorption ( InputWorkspace = wavelengthWS , OutputWorkspace = correctionWSName , SparseInstrument = False , Interpolation = 'CSpline' , EnableLogging = self . _subalgLogging , EventsPerPoint = eventsPerPoint , SeedValue = common . SIMULATION_SEED ) else : rows = self . getProperty ( common . PROP_SPARSE_INSTRUMENT_ROWS ) . value columns = self . getProperty ( common . PROP_SPARSE_INSTRUMENT_COLUMNS ) . value correctionWS = MonteCarloAbsorption ( InputWorkspace = wavelengthWS , OutputWorkspace = correctionWSName , SparseInstrument = True , NumberOfDetectorRows = rows , NumberOfDetectorColumns = columns , Interpolation = 'CSpline' , EnableLogging = self . _subalgLogging , EventsPerPoint = eventsPerPoint , SeedValue = common . SIMULATION_SEED ) self . _cleanup . cleanup ( wavelengthWS ) correctionWS = ConvertUnits ( InputWorkspace = correctionWS , OutputWorkspace = correctionWSName , Target = 'TOF' , EMode = 'Direct' , EnableLogging = self . _subalgLogging ) return correctionWS