Skip to content

Commit

Permalink
fixed path name for script test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostert committed Nov 25, 2022
1 parent 3e6d0cf commit a7d90b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/DarkNews/GenLauncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def __init__(self, param_file=None, **kwargs):
# append all transition magnetic moments
_TMMs = [ f'{x}_{getattr(self.bsm_model, x):.4g}_' for x in self.bsm_model.__dict__.keys() if ('mu_tr_' in x and getattr(self.bsm_model, x) != 0)]
if len(_TMMs) > 0:
_boson_string = _boson_string.join(_TMMs)
_boson_string += ''.join(_TMMs)

# HNL masses
_mass_strings = [f'{m}_{getattr(self.bsm_model, m)}_' for m in ['m6', 'm5', 'm4'] if getattr(self.bsm_model, m) is not None]
Expand Down
15 changes: 9 additions & 6 deletions tests/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ def test_dn_gen():
# dark photon
os.system('dn_gen --path="./test_script_v1" --HNLtype="majorana" --make_summary_plots')

filename = 'test_script_v1/data/miniboone_fhc/3plus1/m4_0.15_mzprime_1.25_majorana/pandas_df.pckl'
assert os.path.exists(filename), f'Could not find dn_gen output in {filename}'
plots_path = 'test_script_v1/data/miniboone_fhc/3plus1/m4_0.15_mzprime_1.25_majorana/summary_plots'
assert os.path.exists(plots_path), f'Could not find summary plots in {plots_path}'

# now for TMM
os.system('dn_gen --path="./test_script_v2" --HNLtype="majorana" --decay_product="photon" --mu_tr_mu4=1e-6 --make_summary_plots')

for i in range(1,3):
filename=f'test_script_v{i}/data/miniboone_fhc/3plus1/m4_0.15_mzprime_1.25_majorana/pandas_df.pckl'
assert os.path.exists(filename), f'Could not find dn_gen output in {filename}'
plots_path=f'test_script_v{i}/data/miniboone_fhc/3plus1/m4_0.15_mzprime_1.25_majorana/summary_plots'
assert os.path.exists(plots_path), f'Could not find summary plots in {plots_path}'

filename = 'test_script_v2/data/miniboone_fhc/3plus1/m4_0.15_mzprime_1.25_mu_tr_mu4_1e-06_majorana/pandas_df.pckl'
assert os.path.exists(filename), f'Could not find dn_gen output in {filename}'
plots_path = 'test_script_v2/data/miniboone_fhc/3plus1/m4_0.15_mzprime_1.25_mu_tr_mu4_1e-06_majorana/summary_plots'
assert os.path.exists(plots_path), f'Could not find summary plots in {plots_path}'

@pytest.mark.skip(reason="Still need to find a way to set up git for venvs")
def test_examples_download():
Expand Down

0 comments on commit a7d90b8

Please sign in to comment.