pyapas is a python-based accelerator physics application set.
X. Lu (CSNS, IHEP), Y.L. Zhao (IHEP), C. Meng (IHEP), Y.M. Peng (IHEP), H.F. Ji (IHEP), N. Li (IHEP), J.Y. Wan (IHEP),
The native environment of pyapas is ubuntu (>18.04) or centos (>7); the guidelines in the following will assume that this is the case.
Firstly, clone the project to your local machine.
git clone https://github.com/luxiaohan/pyapas.git
cd pyapasThen, initialize and update the submodules:
git submodule update --init --recursiveOr if you encounter issues, try:
git submodule sync
git submodule update --init --recursiveYou can set up the environment by sourcing the setup script:
source setup_environment.shThis will add the necessary paths to your environment variables. To make it permanent, you can add the above command to your .bashrc or .zshrc file.
Alternatively, you can install pyapas as a Python package. It is recommended to use a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Linux/Mac
# or
# venv\Scripts\activate # On Windows
pip install -e .After setting up the environment, you can run pyapas by simply typing:
pyapasTo create a new application, use the pyapasinit script:
cd pyapas/apps
pyapasinit 0 new_app # Create a general app
# or
pyapasinit 1 new_acc_app # Create an accelerator app
cd new_app
python main.pypyapas/: Main source code directoryapps/: Application modules (e.g., lattice viewer, orbit correction, etc.)cores/: Core libraries and utilitiesextensions/: Extensions for external tools (e.g., Ocelot, AT)services/: Service modulessites/: Site-specific configurationstemplates/: Templates for creating new applications
bin/: Executable scriptsdocs/: Documentation files
For more detailed documentation, please refer to the docs directory.
This project is licensed under the GNU General Public License v3 - see the LICENSE file for details.
