Skip to content

Commit

Permalink
Fix waveform params in metric curation (#1132)
Browse files Browse the repository at this point in the history
* Fix for case where waveform_paramse sparse is defined.

* Update deprecated method `warn` -> `warning`

* Update changelog
  • Loading branch information
edeno authored Sep 25, 2024
1 parent a88d55c commit 32dc077
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dj.FreeTable(dj.conn(), "common_session.session_group").drop()

- Drop `SessionGroup` table #1106
- Improve electrodes import efficiency #1125
- Fix logger method call in `common_task` #1132

- Decoding

Expand All @@ -53,6 +54,7 @@ dj.FreeTable(dj.conn(), "common_session.session_group").drop()
- Fix bug in `get_group_by_shank` #1096
- Fix bug in `_compute_metric` #1099
- Fix bug in `insert_curation` returned key #1114
- Fix handling of waveform extraction sparse parameter #1132

## [0.5.3] (August 27, 2024)

Expand Down
4 changes: 2 additions & 2 deletions src/spyglass/common/common_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ def get_epoch_interval_name(cls, epoch, session_intervals):
if target_interval in interval
]
if not possible_targets:
logger.warn(f"Interval not found for epoch {epoch}.")
logger.warning(f"Interval not found for epoch {epoch}.")
elif len(possible_targets) > 1:
logger.warn(
logger.warning(
f"Multiple intervals found for epoch {epoch}. "
+ f"matches are {possible_targets}."
)
Expand Down
5 changes: 4 additions & 1 deletion src/spyglass/spikesorting/v1/metric_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,13 @@ def make(self, key):
os.makedirs(waveforms_dir, exist_ok=True)

logger.info("Extracting waveforms...")

# Extract non-sparse waveforms by default
waveform_params.setdefault("sparse", False)

waveforms = si.extract_waveforms(
recording=recording,
sorting=sorting,
sparse=waveform_params.get("sparse", False),
folder=waveforms_dir,
overwrite=True,
**waveform_params,
Expand Down

0 comments on commit 32dc077

Please sign in to comment.