initial commit - insecure security_key
This commit is contained in:
commit
2144a97a10
288
.gitignore
vendored
Normal file
288
.gitignore
vendored
Normal file
@ -0,0 +1,288 @@
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/tags,python,django
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=tags,python,django
|
||||
|
||||
### Django ###
|
||||
*.log
|
||||
*.pot
|
||||
*.pyc
|
||||
__pycache__/
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
media
|
||||
|
||||
# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
|
||||
# in your Git repository. Update and uncomment the following line accordingly.
|
||||
# <django-project-name>/staticfiles/
|
||||
|
||||
### Django.Python Stack ###
|
||||
# Byte-compiled / optimized / DLL files
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
||||
# Django stuff:
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/#use-with-ide
|
||||
.pdm.toml
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
### Python ###
|
||||
# Byte-compiled / optimized / DLL files
|
||||
|
||||
# C extensions
|
||||
|
||||
# Distribution / packaging
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
|
||||
# Installer logs
|
||||
|
||||
# Unit test / coverage reports
|
||||
|
||||
# Translations
|
||||
|
||||
# Django stuff:
|
||||
|
||||
# Flask stuff:
|
||||
|
||||
# Scrapy stuff:
|
||||
|
||||
# Sphinx documentation
|
||||
|
||||
# PyBuilder
|
||||
|
||||
# Jupyter Notebook
|
||||
|
||||
# IPython
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/#use-with-ide
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
|
||||
# Celery stuff
|
||||
|
||||
# SageMath parsed files
|
||||
|
||||
# Environments
|
||||
|
||||
# Spyder project settings
|
||||
|
||||
# Rope project settings
|
||||
|
||||
# mkdocs documentation
|
||||
|
||||
# mypy
|
||||
|
||||
# Pyre type checker
|
||||
|
||||
# pytype static type analyzer
|
||||
|
||||
# Cython debug symbols
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
|
||||
### Python Patch ###
|
||||
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
||||
poetry.toml
|
||||
|
||||
# ruff
|
||||
.ruff_cache/
|
||||
|
||||
# LSP config files
|
||||
pyrightconfig.json
|
||||
|
||||
### Tags ###
|
||||
# Ignore tags created by etags, ctags, gtags (GNU global) and cscope
|
||||
TAGS
|
||||
.TAGS
|
||||
!TAGS/
|
||||
tags
|
||||
.tags
|
||||
!tags/
|
||||
gtags.files
|
||||
GTAGS
|
||||
GRTAGS
|
||||
GPATH
|
||||
GSYMS
|
||||
cscope.files
|
||||
cscope.out
|
||||
cscope.in.out
|
||||
cscope.po.out
|
||||
tags.lock
|
||||
tags.temp
|
||||
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/tags,python,django
|
||||
|
0
benchtopdevices/benchtopdevices/__init__.py
Normal file
0
benchtopdevices/benchtopdevices/__init__.py
Normal file
16
benchtopdevices/benchtopdevices/asgi.py
Normal file
16
benchtopdevices/benchtopdevices/asgi.py
Normal file
@ -0,0 +1,16 @@
|
||||
"""
|
||||
ASGI config for benchtopdevices project.
|
||||
|
||||
It exposes the ASGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'benchtopdevices.settings')
|
||||
|
||||
application = get_asgi_application()
|
134
benchtopdevices/benchtopdevices/settings.py
Normal file
134
benchtopdevices/benchtopdevices/settings.py
Normal file
@ -0,0 +1,134 @@
|
||||
"""
|
||||
Django settings for benchtopdevices project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 4.2.3.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/4.2/topics/settings/
|
||||
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/4.2/ref/settings/
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-=$1$b*-dgj6+@&-=yl*xsw@if=t%em(u_-i_^p4+-k0^nsg=--'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'debug_toolbar',
|
||||
'sheets'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'benchtopdevices.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'benchtopdevices.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/4.2/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'America/New_York'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/4.2/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
INTERNAL_IPS = [
|
||||
# ...
|
||||
"127.0.0.1",
|
||||
# ...
|
||||
]
|
||||
|
24
benchtopdevices/benchtopdevices/urls.py
Normal file
24
benchtopdevices/benchtopdevices/urls.py
Normal file
@ -0,0 +1,24 @@
|
||||
"""
|
||||
URL configuration for benchtopdevices project.
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/4.2/topics/http/urls/
|
||||
Examples:
|
||||
Function views
|
||||
1. Add an import: from my_app import views
|
||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
||||
Class-based views
|
||||
1. Add an import: from other_app.views import Home
|
||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
||||
Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('', include('sheets.urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
path("__debug__/", include("debug_toolbar.urls")),
|
||||
]
|
16
benchtopdevices/benchtopdevices/wsgi.py
Normal file
16
benchtopdevices/benchtopdevices/wsgi.py
Normal file
@ -0,0 +1,16 @@
|
||||
"""
|
||||
WSGI config for benchtopdevices project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'benchtopdevices.settings')
|
||||
|
||||
application = get_wsgi_application()
|
22
benchtopdevices/manage.py
Executable file
22
benchtopdevices/manage.py
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""Run administrative tasks."""
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'benchtopdevices.settings')
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
raise ImportError(
|
||||
"Couldn't import Django. Are you sure it's installed and "
|
||||
"available on your PYTHONPATH environment variable? Did you "
|
||||
"forget to activate a virtual environment?"
|
||||
) from exc
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
0
benchtopdevices/sheets/__init__.py
Normal file
0
benchtopdevices/sheets/__init__.py
Normal file
3
benchtopdevices/sheets/admin.py
Normal file
3
benchtopdevices/sheets/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
benchtopdevices/sheets/apps.py
Normal file
6
benchtopdevices/sheets/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class SheetsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'sheets'
|
26
benchtopdevices/sheets/forms.py
Normal file
26
benchtopdevices/sheets/forms.py
Normal file
@ -0,0 +1,26 @@
|
||||
from django import forms
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class UploadFileForm(forms.Form):
|
||||
instrument = forms.CharField()
|
||||
customer_name = forms.CharField()
|
||||
customer_address = forms.CharField()
|
||||
control_number = forms.CharField()
|
||||
serial_number = forms.CharField()
|
||||
accuracy = forms.FloatField(initial=0.05, widget=forms.NumberInput(attrs={'step': 0.01}))
|
||||
barometric_pressure = forms.FloatField(widget=forms.NumberInput(attrs={'step': 0.01, 'max': 1100, 'min': 800}))
|
||||
temperature = forms.FloatField(widget=forms.NumberInput(attrs={'step': 0.01, 'max': 1000.0, 'min': -459.67}))
|
||||
humidity = forms.FloatField(widget=forms.NumberInput(attrs={'step': 0.01, 'max': 100.0, 'min': 0.0}))
|
||||
|
||||
CHOICES = [
|
||||
('TV', _('Transducer Verify')),
|
||||
('HC', _('Hardware Calibration'))
|
||||
]
|
||||
|
||||
report_type = forms.ChoiceField(
|
||||
widget=forms.RadioSelect,
|
||||
choices=CHOICES,
|
||||
)
|
||||
file = forms.FileField()
|
0
benchtopdevices/sheets/migrations/__init__.py
Normal file
0
benchtopdevices/sheets/migrations/__init__.py
Normal file
12
benchtopdevices/sheets/models.py
Normal file
12
benchtopdevices/sheets/models.py
Normal file
@ -0,0 +1,12 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class Configuration(models.Model):
|
||||
sertial = models.CharField(max_length = 200)
|
||||
description = models.TextField()
|
||||
calibration_date = models.DateField()
|
||||
calibration_due_date = models.DateField()
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.serial} {self.description}"
|
2
benchtopdevices/sheets/parsers/__init__.py
Normal file
2
benchtopdevices/sheets/parsers/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
from .hardware import parse_hardware_calibration
|
||||
from .transducer import parse_transducer
|
68
benchtopdevices/sheets/parsers/hardware.py
Normal file
68
benchtopdevices/sheets/parsers/hardware.py
Normal file
@ -0,0 +1,68 @@
|
||||
import re
|
||||
|
||||
|
||||
def parse_instrument_info(text):
|
||||
instrument_info = {}
|
||||
# Regex pattern for key-value pairs in the instrument info section
|
||||
for line in text.split("\n")[2:]:
|
||||
if line:
|
||||
key, value = re.sub(r"\s\s+", "`", line.strip()).split("`")
|
||||
instrument_info[key.strip()] = value.strip()
|
||||
return instrument_info
|
||||
|
||||
|
||||
def parse_ports(text):
|
||||
text = f"{text}\n\n" # ensure extra newline to match on
|
||||
pattern = r"(Test Port \d)"
|
||||
matches = re.split(pattern, text)[1:]
|
||||
m = dict(list(zip(matches[0::2], matches[1::2])))
|
||||
calibration_data = {}
|
||||
for port, calibration in m.items():
|
||||
calibration_data[port] = parse_calibration_data(calibration)
|
||||
return calibration_data
|
||||
|
||||
|
||||
KEEP = {
|
||||
"Mass Flow Trans": ("Instrument Flow", "Master Reading"),
|
||||
"Pressure Transducer": ("Instrument Pressure", "Master Value"),
|
||||
}
|
||||
|
||||
|
||||
def parse_calibration_data(text):
|
||||
# Regex pattern for each block in the calibration data section per Port
|
||||
pattern = r"(Mass Flow Trans|Pressure Transducer)\n(.+?)\n\n"
|
||||
matches = re.findall(pattern, text, re.DOTALL)
|
||||
calibration_data = {}
|
||||
for block_title, block_content in matches:
|
||||
lines = block_content.strip().split("\n")
|
||||
lines.pop(0) # Go away =======
|
||||
device_name = lines.pop(0).strip().split(None, 1)[-1].strip()
|
||||
device_data = {"name": device_name}
|
||||
for line in lines:
|
||||
key, value = re.sub(r"\s\s+", "`", line.strip()).split("`")
|
||||
# Only keep the fields we want
|
||||
for start in KEEP[block_title]:
|
||||
key = key.strip()
|
||||
if key.startswith(start):
|
||||
device_data[key] = value.strip()
|
||||
calibration_data[block_title] = device_data
|
||||
return calibration_data
|
||||
|
||||
|
||||
def parse_hardware_calibration(content):
|
||||
# Split the content into instrument info and calibration data sections
|
||||
info_section, calibration_section = content.split(
|
||||
"|| Hardware Calibration Report ||"
|
||||
)
|
||||
|
||||
instrument_info = parse_instrument_info(info_section)
|
||||
calibration_data = parse_ports(calibration_section)
|
||||
|
||||
return {"instrument": instrument_info, "calibration": calibration_data}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
file_path = "./hardware_calibration.txt" # Replace with the actual file path
|
||||
with open(file_path, "r") as file:
|
||||
content = file.read()
|
||||
data = parse_file(file_path)
|
77
benchtopdevices/sheets/parsers/transducer.py
Normal file
77
benchtopdevices/sheets/parsers/transducer.py
Normal file
@ -0,0 +1,77 @@
|
||||
from decimal import *
|
||||
|
||||
import re
|
||||
|
||||
|
||||
def parse_transducer(content):
|
||||
getcontext().prec = 3
|
||||
transducer_data = []
|
||||
|
||||
# Split the content into sections based on the blank line
|
||||
sections = content.strip().split("\n\n")
|
||||
|
||||
for section in sections:
|
||||
# Split each section into lines
|
||||
lines = section.strip().split("\n")
|
||||
lines = [
|
||||
line.strip()
|
||||
for line in lines
|
||||
if not line.startswith("==") and line != "|| Transducer Verify Report ||"
|
||||
]
|
||||
lines.pop(0)
|
||||
|
||||
# Extract the Transducer number and Transducer type
|
||||
transducer_line = lines.pop(0).strip()
|
||||
_, transducer_name, part_number = transducer_line.split(None, 2)
|
||||
|
||||
# Get part number and values
|
||||
value = None
|
||||
transducer_type = None
|
||||
if part_number != "Custom":
|
||||
value = part_number.split()[-1]
|
||||
part_number = part_number.split()[1]
|
||||
if value.endswith("SCCM"):
|
||||
transducer_type = "Flow"
|
||||
if value.endswith("PSIA"):
|
||||
transducer_type = "Pressure"
|
||||
|
||||
# Create a dictionary to store the data for each transducer
|
||||
transducer_info = {
|
||||
"Part Number": part_number,
|
||||
"Value": value,
|
||||
"Transducer Name": transducer_name,
|
||||
"Transducer Type": transducer_type,
|
||||
"Setpoint Pressure": [],
|
||||
"Instrument Pressure": [],
|
||||
"Master Value": [],
|
||||
"Instrument Flow": [],
|
||||
"Verify Date": "",
|
||||
"Verify Time": "",
|
||||
}
|
||||
|
||||
# Extract other information for the transducer
|
||||
for line in lines:
|
||||
key, value = re.sub(r"\s\s+", ",", line.strip()).split(",")
|
||||
if "Verify Date" in key:
|
||||
transducer_info["Verify Date"] = value
|
||||
continue
|
||||
elif "Verify Time" in key:
|
||||
transducer_info["Verify Time"] = value
|
||||
continue
|
||||
|
||||
# Toss anything else where it belongs
|
||||
v = Decimal(value.split(" ")[0])
|
||||
key = re.match(r"(.*)\W(\d)", key)[1]
|
||||
if key in transducer_info:
|
||||
transducer_info[key].append(Decimal(value.split()[0]))
|
||||
|
||||
transducer_data.append(transducer_info)
|
||||
|
||||
return transducer_data
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
file_path = "./transducer_verify.txt"
|
||||
with open(file_path, "r") as file:
|
||||
content = file.read()
|
||||
parsed_data = parse_transducer(file_path)
|
0
benchtopdevices/sheets/templates/sheets/index.html
Normal file
0
benchtopdevices/sheets/templates/sheets/index.html
Normal file
7
benchtopdevices/sheets/templates/sheets/upload.html
Normal file
7
benchtopdevices/sheets/templates/sheets/upload.html
Normal file
@ -0,0 +1,7 @@
|
||||
<form action="." method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
3
benchtopdevices/sheets/tests.py
Normal file
3
benchtopdevices/sheets/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
6
benchtopdevices/sheets/urls.py
Normal file
6
benchtopdevices/sheets/urls.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.upload_file, name = 'upload')
|
||||
]
|
18
benchtopdevices/sheets/views.py
Normal file
18
benchtopdevices/sheets/views.py
Normal file
@ -0,0 +1,18 @@
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import render
|
||||
from .forms import UploadFileForm
|
||||
from .parsers import parse_transducer, parse_hardware_calibration
|
||||
|
||||
|
||||
|
||||
def upload_file(request):
|
||||
if request.method == "POST":
|
||||
breakpoint()
|
||||
f = UploadFileForm(request.POST, request.FILES)
|
||||
if f.is_valid():
|
||||
data = f.clean()
|
||||
content = request.FILES['file'].read()
|
||||
return HttpResponseRedirect("/success/url/")
|
||||
else:
|
||||
form = UploadFileForm()
|
||||
return render(request, "sheets/upload.html", {"form": form})
|
538
hardware_calibration.txt
Normal file
538
hardware_calibration.txt
Normal file
@ -0,0 +1,538 @@
|
||||
|| Instrument Info ||
|
||||
|
||||
Instrument Name Chassis2 Adult
|
||||
Serial Number BBP1736
|
||||
Time 11:31:39
|
||||
Date 07/12/2022
|
||||
|
||||
|
||||
|| Hardware Calibration Report ||
|
||||
|
||||
Hardware 0
|
||||
===============================================================
|
||||
Test Port 1
|
||||
===========================================================
|
||||
|
||||
|
||||
Mass Flow Trans
|
||||
===========================================================
|
||||
Transducer Custom
|
||||
Input AIN 2
|
||||
Setpoint Pressure 1 25.000 psig
|
||||
Setpoint Pressure 2 25.000 psig
|
||||
Setpoint Pressure 3 25.000 psig
|
||||
Setpoint Pressure 4 25.000 psig
|
||||
Setpoint Pressure 5 25.000 psig
|
||||
Setpoint Pressure 6 25.000 psig
|
||||
Analog Value 1 8688254 cnts
|
||||
Analog Value 2 9864771 cnts
|
||||
Analog Value 3 11053088 cnts
|
||||
Analog Value 4 12185889 cnts
|
||||
Analog Value 5 13357767 cnts
|
||||
Analog Value 6 14524278 cnts
|
||||
Master Value 1 0.041 sccm
|
||||
Master Value 2 4.059 sccm
|
||||
Master Value 3 8.150 sccm
|
||||
Master Value 4 11.980 sccm
|
||||
Master Value 5 15.995 sccm
|
||||
Master Value 6 19.985 sccm
|
||||
Linearity 0.129 %
|
||||
Last Cal Date 12/07/2020
|
||||
Last Cal Time 10:35:20
|
||||
Xdcr Filter Code Median
|
||||
Xdcr Typ Residual 108.000
|
||||
Xdcr Zero LL 0.000 cnts
|
||||
Xdcr Zero HL 0.000 cnts
|
||||
Xdcr Zero Lwin 0.000
|
||||
Xdcr Zero Hwin 0.000
|
||||
Xdcr Analog Min 0.000 cnts
|
||||
Xdcr Analog Max 0.000 cnts
|
||||
Xdcr Base Min 0.000
|
||||
Xdcr Base Max 0.000
|
||||
Setpoint Pressure 1 5.800 psig
|
||||
Setpoint Pressure 2 5.800 psig
|
||||
Setpoint Pressure 3 5.800 psig
|
||||
Setpoint Pressure 4 5.800 psig
|
||||
Setpoint Pressure 5 5.800 psig
|
||||
Setpoint Pressure 6 5.800 psig
|
||||
Instrument Pressure 1 5.824 psig
|
||||
Instrument Pressure 2 5.822 psig
|
||||
Instrument Pressure 3 5.820 psig
|
||||
Instrument Pressure 4 5.818 psig
|
||||
Instrument Pressure 5 5.816 psig
|
||||
Instrument Pressure 6 5.815 psig
|
||||
Instrument Flow 1 0.038 sccm
|
||||
Instrument Flow 2 4.075 sccm
|
||||
Instrument Flow 3 8.151 sccm
|
||||
Instrument Flow 4 12.124 sccm
|
||||
Instrument Flow 5 16.213 sccm
|
||||
Instrument Flow 6 20.165 sccm
|
||||
Master Value 1 0.000 sccm
|
||||
Master Value 2 4.000 sccm
|
||||
Master Value 3 8.000 sccm
|
||||
Master Value 4 12.000 sccm
|
||||
Master Value 5 16.000 sccm
|
||||
Master Value 6 20.000 sccm
|
||||
Master Reading 1 0.000 sccm
|
||||
Master Reading 2 4.000 sccm
|
||||
Master Reading 3 8.000 sccm
|
||||
Master Reading 4 12.000 sccm
|
||||
Master Reading 5 16.000 sccm
|
||||
Master Reading 6 20.000 sccm
|
||||
Verify Date 07/12/2022
|
||||
Verify Time 10:54:56
|
||||
|
||||
|
||||
Pressure Transducer
|
||||
===========================================================
|
||||
Transducer CTS D34-441 45PSIA
|
||||
Input AIN 1
|
||||
Setpoint Pressure 1 0.000 psig
|
||||
Setpoint Pressure 2 6.000 psig
|
||||
Setpoint Pressure 3 12.000 psig
|
||||
Setpoint Pressure 4 18.000 psig
|
||||
Setpoint Pressure 5 24.000 psig
|
||||
Setpoint Pressure 6 30.000 psig
|
||||
Analog Value 1 10087020 cnts
|
||||
Analog Value 2 10810568 cnts
|
||||
Analog Value 3 11532365 cnts
|
||||
Analog Value 4 12252414 cnts
|
||||
Analog Value 5 12970722 cnts
|
||||
Analog Value 6 13687182 cnts
|
||||
Master Value 1 0.001 psig
|
||||
Master Value 2 6.001 psig
|
||||
Master Value 3 12.001 psig
|
||||
Master Value 4 18.001 psig
|
||||
Master Value 5 24.001 psig
|
||||
Master Value 6 30.001 psig
|
||||
XDCR Analog ATM 10086749
|
||||
Atm Pressure -0.000 bar
|
||||
Linearity 0.082 %
|
||||
Last Cal Date 12/07/2020
|
||||
Last Cal Time 09:03:38
|
||||
Xdcr Filter Code Med, J-Filter
|
||||
Xdcr Typ Residual 80.000
|
||||
Xdcr Zero LL 9654557.000 cnts
|
||||
Xdcr Zero HL 10485333.000 cnts
|
||||
Xdcr Zero Lwin -2.501 psig
|
||||
Xdcr Zero Hwin 2.499 psig
|
||||
Xdcr Analog Min 5699952.000 cnts
|
||||
Xdcr Analog Max 15110248.000 cnts
|
||||
Xdcr Base Min -4294967.000
|
||||
Xdcr Base Max 8589935.000
|
||||
Setpoint Pressure 1 0.000 psig
|
||||
Setpoint Pressure 2 6.000 psig
|
||||
Setpoint Pressure 3 12.000 psig
|
||||
Setpoint Pressure 4 18.000 psig
|
||||
Setpoint Pressure 5 24.000 psig
|
||||
Setpoint Pressure 6 30.000 psig
|
||||
Instrument Pressure 1 0.000 psig
|
||||
Instrument Pressure 2 6.000 psig
|
||||
Instrument Pressure 3 11.999 psig
|
||||
Instrument Pressure 4 17.998 psig
|
||||
Instrument Pressure 5 23.997 psig
|
||||
Instrument Pressure 6 29.997 psig
|
||||
Master Value 1 0.000 psig
|
||||
Master Value 2 6.000 psig
|
||||
Master Value 3 12.000 psig
|
||||
Master Value 4 18.000 psig
|
||||
Master Value 5 24.000 psig
|
||||
Master Value 6 30.000 psig
|
||||
Verify Date 07/12/2022
|
||||
Verify Time 08:14:59
|
||||
|
||||
|
||||
Test Port 2
|
||||
===========================================================
|
||||
|
||||
|
||||
Mass Flow Trans
|
||||
===========================================================
|
||||
Transducer Custom
|
||||
Input AIN 4
|
||||
Setpoint Pressure 1 25.000 psig
|
||||
Setpoint Pressure 2 25.000 psig
|
||||
Setpoint Pressure 3 25.000 psig
|
||||
Setpoint Pressure 4 25.000 psig
|
||||
Setpoint Pressure 5 25.000 psig
|
||||
Setpoint Pressure 6 25.000 psig
|
||||
Analog Value 1 8689552 cnts
|
||||
Analog Value 2 9914953 cnts
|
||||
Analog Value 3 11057751 cnts
|
||||
Analog Value 4 12214973 cnts
|
||||
Analog Value 5 13397425 cnts
|
||||
Analog Value 6 14516985 cnts
|
||||
Master Value 1 0.054 sccm
|
||||
Master Value 2 4.255 sccm
|
||||
Master Value 3 8.124 sccm
|
||||
Master Value 4 12.146 sccm
|
||||
Master Value 5 16.159 sccm
|
||||
Master Value 6 19.993 sccm
|
||||
Linearity 0.166 %
|
||||
Last Cal Date 12/07/2020
|
||||
Last Cal Time 10:50:52
|
||||
Xdcr Filter Code Median
|
||||
Xdcr Typ Residual 83.000
|
||||
Xdcr Zero LL 0.000 cnts
|
||||
Xdcr Zero HL 0.000 cnts
|
||||
Xdcr Zero Lwin 0.000
|
||||
Xdcr Zero Hwin 0.000
|
||||
Xdcr Analog Min 0.000 cnts
|
||||
Xdcr Analog Max 0.000 cnts
|
||||
Xdcr Base Min 0.000
|
||||
Xdcr Base Max 0.000
|
||||
Setpoint Pressure 1 5.800 psig
|
||||
Setpoint Pressure 2 5.800 psig
|
||||
Setpoint Pressure 3 5.800 psig
|
||||
Setpoint Pressure 4 5.800 psig
|
||||
Setpoint Pressure 5 5.800 psig
|
||||
Setpoint Pressure 6 5.800 psig
|
||||
Instrument Pressure 1 5.780 psig
|
||||
Instrument Pressure 2 5.779 psig
|
||||
Instrument Pressure 3 5.808 psig
|
||||
Instrument Pressure 4 5.809 psig
|
||||
Instrument Pressure 5 5.807 psig
|
||||
Instrument Pressure 6 5.807 psig
|
||||
Instrument Flow 1 0.049 sccm
|
||||
Instrument Flow 2 4.122 sccm
|
||||
Instrument Flow 3 8.171 sccm
|
||||
Instrument Flow 4 12.220 sccm
|
||||
Instrument Flow 5 16.204 sccm
|
||||
Instrument Flow 6 20.221 sccm
|
||||
Master Value 1 0.000 sccm
|
||||
Master Value 2 4.000 sccm
|
||||
Master Value 3 8.000 sccm
|
||||
Master Value 4 12.000 sccm
|
||||
Master Value 5 16.000 sccm
|
||||
Master Value 6 20.000 sccm
|
||||
Master Reading 1 0.000 sccm
|
||||
Master Reading 2 4.000 sccm
|
||||
Master Reading 3 8.000 sccm
|
||||
Master Reading 4 12.000 sccm
|
||||
Master Reading 5 16.000 sccm
|
||||
Master Reading 6 20.000 sccm
|
||||
Verify Date 07/12/2022
|
||||
Verify Time 11:01:54
|
||||
|
||||
|
||||
Pressure Transducer
|
||||
===========================================================
|
||||
Transducer CTS D34-441 45PSIA
|
||||
Input AIN 3
|
||||
Setpoint Pressure 1 0.000 psig
|
||||
Setpoint Pressure 2 6.000 psig
|
||||
Setpoint Pressure 3 12.000 psig
|
||||
Setpoint Pressure 4 18.000 psig
|
||||
Setpoint Pressure 5 24.000 psig
|
||||
Setpoint Pressure 6 30.000 psig
|
||||
Analog Value 1 10050243 cnts
|
||||
Analog Value 2 10763409 cnts
|
||||
Analog Value 3 11474665 cnts
|
||||
Analog Value 4 12184422 cnts
|
||||
Analog Value 5 12892174 cnts
|
||||
Analog Value 6 13598393 cnts
|
||||
Master Value 1 0.001 psig
|
||||
Master Value 2 6.001 psig
|
||||
Master Value 3 12.001 psig
|
||||
Master Value 4 18.001 psig
|
||||
Master Value 5 24.001 psig
|
||||
Master Value 6 30.001 psig
|
||||
XDCR Analog ATM 10050055
|
||||
Atm Pressure -0.000 bar
|
||||
Linearity 0.082 %
|
||||
Last Cal Date 12/07/2020
|
||||
Last Cal Time 09:11:34
|
||||
Xdcr Filter Code Med, J-Filter
|
||||
Xdcr Typ Residual 59.000
|
||||
Xdcr Zero LL 9654557.000 cnts
|
||||
Xdcr Zero HL 10485333.000 cnts
|
||||
Xdcr Zero Lwin -2.501 psig
|
||||
Xdcr Zero Hwin 2.499 psig
|
||||
Xdcr Analog Min 5699952.000 cnts
|
||||
Xdcr Analog Max 15110248.000 cnts
|
||||
Xdcr Base Min -4294967.000
|
||||
Xdcr Base Max 8589935.000
|
||||
Setpoint Pressure 1 0.000 psig
|
||||
Setpoint Pressure 2 6.000 psig
|
||||
Setpoint Pressure 3 12.000 psig
|
||||
Setpoint Pressure 4 18.000 psig
|
||||
Setpoint Pressure 5 24.000 psig
|
||||
Setpoint Pressure 6 30.000 psig
|
||||
Instrument Pressure 1 -0.000 psig
|
||||
Instrument Pressure 2 5.999 psig
|
||||
Instrument Pressure 3 12.000 psig
|
||||
Instrument Pressure 4 17.998 psig
|
||||
Instrument Pressure 5 23.999 psig
|
||||
Instrument Pressure 6 29.999 psig
|
||||
Master Value 1 0.000 psig
|
||||
Master Value 2 6.000 psig
|
||||
Master Value 3 12.000 psig
|
||||
Master Value 4 18.000 psig
|
||||
Master Value 5 24.000 psig
|
||||
Master Value 6 30.000 psig
|
||||
Verify Date 07/12/2022
|
||||
Verify Time 08:21:53
|
||||
|
||||
|
||||
Test Port 3
|
||||
===========================================================
|
||||
|
||||
|
||||
Mass Flow Trans
|
||||
===========================================================
|
||||
Transducer Custom
|
||||
Input AIN 6
|
||||
Setpoint Pressure 1 25.000 psig
|
||||
Setpoint Pressure 2 25.000 psig
|
||||
Setpoint Pressure 3 25.000 psig
|
||||
Setpoint Pressure 4 25.000 psig
|
||||
Setpoint Pressure 5 25.000 psig
|
||||
Setpoint Pressure 6 25.000 psig
|
||||
Analog Value 1 8686103 cnts
|
||||
Analog Value 2 9889340 cnts
|
||||
Analog Value 3 11072089 cnts
|
||||
Analog Value 4 12249269 cnts
|
||||
Analog Value 5 13397809 cnts
|
||||
Analog Value 6 14502802 cnts
|
||||
Master Value 1 0.007 sccm
|
||||
Master Value 2 4.155 sccm
|
||||
Master Value 3 8.207 sccm
|
||||
Master Value 4 12.206 sccm
|
||||
Master Value 5 16.165 sccm
|
||||
Master Value 6 19.942 sccm
|
||||
Linearity 0.096 %
|
||||
Last Cal Date 12/07/2020
|
||||
Last Cal Time 14:29:53
|
||||
Xdcr Filter Code Median
|
||||
Xdcr Typ Residual 722632.000
|
||||
Xdcr Zero LL 0.000 cnts
|
||||
Xdcr Zero HL 0.000 cnts
|
||||
Xdcr Zero Lwin 0.000
|
||||
Xdcr Zero Hwin 0.000
|
||||
Xdcr Analog Min 0.000 cnts
|
||||
Xdcr Analog Max 0.000 cnts
|
||||
Xdcr Base Min 0.000
|
||||
Xdcr Base Max 0.000
|
||||
Setpoint Pressure 1 5.800 psig
|
||||
Setpoint Pressure 2 5.800 psig
|
||||
Setpoint Pressure 3 5.800 psig
|
||||
Setpoint Pressure 4 5.800 psig
|
||||
Setpoint Pressure 5 5.800 psig
|
||||
Setpoint Pressure 6 5.800 psig
|
||||
Instrument Pressure 1 5.892 psig
|
||||
Instrument Pressure 2 5.889 psig
|
||||
Instrument Pressure 3 5.887 psig
|
||||
Instrument Pressure 4 5.884 psig
|
||||
Instrument Pressure 5 5.883 psig
|
||||
Instrument Pressure 6 5.881 psig
|
||||
Instrument Flow 1 0.005 sccm
|
||||
Instrument Flow 2 4.091 sccm
|
||||
Instrument Flow 3 8.123 sccm
|
||||
Instrument Flow 4 12.135 sccm
|
||||
Instrument Flow 5 16.175 sccm
|
||||
Instrument Flow 6 20.202 sccm
|
||||
Master Value 1 0.000 sccm
|
||||
Master Value 2 4.000 sccm
|
||||
Master Value 3 8.000 sccm
|
||||
Master Value 4 12.000 sccm
|
||||
Master Value 5 16.000 sccm
|
||||
Master Value 6 20.000 sccm
|
||||
Master Reading 1 0.000 sccm
|
||||
Master Reading 2 4.000 sccm
|
||||
Master Reading 3 8.000 sccm
|
||||
Master Reading 4 12.000 sccm
|
||||
Master Reading 5 16.000 sccm
|
||||
Master Reading 6 20.000 sccm
|
||||
Verify Date 07/12/2022
|
||||
Verify Time 11:18:36
|
||||
|
||||
|
||||
Pressure Transducer
|
||||
===========================================================
|
||||
Transducer CTS D34-441 45PSIA
|
||||
Input AIN 5
|
||||
Setpoint Pressure 1 0.000 psig
|
||||
Setpoint Pressure 2 6.000 psig
|
||||
Setpoint Pressure 3 12.000 psig
|
||||
Setpoint Pressure 4 18.000 psig
|
||||
Setpoint Pressure 5 24.000 psig
|
||||
Setpoint Pressure 6 30.000 psig
|
||||
Analog Value 1 10008894 cnts
|
||||
Analog Value 2 10714413 cnts
|
||||
Analog Value 3 11418030 cnts
|
||||
Analog Value 4 12120292 cnts
|
||||
Analog Value 5 12820552 cnts
|
||||
Analog Value 6 13519203 cnts
|
||||
Master Value 1 0.000 psig
|
||||
Master Value 2 6.000 psig
|
||||
Master Value 3 12.000 psig
|
||||
Master Value 4 18.000 psig
|
||||
Master Value 5 24.000 psig
|
||||
Master Value 6 30.000 psig
|
||||
XDCR Analog ATM 10008874
|
||||
Atm Pressure -0.000 bar
|
||||
Linearity 0.081 %
|
||||
Last Cal Date 07/12/2022
|
||||
Last Cal Time 09:09:57
|
||||
Xdcr Filter Code Med, J-Filter
|
||||
Xdcr Typ Residual 121.000
|
||||
Xdcr Zero LL 9654557.000 cnts
|
||||
Xdcr Zero HL 10485333.000 cnts
|
||||
Xdcr Zero Lwin -2.500 psig
|
||||
Xdcr Zero Hwin 2.500 psig
|
||||
Xdcr Analog Min 5699952.000 cnts
|
||||
Xdcr Analog Max 15110248.000 cnts
|
||||
Xdcr Base Min -4294967.000
|
||||
Xdcr Base Max 8589935.000
|
||||
Setpoint Pressure 1 0.000 psig
|
||||
Setpoint Pressure 2 6.000 psig
|
||||
Setpoint Pressure 3 12.000 psig
|
||||
Setpoint Pressure 4 18.000 psig
|
||||
Setpoint Pressure 5 24.000 psig
|
||||
Setpoint Pressure 6 30.000 psig
|
||||
Instrument Pressure 1 -0.000 psig
|
||||
Instrument Pressure 2 6.000 psig
|
||||
Instrument Pressure 3 12.002 psig
|
||||
Instrument Pressure 4 18.000 psig
|
||||
Instrument Pressure 5 24.002 psig
|
||||
Instrument Pressure 6 30.001 psig
|
||||
Master Value 1 0.000 psig
|
||||
Master Value 2 6.000 psig
|
||||
Master Value 3 12.000 psig
|
||||
Master Value 4 18.000 psig
|
||||
Master Value 5 24.000 psig
|
||||
Master Value 6 30.000 psig
|
||||
Verify Date 07/12/2022
|
||||
Verify Time 09:13:02
|
||||
|
||||
|
||||
Test Port 4
|
||||
===========================================================
|
||||
|
||||
|
||||
Mass Flow Trans
|
||||
===========================================================
|
||||
Transducer Custom
|
||||
Input AIN 8
|
||||
Setpoint Pressure 1 25.000 psig
|
||||
Setpoint Pressure 2 25.000 psig
|
||||
Setpoint Pressure 3 25.000 psig
|
||||
Setpoint Pressure 4 25.000 psig
|
||||
Setpoint Pressure 5 25.000 psig
|
||||
Setpoint Pressure 6 25.000 psig
|
||||
Analog Value 1 8684522 cnts
|
||||
Analog Value 2 9881552 cnts
|
||||
Analog Value 3 11081720 cnts
|
||||
Analog Value 4 12240018 cnts
|
||||
Analog Value 5 13413541 cnts
|
||||
Analog Value 6 14535797 cnts
|
||||
Master Value 1 0.000 sccm
|
||||
Master Value 2 4.090 sccm
|
||||
Master Value 3 8.134 sccm
|
||||
Master Value 4 12.132 sccm
|
||||
Master Value 5 16.121 sccm
|
||||
Master Value 6 19.984 sccm
|
||||
Linearity 0.194 %
|
||||
Last Cal Date 12/07/2020
|
||||
Last Cal Time 11:27:27
|
||||
Xdcr Filter Code Median
|
||||
Xdcr Typ Residual 13.000
|
||||
Xdcr Zero LL 0.000 cnts
|
||||
Xdcr Zero HL 0.000 cnts
|
||||
Xdcr Zero Lwin 0.000
|
||||
Xdcr Zero Hwin 0.000
|
||||
Xdcr Analog Min 0.000 cnts
|
||||
Xdcr Analog Max 0.000 cnts
|
||||
Xdcr Base Min 0.000
|
||||
Xdcr Base Max 0.000
|
||||
Setpoint Pressure 1 5.800 psig
|
||||
Setpoint Pressure 2 5.800 psig
|
||||
Setpoint Pressure 3 5.800 psig
|
||||
Setpoint Pressure 4 5.800 psig
|
||||
Setpoint Pressure 5 5.800 psig
|
||||
Setpoint Pressure 6 5.800 psig
|
||||
Instrument Pressure 1 5.835 psig
|
||||
Instrument Pressure 2 5.837 psig
|
||||
Instrument Pressure 3 5.839 psig
|
||||
Instrument Pressure 4 5.841 psig
|
||||
Instrument Pressure 5 5.841 psig
|
||||
Instrument Pressure 6 5.841 psig
|
||||
Instrument Flow 1 -0.002 sccm
|
||||
Instrument Flow 2 4.051 sccm
|
||||
Instrument Flow 3 7.989 sccm
|
||||
Instrument Flow 4 12.073 sccm
|
||||
Instrument Flow 5 16.013 sccm
|
||||
Instrument Flow 6 20.043 sccm
|
||||
Master Value 1 0.000 sccm
|
||||
Master Value 2 4.000 sccm
|
||||
Master Value 3 8.000 sccm
|
||||
Master Value 4 12.000 sccm
|
||||
Master Value 5 16.000 sccm
|
||||
Master Value 6 20.000 sccm
|
||||
Master Reading 1 0.000 sccm
|
||||
Master Reading 2 4.000 sccm
|
||||
Master Reading 3 8.000 sccm
|
||||
Master Reading 4 12.000 sccm
|
||||
Master Reading 5 16.000 sccm
|
||||
Master Reading 6 20.000 sccm
|
||||
Verify Date 07/12/2022
|
||||
Verify Time 11:26:40
|
||||
|
||||
|
||||
Pressure Transducer
|
||||
===========================================================
|
||||
Transducer CTS D34-441 45PSIA
|
||||
Input AIN 7
|
||||
Setpoint Pressure 1 0.000 psig
|
||||
Setpoint Pressure 2 6.000 psig
|
||||
Setpoint Pressure 3 12.000 psig
|
||||
Setpoint Pressure 4 18.000 psig
|
||||
Setpoint Pressure 5 24.000 psig
|
||||
Setpoint Pressure 6 30.000 psig
|
||||
Analog Value 1 10046563 cnts
|
||||
Analog Value 2 10762536 cnts
|
||||
Analog Value 3 11476853 cnts
|
||||
Analog Value 4 12189519 cnts
|
||||
Analog Value 5 12900160 cnts
|
||||
Analog Value 6 13609169 cnts
|
||||
Master Value 1 0.000 psig
|
||||
Master Value 2 6.000 psig
|
||||
Master Value 3 12.000 psig
|
||||
Master Value 4 18.000 psig
|
||||
Master Value 5 24.000 psig
|
||||
Master Value 6 30.000 psig
|
||||
XDCR Analog ATM 10046626
|
||||
Atm Pressure 0.000 bar
|
||||
Linearity 0.083 %
|
||||
Last Cal Date 07/12/2022
|
||||
Last Cal Time 08:57:20
|
||||
Xdcr Filter Code Med, J-Filter
|
||||
Xdcr Typ Residual 138.000
|
||||
Xdcr Zero LL 9654557.000 cnts
|
||||
Xdcr Zero HL 10485333.000 cnts
|
||||
Xdcr Zero Lwin -2.499 psig
|
||||
Xdcr Zero Hwin 2.501 psig
|
||||
Xdcr Analog Min 5699952.000 cnts
|
||||
Xdcr Analog Max 15110248.000 cnts
|
||||
Xdcr Base Min -4294967.000
|
||||
Xdcr Base Max 8589935.000
|
||||
Setpoint Pressure 1 0.000 psig
|
||||
Setpoint Pressure 2 6.000 psig
|
||||
Setpoint Pressure 3 12.000 psig
|
||||
Setpoint Pressure 4 18.000 psig
|
||||
Setpoint Pressure 5 24.000 psig
|
||||
Setpoint Pressure 6 30.000 psig
|
||||
Instrument Pressure 1 -0.000 psig
|
||||
Instrument Pressure 2 5.999 psig
|
||||
Instrument Pressure 3 11.999 psig
|
||||
Instrument Pressure 4 17.998 psig
|
||||
Instrument Pressure 5 23.997 psig
|
||||
Instrument Pressure 6 29.997 psig
|
||||
Master Value 1 0.000 psig
|
||||
Master Value 2 6.000 psig
|
||||
Master Value 3 12.000 psig
|
||||
Master Value 4 18.000 psig
|
||||
Master Value 5 24.000 psig
|
||||
Master Value 6 30.000 psig
|
||||
Verify Date 07/12/2022
|
||||
Verify Time 09:04:54
|
45
notes.txt
Normal file
45
notes.txt
Normal file
@ -0,0 +1,45 @@
|
||||
TRANSDUCER\d - array of TRANSDUCERS
|
||||
- Instrument Pressure \d # As Found
|
||||
- Master Value \d # Gauge Reading Set Point
|
||||
- Note: IP1 = MV1
|
||||
|
||||
Once selected, prompt for "As Found", "As Left", or "Both"
|
||||
- If as left, proppt for as found file. etc etc.
|
||||
- If both, continue on with logic.
|
||||
|
||||
If Transducer Name contains "CUSTOM" - prompt for the name in an input box (change to Type)
|
||||
Part Number: "CTS A12-221" Value "250CCM"
|
||||
|
||||
Data to always enter in
|
||||
- Instrument
|
||||
- Customer Name
|
||||
- Customer Address
|
||||
- Control Number
|
||||
- Serial Number
|
||||
- Accuracy (once, but applies to the full List)
|
||||
- Barometric Pressure
|
||||
- Temperature
|
||||
- Humidity
|
||||
|
||||
|
||||
Auto Data
|
||||
- Date [Verify Date]
|
||||
- Part Number "middle number from Part Name/Type variable"
|
||||
|
||||
|
||||
Calculations: etc
|
||||
- High Limit/ Low Limit eg: (SPAN*1.0005 + column) (SPAN*0.9995 - column)
|
||||
- Delta = abs(gauge reading) - abs(asleft|asfound)
|
||||
- PSIA - PRESSURE
|
||||
- SCCM - FLOW
|
||||
- TRANSDUCER1 Will ALWAYS be pressure
|
||||
|
||||
CONFIG:
|
||||
- Mensor Numbers etc
|
||||
- Cal device, cal serial, Cal cal date, cal due date
|
||||
|
||||
|
||||
# HARDWARE CALIBRATION
|
||||
- "Mass Flow Trans" look at `Instrument Flow` and `Master Reading`
|
||||
- "Pressure Transducer" `Instrument Pressure` and `Master Value`
|
||||
- Always take the SECOND `Master Value`
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
django
|
||||
psycopg2
|
||||
django-debug-toolbar
|
85
transducer_verify.txt
Normal file
85
transducer_verify.txt
Normal file
@ -0,0 +1,85 @@
|
||||
|| Transducer Verify Report ||
|
||||
TRANSDUCER1
|
||||
===============================================================
|
||||
Transducer 1 CTS D34-442 115PSIA
|
||||
Setpoint Pressure 1 0.000 psig
|
||||
Setpoint Pressure 2 20.000 psig
|
||||
Setpoint Pressure 3 40.000 psig
|
||||
Setpoint Pressure 4 60.000 psig
|
||||
Setpoint Pressure 5 80.000 psig
|
||||
Setpoint Pressure 6 100.000 psig
|
||||
Instrument Pressure 1 0.000 psig
|
||||
Instrument Pressure 2 20.002 psig
|
||||
Instrument Pressure 3 39.997 psig
|
||||
Instrument Pressure 4 60.010 psig
|
||||
Instrument Pressure 5 80.001 psig
|
||||
Instrument Pressure 6 100.002 psig
|
||||
Master Value 1 0.000 psig
|
||||
Master Value 2 20.000 psig
|
||||
Master Value 3 40.000 psig
|
||||
Master Value 4 60.000 psig
|
||||
Master Value 5 80.000 psig
|
||||
Master Value 6 100.000 psig
|
||||
Verify Date 07/20/22
|
||||
Verify Time 11:20:26
|
||||
|
||||
TRANSDUCER2
|
||||
===============================================================
|
||||
Transducer 2 CTS A12-221 250SCCM
|
||||
Setpoint Pressure 1 20.000 psig
|
||||
Setpoint Pressure 2 20.000 psig
|
||||
Setpoint Pressure 3 20.000 psig
|
||||
Setpoint Pressure 4 20.000 psig
|
||||
Setpoint Pressure 5 20.000 psig
|
||||
Setpoint Pressure 6 20.000 psig
|
||||
Setpoint Pressure 7 20.000 psig
|
||||
Setpoint Pressure 8 20.000 psig
|
||||
Setpoint Pressure 9 20.000 psig
|
||||
Setpoint Pressure 10 20.000 psig
|
||||
Setpoint Pressure 11 20.000 psig
|
||||
Instrument Pressure 1 20.154 psig
|
||||
Instrument Pressure 2 20.153 psig
|
||||
Instrument Pressure 3 20.152 psig
|
||||
Instrument Pressure 4 20.150 psig
|
||||
Instrument Pressure 5 20.148 psig
|
||||
Instrument Pressure 6 20.145 psig
|
||||
Instrument Pressure 7 20.144 psig
|
||||
Instrument Pressure 8 20.141 psig
|
||||
Instrument Pressure 9 20.139 psig
|
||||
Instrument Pressure 10 20.138 psig
|
||||
Instrument Pressure 11 20.136 psig
|
||||
Instrument Flow 1 -0.082 sccm
|
||||
Instrument Flow 2 24.802 sccm
|
||||
Instrument Flow 3 49.664 sccm
|
||||
Instrument Flow 4 74.836 sccm
|
||||
Instrument Flow 5 99.416 sccm
|
||||
Instrument Flow 6 125.289 sccm
|
||||
Instrument Flow 7 150.205 sccm
|
||||
Instrument Flow 8 175.290 sccm
|
||||
Instrument Flow 9 200.165 sccm
|
||||
Instrument Flow 10 224.748 sccm
|
||||
Instrument Flow 11 249.825 sccm
|
||||
Master Reading 1 0.000 sccm
|
||||
Master Reading 2 25.000 sccm
|
||||
Master Reading 3 50.000 sccm
|
||||
Master Reading 4 75.000 sccm
|
||||
Master Reading 5 100.000 sccm
|
||||
Master Reading 6 125.000 sccm
|
||||
Master Reading 7 150.000 sccm
|
||||
Master Reading 8 175.000 sccm
|
||||
Master Reading 9 200.000 sccm
|
||||
Master Reading 10 225.000 sccm
|
||||
Master Reading 11 250.000 sccm
|
||||
Master Value 1 0.000 sccm
|
||||
Master Value 2 25.000 sccm
|
||||
Master Value 3 50.000 sccm
|
||||
Master Value 4 75.000 sccm
|
||||
Master Value 5 100.000 sccm
|
||||
Master Value 6 125.000 sccm
|
||||
Master Value 7 150.000 sccm
|
||||
Master Value 8 175.000 sccm
|
||||
Master Value 9 200.000 sccm
|
||||
Master Value 10 225.000 sccm
|
||||
Master Value 11 250.000 sccm
|
||||
Verify Date 07/15/21
|
||||
Verify Time 14:55:10
|
Loading…
Reference in New Issue
Block a user