-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathread_models_cn.py
More file actions
424 lines (387 loc) · 24.1 KB
/
read_models_cn.py
File metadata and controls
424 lines (387 loc) · 24.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
from nugridpy import nugridse as mp
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
## range of isotopic ratios
isotopes_x = ['C-12','C-13']
isotopes_y = ['N-14','N-15']
## References in data
# 'Alexander ApJ 1999', 'Alexander GCA 1993',
# 'Alexander GCA 1994', 'Alexander GCA 1995', 'Amari ApJ 1992',
# 'Amari ApJ 1999', 'Amari ApJ 2001', 'Amari ApJ 2001 (nova)',
# 'Amari unpublished (2003)', 'Amari unpublished 1992',
# 'Avila ApJ 2012', 'Barzyk MAPS 2007', 'Barzyk MAPS 2008',
# 'Besmehn GCA 2003', 'Besmehn Thesis 2001', 'Bose GCA 2012',
# 'Busemann E&P Ltrs 2009', 'Croat Astron. J. 2010',
# 'Floss MAPS 2012', 'Fujiya ApJ Letters 2011',
# 'Fujiya ApJ Letters 2013', 'Gao LPSC 1997', 'Gyngard LPSC 2006',
# 'Gyngard MetSoc 2006', 'Gyngard MetSoc 2010',
# 'Gyngard unpublished 2009', 'Heck ApJ 2007', 'Heck ApJ 2009',
# 'Henkel MAPS 2007', 'Hoppe ApJ 1994', 'Hoppe ApJ 1997',
# 'Hoppe ApJ 2001', 'Hoppe ApJ 2009', 'Hoppe ApJ 2010',
# 'Hoppe ApJ Letters 2012', 'Hoppe GCA 1996', 'Hoppe LPSC 1996',
# 'Hoppe MAPS 2000', 'Hoppe Science 1996', 'Hoppe unpublished',
# 'Hoppe unpublished ', 'Huss GCA 1997', 'Huss MAPS 2007',
# 'Hynes LPSC 2006', 'Hynes LPSC 2008', 'Ireland ApJ 1991',
# 'Jennings LPSC 2002', 'Lin ApJ 2002', 'Liu ApJ 2014',
# 'Lyon LPSC 2006', 'Marhas ApJ 2008', 'Marhas LPSC 2004',
# 'Marhas LPSC 2005', 'Marhas LPSC 2007', 'Marhas MAPS 2007',
# 'Marhas Met Soc 2005', 'Nguyen GCA 2018', 'Nicolussi GCA 1998',
# 'Nicolussi Phys Rev Ltrs 1998', 'Nicolussi Science 1997',
# 'Nittler ApJ 1996', 'Nittler ApJ 2005', 'Nittler GCA 2003',
# 'Nittler Met Soc 2006', 'Nittler Thesis 1996',
# 'Orthous-Daunay LPSC 2012', 'Pellin LPSC 2000', 'Pellin LPSC 2006',
# 'Reference', 'Savina GCA 2003', 'Savina Science 2004',
# 'Stadermann GCA 2006', 'Stroud Met Soc 2004', 'Trappitsch GCA 2018'
#'Virag GCA 1992', 'Wopenka LPSC 2010', 'Xu Metsoc 2012',
#'Yada MAPS 2008','Zhao ApJ 2013', 'Zinner GCA 2007', 'Zinner LPSC 2010',
# 'Zinner MAPS 2003'
reference = 'Barzyk MAPS 2007' # insert here for dataset
reference1 = 'Davis NIC V 1999'
## class of presolar grain
# '', 'AB', 'C', 'HM only', 'M', 'MS', 'N', 'Type', 'U', 'U/C', 'X',
# 'X ', 'Y', 'Z', 'uncl.', 'unclass'
clas_1 = 'HM only'
clas_2 = 'M'
run1=mp.se('../mppnp/z1m2/m2z1m2/H5_surf','surf.h5')
run2=mp.se('../mppnp/z2m2/m2z2m2/H5_surf','surf.h5')
run3=mp.se('../mppnp/z3m2/m2z3m2/H5_surf','surf.h5')
#run4=mp.se('../mppnp/z3p5m2/m2z3p5m2_hCBM_TDUx1p4/H5_surf','surf.h5')
run5=mp.se('../mppnp/z1m2/m3z1m2/H5_surf','surf.h5')
run6=mp.se('../mppnp/z2m2/m3z2m2/H5_surf','surf.h5')
run7=mp.se('../mppnp/z3m2/m3z3m2/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z3p5m2/m3z3p5m2_hCBM_TDUx1p4/H5_surf','surf.h5')
#run5=mp.se('../mppnp/z3p5m2/m2z3p5m2_hCBM_TDUx1p4/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z3p5m2/m2p3z3p5m2_hCBM_TDUx1p4/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z3m2/m3z3m2/H5_surf','surf.h5')
##run8=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/H5_surf','surf.h5')
#run9=mp.se('../mppnp/z3p5m2/m3z3p5m2_hCBM_TDUx1p4/H5_surf','surf.h5')
#run3=mp.se('../mppnp/z3m2/m3z3m2/H5_surf','surf.h5')
##run4=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/H5_surf','surf.h5')
##run5=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/95Zr/H5_surf','surf.h5')
##run6=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/95ZrJd2/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/ota_22Ne/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/ota_22Ne_94Zr/H5_surf','surf.h5')
#run9=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/ota_22Ne_0.9Zr94/H5_surf','surf.h5')
##run5=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/500dif (-rotmix.st)/H5_surf','surf.h5')
##run6=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/333dif (-rotmix.stx1.5)/H5_surf','surf.h5')
##run7=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/94Zr/H5_surf','surf.h5')
##run8=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/500dif_94Zr/H5_surf','surf.h5')
##run9=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/333dif_94Zr/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/250dif (-rotmix.stx2)/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3_mk1/94Zr/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z3m2/m2p7z3m2_hCBM_TDUx1p4/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z3m2/m2p7z3m2_hCBM_TDUx4p3/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z3m2/m2p7z3m2_hCBM_TDUx4p3/95Zr/H5_surf','surf.h5')
#run9=mp.se('../mppnp/z3m2/m2p7z3m2_hCBM_TDUx4p3/95ZrJd2/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z2p8m2/m3z2p8m2/H5_surf','surf.h5')
#run5=mp.se('../mppnp/z3m2/m3z3m2/H5_surf','surf.h5')
##run4=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/H5_surf','surf.h5')
##run5=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/95Zr/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/95Zrll23/H5_surf','surf.h5')
##run8=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/95ZrJlow/H5_surf','surf.h5')
#run5=mp.se('../mppnp/z3p5m2/m2p3z3p5m2_hCBM_TDUx1p4/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z3p5m2/m2p3z3p5m2_hCBM_TDUx4p3/H5_surf','surf.h5')
#run5=mp.se('../mppnp/z3p5m2/m2z3p5m2_hCBM_TDUx7/95Zr/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z3p5m2/m2z3p5m2_hCBM_TDUx7/94Zr/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z3m2/m3z3m2/H5_surf','surf.h5')
#run9=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx7/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z3m2/m3z3m2/TDUx4p3/H5_surf','surf.h5')
#run9=mp.se('../mppnp/z3m2/m3z3m2/TDUx12/H5_surf','surf.h5')
#run9=mp.se('../mppnp/z3m2/m3z3m2/TDUx4p3_94Zr/H5_surf','surf.h5')
#run10=mp.se('../mppnp/z3m2/m3z3m2/TDUx4p3_95Zr/H5_surf','surf.h5')
#run9=mp.se('../mppnp/z3m2/m3z3m2/HeCBMd4/H5_surf','surf.h5')
#run10=mp.se('../mppnp/z3m2/m3z3m2/HeCBMd10/H5_surf','surf.h5')
##run6=mp.se('../mppnp/z3m2/m3z3m2/94Zr/H5_surf','surf.h5')
##run7=mp.se('../mppnp/z3m2/m3z3m2/45Zrng/H5_surf','surf.h5')
#run5=mp.se('../mppnp/z2m2/m3z2m2/1adif/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z2m2/m3z2m2/250dif/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z2m2/m3z2m2/kadon1/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z3m2/m3z3m2/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z3m2/m3z3m2/94Zr/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z3m2/m3z3m2/45Zrng/H5_surf','surf.h5')
##run9=mp.se('../mppnp/z3m2/m3z3m2/45ZrngNe22/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z2m2/m3z2m2/H5_surf','surf.h5')
#run10=mp.se('../mppnp/z2m2/m3z2m2/500dif/H5_surf','surf.h5')
#run11=mp.se('../mppnp/z2m2/m3z2m2/500dif_45ZrngNe22/H5_surf','surf.h5')
#run2=mp.se('../mppnp/z1m2/m2z1m2_he07/H5_surf','surf.h5')
#run3=mp.se('../mppnp/z1m2/m2z1m2/H5_surf_critter','surf.h5')
#run4=mp.se('../mppnp/z2m2/m2z2m2_he07/H5_surf','surf.h5')
#run5=mp.se('../mppnp/z2m2/m2z2m2/H5_surf_critter','surf.h5')
#run6=mp.se('../mppnp/z1m2/m3z1m2_he07/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z1m2/m3z1m2/H5_surf_critter','surf.h5')
#run8=mp.se('../mppnp/z2m2/m3z2m2_he07/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z2m2/m3z2m2/critter/H5_surf','surf.h5')
#run1=mp.se('../mppnp/z1m2/m2z1m2_he07/H5_surf','surf.h5')
##run2=mp.se('../mppnp/z1m2/m2z1m2_he07/ll22/H5_surf','surf.h5')
##run3=mp.se('../mppnp/z1m2/m2z1m2_he07/ne22a22/H5_surf','surf.h5')
#run4=mp.se('../mppnp/z1m2/m2z1m2_he07/ll31/H5_surf','surf.h5')
#run5=mp.se('../mppnp/z1m2/m2z1m2_he07/ne22a13/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z1m2/m2z1m2_he07/ne22a21/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z1m2/m2z1m2_he07/ne22a31/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z2m2/m3z2m2_he07/ll22/H5_surf','surf.h5')
#run9=mp.se('../mppnp/z2m2/m3z2m2_he07/ne22a22/H5_surf','surf.h5')
#run10=mp.se('../mppnp/z2m2/m3z2m2_he07/H5_surf','surf.h5')
#run1=mp.se('../mppnp/z1m2/m2z1m2/H5_surf','surf.h5')
#run2=mp.se('../mppnp/z1m2/m2z1m2/mod2/H5_surf','surf.h5')
#run3=mp.se('../mppnp/z1m2/m2z1m2/mod2_hi/H5_surf','surf.h5')
#run4=mp.se('../mppnp/z1m2/m2z1m2/mod2_oldscreen/H5_surf','surf.h5')
#run5=mp.se('../mppnp/z1m2/m2z1m2/mod2_lo/H5_surf','surf.h5')
#run_mass=[run1,run2,run3,run4,run5,run6,run7,run8,run9,run10,run11,run12,run13]
run_mass=[run1,run2,run3,run5,run6,run7]
metallicity_label=[#'M3.z2m2','M3.z2m2\_hCBM\_TDUx7','M3.z3m2','M3.z3m2\_hCBM\_TDUx7']
#'m3z3m2','m3z3m2-hCBM','RI18','m2p7z3p5m2','m2p7z3p5m2-hCBM']
#'m3z3m2-hCBM','m3z3m2-hCBM-rotmix.st','m3z3m2-hCBM-rotmix.stx1p5','m3z3m2-hCBM 0.8x ${^{94}}$Zr(n,$\\gamma$)','m3z3m2-hCBM-rotmix.st 0.8x ${^{94}}$Zr(n,$\\gamma$)','m3z3m2-hCBM-rotmix.stx1p5 0.8x ${^{94}}$Zr(n,$\\gamma$)']
#'m3z3m2-hCBM','m3z3m2-hCBM 0.5x ${^{95}}$Zr(n,$\\gamma$)','m3z3m2-hCBM 0.5x ${^{95}}$Zr(n,$\\gamma$), 0.5x ${^{22}}$Ne($\\alpha$,n)','m3z3m2-hCBM 0.22x ${^{22}}$Ne($\\alpha$,n)','m3z3m2-hCBM 0.8x ${^{94}}$Zr(n,$\\gamma$), 0.22x ${^{22}}$Ne($\\alpha$,n)','m3z3m2-hCBM 0.7x ${^{94}}$Zr(n,$\\gamma$), 0.22x ${^{22}}$Ne($\\alpha$,n)']
#'m3z3m2-hCBM 0.5x ${^{95}}$Zr(n,$\\gamma$), 0.5x ${^{22}}$Ne($\\alpha$,n)','m2p7z3p5m2-hCBM','m2p7z3p5m2-hCBM 0.5x ${^{95}}$Zr(n,$\\gamma$)','m2p7z3p5m2-hCBM 0.5x ${^{95}}$Zr(n,$\\gamma$), 0.5x ${^{22}}$Ne($\\alpha$,n)']
#'m2z3p5m2\_hCBM\_TDUx7','m2p3z3p5m2\_hCBM\_TDUx7','m3z3p5m2\_hCBM\_TDUx7','m3z3m2 TDUx4p3','m2z3p5m2\_hCBM\_TDUx12','m2z3p5m2 0.5x ${^{95}}$Zr(n,$\gamma$)','m2z3p5m2 ${^{94}}$Zr(n,$\gamma$) Kad 0.3']
'm2z1m2','m2z2m2','m2z3m2','m3z1m2','m3z2m2','m3z3m2','m2z3p5m2','m3z3p5m2']
#'m2z3p5m2\_hCBM\_TDUx1p4','m2p3z3p5m2\_hCBM\_TDUx1p4','M3.z3m2','M3.z3m2\_hCBM\_TDUx4p3','m3z3p5m2\_hCBM\_TDUx1p4']
#'M3.z3m2','M3.z3m2\_hCBM\_TDUx4p3','M3p3.z3m2','M2p7.z3m2','M3.z2p8m2']
#'M3.z3m2\_hCBM\_TDUx4p3','M3.z3m2\_hCBM\_TDUx4p3 95Zr','M3.z3m2\_hCBM\_TDUx4p3 95Zr low ${^{22}}$Ne($\\alpha$,n)']
#'M3.z3m2','M3.z3m2\_hCBM\_TDUx4p3','M3.z3m2\_hCBM\_TDUx4p3 95Zr','M3.z3m2\_hCBM\_TDUx4p3 95Zr ll23','M3.z3m2\_hCBM\_TDUx4p3 95Zr ll12']
#'m2z3p5m2\_hCBM\_TDUx4p3']
#'m2p3z3p5m2\_hCBM\_TDUx1p4','m2p3z3p5m2\_hCBM\_TDUx4p3']
#'$M3.z2m2$','$M3.z2m2$ $diffusion/500$','$M3.z2m2$ $diffusion/500,$ ${^{94}}Zr(n,\gamma)$ Kad 0.3, $1.3x$ ${^{95}}Zr(e^{-},\gamma),$ ${^{22}}Ne$ $std$ $(\\alpha,\gamma),$ $high$ $(\\alpha,n)$']
#'$m3z3m2$','$m3z3m2,$ $0.8x$ ${^{94}}Zr(n,\gamma)$','$m3z3m2,$ ${^{94}}Zr(n,\gamma)$ $Kad$ $0.3$, $0.5x$ ${^{95}}Zr(n,\gamma)$','$m3z3m2,$ ${^{94}}Zr(n,\gamma)$ $Kad$ $0.3$, $0.5x$ ${^{95}}Zr(n,\gamma),$ ${^{22}}Ne$ $std$ $(\\alpha,n),$ $high$ $(\\alpha,\gamma)$','$m3z2m2-rotmix.st$','$m3z2m2-rotmix.st,$ ${^{94}}Zr(n,\gamma)$ $Kad$ $0.3$, $0.5x$ ${^{95}}Zr(n,\gamma),$ ${^{22}}Ne$ $std$ $(\\alpha,n),$ $high$ $(\\alpha,\gamma)$']
#'$M3.z2m2$ $KADoNiS$ $0.3$','$M3.z2m2$ $KADoNiS$ $1.0$']
#'$M2.z2m2$','$M2.z3m2$','$M3.z2m2$','$M3.z3m2$','$M3.z2m2$ $diffusion/500$','$M3.z2m2$ $diffusion/1k$']
#'m2z1m2','m2z2m2','m2z3m2','m2z3p5m2','m3z1m2','m3z2m2','m3z3m2','m3z3p5m2']
#'m3z3m2','m3z3m2 TDUx4p3','m3z3m2 TDUx12'] # ${^{94}}$Zr(n,$\gamma$) Kad 0.3','m3z3m2 TDUx4p3 0.5x ${^{95}}$Zr(n,$\gamma$)','m3z3m2 HeCBMd2','m3z3m2 HeCBMd4','m3z3m2 HeCBMd10']
#'$M2.z6m3\_hCBM$','$M3.z6m3\_hCBM$','$M2.z1m2\_hCBM$','$M2.z2m2\_hCBM$','$M3.z2m2\_hCBM$']
#'$M1p86.z2m2\_hCBM$','$M1p86.z2m2\_hCBM,$ $Ne22$','$M1p86.z2m2,$ $Ne22,$ $3x$ $Fe56(n,\gamma)$','$M2.z2m2$','$M2.z2m2\_hCBM$']
#'$M2.z1m2$','$M2.z2m2,$ $Ne22$ $\uparrow(\\alpha,\gamma)\downarrow(\\alpha,n)$','$M2.z1m2,$ $Ne22,$ $3x$ $Fe56(n,\gamma)$','$M2.z1m2,$ $Ne22,$ $2x$ $Fe56(n,\gamma)$','$M2.z1m2,$ $Ne22,$ $1.5x$ $Fe56(n,\gamma)$',\
#'$M2.z1m2\_hCBM$','$M2.z1m2\_hCBM,$ $Ne22$ $\uparrow(\\alpha,\gamma)\downarrow(\\alpha,n)$','$M2.z1m2\_hCBM,$ $Ne22,$ $3x$ $Fe56(n,\gamma)$','$M2.z1m2\_hCBM,$ $Ne22,$ $2x$ $Fe56(n,\gamma)$','$M2.z1m2\_hCBM,$ $Ne22,$ $`1.5x$ $Fe56(n,\gamma)$']
#'$M2.z1m2,$ $Ne22,$ $1.5x$ $Fe56(n,\gamma)$','$M2.z1m2,$ $Ne22,$ $2x$ $Fe56(n,\gamma)$','$M2.z1m2,$ $1.15x$ $Fe56(n,\gamma)$','$M2.z1m2,$ $Ne22,$ $3x$ $Fe56(n,\gamma)$']
#'$M3.z2m2\_he07$','$M3.z2m2\_he07,$ $Longland$ $22$','$M3.z2m2\_he07,$ $Chetec$ $22$','$M3.z2m2\_he07,$ $Longland$ $31$','$M2.z1m2\_he07,$ $new$ $Ne22 + \\alpha$ $13$','$M2.z1m2\_he07,$ $new$ $Ne22 + \\alpha$ $22$','$M2.z1m2\_he07,$ $new$ $Ne22 + \\alpha$ $31$']
#'$M2.z1m2$','$M2.z1m2$ $modular2$','$M2.z1m2$ $modular2$ $high$','$M2.z1m2$ $modular2$ $old$ $screening$','$M2.z1m2$ $modular2$ $low$']
#'$M2.z1m2\_he07,$ $Longland$','$M2.z1m2\_he07,$ $This$ $work$','$M3.z2m2\_he07,$ $Longland$','$M3.z2m2\_he07,$ $This$ $work$','$M3.z2m2\_he07,$ $Longland$ $22$','$M3.z2m2\_he07,$ $new$ $Ne22 + \\alpha$ $21$']
#'$M1p65.z2m2$','$M2.z2m2$','$M3.z2m2$']
#'$M2.z2m2$','$M2.z2m2,$ $Ritter$ $et$ $al.$ $2017$']
#['$M1p65.z2m2$','$M1p65.z2m2,$ $Ritter$ $et$ $al.$ $2017$','$M3.z1m2\_lowres$','$M3.z1m2$','$M3.z1m2,$ $Ritter$ $et$ $al.$ $2017$']
#['$M2.z1m2\_he07$','$M2.z1m2\_R17$','$M2.z2m2\_he07$','$M2.z2m2\_R17$','$M3.z1m2\_he07$','$M3.z1m2\_R17$','$M3.z2m2\_he07$','$M3.z2m2\_R17$'] ## legend labels
sparcity_sindex=2000 ## sparcity to adopt reading s-process index data
sparcity_isoratio=2000 ## sparcity to adopt reading isotopic ratio data
markers=['tab:green','tab:red','tab:blue','tab:green','tab:red','tab:blue', 'tab:cyan','tab:gray','tab:brown','tab:green','tab:blue','tab:red','k', 'tab:gray','tab:cyan','tab:olive','tab:brown', 'y', 'tab:purple', 'tab:pink', 'tab:orange']## markers to use while plotting s-process indices
symbols=['s','o','h','^','>','*','D','<','p','d','^','s','o'] ## linestyles to use while plotting s-process indices
line=['solid','solid','solid','dashed','dashed','dashed','dashed','solid','solid','solid','solid','solid','solid','solid','dashed','dotted']
## IF ISO_RATIO IS TRUE THIS SETS THE ISOTOPIC RATIOS YOU WANT TO PLOT
a = [''.join( isotopes_x[0].split('-')[::-1] ),''.join( isotopes_x[1].split('-')[::-1] )]
b = '/'.join(a)
#c = str('d()')
iso_ratio_1 = b
d = [''.join( isotopes_y[0].split('-')[::-1] ),''.join( isotopes_y[1].split('-')[::-1] )]
e = '/'.join(d)
iso_ratio_2 = e
# load data
df = pd.read_csv('SiC-All.txt', sep='\t',engine='python')
df_plot = df[((df['Type']==clas_1))]# & (df['Reference']==reference1))]
df_plot2 = df[((df['Type']==clas_2))]# & (df['Reference']==reference))] # load data
# data sets
x = df_plot[iso_ratio_1].values
y = df_plot[iso_ratio_2].values
xerr = df_plot['Error['+iso_ratio_1+']'].values
yerr = df_plot['Error['+iso_ratio_2+']'].values
x2 = df_plot2[iso_ratio_1].values
y2 = df_plot2[iso_ratio_2].values
xerr2 = df_plot2['Error['+iso_ratio_1+']'].values
yerr2 = df_plot2['Error['+iso_ratio_2+']'].values
# adding in LaTex
aa = ['}}$'.join( isotopes_x[0].split('-')[::-1] ),'}}$'.join( isotopes_x[1].split('-')[::-1] )]
bb = '/'.join(aa)
cc = str('d(${^{)')
iso_ratio_11 = (cc[:6] + bb + cc[6:]).replace('/','/${^{')
dd = ['}}$'.join( isotopes_y[0].split('-')[::-1] ),'}}$'.join( isotopes_y[1].split('-')[::-1] )]
ee = '/'.join(dd)
iso_ratio_22 = (cc[:6] + ee + cc[6:]).replace('/','/${^{')
if iso_ratio_11[0] == 'd':
iso_ratio_111=iso_ratio_11.replace('d','$\delta$')
if iso_ratio_22[0] == 'd':
iso_ratio_222=iso_ratio_22.replace('d','$\delta$')
##############################
df1=pd.read_csv('isotopi_m2p0z1m2_000_20180116_152314.txt', sep='\s+',index_col='Isotope',usecols=[0,3,5,6,7,8,9,10,11,12,13],engine='python').T
df2=pd.read_csv('isotopi_m2p0z2m2_000_20180116_152257.txt', sep='\s+',index_col='Isotope',usecols=[0,3,5,6,7,8,9,10,11,12,13],engine='python').T
df3=pd.read_csv('isotopi_m3p0z1m2_000_20180116_152226.txt', sep='\s+',index_col='Isotope',usecols=[0,3,5,6,7,8,9,10,11,12,13,14,15],engine='python').T
df4=pd.read_csv('isotopi_m3p0z2m2_000_20180116_152153.txt', sep='\s+',index_col='Isotope',usecols=[0,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18],engine='python').T
df6=pd.read_csv('isotopi_m2p0zsun_000_20190703_144412.txt', sep='\s+',index_col='Isotope',usecols=[0,3,5,6,7,8,9,10,11,12,13],engine='python').T
df7=pd.read_csv('isotopi_m2p0zsun_010_20190703_144412.txt', sep='\s+',index_col='Isotope',usecols=[0,3,5,6,7,8,9,10,11,12],engine='python').T
df8=pd.read_csv('isotopi_m2p0zsun_030_20190703_144412.txt', sep='\s+',index_col='Isotope',usecols=[0,3,5,6,7,8,9,10,11,12,13],engine='python').T
df9=pd.read_csv('isotopi_m2p0zsun_060_20190703_144412.txt', sep='\s+',index_col='Isotope',usecols=[0,3,5,6,7,8,9,10,11,12],engine='python').T
df5=pd.read_csv('isotopi_m2p0zsun_000_20180720_16736.txt', sep='\s+',index_col='Isotope',usecols=[0,3],engine='python').T
inizr90=df5['Zr90'].values
inizr91=df5['Zr91'].values
inizr92=df5['Zr92'].values
inizr94=df5['Zr94'].values
inizr96=df5['Zr96'].values
list1=[df1,df3,df4,df6,df7,df8,df9]
#metallicity=['FRUITY m2z1m2','FRUITY m2z2m2','FRUITY m3z1m2','FRUITY m3z2m2']
metallicity=['FRUITY m2z1m2','FRUITY m3z1m2','FRUITY m3z2m2','FRUITY m2zsun 000','FRUITY m2zsun 010','FRUITY m2zsun 030','FRUITY m2zsun 060']
zr90=[]
for i in list1:
df_plot = i['Zr90'].values
zr90.append(df_plot)
zr91=[]
for i in list1:
df_plot = i['Zr91'].values
zr91.append(df_plot)
zr92=[]
for i in list1:
df_plot = i['Zr92'].values
zr92.append(df_plot)
zr94=[]
for i in list1:
df_plot = i['Zr94'].values
zr94.append(df_plot)
zr96=[]
for i in list1:
df_plot = i['Zr96'].values
zr96.append(df_plot)
ratio0=(((np.array(zr90)/np.array(zr94))/(inizr90/inizr94))-1)*1000
ratio1=(((np.array(zr91)/np.array(zr94))/(inizr91/inizr94))-1)*1000
ratio2=(((np.array(zr92)/np.array(zr94))/(inizr92/inizr94))-1)*1000
ratio6=(((np.array(zr96)/np.array(zr94))/(inizr96/inizr94))-1)*1000
df10 = df1[(df1['C12']/df1['O16']>=1.)]
df20 = df2[(df2['C12']/df2['O16']>=1.)]
df30 = df3[(df3['C12']/df3['O16']>=1.)]
df40 = df4[(df4['C12']/df4['O16']>=1.)]
df60 = df6[(df6['C12']/df6['O16']>=1.)]
df70 = df7[(df7['C12']/df7['O16']>=1.)]
df80 = df8[(df8['C12']/df8['O16']>=1.)]
df90 = df9[(df9['C12']/df9['O16']>=1.)]
#list2=[df10,df20,df30,df40]
list2=[df10,df30,df40,df60,df70,df80,df90]
zr90_co=[]
for i in list2:
df_plot = i['Zr90'].values
zr90_co.append(df_plot)
zr91_co=[]
for i in list2:
df_plot = i['Zr91'].values
zr91_co.append(df_plot)
zr92_co=[]
for i in list2:
df_plot = i['Zr92'].values
zr92_co.append(df_plot)
zr94_co=[]
for i in list2:
df_plot = i['Zr94'].values
zr94_co.append(df_plot)
zr96_co=[]
for i in list2:
df_plot = i['Zr96'].values
zr96_co.append(df_plot)
ratio0_co=(((np.array(zr90_co)/np.array(zr94_co))/(inizr90/inizr94))-1)*1000
ratio1_co=(((np.array(zr91_co)/np.array(zr94_co))/(inizr91/inizr94))-1)*1000
ratio2_co=(((np.array(zr92_co)/np.array(zr94_co))/(inizr92/inizr94))-1)*1000
ratio6_co=(((np.array(zr96_co)/np.array(zr94_co))/(inizr96/inizr94))-1)*1000
###############################
# sparcity for cycles I am looking at.
sparsity = sparcity_isoratio
isotopic_ratio_x = []
isotopic_ratio_y = []
isotopic_ratio_x_tps = []
isotopic_ratio_y_tps = []
isotopic_ratio_x_tps_co = []
isotopic_ratio_y_tps_co = []
initial_isotopic_ratio_x = []
initial_isotopic_ratio_y = []
k = 0
for i in run_mass:
# get initial value
initial_isotopic_ratio_x.append(float(i.se.get(min(i.se.cycles),'iso_massf',isotopes_x[0]))/float(i.se.get(min(i.se.cycles),'iso_massf',isotopes_x[1])))
initial_isotopic_ratio_y.append(float(i.se.get(min(i.se.cycles),'iso_massf',isotopes_y[0]))/float(i.se.get(min(i.se.cycles),'iso_massf',isotopes_y[1])))
dum_isotopic_ratio_x = []
dum_isotopic_ratio_y = []
dumdum_isotopic_ratio_x = []
dumdum_isotopic_ratio_y = []
dum_isotopic_ratio_x_tps = []
dum_isotopic_ratio_y_tps = []
dum_isotopic_ratio_x_tps_co = []
dum_isotopic_ratio_y_tps_co = []
co_ratio=[]
for j in i.se.cycles[0::sparsity]:
print(j)
dum_isotopic_ratio_x.append(float(i.se.get(j,'iso_massf',isotopes_x[0]))/float(i.se.get(j,'iso_massf',isotopes_x[1])))
dum_isotopic_ratio_y.append(float(i.se.get(j,'iso_massf',isotopes_y[0]))/float(i.se.get(j,'iso_massf',isotopes_y[1])))
co_ratio.append((float(i.se.get(j,'iso_massf','C-12')*4.))/(float(i.se.get(j,'iso_massf','O-16'))*3))
if (len(co_ratio)>1):
if (co_ratio[len(co_ratio)-1]>(co_ratio[len(co_ratio)-2]+0.02)):
dum_isotopic_ratio_x_tps.append(float(i.se.get(j,'iso_massf',isotopes_x[0]))/float(i.se.get(j,'iso_massf',isotopes_x[1])))
dum_isotopic_ratio_y_tps.append(float(i.se.get(j,'iso_massf',isotopes_y[0]))/float(i.se.get(j,'iso_massf',isotopes_y[1])))
if (co_ratio[len(co_ratio)-1]>1.):
dum_isotopic_ratio_x_tps_co.append(float(i.se.get(j,'iso_massf',isotopes_x[0]))/float(i.se.get(j,'iso_massf',isotopes_x[1])))
dum_isotopic_ratio_y_tps_co.append(float(i.se.get(j,'iso_massf',isotopes_y[0]))/float(i.se.get(j,'iso_massf',isotopes_y[1])))
dumdum_isotopic_ratio_x=(np.array(dum_isotopic_ratio_x)/initial_isotopic_ratio_x[-1:]-1.)*1000.
dumdum_isotopic_ratio_y=(np.array(dum_isotopic_ratio_y)/initial_isotopic_ratio_y[-1:]-1.)*1000.
dumdum_isotopic_ratio_x_tps=(np.array(dum_isotopic_ratio_x_tps)/initial_isotopic_ratio_x[-1:]-1.)*1000.
dumdum_isotopic_ratio_y_tps=(np.array(dum_isotopic_ratio_y_tps)/initial_isotopic_ratio_y[-1:]-1.)*1000.
dumdum_isotopic_ratio_x_tps_co=(np.array(dum_isotopic_ratio_x_tps_co)/initial_isotopic_ratio_x[-1:]-1.)*1000.
dumdum_isotopic_ratio_y_tps_co=(np.array(dum_isotopic_ratio_y_tps_co)/initial_isotopic_ratio_y[-1:]-1.)*1000.
isotopic_ratio_x.append(dumdum_isotopic_ratio_x)
isotopic_ratio_y.append(dumdum_isotopic_ratio_y)
isotopic_ratio_x_tps.append(dumdum_isotopic_ratio_x_tps)
isotopic_ratio_y_tps.append(dumdum_isotopic_ratio_y_tps)
isotopic_ratio_x_tps_co.append(dumdum_isotopic_ratio_x_tps_co)
isotopic_ratio_y_tps_co.append(dumdum_isotopic_ratio_y_tps_co)
k = k+1
mass_label =[]
for i in run_mass:
mass_label.append(float(i.se.get('mini')))
array_to_plot_x = isotopic_ratio_x
array_to_plot_y = isotopic_ratio_y
array_to_plot_x_tps = isotopic_ratio_x_tps
array_to_plot_y_tps = isotopic_ratio_y_tps
array_to_plot_x_tps_co = isotopic_ratio_x_tps_co
array_to_plot_y_tps_co = isotopic_ratio_y_tps_co
plt.rcParams['text.usetex'] = True
#plt.rcParams['axes.linewidth'] = 5
plt.rcParams['xtick.major.size'] = 20
plt.rcParams['xtick.major.width'] = 2#3
plt.rcParams['ytick.major.size'] = 20
plt.rcParams['ytick.major.width'] = 2#3
plt.rcParams['xtick.labelsize'] = 30
plt.rcParams['ytick.labelsize'] = 30
plt.tick_params(axis='both',pad=5,direction='in')
plt.axhline(y=0.,linewidth=2, color='k')
plt.axvline(x=0.,linewidth=2, color='k')
######################################
#if isotopes_y == ['Zr-90','Zr-94']:
# for i in range(len(zr90)):
# plt.plot(ratio6[i],ratio0[i],c=markers[i],ls=line[i],linewidth=2.)
# plt.plot(ratio6_co[i],ratio0_co[i],marker=symbols[i],ls=line[i],c=markers[i],markersize=20.,label=str(metallicity[i]))
#if isotopes_y == ['Zr-91','Zr-94']:
# for i in range(len(zr91)):
# plt.plot(ratio6[i],ratio1[i],c=markers[i],ls=line[i],linewidth=2.)
# plt.plot(ratio6_co[i],ratio1_co[i],marker=symbols[i],ls=line[i],c=markers[i],markersize=20.,label=str(metallicity[i]))
#
#if isotopes_y == ['Zr-92','Zr-94']:
# for i in range(len(zr92)):
# plt.plot(ratio6[i],ratio2[i],c=markers[i],ls=line[i],linewidth=2.)
# plt.plot(ratio6_co[i],ratio2_co[i],marker=symbols[i],ls=line[i],c=markers[i],markersize=20.,label=str(metallicity[i]))
#######################################
#plt.errorbar(x.astype(np.float64),y.astype(np.float64),xerr=2*xerr.astype(np.float64),yerr=2*yerr.astype(np.float64),marker=symbols[-2],c=markers[-2],ls='None',markersize=8.,label=reference1+', '+clas_2)
plt.errorbar(x2.astype(np.float64),y2.astype(np.float64),xerr=2*xerr2.astype(np.float64),yerr=2*yerr2.astype(np.float64),marker=symbols[-1],c=markers[-1],ls='None',markersize=8.,label=clas_2)
for k in range(0,len(array_to_plot_x)):
plt.plot(array_to_plot_x_tps[k],array_to_plot_y_tps[k],c=markers[k],ls=line[k],linewidth=2.)
plt.plot(array_to_plot_x_tps_co[k],array_to_plot_y_tps_co[k],marker=symbols[k],c=markers[k],ls=line[k],markersize=20.,linewidth=2.,label=str(metallicity_label[k]))
plt.xlabel(iso_ratio_111, fontsize=30)
plt.ylabel(iso_ratio_222, fontsize=30)
plt.legend(numpoints=1,prop={'size':15})
plt.show()
labels = df_plot['Grain Label'].values
labels2 = df_plot2['Grain Label'].values
for label, x, y in zip(labels, x, y):
plt.annotate(
label,
xy=(x, y), xytext=(-20, 20),
textcoords='offset points', #ha='right', va='bottom',
bbox=dict(boxstyle='round,pad=0.5', fc='white', alpha=0.5),
arrowprops=dict(arrowstyle = '->', connectionstyle='arc3,rad=0'))
for label2, x2, y2 in zip(labels2, x2, y2):
plt.annotate(
label2,
xy=(x2, y2), xytext=(-20, 20),
textcoords='offset points', #ha='right', va='bottom',
bbox=dict(boxstyle='round,pad=0.5', fc='white', alpha=0.5),
arrowprops=dict(arrowstyle = '->', connectionstyle='arc3,rad=0'))
#plt.show()