Skip to content

Commit

Permalink
saturation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-langfield committed Jun 28, 2024
1 parent 07d5c09 commit 0999c2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ibldsp/voltage.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,13 +628,15 @@ def my_function(i_chunk, n_chunk):
time_data = tid.read()
time_data = np.frombuffer(time_data, dtype=np.float32)
rms_data = np.frombuffer(rms_data, dtype=np.float32)
saturation_data = np.load(file_saturation)
assert rms_data.shape[0] == time_data.shape[0] * ncv
rms_data = rms_data.reshape(time_data.shape[0], ncv)
output_qc_path = output_qc_path or output_file.parent
np.save(output_qc_path.joinpath("_iblqc_ephysTimeRmsAP.rms.npy"), rms_data)
np.save(
output_qc_path.joinpath("_iblqc_ephysTimeRmsAP.timestamps.npy"), time_data
)
np.save(output_qc_path.joinpath("_iblqc_ephysSaturation.samples.npy"), saturation_data)


def detect_bad_channels(raw, fs, similarity_threshold=(-0.5, 1), psd_hf_threshold=None):
Expand Down

0 comments on commit 0999c2a

Please sign in to comment.