Skip to content

Instantly share code, notes, and snippets.

@xaratustrah
Last active February 18, 2025 08:51
Show Gist options
  • Save xaratustrah/978a62cbd7f3f0ea37dc20529cdb7caf to your computer and use it in GitHub Desktop.
Save xaratustrah/978a62cbd7f3f0ea37dc20529cdb7caf to your computer and use it in GitHub Desktop.
Analysis tool chain

Installing common analysis tools for experiments

Installation

Installing miniforge

please download the latest MINIFORGE from https://github.com/conda-forge/miniforge/releases. The advantage of MINIFORGE is that it by default points to conda-forge channels. The miniforge installation also brings with itself the executable apps like mamba and conda which are compatible.

Pleae choose the proper executable for your system / architecture. i.e. Linux or OSX.

Installation script

By creating an environment, all files will be installed there, which is a very nice feature. Open a terminal, then create a new environment. The name of the environment can be anything. Of course you can also install in an existing environment. The script below does all steps at the same time.

Currently Python 3.10 is supported. After that individual packages can be installed. You can save the following as a script file:

#!/bin/bash
# analysistools_installer.sh
#
# xaratustrah@github

mamba create -n analysistools
mamba activate analysistools
mamba install -y python=3.10 root pyqt pyqtgraph pyfftw

mkdir /tmp/analysistools && cd "$_"
curl -LkSs https://api.github.com/repos/xaratustrah/iqtools/tarball | tar xz -C ./
curl -LkSs https://api.github.com/repos/xaratustrah/barion/tarball | tar xz -C ./
curl -LkSs https://api.github.com/repos/gwgwhc/lisereader/tarball | tar xz -C ./
curl -LkSs https://api.github.com/repos/DFreireF/rionid/tarball | tar xz -C ./
find . -maxdepth 1 -type d -exec bash -c "cd '{}' && pip install -r requirements.txt" \;
find . -maxdepth 1 -type d -exec bash -c "cd '{}' && pip install ." \;
pip install loguru

rm -rf /tmp/analysistools

then call it by:

sh analysistools_installer.sh

Alternatively you can enter each line one by one in the shell.

Usage

You can see your newly created mamba env by:

mamba env list

Then you need to activate it:

mamba activate analysistools

In this environment, you have all of your analysis libraries, and also individual apps like iqtools, barion, iqgui, rionid, etc.

After finishign your work, you can deactivate your environment:

mamba deactivate

Removing everything

In case you need to remove anything, since all installations are done in a mamba environment, you can just delete the whole thing using:

mamba deactivate && mamba env remove -n analysistools

Using Docker

A separate repository hosts a dockerized version of this tutorial, please refer to that repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment