From 2e5dc270555a797d855a6750f0cf51efdfef6359 Mon Sep 17 00:00:00 2001 From: Cal Wing <20716204+calw20@users.noreply.github.com> Date: Tue, 22 Oct 2024 21:37:28 +1000 Subject: [PATCH] Finalise Graphing Steps --- data/x2s5823/_info.yaml | 2 +- data/x2s5824/_info.yaml | 2 +- data/x2s5827/_info.yaml | 2 +- data/x2s5829/_info.yaml | 2 +- data/x2s5830/_info.yaml | 2 +- data/x2s5831/_info.yaml | 2 +- data/x2s5832/_info.yaml | 2 +- main.py | 13 ++++++++----- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/data/x2s5823/_info.yaml b/data/x2s5823/_info.yaml index 2be6022..eacd58c 100644 --- a/data/x2s5823/_info.yaml +++ b/data/x2s5823/_info.yaml @@ -1,7 +1,7 @@ # Data Info File # Cal Wing - Oct 24 -long_name: "Shot 1 (x2s5823) - Fat Probe - 2024-10-15" +long_name: "Shot 1 (x2s5823) - Thick Probe (ST2) - 2024-10-15\nProtruding ST1 - Mars Entry Conditions" name: "Shot 1" date: "2024-10-15" time: "13:02" diff --git a/data/x2s5824/_info.yaml b/data/x2s5824/_info.yaml index bed30b7..7391b0b 100644 --- a/data/x2s5824/_info.yaml +++ b/data/x2s5824/_info.yaml @@ -1,7 +1,7 @@ # Data Info File # Cal Wing - Oct 24 -long_name: "Shot 2 (x2s5824) - Thin Probe - 2024-10-15" +long_name: "Shot 2 (x2s5824) - Thin Probe (ST2) - 2024-10-15\nProtruding ST2 - Mars Entry Conditions" name: "Shot 2" date: "2024-10-15" time: "17:18" diff --git a/data/x2s5827/_info.yaml b/data/x2s5827/_info.yaml index 1826328..af68499 100644 --- a/data/x2s5827/_info.yaml +++ b/data/x2s5827/_info.yaml @@ -1,7 +1,7 @@ # Data Info File # Cal Wing - Oct 24 -long_name: "Shot 2 (x2s5827) - Thin Probe Pair (ST2 & ST3) - 2024-10-16" +long_name: "Shot 2 (x2s5827) - Thin Probe Pair (ST2 & ST3) - 2024-10-16\nProtruding ST2 & ST3 - Mars Entry Conditions" name: "Shot 3" date: "2024-10-16" time: "18:40" diff --git a/data/x2s5829/_info.yaml b/data/x2s5829/_info.yaml index 8da2d56..fa60d8a 100644 --- a/data/x2s5829/_info.yaml +++ b/data/x2s5829/_info.yaml @@ -1,7 +1,7 @@ # Data Info File # Cal Wing - Oct 24 -long_name: "Shot 4 (x2s5829) - Thin Probe Pair (ST2 & ST3) - 2024-10-17" +long_name: "Shot 4 (x2s5829) - Thin Probe Pair (ST2 & ST3) - 2024-10-17\nProtruding ST2 & ST3 - Mars Entry Conditions" name: "Shot 4" date: "2024-10-17" time: "17:00" diff --git a/data/x2s5830/_info.yaml b/data/x2s5830/_info.yaml index 366b1f8..4d18865 100644 --- a/data/x2s5830/_info.yaml +++ b/data/x2s5830/_info.yaml @@ -1,7 +1,7 @@ # Data Info File # Cal Wing - Oct 24 -long_name: "Shot 5 (x2s5829) - Thin Probe Pair (ST2 & ST3) - 2024-10-17" +long_name: "Shot 5 (x2s5829) - Thin Probe Pair (ST2 & ST3) - 2024-10-17\nProtruding ST2 & ST3 - Mars Entry Conditions" name: "Shot 5" date: "2024-10-18" time: "08:51" diff --git a/data/x2s5831/_info.yaml b/data/x2s5831/_info.yaml index 0c4ebe3..fab190c 100644 --- a/data/x2s5831/_info.yaml +++ b/data/x2s5831/_info.yaml @@ -1,7 +1,7 @@ # Data Info File # Cal Wing - Oct 24 -long_name: "Shot 6 (x2s5829) - Thin Probe (ST1, ST2 & ST3) - 2024-10-18 - Flush ST2" +long_name: "Shot 6 (x2s5829) - Thin Probe Set (ST1, ST2 & ST3) - 2024-10-18\nProtruding ST1 & ST3, Flush ST2 (Only Gauge 1) - Mars Entry Conditions" comments: "G2 Pointless, Wasn't attached" name: "Shot 6" date: "2024-10-18" diff --git a/data/x2s5832/_info.yaml b/data/x2s5832/_info.yaml index 50a231a..d494550 100644 --- a/data/x2s5832/_info.yaml +++ b/data/x2s5832/_info.yaml @@ -1,7 +1,7 @@ # Data Info File # Cal Wing - Oct 24 -long_name: "Shot 7 (x2s5829) - Thin Probe Set (ST1, ST2 & ST3) - 2024-10-18\nFlush ST3 - Low Pressure, 'Pure' Air" +long_name: "Shot 7 (x2s5829) - Thin Probe Set (ST1, ST2 & ST3) - 2024-10-18\nProtruding ST1 & ST1, Flush ST3 (Only Gauge 1) - Low Pressure, 'Pure' Air Conditions" name: "Shot 6" date: "2024-10-18" time: "15:58" diff --git a/main.py b/main.py index f5b1bb0..2de0d8a 100644 --- a/main.py +++ b/main.py @@ -380,12 +380,13 @@ print("Loaded Data") #[TODO] Refactor def genGraph(gData: dict, showPlot: bool = True, doLimits: bool = True, forcePlots: bool = False, addShockInfo: bool = True): graphData = { - "title": f"Shock response Time\nFor {gData['info']['long_name']}", + "title": f"Shock Response Time\nFor {gData['info']['long_name']}", "xLabel": "Time ($\\mu$s)", "yLabel": "Voltage Reading (V)", "grid": True, - "figSize": (8,6.5), + "figSize": (9, 6.8), #(8,6.5), "ledgLoc": 'upper left', + "yLim": (-1.5, 11 if addShockInfo else 4), "plots": [] } @@ -463,7 +464,7 @@ def genGraph(gData: dict, showPlot: bool = True, doLimits: bool = True, forcePlo "text": f"Measured Shock Speeds {probeText}", "align": ("top", "right"), "alpha": 0.75, - "x": 0.94 if len(gData["info"]["probe-info"]["locations"]) < 3 else 0.885, + "x": 0.94, #if len(gData["info"]["probe-info"]["locations"]) < 3 else 0.885, "y": 0.94 }) @@ -476,12 +477,14 @@ def genGraph(gData: dict, showPlot: bool = True, doLimits: bool = True, forcePlo -print("Graphing Data") +#print("Graphing Data") for shot in loaded_data: - #if shot != loaded_data[-2]: continue + #print(data[shot]['info']['long_name'].rsplit("\n", 1)[-1]) genGraph(data[shot], showPlot=False, addShockInfo=False) genGraph(data[shot], showPlot=False, forcePlots=True) + + # This forces matplotlib to hang until I tell it to close all windows pltKeyClose()