Skip to content

Input files for ExportOneAnimal.py #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
croneal opened this issue Jun 4, 2024 · 2 comments
Open

Input files for ExportOneAnimal.py #2

croneal opened this issue Jun 4, 2024 · 2 comments

Comments

@croneal
Copy link

croneal commented Jun 4, 2024

Hi,

I encountered an issue while following your pipeline. Specifically, I'm stuck at the ExportOneAnimal.py script, which requires a data_file generated from ExportScaledSeg.py, along with a timestamp file.

I attempted to create a timestamp file by generating a txt file with a single line of time, such as 20240604100000. However, upon execution, I encountered the following error:

NameError: free variable 'sync_skip' referenced before assignment in enclosing scope

Additionally, I'm unsure about the requirements for the EEG files.

It would be helpful if you could provide some demo files or further guidance on generating the feather format file.

Thanks a lot.

@SkepticRaven
Copy link
Contributor

It looks like that's a bug!

I had created a csv file with 2 columns.

  • Video filename without extension
  • Frame index when alignment occurs.

While it is an optional input (with --timesyncfile), it appears that I never wrote the case when it isn't provided. It should be a relatively easy fix. I should be able to write a minor patch for this pretty quickly (possibly today).

As for getting demo files... that may take a bit longer.

I can also in the patch for the exclusion of timesyncfile also try and write down more details about the structure of the files.

Briefly to give you some insight into what we did ---
Although we describe the data collection being Raspberry-Pi-based in the paper, I never shared the exact command here (which for stability reasons, we needed to separate the video stream and the time logging stream). The timestamps were written out to a plain text file. This code (that is producing this error) reads in those timestamps (which are formatted as seconds relative to system boot) and adjusts them to be a localized time.

@SkepticRaven
Copy link
Contributor

Just added https://github.com/KumarLabJax/MouseSleep/tree/issue%232

It adds documentation in the main file alongside patching the exact error you ran into above. Hopefully this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants