Compare commits
No commits in common. "bb6b47329c6f4f4648a124fe98bc45515652f36f" and "9c8c01f866435d9faa50210280e359491fdb3daf" have entirely different histories.
bb6b47329c
...
9c8c01f866
@ -8,11 +8,9 @@ time: "17:00"
|
|||||||
|
|
||||||
shot-info:
|
shot-info:
|
||||||
name: "x2s5829"
|
name: "x2s5829"
|
||||||
# These get formatted with the shot name
|
tdms: "x2s5829.tdms"
|
||||||
# [TODO] Think about overrides
|
config: "x2s5829.config"
|
||||||
tdms: "{0}.tdms"
|
info: "x2s5829.txt"
|
||||||
config: "{0}.config"
|
|
||||||
info: "{0}.txt"
|
|
||||||
|
|
||||||
# Canny Args
|
# Canny Args
|
||||||
canny-args:
|
canny-args:
|
||||||
@ -34,16 +32,15 @@ probe-info:
|
|||||||
c2c: 5.6 # mm
|
c2c: 5.6 # mm
|
||||||
gauge-diam: 0.8 # mm
|
gauge-diam: 0.8 # mm
|
||||||
gauge-c2c: 1.8 #mm
|
gauge-c2c: 1.8 #mm
|
||||||
|
data-record:
|
||||||
|
type: "scope"
|
||||||
|
config: "eProbe-Scope.txt"
|
||||||
|
data: "eProbe-Scope.csv"
|
||||||
|
|
||||||
data-records:
|
trigger: # Redundant?
|
||||||
- type: "scope"
|
type: "channel"
|
||||||
config: "eProbe-Scope.txt"
|
channel: 4
|
||||||
data: "eProbe-Scope.csv"
|
alignment-offset: 0 # 601 # us [TODO] Make this auto-magic
|
||||||
|
delay: 100 # us
|
||||||
trigger: # Redundant?
|
|
||||||
type: "channel"
|
|
||||||
channel: 4
|
|
||||||
alignment-offset: 0 # 601 # us [TODO] Make this auto-magic
|
|
||||||
delay: 100 # us
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
# Data Info File
|
|
||||||
# Cal Wing - Oct 24
|
|
||||||
|
|
||||||
long_name: "Shot 5 (x2s5829) - Thin Probe Pair (ST2 & ST3) - 2024-10-17"
|
|
||||||
name: "Shot 5"
|
|
||||||
date: "2024-10-18"
|
|
||||||
time: "08:51"
|
|
||||||
|
|
||||||
shot-info:
|
|
||||||
name: "x2s5830"
|
|
||||||
tdms: "{0}.tdms"
|
|
||||||
config: "{0}.config"
|
|
||||||
info: "{0}.txt"
|
|
||||||
|
|
||||||
# Canny Args
|
|
||||||
canny-args:
|
|
||||||
- sigma: 2
|
|
||||||
post_pres: 0.03
|
|
||||||
|
|
||||||
- sigma: 1
|
|
||||||
post_pres: 0.2
|
|
||||||
|
|
||||||
pcb-refs:
|
|
||||||
- "st1"
|
|
||||||
|
|
||||||
probe-info:
|
|
||||||
type: "Thin"
|
|
||||||
locations: # In order of pulse
|
|
||||||
- "st2"
|
|
||||||
- "st3"
|
|
||||||
overhang: 1 # mm
|
|
||||||
c2c: 5.6 # mm
|
|
||||||
gauge-diam: 0.8 # mm
|
|
||||||
gauge-c2c: 1.8 #mm
|
|
||||||
|
|
||||||
data-records:
|
|
||||||
- type: "scope"
|
|
||||||
config: "eProbe-Scope.txt"
|
|
||||||
data: "eProbe-Scope.csv"
|
|
||||||
|
|
||||||
trigger: # Redundant?
|
|
||||||
type: "channel"
|
|
||||||
channel: 4
|
|
||||||
alignment-offset: 0 # 601 # us [TODO] Make this auto-magic
|
|
||||||
delay: 100 # us
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,18 +0,0 @@
|
|||||||
ANALOG
|
|
||||||
Ch 1 Scale 500mV/, Pos 800.00mV, Coup DC, BW Limit Off, Inv Off, Imp 1M Ohm
|
|
||||||
Probe 10.000000 : 1, Skew 0.0s
|
|
||||||
Ch 2 Scale 500mV/, Pos 1.25000V, Coup DC, BW Limit Off, Inv Off, Imp 1M Ohm
|
|
||||||
Probe 10.000000 : 1, Skew 0.0s
|
|
||||||
Ch 4 Scale 1.00V/, Pos 2.85000V, Coup DC, BW Limit Off, Inv Off, Imp 1M Ohm
|
|
||||||
Probe 1.0000000 : 1, Skew 0.0s
|
|
||||||
|
|
||||||
TRIGGER
|
|
||||||
Sweep Mode Auto, Coup DC, Noise Rej Off, HF Rej Off, Holdoff 40.0ns
|
|
||||||
Mode Edge, Source Ch 4, Slope Rising, Level 1.00000V
|
|
||||||
|
|
||||||
HORIZONTAL
|
|
||||||
Mode Normal, Ref Center, Main Scale 500.0us/, Main Delay -100.000000us
|
|
||||||
|
|
||||||
ACQUISITION
|
|
||||||
Mode High Res, Realtime On, Vectors On, Persistence Off
|
|
||||||
|
|
Binary file not shown.
@ -1,49 +0,0 @@
|
|||||||
# x2s5830 config file
|
|
||||||
# This files contains a text version of the National Instruments PXI unit configuration data.
|
|
||||||
# Channels are represented as one line per configured signal with tab-separated values.
|
|
||||||
#
|
|
||||||
# Line content and types of values (first item is item 0):
|
|
||||||
# i item type comments
|
|
||||||
# --------------------------------------------------------------------------------------------------------
|
|
||||||
# 0 signal name string
|
|
||||||
# 1 channel ID string legacy I/O channel designation
|
|
||||||
# 2 external gain float 1 if there is no external amplifier connected
|
|
||||||
# 3 sensitivity float volts per measured unit (of the transducer)
|
|
||||||
# 4 units string name of units for physical quantity (e.g. kPa)
|
|
||||||
# 5 position float position of transducer (in mm)
|
|
||||||
# 6 serial number string transducer identity
|
|
||||||
# 7 PXI channel ID string non-legacy channel ID and trigger source
|
|
||||||
#---------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
sd1 2 0 9 1 9.500000E-4 kPa 0.000 112A24-9609 PXI1Slot2/ai0
|
|
||||||
sd2 2 1 9 1 9.500000E-4 kPa 0.000 113A22-9535 PXI1Slot2/ai1
|
|
||||||
sd3 2 3 9 1 6.820000E-4 kPa 0.000 112A24-2676 PXI1Slot2/ai3
|
|
||||||
st1 2 4 9 1 1.482000E-2 kPa 0.000 112A22-35071 PXI1Slot2/ai4
|
|
||||||
st2 5 4 9 1 1.168700E-2 kPa 0.000 112A22-35070 PXI1Slot5/ai4
|
|
||||||
st3 2 6 9 1 1.450000E-2 kPa 0.000 112A22-19126 PXI1Slot2/ai6
|
|
||||||
at1 3 0 9 1 1.443000E-2 kPa 0.000 112A22-35098 PXI1Slot3/ai0
|
|
||||||
at2 3 1 9 1 1.450000E-2 kPa 0.000 112A22-9050 PXI1Slot3/ai1
|
|
||||||
at3 3 2 9 1 1.447980E-2 kPa 0.000 112A22-19124 PXI1Slot3/ai2
|
|
||||||
at4 3 3 9 1 1.435000E-2 kPa 0.000 112A22-34424 PXI1Slot3/ai3
|
|
||||||
at5 3 4 9 1 1.447000E-2 kPa 0.000 112A22-34425 PXI1Slot3/ai4
|
|
||||||
at6 3 5 9 1 1.442000E-2 kPa 0.000 112A22-34426 PXI1Slot3/ai5
|
|
||||||
at7 2 7 9 1 1.451000E-2 kPa 0.000 112A22-35096 PXI1Slot2/ai7
|
|
||||||
at8 3 7 9 1 1.490000E-2 kPa 0.000 112A22-35079 PXI1Slot3/ai7
|
|
||||||
pimax4 5 1 9 1 1.000000E-3 mV 0.000 pimax4 PXI1Slot5/ai1
|
|
||||||
trigbox 5 7 9 1 1.000000E-3 mV 0.000 trigbox PXI1Slot5/ai7(Trigger)
|
|
||||||
trigbox_delay 5 5 9 1 1.000000E-3 mV 0.000 trigbox_delay PXI1Slot5/ai5
|
|
||||||
pt1 5 2 9 1 8.500000E-4 kPa 0.000 SN-22554 PXI1Slot5/ai2
|
|
||||||
irc800 8 4 9 1 1.000000E-3 mV 0.000 irc800 PXI1Slot8/ai4
|
|
||||||
shimadzu 8 6 9 1 1.000000E-3 mV 0.000 shimadzu PXI1Slot8/ai6
|
|
||||||
pimax3 8 7 9 1 1.000000E-3 mV 0.000 pimax3 PXI1Slot8/ai7
|
|
||||||
Phantom 8 2 9 1 1.000000E-3 mV 0.000 phantom PXI1Slot8/ai2
|
|
||||||
pt2 6 1 9 1 1.440000E-3 kPa 0.000 SN 22556 PXI1Slot6/ai1
|
|
||||||
pt3 6 2 9 1 1.810000E-3 kPa 0.000 SN 7446 PXI1Slot6/ai2
|
|
||||||
pt4 6 3 9 1 7.300000E-4 kPa 0.000 SN LW30649 PXI1Slot6/ai3
|
|
||||||
pt5 8 3 9 1 7.350000E-4 kPa 0.000 SN LW30651 PXI1Slot8/ai3
|
|
||||||
pt6 6 5 9 1 7.290000E-4 kPa 0.000 SN LW30652 PXI1Slot6/ai5
|
|
||||||
pt7 6 6 9 1 7.220000E-4 kPa 0.000 SN 22514 PXI1Slot6/ai6
|
|
||||||
pt8 3 6 9 1 1.430000E-3 kPa 0.000 SN 16785 PXI1Slot3/ai6
|
|
||||||
pt9 5 0 9 1 1.010000E-3 kPa 0.000 SN 7430 PXI1Slot5/ai0
|
|
||||||
photodiode 8 0 9 1 1.000000E+0 mV 0.000 photodiode PXI1Slot8/ai0
|
|
||||||
phantom_aperture 4 4 9 1 1.000000E-3 mV 0.000 phantom_aperture PXI1Slot4/ai4
|
|
20024
data/x2s5830/x2s5830.lvm
20024
data/x2s5830/x2s5830.lvm
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -1,161 +0,0 @@
|
|||||||
--------------------------------------------------------------------------------
|
|
||||||
Project.........................................Mars entry non-equilibrium expanding flows
|
|
||||||
Run number................................ x2s5830
|
|
||||||
Date............................................18/10/2024
|
|
||||||
Blame...........................................Mragank, Aaron
|
|
||||||
Condition................................... Mars condition, high density, Mars mixture
|
|
||||||
Reservoir..................................... 6.75 MPa
|
|
||||||
Driver............................................83520 Pa 90% He, 92.8 kPa Argon
|
|
||||||
Primary diaphragm.................... 2 mm scored, cold rolled steel 6U374
|
|
||||||
Shock tube................................... 62308 Pa ( pure co2)
|
|
||||||
Secondary diaphragm................ 10 micron mylar
|
|
||||||
Acceleration tube....................... 250 Pa lab air (set on new gauge on the bottom of the dump tank)
|
|
||||||
Trig.............................................. Pt5 (changed as wedge is ahead of pitot probes) slot8ai3 on tee piece 8ai4 - cable pt5
|
|
||||||
Lab environment...................... N/A
|
|
||||||
Driver Condition........................x2-lwp-2.0-90-0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
EXPERIMENT SETUP
|
|
||||||
|
|
||||||
pitot rake
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
EQUIPMENT
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
1x photodiode (350 - 1100nm)
|
|
||||||
1xShimadzu -- in use
|
|
||||||
1xmini-spec (200-1000nm)
|
|
||||||
Phantom
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-------------------------- SUSS Spectral Overview ----------------------------
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Dichroic 1 (UV/VIS): DMLP650L
|
|
||||||
Dichroic 2 (VIS/IR): DMLP900L
|
|
||||||
UV FOV: 8mm
|
|
||||||
VIS FOV: 8mm
|
|
||||||
IR FOV: 8mm
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
---UV---
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
N/A
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
---Visible---
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Spectrometer: Acton Spectrapro 2300i
|
|
||||||
Centre Wavelength: 775
|
|
||||||
Grating: 150
|
|
||||||
Camera: PIMAX4
|
|
||||||
Gain: 50
|
|
||||||
Delay: 80 us
|
|
||||||
Exposure: 50 us
|
|
||||||
Trigger level: 1V
|
|
||||||
Slit: 100 um
|
|
||||||
Filter:
|
|
||||||
Trigger: A3 cable from trigger box port 0
|
|
||||||
Monitor: T1 Cable
|
|
||||||
Aperture: 12.5 mm
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
---IR---
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Spectrometer: Acton Spectrapro 2500
|
|
||||||
Centre Wavelength: 1300
|
|
||||||
Grating: 75
|
|
||||||
Camera: IRC800
|
|
||||||
Delay: 100us setted in DAQ with 800 counts
|
|
||||||
Exposure: 20 us
|
|
||||||
Slit: 1000 um
|
|
||||||
Filter:
|
|
||||||
Trigger: T2 cable from trigger box port1
|
|
||||||
Monitor: PDTP1G Cable
|
|
||||||
Aperture: 12.5 mm
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Shimadzu
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Window : BK7 Diam 209mm top
|
|
||||||
Lens: Nikon AF Micro NIKKOR 200MM with 780-unknown? filter
|
|
||||||
Aperture-Number 16
|
|
||||||
Frame Rates 500.000 kFPS
|
|
||||||
Exposure: 1/2
|
|
||||||
Gain: x2(/x50)
|
|
||||||
Mode: External
|
|
||||||
Trigger @: 0/0 (0-99=100frames)
|
|
||||||
point: 10
|
|
||||||
Delay: 0 microseconds
|
|
||||||
Polarity: Pos
|
|
||||||
Monitor Expose: off
|
|
||||||
Filter:
|
|
||||||
Cables: Trigger: H6 cable from trigger box port 1
|
|
||||||
Monitor: H4 Cable
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
PHOTODIODE
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Location: Circle around stagnation point, pt5.
|
|
||||||
Filter: 777nm hydrogen filter actually. not sure which one...
|
|
||||||
Model number: (350-1100)
|
|
||||||
Lens: Unknown
|
|
||||||
Gain: 70
|
|
||||||
Fibre optic cable: Red
|
|
||||||
Aperture: None
|
|
||||||
BNC: A4
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
MINI-SPEC (200 - 1000nm)
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Location: Pt5 looking out into the flow
|
|
||||||
Filter: none
|
|
||||||
Window: 3mm fused silica from OGP optics.
|
|
||||||
Cable: New red cable
|
|
||||||
Lens: N/A
|
|
||||||
Delay: 80 us + 8 us internal
|
|
||||||
Integration time: 20 us
|
|
||||||
Aperture: N/A
|
|
||||||
Trigger level: 1 V
|
|
||||||
Filter: N/A
|
|
||||||
Trigger: A5 cable from trigger box port 0, with vis
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Phantom
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Window : side
|
|
||||||
Lens: Nikon AF Micro NIKKOR 105 mm focus
|
|
||||||
Aperture-Number 11
|
|
||||||
Frame Rates 110000.000 FPS
|
|
||||||
Exposure: 1 us
|
|
||||||
Gain: N/A
|
|
||||||
Mode: External
|
|
||||||
Delay: 0 microseconds
|
|
||||||
Polarity: Pos
|
|
||||||
Monitor Expose: off
|
|
||||||
Filter:
|
|
||||||
Cables: Trigger: B3 cable from trigger box port 2
|
|
||||||
Monitor: H4 Cable
|
|
||||||
|
|
||||||
|
|
||||||
UV phantom as well
|
|
||||||
|
|
||||||
LOG
|
|
||||||
X2s5815
|
|
||||||
Bad shot - very messy - oring ruptured in the secondary may have over pressurised with additional LAB Air.
|
|
||||||
X2s5816
|
|
||||||
Fired at 1.32Pa instead of 13.2pa.....
|
|
||||||
x2s5826
|
|
||||||
Phantom aperture was 18 in description for prev shot but was set to 22 for the prev shot
|
|
||||||
Phantom trig signal changed from falling to rising
|
|
||||||
|
|
66
main.py
66
main.py
@ -30,11 +30,10 @@ with open(TUNNEL_INFO_FILE, 'r') as file:
|
|||||||
TUNNEL_INFO = yaml.safe_load(file)
|
TUNNEL_INFO = yaml.safe_load(file)
|
||||||
|
|
||||||
data_to_load = [
|
data_to_load = [
|
||||||
#"x2s5823",
|
"x2s5823",
|
||||||
#"x2s5824",
|
"x2s5824",
|
||||||
#"x2s5827",
|
"x2s5827",
|
||||||
#"x2s5829",
|
"x2s5829",
|
||||||
"x2s5830",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# ==== Data Loading & Processing ====
|
# ==== Data Loading & Processing ====
|
||||||
@ -52,25 +51,16 @@ def load_data(data_path: str, data={}) -> dict:
|
|||||||
# Grab the shot name
|
# Grab the shot name
|
||||||
x2_shot = dataInfo["shot-info"]["name"]
|
x2_shot = dataInfo["shot-info"]["name"]
|
||||||
|
|
||||||
# Update shot-info values to use the name
|
|
||||||
dataInfo["shot-info"]["tdms"] = dataInfo["shot-info"]["tdms"].format(x2_shot)
|
|
||||||
dataInfo["shot-info"]["config"] = dataInfo["shot-info"]["config"].format(x2_shot)
|
|
||||||
dataInfo["shot-info"]["info"] = dataInfo["shot-info"]["info"].format(x2_shot)
|
|
||||||
|
|
||||||
# Load Raw Data
|
# Load Raw Data
|
||||||
# TDMS File (X2 DAQ Data)
|
# TDMS File (X2 DAQ Data)
|
||||||
x2_tdms_data = TdmsFile.read(data_path + dataInfo["shot-info"]['tdms'], raw_timestamps=True)
|
x2_tdms_data = TdmsFile.read(data_path + dataInfo["shot-info"]['tdms'], raw_timestamps=True)
|
||||||
x2_channels = x2_tdms_data.groups()[0].channels()
|
x2_channels = x2_tdms_data.groups()[0].channels()
|
||||||
x2_channel_names = tuple(c.name for c in x2_channels)
|
x2_channel_names = tuple(c.name for c in x2_channels)
|
||||||
|
|
||||||
data_locs = [dr["type"] for dr in dataInfo["probe-info"]["data-records"]]
|
|
||||||
|
|
||||||
# Scope info _if it exists_
|
# Scope info _if it exists_
|
||||||
if "scope" in data_locs:
|
if dataInfo["probe-info"]["data-record"]["type"] == "scope":
|
||||||
scope_data_info = dataInfo["probe-info"]["data-record"][data_locs.index("scope")]
|
scope_data_path = data_path + dataInfo["probe-info"]["data-record"]["data"]
|
||||||
|
scope_config_path = data_path + dataInfo["probe-info"]["data-record"]["config"] # [TODO] Read this file
|
||||||
scope_data_path = data_path + scope_data_info["data"]
|
|
||||||
scope_config_path = data_path + ["config"] # [TODO] Read this file
|
|
||||||
|
|
||||||
# Generate Data Headers - This could be better
|
# Generate Data Headers - This could be better
|
||||||
with open(scope_data_path, 'r') as dfile:
|
with open(scope_data_path, 'r') as dfile:
|
||||||
@ -110,14 +100,12 @@ def load_data(data_path: str, data={}) -> dict:
|
|||||||
},
|
},
|
||||||
"time": {
|
"time": {
|
||||||
"x2": None,
|
"x2": None,
|
||||||
"probes": None, # This may be x2 but may not - ie a scope was used
|
"trigger_index": None
|
||||||
"trigger_index": None,
|
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"x2": {}, # Only pop channels with a voltage scale in ./tunnel-info.yaml
|
"x2": {} # Only pop channels with a voltage scale in ./tunnel-info.yaml
|
||||||
"probes": {} # Save probe data
|
|
||||||
},
|
},
|
||||||
"shock-speed": {} # Note all in us
|
"shock-speed": {}
|
||||||
}
|
}
|
||||||
|
|
||||||
# === Process the data ===
|
# === Process the data ===
|
||||||
@ -151,16 +139,13 @@ def load_data(data_path: str, data={}) -> dict:
|
|||||||
# Add the time data
|
# Add the time data
|
||||||
data[x2_shot]["time"] = {
|
data[x2_shot]["time"] = {
|
||||||
"x2": x2_time_us,
|
"x2": x2_time_us,
|
||||||
"trigger_index": x2_trigger_index,
|
"trigger_index": x2_trigger_index
|
||||||
"probes": x2_time_us, # Until otherwise overridden - probe time is x2 time
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Scope timing _if it exists_
|
# Scope timing _if it exists_
|
||||||
if "scope" in data_locs:
|
if dataInfo["probe-info"]["data-record"]["type"] == "scope":
|
||||||
scope_data_info = dataInfo["probe-info"]["data-record"][data_locs.index("scope")]
|
trigger_info = dataInfo["probe-info"]["data-record"]["trigger"] # Get the scope trigger info
|
||||||
|
|
||||||
trigger_info = scope_data_info["trigger"] # Get the scope trigger info
|
|
||||||
|
|
||||||
# Calc the scope time & apply any manual offsets
|
# Calc the scope time & apply any manual offsets
|
||||||
scope_time = (scope_data[:, 0] - scope_data[0, 0]) * 1e6 # to us
|
scope_time = (scope_data[:, 0] - scope_data[0, 0]) * 1e6 # to us
|
||||||
@ -190,11 +175,6 @@ def load_data(data_path: str, data={}) -> dict:
|
|||||||
data[x2_shot]["data"]["scope"][i] = ref
|
data[x2_shot]["data"]["scope"][i] = ref
|
||||||
data[x2_shot]["data"]["scope"][header] = ref
|
data[x2_shot]["data"]["scope"][header] = ref
|
||||||
|
|
||||||
# Save Probe Data
|
|
||||||
if "scope" in data_locs:
|
|
||||||
data[x2_shot]["data"]["probes"] = data[x2_shot]["data"]["scope"][1:2]
|
|
||||||
data[x2_shot]["time"]["probes"] = data[x2_shot]["time"]["scope"]
|
|
||||||
|
|
||||||
|
|
||||||
# Find Shock Times
|
# Find Shock Times
|
||||||
# X2 - Canning Edge
|
# X2 - Canning Edge
|
||||||
@ -207,18 +187,18 @@ def load_data(data_path: str, data={}) -> dict:
|
|||||||
data[x2_shot]["shock-point"][ref] = shock_point, first_value
|
data[x2_shot]["shock-point"][ref] = shock_point, first_value
|
||||||
|
|
||||||
for i, probe in enumerate(dataInfo["probe-info"]["locations"]):
|
for i, probe in enumerate(dataInfo["probe-info"]["locations"]):
|
||||||
probeCh1 = data[x2_shot]["data"]["probes"][0]
|
probeCh1 = data[x2_shot]["data"]["scope"][1]
|
||||||
probeCh2 = data[x2_shot]["data"]["probes"][1]
|
probeCh2 = data[x2_shot]["data"]["scope"][2]
|
||||||
|
|
||||||
# Get the canny-args
|
# Get the canny-args
|
||||||
cArgs = dataInfo["canny-args"]
|
cArgs = dataInfo["canny-args"]
|
||||||
doCannyPlot = False
|
doCannyPlot = False
|
||||||
if i in range(len(cArgs)):
|
if i in range(len(cArgs)):
|
||||||
sigma = cArgs[i]["sigma"]
|
sigma = cArgs[i]["sigma"]
|
||||||
post_sup_thresh = cArgs[i]["post_pres"]
|
post_pres = cArgs[i]["post_pres"]
|
||||||
else:
|
else:
|
||||||
sigma = cArgs[-1]["sigma"]
|
sigma = cArgs[-1]["sigma"]
|
||||||
post_sup_thresh = cArgs[-1]["post_pres"]
|
post_pres = cArgs[-1]["post_pres"]
|
||||||
|
|
||||||
# If this _isn't_ the first probe then apply a time offset
|
# If this _isn't_ the first probe then apply a time offset
|
||||||
if i > 0:
|
if i > 0:
|
||||||
@ -228,11 +208,7 @@ def load_data(data_path: str, data={}) -> dict:
|
|||||||
time_offset = None
|
time_offset = None
|
||||||
|
|
||||||
# Find G1 Shock Time
|
# Find G1 Shock Time
|
||||||
first_value, first_value_uncertainty, _, _ = canny_shock_finder(scope_time, probeCh1, sigma=sigma, post_suppression_threshold=post_sup_thresh, plot=doCannyPlot, start_time=time_offset, print_func=None)
|
first_value, first_value_uncertainty, _, _ = canny_shock_finder(scope_time, probeCh1, sigma=sigma, post_suppression_threshold=post_pres, plot=doCannyPlot, start_time=time_offset, print_func=None)
|
||||||
if first_value is None:
|
|
||||||
print(f"[ERROR] {x2_shot} - {probe}-g1 could not be detected using: Sigma = {sigma}, post_suppression_threshold = {post_sup_thresh}")
|
|
||||||
raise ValueError(f"{probe}-g1 not detected")
|
|
||||||
|
|
||||||
shock_point = np.where(scope_time >= first_value)[0][0] # [BUG] Seems to give n+1
|
shock_point = np.where(scope_time >= first_value)[0][0] # [BUG] Seems to give n+1
|
||||||
|
|
||||||
data[x2_shot]["shock-point"][f"{probe}-g1"] = shock_point, first_value
|
data[x2_shot]["shock-point"][f"{probe}-g1"] = shock_point, first_value
|
||||||
@ -242,11 +218,7 @@ def load_data(data_path: str, data={}) -> dict:
|
|||||||
time_offset = data[x2_shot]["shock-point"][f"{privPoint}-g2"][1] + CANNY_TIME_OFFSET
|
time_offset = data[x2_shot]["shock-point"][f"{privPoint}-g2"][1] + CANNY_TIME_OFFSET
|
||||||
|
|
||||||
# Find G2 Shock Time
|
# Find G2 Shock Time
|
||||||
first_value, first_value_uncertainty, _, _ = canny_shock_finder(scope_time, probeCh2, sigma=sigma, post_suppression_threshold=post_sup_thresh, plot=doCannyPlot, start_time=time_offset, print_func=None)
|
first_value, first_value_uncertainty, _, _ = canny_shock_finder(scope_time, probeCh2, sigma=sigma, post_suppression_threshold=post_pres, plot=doCannyPlot, start_time=time_offset, print_func=None)
|
||||||
if first_value is None:
|
|
||||||
print(f"[ERROR] {x2_shot} - {probe}-g2 could not be detected using: Sigma = {sigma}, post_suppression_threshold = {post_sup_thresh}")
|
|
||||||
raise ValueError(f"{probe}-g2 not detected")
|
|
||||||
|
|
||||||
shock_point = np.where(scope_time >= first_value)[0][0] # [BUG] Seems to give n+1
|
shock_point = np.where(scope_time >= first_value)[0][0] # [BUG] Seems to give n+1
|
||||||
data[x2_shot]["shock-point"][f"{probe}-g2"] = shock_point, first_value
|
data[x2_shot]["shock-point"][f"{probe}-g2"] = shock_point, first_value
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user