Esempio n. 1
0
def demo():
    """Return strax context used in the straxen demo notebook"""
    straxen.download_test_data()

    st = strax.Context(storage=[
        strax.DataDirectory('./strax_data'),
        strax.DataDirectory('./strax_test_data',
                            deep_scan=True,
                            provide_run_metadata=True,
                            readonly=True)
    ],
                       forbid_creation_of=straxen.daqreader.DAQReader.provides,
                       config=dict(**x1t_common_config),
                       **x1t_context_config)

    # Use configs that are always available
    st.set_config(
        dict(
            hev_gain_model=(
                'to_pe_per_run', straxen.aux_repo +
                '3548132b55f81a43654dba5141366041e1daaf01/strax_files/to_pe.npy'
            ),
            gain_model=(
                'to_pe_per_run', straxen.aux_repo +
                '3548132b55f81a43654dba5141366041e1daaf01/strax_files/to_pe.npy'
            ),
        ))
    st.register(straxen.RecordsFromPax)
    return st
Esempio n. 2
0
def demo():
    """Return strax context used in the straxen demo notebook"""
    straxen.download_test_data()

    st = strax.Context(storage=[
        strax.DataDirectory('./strax_data'),
        strax.DataDirectory('./strax_test_data',
                            deep_scan=True,
                            provide_run_metadata=True,
                            readonly=True)
    ],
                       forbid_creation_of=straxen.daqreader.DAQReader.provides,
                       config=dict(**x1t_common_config),
                       **x1t_context_config)

    # Use configs that are always available
    st.set_config(
        dict(
            hev_gain_model=('1T_to_pe_placeholder', False),
            gain_model=('1T_to_pe_placeholder', False),
            elife=1e6,
            electron_drift_velocity=("electron_drift_velocity_constant",
                                     1.3325e-4),
            se_gain=28.2,
            avg_se_gain=28.2,
            rel_extraction_eff=1.0,
            s1_xyz_map=
            f'itp_map://resource://{pax_file("XENON1T_s1_xyz_lce_true_kr83m_SR1_pax-680_fdc-3d_v0.json")}?fmt=json',
            s2_xy_map=
            f'itp_map://resource://{pax_file("XENON1T_s2_xy_ly_SR1_v2.2.json")}?fmt=json',
        ))
    return st
Esempio n. 3
0
def demo():
    """Return strax context used in the straxen demo notebook"""
    straxen.download_test_data()

    st = strax.Context(storage=[
        strax.DataDirectory('./strax_data'),
        strax.DataDirectory('./strax_test_data',
                            deep_scan=True,
                            provide_run_metadata=True,
                            readonly=True)
    ],
                       forbid_creation_of=straxen.daqreader.DAQReader.provides,
                       config=dict(**x1t_common_config),
                       **x1t_context_config)

    # Use configs that are always available
    st.set_config(
        dict(
            hev_gain_model=('1T_to_pe_placeholder', False),
            gain_model=('1T_to_pe_placeholder', False),
            elife_conf=('elife_constant', 1e6),
            electron_drift_velocity=("electron_drift_velocity_constant",
                                     1.3325e-4),
        ))
    return st
Esempio n. 4
0
def demo():
    """Return strax context used in the straxen demo notebook"""
    straxen.download_test_data()
    return strax.Context(storage=[
        strax.DataDirectory('./strax_data'),
        strax.DataDirectory('./strax_test_data')
    ],
                         register=straxen.RecordsFromPax,
                         forbid_creation_of=('raw_records', ),
                         **common_opts)
Esempio n. 5
0
def demo():
    """Return strax context used in the straxen demo notebook"""
    straxen.download_test_data()
    return strax.Context(storage=[
        strax.DataDirectory('./strax_data'),
        strax.DataDirectory('./strax_test_data',
                            deep_scan=True,
                            provide_run_metadata=True,
                            readonly=True)
    ],
                         register=straxen.RecordsFromPax,
                         forbid_creation_of=('raw_records', ),
                         config=dict(**x1t_common_config),
                         **x1t_context_config)
Esempio n. 6
0
 def download_test_data(self):
     download_test_data(self.data_file)
     self.assertTrue(os.path.exists(self.live_data_path))