-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprecursorRun.py
64 lines (42 loc) · 1.92 KB
/
precursorRun.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/python3
"""Written for Python 3.12
Jeffrey Johnston [email protected] March 2024"""
import logging
LEVEL = logging.INFO
logger = logging.getLogger(__name__)
import re
import constants as const
import utils
import precursorAveraging
import precursorTransform
import precursorIntensity
import precursorProfile
import precursorIntensityAlt
################################################################################
def main():
cases = [path for path in const.CASES_DIR.iterdir()
if path.is_dir() and re.fullmatch('p[0-9]{3}', path.name)]
logger.info(f'Found {len(cases)} precursor cases')
for casedir in cases:
casename = casedir.name
precursorAveraging.precursorAveraging(casename)
precursorTransform.precursorTransform(casename)
precursorIntensity.precursorIntensity(casename)
########################################################################
width = 4000
if casename in ['p001', 'p005', 'p013', 'p011']: # NBL
starttime = 16000
elif casename in ['p003', 'p008', 'p014', 'p012']: # CBL
starttime = 8000
precursorProfile.precursorProfile(casename,width,starttime)
precursorIntensityAlt.precursorIntensityAlt(casename,width,starttime)
########################################################################
if casename == 'p001': # NBL, long runtime
starttime = 80000
precursorProfile.precursorProfile(casename,width,starttime)
precursorProfile.precursorProfile(casename,width,offset=3000)
precursorIntensityAlt.precursorIntensityAlt(casename,width,starttime)
################################################################################
if __name__ == '__main__':
utils.configure_root_logger(level=LEVEL)
main()