Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _setup_recording(self, recording, output_folder):
p = self.params
# Bandpass filter
if p['filter'] and p['freq_min'] is not None and p['freq_max'] is not None:
recording = st.preprocessing.bandpass_filter(
recording=recording, freq_min=p['freq_min'], freq_max=p['freq_max'])
if p['pre_scale']:
recording = st.preprocessing.normalize_by_quantile(
recording=recording, scale=p['pre_scale_value'],
median=0.0, q1=0.05, q2=0.95
)
# this should have its name changed
self.Probe = hs.probe.RecordingExtractor(
recording,
masked_channels=p['probe_masked_channels'],
inner_radius=p['probe_inner_radius'],
neighbor_radius=p['probe_neighbor_radius'],
event_length=p['probe_event_length'],
peak_jitter=p['probe_peak_jitter'])