Skip to content

Commit

Permalink
updated unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ckarwin committed Oct 31, 2024
1 parent d1ed6a7 commit e74d50e
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
from cosipy.background_estimation import ContinuumEstimation
from cosipy import test_data

def test_line_background_estimation():
def test_continuum_background_estimation():

instance = ContinuumEstimation()

# Test main method:
data_file = test_data.path / "bkg_pl.h5"
#data_file = test_data.path / "bkg_pl.h5"
data_file = "/project/majello/astrohe/ckarwin/COSI/COSIpy_Development/Continuum_BG_Estimation/Run_8/crab_bkg_binned_data_galactic.hdf5"
data_yaml = test_data.path / "inputs_crab.yaml"
psr_file = test_data.path / "test_precomputed_response.h5"
#psr_file = "crab_psr.h5"
#instance.continuum_bg_estimation(data_file, data_yaml, psr_file, "estimated_bg", e_loop=(2,3), s_loop=(4,5))
#psr_file = test_data.path / "test_precomputed_response.h5"
psr_file = "/project/majello/astrohe/ckarwin/COSI/COSIpy_Development/Continuum_BG_Estimation/Run_8/crab_psr.h5"
psr = instance.load_psr_from_file(psr_file)
instance.continuum_bg_estimation(data_file, data_yaml, psr, e_loop=(2,3), s_loop=(4,5))

0 comments on commit e74d50e

Please sign in to comment.