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 Jan 27, 2025
1 parent 55f4868 commit 4c80452
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/mps_motion/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def find_time_index(t_star, default):
)
reference_frame = data.time_stamps[reference_frame_index]
logger.info(
f"Found reference frame at index {reference_frame_index} " f"and time {reference_frame:.2f}",
f"Found reference frame at index {reference_frame_index} and time {reference_frame:.2f}",
)

u = opt_flow.get_displacements(reference_frame=reference_frame)
Expand Down
7 changes: 3 additions & 4 deletions src/mps_motion/motion_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def estimate_referece_image_from_velocity(
inds = np.isclose(v, background, atol=np.abs(v.max() - v.min()) * rel_tol)

msg = (
"Unable to find any values at the baseline. "
"Please try a smaller tolerance when estimating the reference image"
"Unable to find any values at the baseline. Please try a smaller tolerance when estimating the reference image"
)
if not inds.any():
# No values are this close to the baseline
Expand Down Expand Up @@ -132,7 +131,7 @@ def get_reference_image(

except ValueError:
refs = RefFrames._member_names_
msg = "Expected reference frame to be an integer or one of " f"{refs}, got {reference_frame}"
msg = f"Expected reference frame to be an integer or one of {refs}, got {reference_frame}"
if str(reference_frame) not in refs:
raise ValueError(msg)
reference_image = getattr(np, str(reference_frame))(frames, axis=2)
Expand Down Expand Up @@ -335,4 +334,4 @@ def get_velocities(
return self._velocity

def __repr__(self):
return f"{self.__class__.__name__}(" f"data={self.data}, flow_algorithm={self.flow_algorithm})"
return f"{self.__class__.__name__}(data={self.data}, flow_algorithm={self.flow_algorithm})"

0 comments on commit 4c80452

Please sign in to comment.