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.


drawings.js

Description:
  • This file contains every function related to the canvas drawings & interactions.

    Functions included in this file :

    • clearCanvas
    • drawCursors
    • drawSignal
    • drawFFT
    • drawGrid
    • removeSpikes
    • drawZoomRectangle
    • resetZoom
    • drawTriggerCursor
Source:
Version:
  • 1.0.0
Since:
  • 2024-05-31
Author:
  • Owen Pichot
License:
  • Public Domain

This file contains every function related to the canvas drawings & interactions.

Functions included in this file :

  • clearCanvas
  • drawCursors
  • drawSignal
  • drawFFT
  • drawGrid
  • removeSpikes
  • drawZoomRectangle
  • resetZoom
  • drawTriggerCursor

infoComputing.js

Description:
  • This file contains every fonction needed to compute a result to display on-screen as numbers or as signals, etc.

    Functions included in this file :

    • getTimeScale
    • getTimePerDiv
    • mapVoltageToRaw
    • mapRawToVoltage
    • getTimeBetweenCursors
    • getMillivoltsBetweenCursors
    • getMilliVoltForACursor
    • getMilliVoltsRelativeToTriggerCursor
    • getTimeForACursor
    • setScreenInformation
    • generatePoints
    • calculateAutoMeasures
    • getMilliVoltsPerDiv
    • updateGeneratedMathSignalsData
    • toggleMeasurement
    • resetMeasurements
    • getPositionRelativeToTriggerCursor
    • updateTriggerSettings
    • calculateZoomFactors
Source:
Version:
  • 1.0.0
Since:
  • 2024-05-31
Author:
  • Owen Pichot
License:
  • Public Domain

This file contains every fonction needed to compute a result to display on-screen as numbers or as signals, etc.

Functions included in this file :

  • getTimeScale
  • getTimePerDiv
  • mapVoltageToRaw
  • mapRawToVoltage
  • getTimeBetweenCursors
  • getMillivoltsBetweenCursors
  • getMilliVoltForACursor
  • getMilliVoltsRelativeToTriggerCursor
  • getTimeForACursor
  • setScreenInformation
  • generatePoints
  • calculateAutoMeasures
  • getMilliVoltsPerDiv
  • updateGeneratedMathSignalsData
  • toggleMeasurement
  • resetMeasurements
  • getPositionRelativeToTriggerCursor
  • updateTriggerSettings
  • calculateZoomFactors

infoExport.js

Description:
  • This file contains every function that allows a user to download data may that be pictures or another file type (.csv, base64, etc..).

    Functions included in this file :

    • downloadCanvasAsImage
    • copyCanvasToClipboard
    • downloadDataToCsv
Source:
Version:
  • 1.0.0
Since:
  • 2024-05-31
Author:
  • Owen Pichot
License:
  • Public Domain

This file contains every function that allows a user to download data may that be pictures or another file type (.csv, base64, etc..).

Functions included in this file :

  • downloadCanvasAsImage
  • copyCanvasToClipboard
  • downloadDataToCsv

main.js

Description:
  • This is the main script file for the project. It is responsible for the main loop drawing the signals on the oscilloscope screen and fetching the data beforehand. Most global variables declared within this file are used throughout all other files. Functions included in this file :

    • getCurrentSettings
    • fetchDataFromFile
    • fetchRawData
    • saveColorChoices
    • environmentSetup
    • MAINLOOP
Source:
Version:
  • 1.0.0
Since:
  • 2024-05-31
Author:
  • Owen Pichot
License:
  • Public Domain

This is the main script file for the project. It is responsible for the main loop drawing the signals on the oscilloscope screen and fetching the data beforehand. Most global variables declared within this file are used throughout all other files. Functions included in this file :

  • getCurrentSettings
  • fetchDataFromFile
  • fetchRawData
  • saveColorChoices
  • environmentSetup
  • MAINLOOP

misc.js

Description:
  • This file contains versatile fonctions without a specific module appartenance.

    Functions included in this file :

    • showToast
    • getMedian
    • formatFrequency
Source:
Version:
  • 1.0.0
Since:
  • 2024-05-31
Author:
  • Owen Pichot
License:
  • Public Domain

This file contains versatile fonctions without a specific module appartenance.

Functions included in this file :

  • showToast
  • getMedian
  • formatFrequency

modal.js

Description:
  • This file contains every function needed to spawn & populate the popup for the sub-menus.

    Functions included in this file :

    • createSelect
    • displayBaseModal
    • hideModal
    • clearModal
    • populateModalForMeasure_AUTO
    • populateModalForSave
    • populateModalForMeasure_MATHS
    • populateModalForTrigger
    • populateModalForCursors
    • populateModalForSize
    • populateModalForDisplay
    • populateModalForSetup
Source:
Version:
  • 1.0.0
Since:
  • 2024-05-31
Author:
  • Owen Pichot
License:
  • Public Domain

This file contains every function needed to spawn & populate the popup for the sub-menus.

Functions included in this file :

  • createSelect
  • displayBaseModal
  • hideModal
  • clearModal
  • populateModalForMeasure_AUTO
  • populateModalForSave
  • populateModalForMeasure_MATHS
  • populateModalForTrigger
  • populateModalForCursors
  • populateModalForSize
  • populateModalForDisplay
  • populateModalForSetup

triggerAndAutoset.js

Description:
  • This file contains the two functions needed to check when the oscilloscope needs to be triggered and to bring back a clipped signal into the screen.

    Functions included in this file :

    • autoset
    • triggerCheck
Source:
Version:
  • 1.0.0
Since:
  • 2024-05-31
Author:
  • Owen Pichot
License:
  • Public Domain

This file contains the two functions needed to check when the oscilloscope needs to be triggered and to bring back a clipped signal into the screen.

Functions included in this file :

  • autoset
  • triggerCheck

ui.js

Description:
  • This file contains every fonction called via an event firing. Some fonctions are also called via user inputs on sub-menus.

    Functions included in this file :

    • changeChannelButtonStatus
    • toggleDisplayForVerticalCursorScrollers + sub-functions
    • toggleDisplayForHorizontalCursorScrollers + sub-functions
    • changeScreenSize + sub-functions
    • changeScreenLightMode
    • setScrollersEvents + sub-functions
    • setupTriggerCursor + sub-functions
Source:
Version:
  • 1.0.0
Since:
  • 2024-05-31
Author:
  • Owen Pichot
License:
  • Public Domain

This file contains every fonction called via an event firing. Some fonctions are also called via user inputs on sub-menus.

Functions included in this file :

  • changeChannelButtonStatus
  • toggleDisplayForVerticalCursorScrollers + sub-functions
  • toggleDisplayForHorizontalCursorScrollers + sub-functions
  • changeScreenSize + sub-functions
  • changeScreenLightMode
  • setScrollersEvents + sub-functions
  • setupTriggerCursor + sub-functions