Created
June 10, 2019 16:28
-
-
Save julioxavierr/6bcf8d482d942023636d8bb617f6751e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyedflib | |
import numpy as np | |
import sys | |
from shutil import copyfile | |
import datetime | |
# copy input as output | |
copyfile(sys.argv[1], sys.argv[2]) | |
# read input and get number of signals | |
f = pyedflib.EdfReader(sys.argv[1]) | |
print(f.getStartdatetime()) | |
n = f.signals_in_file | |
# write into output the current datetime | |
o = pyedflib.EdfWriter(sys.argv[2], 1) | |
now = datetime.datetime.now() | |
o.setStartdatetime(now) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment