Merge branch 'master' of https://whale.am28.uni-tuebingen.de/git/raab/GP2023_chirp_detection
This commit is contained in:
commit
ab263d26a2
35
code/get_behaviour.py
Normal file
35
code/get_behaviour.py
Normal file
@ -0,0 +1,35 @@
|
||||
import os
|
||||
from paramiko import SSHClient
|
||||
from scp import SCPClient
|
||||
from IPython import embed
|
||||
from pandas import read_csv
|
||||
|
||||
ssh = SSHClient()
|
||||
ssh.load_system_host_keys()
|
||||
|
||||
ssh.connect(hostname='kraken',
|
||||
username='efish',
|
||||
password='fwNix4U',
|
||||
)
|
||||
|
||||
|
||||
# SCPCLient takes a paramiko transport as its only argument
|
||||
scp = SCPClient(ssh.get_transport())
|
||||
|
||||
data = read_csv('../recs.csv')
|
||||
foldernames = data['recording'].values
|
||||
|
||||
directory = f'/Users/acfw/Documents/uni_tuebingen/chirpdetection/GP2023_chirp_detection/data/mount_data/'
|
||||
for foldername in foldernames:
|
||||
|
||||
if not os.path.exists(directory+foldername):
|
||||
os.makedirs(directory+foldername)
|
||||
|
||||
files = [('-').join(foldername.split('-')[:3])+'.csv','chirp_ids.npy', 'chirps.npy', 'fund_v.npy', 'ident_v.npy', 'idx_v.npy', 'times.npy', 'spec.npy', 'LED_on_time.npy', 'sign_v.npy']
|
||||
|
||||
|
||||
for f in files:
|
||||
scp.get(f'/home/efish/behavior/2019_tube_competition/{foldername}/{f}',
|
||||
directory+foldername)
|
||||
|
||||
scp.close()
|
Loading…
Reference in New Issue
Block a user