Skip to content

Neuralynx DateTime incorrectly parsed #1901

Description

@eduardosand

Hi,

I am reaching a last few datasets for a project, and now reaching the more problematic of the datasets that still need to be looked at.
I have one dataset that is mostly fine but the header information indicated that the "File was not properly closed", so the 'recording_closed' that nlxheader.py is looking for can't parse the DateTime information. Instead, the dt2 generated has Date as 'File' and Time as 'was'.

I edited nlxheader.py on my end(line 351-353) to

            dt2 = sr.groupdict()
            if dt2['date'] == 'File':
                self['recording_closed'] = 'File was not properly closed'
            else:
                self["recording_closed"] = dateutil.parser.parse(f"{dt2['date']} {dt2['time']}")

Not the cleanest solution, but gets the job done and I can load the rest of this particular dataset. I think this is related to a previous issue, when the recording_closed information wasn't present at allissue here but this issue is distinct from that.

I am happy to help think about better resolutions to this if needed, or assist in pushing this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions