AGATA Oscilloscope Web Application
General Description
This project utilizes a Python server providing continuous data acquisition to power a web application built with Django. The application offers oscilloscope-like functionality, including:
- Data Analysis: Users can choose between visualizing real-time raw data or read .osc files.
- Display Options: Customize the visualization of data curves.
- Mathematical Transformations: Apply mathematical operations to the data for more in-depth analysis.
The application is developed using JavaScript on the client side and Python on the server side.
Project Context
AGATA (Advanced Gamma Tracking Array) is a European research project aimed at developing and constructing a next-generation 4pi gamma-ray spectrometer. This cutting-edge tool will be utilized in experiments with both intense, stable, and radioactive ion beams to explore the structure of atomic nuclei based on angular momentum, isospin, and temperature at the limits of their stability.
Spectrometer Design
The complete AGATA spectrometer will feature:
- 180 High-Purity Germanium (HPGe) Crystals: Each crystal is 9 cm in length and 8 cm in diameter with a hexaconical shape (hexagonal at the front, circular at the back).
- Segmentation: Each crystal is electrically segmented into 36 segments (6 longitudinal, 6 transverse).
This setup will allow for precise and detailed gamma-ray tracking and spectroscopy.
Installation tutorial of the oscillo app.
Seting up the database container
The first thing to setup for this app to work properly is the database container.
A script is available within the "docker/" folder of the github repository (link here), called 'startMysqlDB.sh', to create and start the database container, simply type the following command in the terminal :
> bash startMysqlDB.sh
> #OR
> ./startMysqlDB.sh
This might take a few minutes while the computer downloads any packages needed for the container..
Once this is done, the mysql server/container should be up and running, you can check for sure by typing this command to the terminal :
> docker ps
#This should display a list of containers, check for the one with the name 'mysql' and make sure its status is set to 'up'.
Setting up & starting the oscillo-app container
The setup for the app container itself has an extra step but isn't much more complicated than the mysql one.
In a terminal, type the following commands :
You need to be within the 'docker' folder for these steps !
#We start by building the image for the container.
> docker build -t oscillo-app .
#Now we create & start the container.
> bash runOscillo.sh
> #OR
> ./runOscillo.sh
This step might take a few minutes, once done, the app should be up and running. You can make sure the app container is up and running like so :
> docker ps
#This should display a list of containers, check for the one with the name 'oscillo-app' and make sure its status is set to 'up'.
Accessing the oscillo-app
- http://127.0.0.1:8000/oscillo/
- http://localhost:8000/oscillo/
- http://*Your machine's name*:8000/oscillo/
Now that everything is running, you can access the app by opening any internet browser and type any of the urls below to access it :
Start-up mock-up server for the oscillo app (Sinusoidals only)
If you need to test wether or not the app is functionnal with a demo of some sort, you can follow this procedure to start a small server that will generate 4 sinusoidals that will be sent to the oscilloscope.
Navigate to the "docker" folder, then, using the script "HandleFakeSins.sh", you can start or stop the demo sinusoidals like so :
#Starting the demo sinusoidals :
> bash HandleFakeSins.sh start
#Stopping the demo sinusoidals :
> bash HandleFakeSins.sh stop
Start-up mock-up server for the oscillo app (.dat files)
A second script is put at your disposal to allow a user to select a .dat file containing raw data and send said data to the app just like the STARE cards would.
Same as with the demo sinusoidals, a script is available within the "docker" folder. Navigate to this folder in a terminal and use the script like so :
#Starting the server with a specific .dat file :
> bash HandleFakeStare.sh start
> Please enter the path to the .dat file you wish to upload :
> * Select here a .dat file you want to use *
Now the server inside the app container will be sending the data from the file given, you can see it via the oscilloscope's page.
#Stopping the server :
> bash HandleFakeStare.sh stop