def test_reduction_method(self): # a quick smoke test to check that the reduction can occur # warnings filter for pixel size with warnings.catch_warnings(): warnings.simplefilter("ignore", RuntimeWarning) a = PlatypusReduce("PLP0000711.nx.hdf", data_folder=self.pth) # try reduction with the reduce method a.reduce( "PLP0000708.nx.hdf", data_folder=self.pth, rebin_percent=4, ) # try reduction with the __call__ method a( "PLP0000708.nx.hdf", data_folder=self.pth, rebin_percent=4, ) # this should also have saved a couple of files in the current # directory assert os.path.isfile("./PLP0000708_0.dat") assert os.path.isfile("./PLP0000708_0.xml") # can we read the file ReflectDataset("./PLP0000708_0.dat") # try writing offspecular data a.write_offspecular("offspec.xml", 0)
def test_reduction_method(self): # a quick smoke test to check that the reduction can occur a = PlatypusReduce('PLP0000711.nx.hdf', data_folder=self.pth) # try reduction with the reduce method a.reduce('PLP0000708.nx.hdf', data_folder=self.pth, rebin_percent=4) # try reduction with the __call__ method a('PLP0000708.nx.hdf', data_folder=self.pth, rebin_percent=4) # this should also have saved a couple of files in the current # directory assert_(os.path.isfile('./PLP0000708_0.dat')) assert_(os.path.isfile('./PLP0000708_0.xml')) # try writing offspecular data a.write_offspecular('offspec.xml', 0)
def test_reduction_method(self): # a quick smoke test to check that the reduction can occur a = PlatypusReduce('PLP0000711.nx.hdf', data_folder=self.path, rebin_percent=4) # try reduction with the reduce method a.reduce('PLP0000708.nx.hdf', data_folder=self.path, rebin_percent=4) # try reduction with the __call__ method a('PLP0000708.nx.hdf', data_folder=self.path, rebin_percent=4) # this should also have saved a couple of files in the current # directory assert_(os.path.isfile('./PLP0000708_0.dat')) assert_(os.path.isfile('./PLP0000708_0.xml')) # try writing offspecular data a.write_offspecular('offspec.xml', 0)