Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
RobBuchananCompPhys committed Feb 21, 2025
1 parent 895311d commit c4605a4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions MDANSE/Src/MDANSE/Mathematics/Signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,11 +978,9 @@ def power_spectrum(
output["pacf_total"] = np.zeros(frames["n_frames"])
output["pps_total"] = np.zeros_like(output["romega"])

for index in range(num_atoms):
indexes = atom_selection["indices"][index]
atoms = [sorted_atoms[idx] for idx in indexes]
for indices, name in zip(atom_selection["indices"], atom_selection["names"]):
series = trajectory.read_com_trajectory(
indexes,
indices,

Check failure on line 983 in MDANSE/Src/MDANSE/Mathematics/Signal.py

View workflow job for this annotation

GitHub Actions / lint_check_ruff

Ruff (F841)

MDANSE/Src/MDANSE/Mathematics/Signal.py:983:5: F841 Local variable `num_atoms` is assigned to but never used
first=frames["first"],
last=frames["last"] + 1,

Check failure on line 985 in MDANSE/Src/MDANSE/Mathematics/Signal.py

View workflow job for this annotation

GitHub Actions / lint_check_ruff

Ruff (F841)

MDANSE/Src/MDANSE/Mathematics/Signal.py:985:5: F841 Local variable `sorted_atoms` is assigned to but never used
step=frames["step"],
Expand All @@ -996,9 +994,7 @@ def power_spectrum(
3 * n_configs
)

output["pacf_%s" % atom_selection["names"][index]] += np.array(
[x[0] for x in atomicPACF]
)
output[f"pacf_{name}"] += np.array([x[0] for x in atomicPACF])

nAtomsPerElement = atom_selection.get_natoms()
for element, number in nAtomsPerElement.items():
Expand Down

0 comments on commit c4605a4

Please sign in to comment.