Skip to content

Commit

Permalink
search: adding scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
miili committed Jan 25, 2024
1 parent b827efa commit fa01262
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ repos:
- id: mixed-line-ending
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: v0.1.9
rev: v0.1.14
hooks:
- id: ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.9
rev: v0.1.14
hooks:
- id: ruff-format
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ classifiers = [
dev = [
"pre-commit>=3.4",
"black>=23.7",
"ruff>=0.1",
"ruff>=0.1.14",
"pytest>=7.4",
"pytest-asyncio>=0.21",
]
Expand Down
5 changes: 3 additions & 2 deletions src/qseek/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,10 @@ async def search(

semblance.apply_cache(semblance_cache or {}) # Apply after normalization

threshold = parent.detection_threshold ** (1.0 / parent.image_mean_p)
detection_idx, detection_semblance = await semblance.find_peaks(
height=parent.detection_threshold,
prominence=parent.detection_threshold,
height=threshold,
prominence=threshold,
distance=round(parent.detection_blinding.total_seconds() * sampling_rate),
)

Expand Down

0 comments on commit fa01262

Please sign in to comment.