def setUpClass(cls):
        # virtual X server for plots under headless LINUX travis testing is needed
        if os.getenv('TRAVIS', False) and os.getenv('TRAVIS_OS_NAME',
                                                    False) == 'linux':
            from xvfbwrapper import Xvfb  # virtual X server for plots under headless LINUX travis testing is needed
            cls.vdisplay = Xvfb()
            cls.vdisplay.start()

        cls.big_noisy_data_file = analysis_utils.get_data(
            path='fixtures/hit_analysis/TestBeamData_Mimosa26_DUT0.h5',
            output=os.path.join(
                testing_path,
                'fixtures/hit_analysis/TestBeamData_Mimosa26_DUT0.h5'))

        cls.noisy_data_file = analysis_utils.get_data(
            'fixtures/hit_analysis/TestBeamData_Mimosa26_DUT0_small.h5',
            output=os.path.join(
                testing_path,
                'fixtures/hit_analysis/TestBeamData_Mimosa26_DUT0_small.h5'))
        cls.data_file = analysis_utils.get_data(
            'fixtures/hit_analysis/TestBeamData_FEI4_DUT0_small.h5',
            output=os.path.join(
                testing_path,
                'fixtures/hit_analysis/TestBeamData_FEI4_DUT0_small.h5'))
        cls.output_folder = 'tmp_hit_test_output'
        test_tools.create_folder(cls.output_folder)
        cls.pixel_size = ((250, 50), (250, 50), (250, 50), (250, 50))  # in um
 def setUpClass(cls):
     # virtual X server for plots under headless LINUX travis testing is needed
     if os.getenv('TRAVIS', False) and os.getenv('TRAVIS_OS_NAME', False) == 'linux':
         from xvfbwrapper import Xvfb
         cls.vdisplay = Xvfb()
         cls.vdisplay.start()
     cls.output_folder = 'tmp_track_test_output'
     test_tools.create_folder(cls.output_folder)
     cls.pixel_size = (250, 50)  # in um
Пример #3
0
 def setUpClass(cls):
     # virtual X server for plots under headless LINUX travis testing is needed
     if os.getenv('TRAVIS', False) and os.getenv('TRAVIS_OS_NAME',
                                                 False) == 'linux':
         from xvfbwrapper import Xvfb  # virtual X server for plots under headless LINUX travis testing is needed
         cls.vdisplay = Xvfb()
         cls.vdisplay.start()
     cls.output_folder = 'tmp_test_res_output'
     test_tools.create_folder(cls.output_folder)
     cls.pixel_size = [250, 50] * 4  # in um
     cls.n_pixels = [80, 336] * 4
     cls.z_positions = [0., 19500, 108800, 128300]  # in um
 def setUpClass(cls):
     # virtual X server for plots under headless LINUX travis testing is needed
     if os.getenv('TRAVIS', False) and os.getenv('TRAVIS_OS_NAME',
                                                 False) == 'linux':
         from xvfbwrapper import Xvfb
         cls.vdisplay = Xvfb()
         cls.vdisplay.start()
     # Define test data input files, download if needed
     cls.data_files = [
         analysis_utils.get_data(
             'fixtures/dut_alignment/Cluster_DUT%d_cluster.h5' % i,
             output=os.path.join(
                 testing_path,
                 'fixtures/dut_alignment/Cluster_DUT%d_cluster.h5' % i))
         for i in range(4)
     ]
     # Define and create tests output folder, is deleted at the end of tests
     cls.output_folder = os.path.join(
         os.path.dirname(os.path.realpath(cls.data_files[0])), 'output')
     test_tools.create_folder(cls.output_folder)
     cls.n_pixels = [(80, 336)] * 4
     cls.pixel_size = [(250, 50)] * 4  # in um
     cls.z_positions = [0., 19500, 108800, 128300]
def copy_data(path, out_path):
    logging.error('COPY %s %s', path, out_path)
    test_tools.create_folder(os.path.dirname(out_path))
    copyfile(path, out_path)