Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 18, 2024
1 parent 4a7da19 commit 8c9d7f6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/pspec_likelihood/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The PSpec Likelihood Package."""

from . import likelihood
from .arbitrary_linear_systematics import LikelihoodLinearSystematic
from .likelihood import (
Expand Down
1 change: 1 addition & 0 deletions src/pspec_likelihood/arbitrary_linear_systematics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module responsible for computing the likelihood for linear systematics."""

from __future__ import annotations

import warnings
Expand Down
17 changes: 11 additions & 6 deletions src/pspec_likelihood/likelihood.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Primary module defining likelihoods based on HERA power spectra."""

from __future__ import annotations

import warnings
Expand Down Expand Up @@ -733,12 +734,16 @@ def loglike(self, theory_params, sys_params) -> float:
# them. "basis" corresponds to "A" in the memo.
basis = self.linear_systematics_basis_function(
sys_params,
self.model.kperp_bins_theory
if self.model.apply_window_to_systematics
else self.model.kperp_bins_obs,
self.model.kpar_bins_theory
if self.model.apply_window_to_systematics
else self.model.kpar_bins_obs,
(
self.model.kperp_bins_theory
if self.model.apply_window_to_systematics
else self.model.kperp_bins_obs
),
(
self.model.kpar_bins_theory
if self.model.apply_window_to_systematics
else self.model.kpar_bins_obs
),
)

mu_linear = self.get_mu_linear(basis)
Expand Down
1 change: 1 addition & 0 deletions src/pspec_likelihood/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Types to be used throughout the package."""

from __future__ import annotations

from typing import Any, Callable
Expand Down
1 change: 1 addition & 0 deletions src/pspec_likelihood/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Miscellaneous utility functions."""

from __future__ import annotations

import warnings
Expand Down
1 change: 1 addition & 0 deletions tests/test_likelihoods.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test loading an UVPspec file"""

from __future__ import annotations

import astropy.units as un
Expand Down
1 change: 1 addition & 0 deletions tests/test_uvpread.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test loading an UVPspec file"""

from pathlib import Path

import astropy.units as un
Expand Down

0 comments on commit 8c9d7f6

Please sign in to comment.