-
Notifications
You must be signed in to change notification settings - Fork 1
/
findsens.py
44 lines (35 loc) · 1.26 KB
/
findsens.py
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
import os
import pandas as pd
import numpy as np
cwd = os.getcwd()
def import_sensitivities(ratio, file_location=False, thermo=False):
"""
Ratio is the C/O starting gas ratio
file_location is the LSR C and O binding energy, fasle to load the base case
thermo is either False to load reaction sensitivities or True to load thermo sensitivities
"""
try:
# load in the sensitivity csv files
if file_location is False:
pd.read_csv('./base/sensitivities/' + str(ratio) + 'RxnSensitivity.csv')
else:
pd.read_csv('./' + str(file_location) + '/sensitivities/' + str(ratio) + 'RxnSensitivity.csv')
except:
print('Cannot find ' + str(ratio) + 'RxnSensitivity.csv for: ' + file_location)
array = os.listdir('./small-grid/')
array = sorted(array)
ratios = [0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6]
for f in array:
rxndata = []
thermodata = []
f = 'small-grid/' + f
for ratio in ratios:
import_sensitivities(ratio, file_location=f)
array = os.listdir('./large-grid/')
array = sorted(array)
for f in array:
rxndata = []
thermodata = []
f = 'large-grid/' + f
for ratio in ratios:
import_sensitivities(ratio, file_location=f)