diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c0d90b..33b6b68 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.12.3" + rev: "v0.12.5" hooks: # id: ruff-check would go here if using both - id: ruff-format diff --git a/src/lightcurves/LC.py b/src/lightcurves/LC.py index f44ff17..f35604f 100644 --- a/src/lightcurves/LC.py +++ b/src/lightcurves/LC.py @@ -186,7 +186,9 @@ def get_gti_iis( if n_pick: # only consider the n_pick longest GTIs # TBD: double check, might compute index differences, not time gaps.. - gap_len = np.array([t - s for s, t in zip(GTI_start_ii, GTI_end_ii, strict=False)]) + gap_len = np.array( + [t - s for s, t in zip(GTI_start_ii, GTI_end_ii, strict=False)] + ) gap_len1 = np.sort(gap_len) ii = [x for x in range(len(gap_len)) if gap_len[x] in gap_len1[-n_pick:]] # n_gaps = considered gaps (longest not gaps) @@ -332,9 +334,7 @@ def __repr__(self): def __len__(self): return len(self.time) - def __getitem__( - self, inbr: int | slice | list[int] - ) -> np.ndarray | LightCurve: + def __getitem__(self, inbr: int | slice | list[int]) -> np.ndarray | LightCurve: """ Access elements or subsets of the LightCurve using indexing or slicing. @@ -583,9 +583,7 @@ def plot_shade( y1 = np.ones(len(x)) * np.min(self.flux) ax.fill_between(x, y, y1, step="mid", alpha=0.2, zorder=0, **kwargs) - def plot_grid( - self, spacing: float = 10, ax: Axes | None = None, **kwargs - ) -> None: + def plot_grid(self, spacing: float = 10, ax: Axes | None = None, **kwargs) -> None: """ Add a minor grid to the time axis at specified spacing.