Skip to content

Commit

Permalink
🔥 Remove (move to legacy_files) peaks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arafune committed Apr 29, 2024
1 parent b9e5345 commit cc89781
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ Major Changes from 3.0.1

- The functions in this module have not been used and are unlikely to be used in the future.

- Remove fits/fit_model/peaks.py

- The classes (fitting models) defined in this module are essentially needless, **as you can use the + operator on the Model instances.**

- modules that use the Bokeh.

There is a dependency problem among bokeh, tornard, and Jupyter, which I cannot fix because I'm haven't use Bokeh. But note that hvplot can work with the current version.
Expand Down
5 changes: 4 additions & 1 deletion src/arpes/fits/fit_models/peaks.py → legacy_files/peaks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"""Includes multi-peak model definitions."""
"""Includes multi-peak model definitions.
arpes/fits/fit_models/peaks.py
"""

from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ convention = "google"
"tests/*" = ["PLR2004", "ERA001"]
"resources/*" = ["INP001"]
"src/arpes/endstations/igor_utils.py" = ["S605"]
"legacy_files/*" = ["ALL"]

[tool.ruff.format]
# Like Black, use double quotes for strings.
Expand Down
5 changes: 2 additions & 3 deletions src/arpes/fits/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from arpes.utilities import normalize_to_spectrum

from . import mp_fits
from .hot_pool import hot_pool

if TYPE_CHECKING:
from collections.abc import Iterable, Sequence
Expand Down Expand Up @@ -126,8 +127,8 @@ def broadcast_model( # noqa: PLR0913
weights: xr.DataArray | None = None,
prefixes: Sequence[str] = "",
window: xr.DataArray | None = None,
parallelize: bool | None = None,
*,
parallelize: bool | None = None,
progress: bool = True,
safe: bool = False,
) -> xr.Dataset:
Expand Down Expand Up @@ -201,8 +202,6 @@ def broadcast_model( # noqa: PLR0913
if parallelize:
logger.debug(f"Running fits (nfits={n_fits}) in parallel (n_threads={cpu_count()})")

from .hot_pool import hot_pool

pool = hot_pool.pool
exe_results = list(
wrap_progress(
Expand Down
1 change: 0 additions & 1 deletion src/arpes/xarray_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
Unpack,
)

from lmfit.model import propagate_err
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
Expand Down

0 comments on commit cc89781

Please sign in to comment.