def test_properlyAveraged(self): """Validate the averaging for two unique detector files""" r0 = self.singleReader r1 = DetectorReader(DET_FILES['bwr1']) r1.read() for detName in self.sampler.detectors: expectedTallies, expectedErrors = (_getExpectedAverages( r0.detectors[detName], r1.detectors[detName])) uniq = self.sampler.detectors[detName] assert_allclose(uniq.tallies, expectedTallies, err_msg='tallies', **TOLERANCES['tallies']) assert_allclose(uniq.errors, expectedErrors, err_msg='errrors', **TOLERANCES['errors'])
def setUpClass(cls): cls.singleReader = DetectorReader(DET_FILES['bwr0']) cls.singleReader.read() cls.sampler = DetectorSampler( [DET_FILES['bwr{}'.format(d)] for d in (0, 1)])