SHIELD permeation rig data aquisition system
Project description
SHIELD permeation rig Data Aquisistion System
This is a tool to be used with the SHIELD hydrogen permeation rig, providing a way to both record data from the rig and have a live UI displaying plots of the pressure values in the gauges connected to the rig and the temperature of the connected thermocouple.
Example script
This is an example of a script that can be used to activate the DAS.
from shield_das import (
DataRecorder,
WGM701_Gauge,
DataPlotter,
CVM211_Gauge,
Baratron626D_Gauge
)
import time
import sys
# Define gauges
gauge_1 = WGM701_Gauge(
gauge_location="downstream",
export_filename="WGM701_pressure_data.csv",
)
gauge_2 = CVM211_Gauge(
gauge_location="upstream",
export_filename="CVM211_pressure_data.csv",
)
gauge_3 = Baratron626D_Gauge(
name="Baratron626D_1KT",
gauge_location="upstream",
export_filename="Baratron626D_1KT_upstream_pressure_data.csv",
full_scale_Torr=1000,
)
gauge_4 = Baratron626D_Gauge(
name="Baratron626D_1T",
gauge_location="downstream",
export_filename="Baratron626D_1T_downstream_pressure_data.csv",
full_scale_Torr=1,
)
# Create recorder
my_recorder = DataRecorder(
gauges=[gauge_1, gauge_2, gauge_3, gauge_4],
)
if __name__ == "__main__":
# Check if we're running in headless mode
headless = "--headless" in sys.argv
if headless:
# Start recorder directly in headless mode
my_recorder.start()
else:
# Create and start the plotter
plotter = DataPlotter(my_recorder)
plotter.start()
# Keep the main thread running (same for both modes)
try:
while True:
time.sleep(1)
# Print status every 10 seconds in headless mode
if headless and int(time.time()) % 10 == 0:
import datetime
print(f"Current time: {datetime.datetime.now()} - Recording in progress... Elapsed time: {my_recorder.elapsed_time:.1f}s")
except KeyboardInterrupt:
my_recorder.stop()
print("Recorder stopped")
Test mode
If the labjack is not connected, the program can be run in test_mode, where dummy data is generated which can then be recorded and veiwed for testing the program works.
It can be activate with the argument test_mode in the DataRecorder class:
# Create recorder
my_recorder = DataRecorder(
gauges=[gauge_1, gauge_2, gauge_3, gauge_4],
test_mode=True
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shield_das-0.1rc1.tar.gz.
File metadata
- Download URL: shield_das-0.1rc1.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d2e283ecdb4cb76c8caf91c5ae6768dadd6b58330a78f4ea6c2c2cccbd151f5
|
|
| MD5 |
fbc81a9baf942df9a588728436a845d0
|
|
| BLAKE2b-256 |
37e98502b88e32596db261609de58c3e1e1c7fd42ee1eed60febdc6bcc12f5d7
|
Provenance
The following attestation bundles were made for shield_das-0.1rc1.tar.gz:
Publisher:
python-publish.yml on PTTEPxMIT/SHIELD_DAS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shield_das-0.1rc1.tar.gz -
Subject digest:
3d2e283ecdb4cb76c8caf91c5ae6768dadd6b58330a78f4ea6c2c2cccbd151f5 - Sigstore transparency entry: 273592594
- Sigstore integration time:
-
Permalink:
PTTEPxMIT/SHIELD_DAS@1d1af95da5cf6e025bebb0a6b7b679bfbf10cdd8 -
Branch / Tag:
refs/tags/v0.1rc1 - Owner: https://github.com/PTTEPxMIT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1d1af95da5cf6e025bebb0a6b7b679bfbf10cdd8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file shield_das-0.1rc1-py3-none-any.whl.
File metadata
- Download URL: shield_das-0.1rc1-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4049087f491ec822d606efb3cd01465b7abce7537c9c6cc8fb7afd7173231b54
|
|
| MD5 |
f0b1d8dae63a26fa71cb17265a78ed28
|
|
| BLAKE2b-256 |
bcbae59c6b6e6bf994e53747fa1d512bb5db90ee551b4315058489a6eac51665
|
Provenance
The following attestation bundles were made for shield_das-0.1rc1-py3-none-any.whl:
Publisher:
python-publish.yml on PTTEPxMIT/SHIELD_DAS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shield_das-0.1rc1-py3-none-any.whl -
Subject digest:
4049087f491ec822d606efb3cd01465b7abce7537c9c6cc8fb7afd7173231b54 - Sigstore transparency entry: 273592600
- Sigstore integration time:
-
Permalink:
PTTEPxMIT/SHIELD_DAS@1d1af95da5cf6e025bebb0a6b7b679bfbf10cdd8 -
Branch / Tag:
refs/tags/v0.1rc1 - Owner: https://github.com/PTTEPxMIT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1d1af95da5cf6e025bebb0a6b7b679bfbf10cdd8 -
Trigger Event:
release
-
Statement type: