Skip to content

Commit

Permalink
./out/ set as default in fig. scripts in ./python/
Browse files Browse the repository at this point in the history
  • Loading branch information
shimoura committed Oct 23, 2023
1 parent f6898ca commit 5278726
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
9 changes: 3 additions & 6 deletions python/compute_scaling_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
else:
simulation = 'lichtman_chii2_different_seed'

base_path = os.path.join(os.getcwd(), 'out/')

if simulation == 'lichtman_chii2_different_seed':
from compute_scaling_experiments_helpers import state_scaling_lichtman_chii2_different_seed as state
base_path = '/p/scratch/cjinb33/jinb3330/huvi_fraction_EI_stable_localEtoI1_lichtman_chiI2/'
save_data_dir = 'simulated_data/scaling_experiment_lichtman_chii2_different_seed'
interesting_paths = [
'07338a82a7f3331ed0309d0aefe2512b/',
Expand All @@ -52,7 +53,6 @@
ana_path = 'd8057e7a966caf3eefdc9d234a0785d3/'
elif simulation == 'lower_etoi':
from compute_scaling_experiments_helpers import state_lower_e_to_i as state
base_path = '/p/scratch/cjinb33/jinb3330/huvi_fraction_EI_lower_e_to_i/'
save_data_dir = 'simulated_data/scaling_experiment_lower_e_to_i'
interesting_paths = [
'12742e24273ad73c879fc396b575e2e9/',
Expand All @@ -72,7 +72,6 @@
ana_path = '099ed2eb40bf4285921a916d32bf5343/'
elif simulation == 'lichtman_chii2_smaller_g':
from compute_scaling_experiments_helpers import state_scaling_lichtman_chii2_smaller_g as state
base_path = '/p/scratch/cjinb33/shimoura1/huvi_fraction_EI_stable_localEtoI1_lichtman_chiI2_smaller_g/'
save_data_dir = 'simulated_data/scaling_experiment_lichtman_chii2_smaller_g'
interesting_paths = [
'08e8618517e6e057db688d6257680da6/',
Expand All @@ -85,7 +84,6 @@
ana_path = 'd8057e7a966caf3eefdc9d234a0785d3/'
elif simulation == 'lichtman_chii2_different_time_consts':
from compute_scaling_experiments_helpers import state_scaling_lichtman_chii2_different_time_consts as state
base_path = '/p/scratch/cjinb33/shimoura1/huvi_fraction_EI_stable_localEtoI1_lichtman_chiI2_different_synaptic_time_constants/'
save_data_dir = 'simulated_data/scaling_experiment_lichtman_chii2_different_time_consts'
interesting_paths = [
'013292ec8fa6c9230d1c9518b71d19ad/',
Expand All @@ -103,7 +101,6 @@
ana_path = 'd8057e7a966caf3eefdc9d234a0785d3/'
elif simulation == 'lichtman_chii2_distributed_params':
from compute_scaling_experiments_helpers import state_scaling_lichtman_chii2_distributed_params as state
base_path = '/p/scratch/cjinb33/shimoura1/huvi_fraction_EI_stable_localEtoI1_lichtman_chiI2_distributed_parameters/'
save_data_dir = 'simulated_data/scaling_experiment_lichtman_chii2_distributed_params'
interesting_paths = [
'2c60ac72127fa0089cf8c65a9f4aaf8e/',
Expand Down Expand Up @@ -142,7 +139,7 @@
# ==============================================================================
# ==============================================================================

filename = '/p/project/cjinb33/jinb3330/gitordner/huvi/data/rutishauser/spikes/'
filename = base_path + 'data/rutishauser/spikes/'
data = load_data(filename)
print(f'loaded {len(data)} neurons')
all_ids = range(len(data))
Expand Down
2 changes: 1 addition & 1 deletion python/compute_scaling_experiments_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def LVr(sts, t_ref, t_start=None, t_stop=None, LvR_min_spikes=10):
return 0.

def calculateFuncionalConnectivityCorrelations(ana_path, tmin=2000, tmax=8000,
base_path='/p/project/cjinb33/shimoura1/huvi-master',
base_path=os.path.join(os.getcwd(), 'out'),
exclude_diagonal=True, use_corrcoeff=True):
"""
Calculates the correlation between experimental and simulated functional
Expand Down
3 changes: 2 additions & 1 deletion python/figure_appendix_rasterplot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import random
import numpy as np
import pandas as pd
import os
from os.path import join as p_join

import matplotlib.pyplot as plt
Expand All @@ -23,7 +24,7 @@
random.seed(1234)


outpath = '/p/scratch/cjinb33/jinb3330/huvi_fraction_EI_stable_localEtoI1_lichtman_chiI2/'
outpath = os.path.join(os.getcwd(), 'out/')
net_folder = p_join(outpath, '10acdb2ae9247b49d4eeea4d78f308b7') # metastable
sim_folder = p_join(net_folder, 'de4934b8c7777751f7c516e2ad35f50a')
ana_folder = p_join(sim_folder, 'd8057e7a966caf3eefdc9d234a0785d3')
Expand Down
3 changes: 2 additions & 1 deletion python/figure_connectivity_construction.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import numpy as np
import pandas as pd
from scipy.special import ndtr
Expand All @@ -15,7 +16,7 @@
except FileNotFoundError:
print('Please run data/macaque/preprocessing.py first')
exit(1)
net_dict = networkDictFromDump('/p/scratch/cjinb33/jinb3330/huvi_fraction_EI_stable_localEtoI1_lichtman_chiI2/517f98422516bbe6cb324c5436e7f66f/')
net_dict = networkDictFromDump(os.path.join(os.getcwd(), 'out/517f98422516bbe6cb324c5436e7f66f/'))

roman_to_arabic_numerals = {
'I': '1',
Expand Down
2 changes: 1 addition & 1 deletion python/figure_connectivity_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
target_min_outdeg = 100
work_dir = "figures/tmp"
figname = "figure_connectivity_validation"
net_dict = networkDictFromDump('/p/scratch/cjinb33/jinb3330/huvi_fraction_EI_stable_localEtoI1_lichtman_chiI2/517f98422516bbe6cb324c5436e7f66f/')
net_dict = networkDictFromDump(os.path.join(os.getcwd(), 'out/517f98422516bbe6cb324c5436e7f66f/'))

# ========== Preprocess ==========
area_list = net_dict['area_list']
Expand Down
2 changes: 1 addition & 1 deletion python/figure_scaling_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@
# Plot experimental fMRI
# ==============================================================================

data_dir = '/p/project/cjinb33/jinb3330/gitordner/huvi/data/senden/rsData_7T_DKparcel/'
data_dir = os.path.join(os.getcwd(), 'data/senden/rsData_7T_DKparcel/')
roi = pd.read_csv(os.path.join(data_dir, 'ROIs.txt'), header=None, names=['roi'], dtype=str, squeeze=True)
roi = roi.apply(lambda x: x.split('-')[-1])
roi = roi.drop(range(0, 14)).drop(range(82, 85))
Expand Down
4 changes: 2 additions & 2 deletions python/figure_spike_journey.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from os.path import join as path_join
from itertools import product, combinations
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
Expand All @@ -25,8 +26,7 @@
ana_hash = '9869eeeab580621db9572c8aa8c5f789'

# outpath = 'out'
outpath = '/p/scratch/cjinb33/jinb3330/huvi_fraction_EI_stable_localEtoI1_lichtman_chiI2_perturbation'

outpath = os.path.join(os.getcwd(), 'out')

def load_diffs(net_hash_orig, net_hash_pert):
"""Calculate rate differences for the two hashes"""
Expand Down
3 changes: 2 additions & 1 deletion python/figure_spike_statistics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import random
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -27,7 +28,7 @@

for state in ['groundstate', 'metastable']:
name_extension = '_lichtman_chiI2_different_seed'
outpath = '/p/scratch/cjinb33/jinb3330/huvi_fraction_EI_stable_localEtoI1_lichtman_chiI2/'
outpath = os.path.join(os.getcwd(), 'out/')
if state == 'groundstate':
net_folder = p_join(outpath, '517f98422516bbe6cb324c5436e7f66f') # groundstate
elif state == 'metastable':
Expand Down

0 comments on commit 5278726

Please sign in to comment.