forked from obobryshev/spectroscopy-oxygen-microwave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresults.py
executable file
·41 lines (32 loc) · 896 Bytes
/
results.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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 25 14:36:52 2021
@author: richard
"""
import os
import pyarts
import matplotlib.pyplot as plt
types ="O2-TRE05", "O2-MPM2020", "AER"
sim_res = os.listdir('Output')
out = {}
for typ in types:
out[typ] = ''
for fil in sim_res:
for typ in types:
if f"fgrid_{typ}" in fil:
if out[typ] == '':
out[typ] = fil
else:
if os.stat(f"Output/{out[typ]}").st_ctime < os.stat(f"Output/{fil}").st_ctime:
out[typ] = fil
for typ in types:
assert out[typ] != '', "Didn't find some of the requires data!"
plt.figure(1)
plt.clf()
for typ in types:
f = pyarts.xml.load(f"Output/{out[typ]}")
y = pyarts.xml.load(f"Output/{out[typ].replace(f'fgrid_{typ}_', f'iy_{typ}_midlat-s_')}")
plt.plot(f, y, label=typ)
plt.legend()
plt.show()