Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexing error for diffuse.flavor #54

Closed
colemanalan opened this issue May 3, 2024 · 1 comment
Closed

Indexing error for diffuse.flavor #54

colemanalan opened this issue May 3, 2024 · 1 comment

Comments

@colemanalan
Copy link
Contributor

When running make in figures/diffuse/flavor/muon_damping/ on the gen2-tdr branch, I get the following error:

(toise) acoleman@phys-coleman:muon_damping$ make
toise-figure-data diffuse.flavor.muon_damping_constraints --clean -d IceCube 15 Gen2-InIce 10 --steps 100 -o icecube+gen2-inice.json.gz
Traceback (most recent call last):
  File "/home/acoleman/programs/miniconda3/envs/toise/bin/toise-figure-data", line 33, in <module>
    sys.exit(load_entry_point('toise', 'console_scripts', 'toise-figure-data')())
  File "/home/acoleman/work/toise/toise/figures/cli.py", line 208, in make_figure_data
    meta["data"] = jsonify(func(tuple(exposure), **args))
  File "/home/acoleman/work/toise/toise/figures/diffuse/flavor.py", line 402, in muon_damping_constraints
    profile = make_profile(
  File "/home/acoleman/programs/miniconda3/envs/toise/lib/python3.9/site-packages/easy_cache/core.py", line 336, in __call__
    value = self.function(*callable_meta.args, **callable_meta.kwargs)
  File "/home/acoleman/work/toise/toise/figures/diffuse/flavor.py", line 169, in make_profile
    llh = muondamped_asimov_llh(exposures, **nominal)
  File "/home/acoleman/work/toise/toise/figures/diffuse/flavor.py", line 104, in muondamped_asimov_llh
    source_components = create_bundle(
  File "/home/acoleman/work/toise/toise/figures/diffuse/flavor.py", line 54, in create_bundle
    return factory.component_bundle(dict(exposures), partial(make_components, **kwargs))
  File "/home/acoleman/work/toise/toise/factory.py", line 319, in __init__
    for channel, aeff in aeff_factory.get()(detector).items():
  File "/home/acoleman/work/toise/toise/factory.py", line 295, in __call__
    self._aeffs[name] = self._create(opts, **kwargs)
  File "/home/acoleman/work/toise/toise/factory.py", line 280, in _create
    nu, mu = create_aeff(opts, psi_bins=psi_bins["tracks"], **kwargs)
  File "/home/acoleman/work/toise/toise/factory.py", line 108, in create_aeff
    neutrino_aeff = effective_areas.create_throughgoing_aeff(
  File "/home/acoleman/work/toise/toise/effective_areas.py", line 690, in create_throughgoing_aeff
    (e_nu, cos_theta, e_mu), efficiency = get_muon_production_efficiency(cos_theta)
  File "/home/acoleman/work/toise/toise/effective_areas.py", line 355, in get_muon_production_efficiency
    edges, efficiency = _interpolate_production_efficiency(center(ct_edges))
  File "/home/acoleman/work/toise/toise/effective_areas.py", line 293, in _interpolate_production_efficiency
    ~(h.bincontent <= 0), numpy.log10(h.bincontent), -numpy.inf
  File "/home/acoleman/programs/miniconda3/envs/toise/lib/python3.9/site-packages/dashi/histogram.py", line 144, in bincontent
    return self._h_bincontent[self._h_visiblerange]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
make: *** [Makefile:6: icecube+gen2-inice.json.gz] Error 1

I was suggested to run pip install https://github.com/IceCube-SPNO/dashi/zipball/master, but this did not fix the error

@jvansanten
Copy link
Collaborator

Fixed by updating dashi in #56.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants