quick refactor and addition of README
This commit is contained in:
parent
3398414b55
commit
c4b0dd1fef
19
README.md
Normal file
19
README.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Ionization Probe Analysis Code
|
||||
|
||||
> Written by Cal Wing (c.wing@uq.net.au - 45811953) in 2024 for his Thesis
|
||||
|
||||
## Installation
|
||||
|
||||
Run `pip install -r requirements.txt` or equivilient for your envoroment.
|
||||
|
||||
## Running
|
||||
|
||||
Run `main.py` it will then generate all the output graphs and put them in (a git untracked) folder called `./images`.
|
||||
|
||||
By default all data graphs will be generated - you need to change the functions called at the end
|
||||
|
||||
## `./data` Explanation
|
||||
|
||||
I like YAML files to store information. All the data shot folders have a file call `_info.yaml` this file contained all the info about the shot so that when it would load & be graphed it would be correct.
|
||||
|
||||
I hope the values are self explanatory but they may not - sorry.
|
64
main.py
64
main.py
@ -29,22 +29,6 @@ CANNY_TIME_OFFSET = 50 #us
|
||||
with open(TUNNEL_INFO_FILE, 'r') as file:
|
||||
TUNNEL_INFO = yaml.safe_load(file)
|
||||
|
||||
data_to_load = [
|
||||
"x2s5823",
|
||||
"x2s5824",
|
||||
"x2s5827",
|
||||
"x2s5829",
|
||||
"x2s5830",
|
||||
"x2s5831",
|
||||
"x2s5832"
|
||||
]
|
||||
|
||||
ref_data_to_load = [
|
||||
"x2s5820",
|
||||
"x2s5821",
|
||||
"x2s5822"
|
||||
]
|
||||
|
||||
# ==== Uncerts ====
|
||||
# Taken from DOI: 10.1007/s00193-017-0763-3 (Implementation of a state-to-state analytical framework for the calculation of expansion tube flow properties)
|
||||
|
||||
@ -1134,34 +1118,50 @@ for refShot in ref_data_to_load:
|
||||
print("Loaded Data")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
data_to_load = [
|
||||
"x2s5823",
|
||||
"x2s5824",
|
||||
"x2s5827",
|
||||
"x2s5829",
|
||||
"x2s5830",
|
||||
"x2s5831",
|
||||
"x2s5832"
|
||||
]
|
||||
|
||||
print("Graphing Data")
|
||||
ref_data_to_load = [
|
||||
"x2s5820",
|
||||
"x2s5821",
|
||||
"x2s5822"
|
||||
]
|
||||
|
||||
# General Shot Graphing
|
||||
for shot in loaded_data:
|
||||
print("Graphing Data")
|
||||
|
||||
# General Shot Graphing
|
||||
for shot in loaded_data:
|
||||
#print(data[shot]['info']['long_name'].rsplit("\n", 1)[-1])
|
||||
genGraph(data[shot], showPlot=False, addShockInfo=False)
|
||||
genGraph(data[shot], showPlot=False, forcePlots=True)
|
||||
|
||||
combo_data = data.copy()
|
||||
combo_data.pop(loaded_data[-2])
|
||||
combo_data.pop(loaded_data[-1])
|
||||
combo_data = data.copy()
|
||||
combo_data.pop(loaded_data[-2])
|
||||
combo_data.pop(loaded_data[-1])
|
||||
|
||||
genComboDataGraph(combo_data, doShockLabels=True)
|
||||
genComboDataGraph(combo_data, doShockLabels=True)
|
||||
|
||||
|
||||
genX2CompGraphs(data["x2s5831"], showPlot=False)
|
||||
genX2CompGraphs(data["x2s5832"], showPlot=False)
|
||||
genX2CompGraphs(data["x2s5831"], showPlot=False)
|
||||
genX2CompGraphs(data["x2s5832"], showPlot=False)
|
||||
|
||||
# Reference Data
|
||||
for shot in ref_data:
|
||||
# Reference Data
|
||||
for shot in ref_data:
|
||||
genRefGraph(ref_data[shot], showPlot=False, addShockInfo=False)
|
||||
genRefGraph(ref_data[shot], showPlot=False, forcePlots=True)
|
||||
|
||||
genComboRefGraph(ref_data, doShockLabels=True)
|
||||
genComboRefGraph(ref_data, ref_data[ref_data_to_load[0]]["info"]["pcb-refs"], addShockInfo=True)
|
||||
genComboRefGraph(ref_data, doShockLabels=True)
|
||||
genComboRefGraph(ref_data, ref_data[ref_data_to_load[0]]["info"]["pcb-refs"], addShockInfo=True)
|
||||
|
||||
|
||||
# This forces matplotlib to hang until I tell it to close all windows
|
||||
pltKeyClose()
|
||||
print("Done")
|
||||
# This forces matplotlib to hang until I tell it to close all windows
|
||||
pltKeyClose()
|
||||
print("Done")
|
Loading…
x
Reference in New Issue
Block a user