Skip to content

Commit

Permalink
rename zenith_bins to cos_zenith_bins to avoid confusion
Browse files Browse the repository at this point in the history
Thanks to @kathrawlins for pointing this out
  • Loading branch information
kjmeagher committed May 31, 2024
1 parent e28f605 commit edfc9a5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ repos:
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/fsfe/reuse-tool
rev: v3.0.1
rev: v3.1.0a1
hooks:
- id: reuse
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
- repo: https://github.com/adamchainz/blacken-docs
Expand All @@ -30,21 +30,21 @@ repos:
- id: blacken-docs
args: [-l 100]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
rev: v1.10.0
hooks:
- id: mypy
files: simweights
additional_dependencies: [numpy]
exclude: ^contrib/
- repo: https://github.com/pycqa/pylint
rev: v3.1.0
rev: v3.2.2
hooks:
- id: pylint
files: simweights
exclude: ^contrib/
additional_dependencies: [numpy, pandas]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.4.6
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand All @@ -69,7 +69,7 @@ repos:
- id: forbid-crlf
- id: forbid-tabs
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-builtin-literals
Expand Down
4 changes: 2 additions & 2 deletions examples/effective_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
w = simweights.NuGenWeighter(f, nfiles=10)
# create the energy and zenith bins
energy_bins = np.geomspace(1e2, 1e8, 25)
zenith_bins = [-1, -0.5, 0, 0.5, 1]
cos_zenith_bins = [-1, -0.5, 0, 0.5, 1]

# calculate the effective area in energy and zenith bins with all of the events in the sample
effective_area = w.effective_area(energy_bins, zenith_bins)
effective_area = w.effective_area(energy_bins, cos_zenith_bins)

# make some labels for the different zenith bins
zenith_labels = [
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ requires-python = "~=3.7"
[project.optional-dependencies]
dev = ["pytest", "pre-commit", "reuse", "black", "ruff", "pylint", "mypy"]
docs = ["sphinx", "sphinx-rtd-theme", "pandas"]
examples = ['matplotlib']
test = [
"h5py",
"tables < 3.8; python_version < '3.9'",
Expand All @@ -53,7 +54,7 @@ Documentation = "https://docs.icecube.aq/simweights/main"
Source = "https://github.com/icecube/simweights"

[tool.codespell]
ignore-words-list = 'livetime'
ignore-words-list = 'livetime,assertIn'
skip = '_build'

[tool.coverage.report]
Expand Down Expand Up @@ -98,8 +99,8 @@ fixable = ["I"]
ignore = [
"ANN401", # any-type
"S101", # assert-used
"COM812", # confilcts with ruff formatter
"ISC001", # confilcts with ruff formatter
"COM812", # conflicts with ruff formatter
"ISC001", # conflicts with ruff formatter
"PLR0913" # Too many arguments in function definition
]
select = ["ALL"]
Expand Down

0 comments on commit edfc9a5

Please sign in to comment.