THIS REPOSITORY IS COPIED FROM https://gitlab.nikhef.nl/muonlab/muonlab AND UPDATED TO WORK ON SMALLER SCREENS (only /GUI/MuonLab_GUI.py was changed). THE ORIGINAL REPOSITORY IS STILL MAINTAINED AND SHOULD BE USED FOR ANY QUESTIONS OR ISSUES.
The NIKHEF MuonLab III detector is a commercially available particle detector. With this code, it can be used to perform various experiments, like determining the lifetime of muons and their velocities, either through a GUI or through a terminal controller. Additionally, ipynb notebooks are provided to perform guided data analysis on the measurements performed. They are written to be accessible, and require no previous knowledge of Python.
For more information on the MuonLab detector, see: https://www.nikhef.nl/muonlab/
Open a terminal (also possible in Visual Studio Code) and navigate to the folder you would like the software to be installed in. If you have git installed, run the commands:
# Clone the repository
cd TIS-TN-SCRIPTS/raspberry-pi/muonlab
bash run-gui.bash -d # Install dependencies
bash run-gui.bash # Run the GUI in the global environment
bash run-gui.bash -v # Run the GUI in a virtual environment (usefull for development)The GUI allows the user to change all available settings on the MuonLab, run all available experiments and save the results of the experiments in a .csv file. It is designed to be operated without any coding or experimental experience. Simply choose your settings, choose your experiment and click 'run'. When starting an experiment, a file name is asked of the user under which all data will be saved. The program automatically saves data every thirty seconds during measurements. To run the GUI, run the command:
python GUI/MuonLab_GUI.pyIMPORTANT: only run the GUI with the pmt_type variable set to non-default if you are completely sure of the PMT type contained in your setup. Running the setup with the wrong PMT settings can damage your hardware. Contact NIKHEF in case of doubt.
Some older setups like the NIKHEF Leskisten are built with different PMT's than the most recent version. These older PMT's need a higher voltage, which can be enabled by adding a pmt_type flag:
python GUI/MuonLab_GUI.py --pmt_type R580The command line interface controls the MuonLab through the command line. It can execute all MuonLab experiments and automatically sets the detector settings to optimal values. For longer lasting measurements it is recommended to use the GUI, as the command line interface only saves the data after the measurement is complete, and not during the measurement like the GUI does. To run the command line interface, run the following command and add the experiment to run (without brackets):
python terminal_controllers/MuonLab_terminal_controller.py <your experiment>To read all available options of the command line interface, run the help command:
python terminal_controllers/MuonLab_terminal_controller.py -hipynb notebooks are available for measurement analysis. They are based around data taken using the MuonLab detector, but can also be run using the sample data "Sample data.csv" in the data folder. It is recommended to run the notebooks using Google CoLab, as this does not require any python or Jupyter installation and can thus be done by anybody on any computer. Simply open a CoLab window and upload the .ipynb file and a data file using a Google account.
This project was migrated from GitHub. This is the actively maintained version and should therefore be used when operating the MuonLab detectors.
- Primary author: Wolf Gautier
- Improvements: Rowen Hersche, Tijl Rohde, Bas Klein Ikkink