Last active
November 6, 2018 18:15
-
-
Save magland/3ba2b1fe6ff138deba0edaedb5de5867 to your computer and use it in GitHub Desktop.
3ba2b1fe6ff138deba0edaedb5de5867
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 argparse | |
import spikeforest as sf | |
import os | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser(description = 'Sort the SpikeForest datasets') | |
parser.add_argument('command',help='sort, clear_in_process, clear_all, assemble') | |
parser.add_argument('study',help='The name of the study') | |
args = parser.parse_args() | |
spikeforest_password=os.environ.get('SPIKEFOREST_PASSWORD','') | |
if not spikeforest_password: | |
raise Exception('Environment variable not set: SPIKEFOREST_PASSWORD') | |
sf.kbucketConfigRemote( | |
share_id='spikeforest.spikeforest1', | |
write=True, | |
password=spikeforest_password | |
) | |
command=args.command | |
study_name=args.study | |
if command=='clear_in_process': | |
sf.batch.clear_sorting_results(study_name=study_name,in_process_only=True) | |
elif command=='clear_all': | |
sf.batch.clear_sorting_results(study_name=study_name,in_process_only=False) | |
elif command=='sort': | |
sf.batch.sort_datasets(study_name=study_name) | |
elif command=='assemble': | |
sf.batch.assemble_sorting_results(study_name=study_name) | |
else: | |
raise Exception('Unrecognized command: '+command) |
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
#!/bin/bash | |
set -e | |
# Set number of cpu's to use for spike sorting | |
export NUM_WORKERS=2 | |
export MKL_NUM_THREADS=$NUM_WORKERS | |
export NUMEXPR_NUM_THREADS=$NUM_WORKERS | |
export OMP_NUM_THREADS=$NUM_WORKERS | |
#study=magland_synth_noise10_K10_C4 | |
study=magland_synth_noise20_K10_C4 | |
python driver_sort_datasets.py clear_in_process $study | |
srun -c 2 -n 40 python driver_sort_datasets.py sort $study | |
#srun -c 2 -n 1 python driver_sort_datasets.py sort $study | |
#python driver_sort_datasets.py sort $study | |
python driver_sort_datasets.py assemble $study | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment