Skip to content

Commit 15d989a

Browse files
committed
QLD metrics for Gordana
1 parent ba7f8de commit 15d989a

4 files changed

Lines changed: 59 additions & 40 deletions

File tree

AUS/QLD/QLD_preTraces.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
else:
9797
rel = [0, 0]
9898
wop = False
99+
print(STYLE['yRange'])
99100
###########################################################################
100101
# Load preprocessed files lists
101102
###########################################################################

AUS/QLD/QLD_pstExplore.py

Lines changed: 55 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,71 @@
44
import sys
55
from os import path
66
from datetime import datetime
7-
87
from matplotlib.pyplot import vlines
98
import QLD_aux as aux
109
import QLD_gene as drv
1110
import QLD_land as lnd
12-
import QLD_functions as fun
13-
# import STP_auxDebug as dbg
11+
import numpy as np
1412
import MoNeT_MGDrivE as monet
1513
from joblib import Parallel, delayed
1614
import compress_pickle as pkl
1715

1816

19-
if monet.isNotebook():
20-
(USR, AOI, LND, EXP) = ('dsk', 'HLT', '02', 's1')
21-
JOB = aux.JOB_DSK
22-
else:
23-
(USR, AOI, LND, EXP) = (
24-
sys.argv[1], sys.argv[2],
25-
sys.argv[3], sys.argv[4]
26-
)
27-
JOB = aux.JOB_SRV
28-
EXPS = aux.getExps(LND)
29-
exp = EXP
30-
###########################################################################
31-
# Setting up paths
32-
###########################################################################
33-
(drive, land) = (
34-
drv.driveSelector(aux.DRV, AOI, popSize=aux.POP_SIZE),
35-
lnd.landSelector(USR, LND)
17+
base = '/home/chipdelmal/Documents/WorkSims/QLD/Experiments/'
18+
year = 3.5
19+
start = int(year*365) # 1175
20+
print('*'*50)
21+
print(" Average signal extrema after {}y".format(year))
22+
print('*'*50)
23+
###########################################################################
24+
# Analyzing seasonality
25+
###########################################################################
26+
pths = (
27+
"s4/PREPROCESS/E_000-HLT_00_sum.bz",
28+
"s4/PREPROCESS/E_000-HLT_01_sum.bz"
3629
)
37-
(gene, fldr) = (drive.get('gDict'), drive.get('folder'))
38-
(PT_ROT, PT_IMG, PT_DTA, PT_PRE, PT_OUT, PT_MTR) = aux.selectPath(
39-
USR, exp, LND
30+
basePopMean = [pkl.load(path.join(base, i))['population'] for i in pths]
31+
totalPop = [i[:,2] for i in basePopMean]
32+
(mx, mn) = ([np.max(i) for i in totalPop], [np.min(i) for i in totalPop])
33+
print('+ Max untreated: {:.0f}, {:.0f}'.format(*mx))
34+
print('+ Min untreated: {:.0f}, {:.0f}'.format(*mn))
35+
print('-'*50)
36+
###########################################################################
37+
# IIT Suppression
38+
###########################################################################
39+
pths = (
40+
"s1/PREPROCESS/E_007-HLT_00_sum.bz",
41+
"s1/PREPROCESS/E_007-HLT_01_sum.bz",
4042
)
41-
PT_IMG = path.join(PT_IMG, 'preTraces')
42-
monet.makeFolder(PT_IMG)
43+
basePopMean = [pkl.load(path.join(base, i))['population'] for i in pths]
44+
totalPop = [i[:,2][start:] for i in basePopMean]
45+
(mx, mn) = ([np.max(i) for i in totalPop], [np.min(i) for i in totalPop])
46+
print('+ Max IIT: {:.0f}, {:.0f}'.format(*mx))
47+
print('+ Min IIT: {:.0f}, {:.0f}'.format(*mn))
48+
print('-'*50)
4349
###########################################################################
44-
# Setting up paths
50+
# SRE Suppression
4551
###########################################################################
46-
pthB = "/home/chipdelmal/Documents/WorkSims/s4/POSTPROCESS'E_000-HLT_00.png"
47-
pthA = "/home/chipdelmal/Documents/WorkSims/s1/POSTPROCESS/E_000-HLT_00.png"
52+
pths = (
53+
"s3/PREPROCESS/E_007-HLT_00_sum.bz",
54+
"s3/PREPROCESS/E_007-HLT_01_sum.bz",
55+
)
56+
basePopMean = [pkl.load(path.join(base, i))['population'] for i in pths]
57+
totalPop = [i[:,2][start:] for i in basePopMean]
58+
(mx, mn) = ([np.max(i) for i in totalPop], [np.min(i) for i in totalPop])
59+
print('+ Max SRE: {:.0f}, {:.0f}'.format(*mx))
60+
print('+ Min SRE: {:.0f}, {:.0f}'.format(*mn))
61+
print('-'*50)
62+
###########################################################################
63+
# IIT+SRE Suppression
64+
###########################################################################
65+
pths = (
66+
"s2/PREPROCESS/E_007-HLT_00_sum.bz",
67+
"s2/PREPROCESS/E_007-HLT_01_sum.bz",
68+
)
69+
basePopMean = [pkl.load(path.join(base, i))['population'] for i in pths]
70+
totalPop = [i[:,2][start:] for i in basePopMean]
71+
(mx, mn) = ([np.max(i) for i in totalPop], [np.min(i) for i in totalPop])
72+
print('+ Max IIT+SRE: {:.0f}, {:.0f}'.format(*mx))
73+
print('+ Min IIT+SRE: {:.0f}, {:.0f}'.format(*mn))
74+
print('-'*50)

STP/RBC/STP_aux.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,6 @@ def selectDepVars(MOI, AOI):
116116
cmap = monet.cmapW
117117
return (scalers, HD_DEP, IND_RAN, cmap)
118118

119-
120-
# #############################################################################
121-
# Probed experiments
122-
# #############################################################################
123-
EXPS_TO_PLOT = (
124-
'E_01_00_000000_00000000000000000000000_00000000000000000000000_000800_000730_000930_000874_000482',
125-
'E_03_00_001000_00000000000000000000030_00000000000000000010000_001600_000730_000930_000655_000723',
126-
'E_03_00_001000_00000000000000000000030_00000000000000000000000_001200_000730_000930_000437_000482'
127-
)
128-
129119
# #############################################################################
130120
# Experiments
131121
# #############################################################################
@@ -166,7 +156,7 @@ def getExperimentsIDSets(PATH_EXP, skip=-1, ext='.bz'):
166156
# #############################################################################
167157
# Paths and Style
168158
# #############################################################################
169-
def selectPath(USR, EXP, LND):
159+
def selectPath(USR, EXP, LND, DRV=None):
170160
if USR == 'srv':
171161
PATH_ROOT = '/RAID5/marshallShare/STP_Grid/{}/{}/'.format(LND, EXP)
172162
elif USR == 'dsk':

STP/RBC/STP_preProcess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
else:
2020
(USR, AOI, LND) = (sys.argv[1], sys.argv[2], sys.argv[3])
2121
JOB = aux.JOB_SRV
22+
DRV = aux.DRV
2223
###############################################################################
2324
# Processing loop
2425
###############################################################################
@@ -29,7 +30,7 @@
2930
# Setting up paths
3031
###########################################################################
3132
(drive, land) = (
32-
drv.driveSelector(aux.DRV, AOI, popSize=aux.POP_SIZE),
33+
drv.driveSelector(DRV, AOI, popSize=aux.POP_SIZE),
3334
lnd.landSelector(exp, LND)
3435
)
3536
(gene, fldr) = (drive.get('gDict'), drive.get('folder'))

0 commit comments

Comments
 (0)