Exemplo n.º 1
0
 def _sumForegroundInQ(self, ws):
     """Sum the foreground region into a single histogram using the coherent method."""
     foreground = self._foregroundIndices(ws)
     sumIndices = [i for i in range(foreground[0], foreground[2] + 1)]
     beamPosIndex = foreground[1]
     isFlatSample = self._checkIfFlatSample()
     sumWSName = self._names.withSuffix('summed_in_Q')
     sumWS = ReflectometrySumInQ(InputWorkspace=ws,
                                 OutputWorkspace=sumWSName,
                                 InputWorkspaceIndexSet=sumIndices,
                                 BeamCentre=beamPosIndex,
                                 FlatSample=isFlatSample,
                                 EnableLogging=self._subalgLogging)
     self._cleanup.cleanup(ws)
     return sumWS
Exemplo n.º 2
0
 def _sumForegroundInQ(self, ws):
     """Sum the foreground region into a single histogram using the coherent method."""
     foreground = self._foregroundIndices(ws)
     sumIndices = [i for i in range(foreground[0], foreground[2] + 1)]
     linePosition = ws.run().getProperty(common.SampleLogs.LINE_POSITION).value
     isFlatSample = not ws.run().getProperty('beam_stats.bent_sample').value
     sumWSName = self._names.withSuffix('summed_in_Q')
     sumWS = ReflectometrySumInQ(
         InputWorkspace=ws,
         OutputWorkspace=sumWSName,
         InputWorkspaceIndexSet=sumIndices,
         BeamCentre=linePosition,
         FlatSample=isFlatSample,
         EnableLogging=self._subalgLogging)
     self._cleanup.cleanup(ws)
     return sumWS