Skip to content

Error when loading samples: 'could not broadcast input array from shape (38370304,) into shape (38371328,)' #37

@stef1029

Description

@stef1029

Hi,
I think something has gone wrong with my data acquisition at some point and a bunch of my files are giving this error when I try and load the samples:

Traceback (most recent call last):
  File "Y:\Behaviour code\2407_July_WT_cohort\Analysis\NAP\July_cohort_scripts\analysis_manager.py", line 36, in __init__
    self.ingest_behaviour_data()
  File "Y:\Behaviour code\2407_July_WT_cohort\Analysis\NAP\July_cohort_scripts\analysis_manager.py", line 83, in ingest_behaviour_data
    self.OEAB_data = process_ADC_Recordings(self.OEAB_folder, self.rig_id)
  File "Y:\Behaviour code\2407_July_WT_cohort\Analysis\NAP\July_cohort_scripts\Preliminary_analysis_scripts\process_ADC_recordings.py", line 28, in __init__
    self.extract_ADC_data()
  File "Y:\Behaviour code\2407_July_WT_cohort\Analysis\NAP\July_cohort_scripts\Preliminary_analysis_scripts\process_ADC_recordings.py", line 36, in extract_ADC_data
    self.samples = self.recording.samples   # raw samples, not in microvolts
  File "C:\Users\Public\.conda\July_cohort\lib\site-packages\open_ephys\analysis\formats\OpenEphysRecording.py", line 92, in samples
    self._load_samples()
  File "C:\Users\Public\.conda\July_cohort\lib\site-packages\open_ephys\analysis\formats\OpenEphysRecording.py", line 200, in _load_samples
    self._samples[:,channel_idx] = samples
ValueError: could not broadcast input array from shape (38370304,) into shape (38371328,)

I am just wondering if this is something that can be fixed to salvage the data? I'm not exactly sure what the issue at the time was, but I was having some issues with the recording buffer overflowing and causing a stop in the recording.
Thanks for any help you can give,
Stefan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions