Skip to content

"bins must be monotonically increasing or decreasing" error #100

@gshvarts

Description

@gshvarts

Running into ValueError: bins must be monotonically increasing or decreasing when trying to create nwbs from trodes files.

Working on getting the most recent error stack but here's an error stack from running into the same error earlier this year to start with:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[2], [line 6](vscode-notebook-cell:?execution_count=2&line=6)
      [3](vscode-notebook-cell:?execution_count=2&line=3) # restrict conversion to a single session, ignores the reconfig metadata in the download
      [4](vscode-notebook-cell:?execution_count=2&line=4) query_expression = f"animal == 'herman' and date == 20211115"
----> [6](vscode-notebook-cell:?execution_count=2&line=6) create_nwbs(
      [7](vscode-notebook-cell:?execution_count=2&line=7)     path=data_path,
      [8](vscode-notebook-cell:?execution_count=2&line=8)     probe_metadata_paths=None,
      [9](vscode-notebook-cell:?execution_count=2&line=9)     output_dir="[/home/gl-willow/banyan/nwb/raw/](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/nwb/raw/)",  # saving to a temporary directory to not clutter up the database.  Please delete when done.
     [10](vscode-notebook-cell:?execution_count=2&line=10)     query_expression=query_expression
     [11](vscode-notebook-cell:?execution_count=2&line=11) )

File [~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:185](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:185), in create_nwbs(path, header_reconfig_path, probe_metadata_paths, output_dir, video_directory, convert_video, n_workers, query_expression, disable_ptp)
    [183](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:183) else:
    [184](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:184)     for session, session_df in file_info.groupby(["date", "animal"]):
--> [185](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:185)         _create_nwb(
    [186](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:186)             session,
    [187](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:187)             session_df,
    [188](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:188)             header_reconfig_path,
    [189](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:189)             probe_metadata_paths,
    [190](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:190)             output_dir,
    [191](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:191)             video_directory,
    [192](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:192)             convert_video,
    [193](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:193)             disable_ptp,
    [194](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:194)         )

File [~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:305](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:305), in _create_nwb(session, session_df, header_reconfig_path, probe_metadata_paths, output_dir, video_directory, convert_video, disable_ptp)
    [299](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:299)     add_position(
    [300](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:300)         nwb_file,
    [301](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:301)         metadata,
    [302](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:302)         session_df,
    [303](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:303)     )
    [304](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:304) else:
--> [305](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:305)     add_position(
    [306](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:306)         nwb_file,
    [307](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:307)         metadata,
    [308](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:308)         session_df,
    [309](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:309)         ptp_enabled=ptp_enabled,
    [310](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:310)         rec_dci_timestamps=rec_dci_timestamps,
    [311](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:311)         sample_count=nwb_file.processing["sample_count"]
    [312](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:312)         .data_interfaces["sample_count"]
    [313](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:313)         .data,
    [314](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:314)     )
    [316](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:316) # write file
    [317](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert.py:317) output_path = Path(f"{output_dir}[/](https://file+.vscode-resource.vscode-cdn.net/){session[1]}{session[0]}.nwb")

File [~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:836](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:836), in add_position(nwb_file, metadata, session_df, ptp_enabled, rec_dci_timestamps, sample_count)
    [833](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:833) else:
    [834](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:834)     dio_camera_timestamps_epoch = None
--> [836](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:836) position_df = get_position_timestamps(
    [837](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:837)     position_timestamps_filepath,
    [838](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:838)     position_tracking_filepath,
    [839](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:839)     ptp_enabled=ptp_enabled,
    [840](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:840)     rec_dci_timestamps=rec_dci_timestamps,
    [841](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:841)     dio_camera_timestamps=dio_camera_timestamps_epoch,
    [842](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:842)     sample_count=sample_count,
    [843](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:843)     epoch_interval=[epoch_start, epoch_end] if not ptp_enabled else None,
    [844](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:844) )
    [846](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:846) # TODO: Doesn't handle multiple cameras currently
    [847](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:847) camera_id = epoch_to_camera_ids.loc[epoch].camera_id[0]

File [~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:624](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:624), in get_position_timestamps(position_timestamps_filepath, position_tracking_filepath, rec_dci_timestamps, dio_camera_timestamps, sample_count, ptp_enabled, epoch_interval)
    [620](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:620) frame_count = np.asarray(video_timestamps.HWframeCount)
    [622](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:622) is_valid_camera_time = np.isin(video_timestamps.index, sample_count)
--> [624](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:624) epoch_start_ind = np.digitize(epoch_interval[0], rec_dci_timestamps)
    [625](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:625) epoch_end_ind = np.digitize(epoch_interval[1], rec_dci_timestamps)
    [627](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:627) camera_systime = rec_dci_timestamps[
    [628](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:628)     wrapped_digitize(
    [629](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:629)         video_timestamps.index[is_valid_camera_time],
ref='~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:0'>0</a>;32m   (...)
    [632](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:632)     + epoch_start_ind
    [633](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:633) ]

File [~/mambaforge/envs/trodes_to_nwb/lib/python3.10/site-packages/numpy/lib/function_base.py:5724](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/mambaforge/envs/trodes_to_nwb/lib/python3.10/site-packages/numpy/lib/function_base.py:5724), in digitize(x, bins, right)
   [5722](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/mambaforge/envs/trodes_to_nwb/lib/python3.10/site-packages/numpy/lib/function_base.py:5722) mono = _monotonicity(bins)
   [5723](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/mambaforge/envs/trodes_to_nwb/lib/python3.10/site-packages/numpy/lib/function_base.py:5723) if mono == 0:
-> [5724](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/mambaforge/envs/trodes_to_nwb/lib/python3.10/site-packages/numpy/lib/function_base.py:5724)     raise ValueError("bins must be monotonically increasing or decreasing")
   [5726](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/mambaforge/envs/trodes_to_nwb/lib/python3.10/site-packages/numpy/lib/function_base.py:5726) # this is backwards because the arguments below are swapped
   [5727](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/notebooks/~/mambaforge/envs/trodes_to_nwb/lib/python3.10/site-packages/numpy/lib/function_base.py:5727) side = 'left' if right else 'right'

ValueError: bins must be monotonically increasing or decreasing

Here's the output from while the create_nwbs function was running as well, in case that's helpful at all:

22-Jan-24 16:58:18 Creating NWB file for session: (20211115, 'herman')
22-Jan-24 16:58:18 	rec_filepaths: ['/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec', '/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec', '/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec', '/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec', '/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec']
22-Jan-24 16:58:18 CREATING REC DATA ITERATORS
22-Jan-24 16:58:18 Parsing headers
22-Jan-24 16:58:19 Parsing header COMPLETE
22-Jan-24 17:27:53 # iterators: 14
22-Jan-24 17:50:04 Reading timestamps COMPLETE
22-Jan-24 17:50:07 	metadata_filepath: [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_metadata.yml](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_metadata.yml)
22-Jan-24 17:50:08 CREATING HARDWARE MAPS
22-Jan-24 17:50:08 CREATING METADATA ENTRIES
[/home/gl-willow/mambaforge/envs/trodes_to_nwb/lib/python3.10/site-packages/pynwb/file.py:471](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/mambaforge/envs/trodes_to_nwb/lib/python3.10/site-packages/pynwb/file.py:471): UserWarning: Date is missing timezone information. Updating to local timezone.
  args_to_set['session_start_time'] = _add_missing_timezone(session_start_time)
22-Jan-24 17:50:08 ERROR: associated file [/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_01_s1.stateScriptLog](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_01_s1.stateScriptLog) does not exist
22-Jan-24 17:50:08 [Errno 2] No such file or directory: '/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_01_s1.stateScriptLog'
22-Jan-24 17:50:08 ERROR: associated file [/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_02_r1.stateScriptLog](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_02_r1.stateScriptLog) does not exist
22-Jan-24 17:50:08 [Errno 2] No such file or directory: '/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_02_r1.stateScriptLog'
22-Jan-24 17:50:08 ERROR: associated file [/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_03_s2.stateScriptLog](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_03_s2.stateScriptLog) does not exist
22-Jan-24 17:50:08 [Errno 2] No such file or directory: '/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_03_s2.stateScriptLog'
22-Jan-24 17:50:08 ERROR: associated file [/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_04_r2.stateScriptLog](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_04_r2.stateScriptLog) does not exist
22-Jan-24 17:50:08 [Errno 2] No such file or directory: '/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_04_r2.stateScriptLog'
22-Jan-24 17:50:08 ERROR: associated file [/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_05_s3.stateScriptLog](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_05_s3.stateScriptLog) does not exist
22-Jan-24 17:50:08 [Errno 2] No such file or directory: '/home/gl-willow/banyan/raw/anna/herman/raw/20211115/20211115_herman_05_s3.stateScriptLog'
[/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127): FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) [/](https://file+.vscode-resource.vscode-cdn.net/) '(1,)type'.
  return np.dtype(typearr)
cp: cannot create regular file '/20211115_herman_01_s1.1.h264': Permission denied
22-Jan-24 17:50:09 Video copy completed. [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.1.h264](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.1.h264) has been copied to [/20211115_herman_01_s1.1.h264](https://file+.vscode-resource.vscode-cdn.net/20211115_herman_01_s1.1.h264)
[/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127): FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) [/](https://file+.vscode-resource.vscode-cdn.net/) '(1,)type'.
  return np.dtype(typearr)
cp: cannot create regular file '/20211115_herman_02_r1.1.h264': Permission denied
22-Jan-24 17:50:09 Video copy completed. [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.1.h264](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.1.h264) has been copied to [/20211115_herman_02_r1.1.h264](https://file+.vscode-resource.vscode-cdn.net/20211115_herman_02_r1.1.h264)
[/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127): FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) [/](https://file+.vscode-resource.vscode-cdn.net/) '(1,)type'.
  return np.dtype(typearr)
cp: cannot create regular file '/20211115_herman_03_s2.1.h264': Permission denied
22-Jan-24 17:50:09 Video copy completed. [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.1.h264](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.1.h264) has been copied to [/20211115_herman_03_s2.1.h264](https://file+.vscode-resource.vscode-cdn.net/20211115_herman_03_s2.1.h264)
[/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127): FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) [/](https://file+.vscode-resource.vscode-cdn.net/) '(1,)type'.
  return np.dtype(typearr)
cp: cannot create regular file '/20211115_herman_04_r2.1.h264': Permission denied
22-Jan-24 17:50:09 Video copy completed. [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.1.h264](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.1.h264) has been copied to [/20211115_herman_04_r2.1.h264](https://file+.vscode-resource.vscode-cdn.net/20211115_herman_04_r2.1.h264)
[/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127): FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) [/](https://file+.vscode-resource.vscode-cdn.net/) '(1,)type'.
  return np.dtype(typearr)
cp: cannot create regular file '/20211115_herman_05_s3.1.h264': Permission denied
22-Jan-24 17:50:09 Video copy completed. [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.1.h264](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.1.h264) has been copied to [/20211115_herman_05_s3.1.h264](https://file+.vscode-resource.vscode-cdn.net/20211115_herman_05_s3.1.h264)
22-Jan-24 17:50:09 ADDING EPHYS DATA
22-Jan-24 17:50:09 Parsing headers
22-Jan-24 17:50:09 Parsing header COMPLETE
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec)
22-Jan-24 18:12:43 # iterators: 14
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec)
Interpolate memmap:  [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec)
22-Jan-24 18:32:35 Reading timestamps COMPLETE
22-Jan-24 18:32:36 ADDING DIO DATA
22-Jan-24 23:24:57 ADDING ANALOG DATA
22-Jan-24 23:24:57 Parsing headers
22-Jan-24 23:24:57 Parsing header COMPLETE
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec)
compute multiplex cache [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec)
22-Jan-24 23:33:22 # iterators: 14
22-Jan-24 23:33:22 Reading timestamps COMPLETE
22-Jan-24 23:33:24 ADDING SAMPLE COUNTS
22-Jan-24 23:43:33 ADDING EPOCHS
22-Jan-24 23:43:33 ['/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.rec']
22-Jan-24 23:43:33 ['/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_02_r1.rec']
22-Jan-24 23:43:33 ['/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_03_s2.rec']
22-Jan-24 23:43:33 ['/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_04_r2.rec']
22-Jan-24 23:43:33 ['/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_05_s3.rec']
22-Jan-24 23:43:33 ADDING POSITION
22-Jan-24 23:43:33 PTP enabled: False
22-Jan-24 23:43:34 1
22-Jan-24 23:43:34 	position_timestamps_filepath: [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.1.videoTimeStamps.cameraHWSync](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.1.videoTimeStamps.cameraHWSync)
22-Jan-24 23:43:34 	position_tracking_filepath: [/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.1.videoPositionTracking](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/banyan/raw/anna/herman/20211115/20211115_herman_01_s1.1.videoPositionTracking)
[/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127): FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) [/](https://file+.vscode-resource.vscode-cdn.net/) '(1,)type'.
  return np.dtype(typearr)
22-Jan-24 23:43:34 repeat timestamps ind: []
22-Jan-24 23:43:34 big frame jumps: []
22-Jan-24 23:43:34 	non_repeat_timestamp_labels = [1]
[/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127](https://file+.vscode-resource.vscode-cdn.net/home/gl-willow/Documents/anna/trodes_to_nwb/src/trodes_to_nwb/convert_position.py:127): FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) [/](https://file+.vscode-resource.vscode-cdn.net/) '(1,)type'.
  return np.dtype(typearr)
22-Jan-24 23:43:34 Camera frame rate estimated from DIO camera ticks: 59523646659.0 frames/s

From our initial poking around, it looks like it might be an issue with rec_dci_timestamps not being monotonically increasing, but not sure why that might happen or how we could address that issue without having to scrap the epoch.

Thanks for your help!

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