Skip to content

Commit

Permalink
Remove old version of simulation. In KiCad model added draft of HV st…
Browse files Browse the repository at this point in the history
…abilizer.
  • Loading branch information
RobertGawron committed Sep 15, 2024
1 parent 35db84c commit 41230f6
Show file tree
Hide file tree
Showing 103 changed files with 26,475 additions and 7,596 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub's language statistics module can't recognize LTSpice files, so just ignore them.
Simulation/LTSPice/* linguist-vendored
26 changes: 26 additions & 0 deletions .github/workflows/docs-generation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docs Generation

on: [push]

jobs:
build_and_test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: install latex and generate documents
run: |
sudo apt-get install -y texlive-latex-base texlive-latex-extra texlive-extra-utils poppler-utils pdf2svg
cd ./ContinuousIntegration
chmod +x ./run_generate_docs.sh
./run_generate_docs.sh
mkdir result
cp ../Documentation/Diagrams/*.svg result
- name: Archive latex docs
uses: actions/upload-artifact@v2
if: always()
with:
name: Latex Documents
path: ./ContinuousIntegration/result
28 changes: 28 additions & 0 deletions .github/workflows/static-code-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Static Code Analysis

on: [push]

jobs:
build_and_test:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v1
- name: install flake8 and run tests
if: always()
run: |
sudo pip install flake8 flake8-html
cd ./ContinuousIntegration
chmod +x ./run_python_static_code_analysis.sh
ls
./run_python_static_code_analysis.sh
- name: Archive Python results
uses: actions/upload-artifact@v2
if: always()
with:
name: Report for Python sources
path: ./ContinuousIntegration/python_lint_report/

1 change: 1 addition & 0 deletions ContinuousIntegration/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python_lint_repport/
3 changes: 3 additions & 0 deletions ContinuousIntegration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ContinuousIntegration

This folder contains scripts run by GitHub continuous integration module. These scripts should be also run locally before pull request.
26 changes: 26 additions & 0 deletions ContinuousIntegration/run_generate_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

cd ../Documentation/Diagrams/

# generate .png from all .tex in current directory

for filename_with_extension in *.tex
do
echo "processing $filename_with_extension..."

# remove file exctension to made file handling easier

filename=${filename_with_extension%.*}

# convert .tex to .pdf

pdflatex $filename.tex
touch $filename-tmp.pdf
pdfcrop $filename.pdf $filename-tmp.pdf

# convert .tex to .png

pdf2svg $filename-tmp.pdf $filename.svg all
done

rm *.aux *.log *.pdf
1 change: 1 addition & 0 deletions ContinuousIntegration/run_python_static_code_analysis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake8 --format=html --htmldir=python_lint_repport ../Mechanic/MechanicOverview
818 changes: 818 additions & 0 deletions Documentation/Diagrams/ArchitectureDataAcquisition.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions Documentation/Diagrams/ArchitectureDataAcquisition.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
\documentclass[tikz, border=5mm]{standalone}

\usetikzlibrary{arrows.meta,decorations.markings,fit,calc, positioning}

\definecolor{componentColor}{RGB}{210,210,210}
\definecolor{systemColor}{RGB}{230,230,230}

\tikzset{component/.append style={fill=componentColor, align=center, draw, minimum width=2cm, minimum height=1.5cm, rounded corners=.3cm}}
\tikzset{system/.style={component, fill=systemColor, rounded corners=0cm}}

\tikzstyle{arrow} = [-{Latex[scale=3.0]}]
\tikzset{arrowLabel/.append style={minimum height=.25cm, draw=none}}
\begin{document}

\begin{tikzpicture}[node distance=1.5cm and 3cm]
% Nodes
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}

\node (photomultiplier) [system] {(Photomultiplier Tube)\\ Input Signal};
\node (photomultipliertemperature) [system, below=of photomultiplier] {(Photomultiplier Tube)\\ Temperature Monitor};
\node (hvvoltage) [system, below=of photomultipliertemperature] {(HV Power Supply)\\ Voltage Monitor};
\node (hvcurrent) [system, below=of hvvoltage] {(HV Power Supply)\\ Current Monitor};
\node (hvtemperature) [system, below=of hvcurrent] {(HV Power Supply)\\ Temperature Monitor};

\node (amplifier) [component, right=of photomultiplier] {Charge Amplifier\\ (LTC6269)};
\node (pulseshaping) [component, below=of amplifier] {Pulse Shaping};
\node (adc) [component, below=of pulseshaping] {ADC\\ (1 Msps, 16bit)\\ (MCP33131-10)};
\node (acquisition) [component, below=of adc] {Acquisition \\ (PIC32MZ0512EFE064-I/PT)};
\node (temperaturemonitor) [component, below=of acquisition] {Monitor of Local Temperature};

\node (gui) [system, right=of acquisition] {User Interface\\ (Arduino Uno 2.4 inch \\ TFT LCD Shield)};
\node (pi) [system, above=of gui] {Data processing and firmware flashing\\ (RaspberryPi 3B)};
\node (hvonoff) [system, below=of gui] {(HV Power Supply)\\ On/Off};

\begin{pgfonlayer}{background}
\node[system, draw, thick, inner xsep=1em, inner ysep=1em, fit= (amplifier) (pulseshaping) (adc) (acquisition) (temperaturemonitor)] {};
\end{pgfonlayer}

% Connectors
\begin{scope}[->]

\draw [arrow] (photomultiplier) -- (amplifier);
\draw [arrow] (amplifier) -- (pulseshaping);
\draw [arrow] (pulseshaping) -- (adc);
\draw [arrow] (adc) -- (acquisition);
\draw [arrow] (temperaturemonitor) -- (acquisition);

\draw [arrow] (photomultipliertemperature.east) -- (acquisition.west);
\draw [arrow] (hvcurrent) -- (acquisition);
\draw [arrow] (hvvoltage.east) -- (acquisition.west);
\draw [arrow] (hvtemperature.east) -- (acquisition.west);

\draw [arrow] (acquisition) -- (gui);
\draw [arrow] (acquisition.east) -- (pi.south);
\draw [arrow] (pi.south) -- (acquisition.east);
\draw [arrow] (acquisition.east) -- (hvonoff.north);


\end{scope}

\end{tikzpicture}
\end{document}
Loading

0 comments on commit 41230f6

Please sign in to comment.