Skip to content

Repository files navigation

pyapas

pyapas is a python-based accelerator physics application set.

Authors

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),

Required libraries

The native environment of pyapas is ubuntu (>18.04) or centos (>7); the guidelines in the following will assume that this is the case.

Installation

1. Download the source code

Firstly, clone the project to your local machine.

git clone https://github.com/luxiaohan/pyapas.git
cd pyapas

Then, initialize and update the submodules:

git submodule update --init --recursive

Or if you encounter issues, try:

git submodule sync
git submodule update --init --recursive

2. Setup the running environment

You can set up the environment by sourcing the setup script:

source setup_environment.sh

This 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 .

Usage

Running pyapas

After setting up the environment, you can run pyapas by simply typing:

pyapas

Creating a new application

To 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.py

Project Structure

  • pyapas/: Main source code directory
    • apps/: Application modules (e.g., lattice viewer, orbit correction, etc.)
    • cores/: Core libraries and utilities
    • extensions/: Extensions for external tools (e.g., Ocelot, AT)
    • services/: Service modules
    • sites/: Site-specific configurations
    • templates/: Templates for creating new applications
  • bin/: Executable scripts
  • docs/: Documentation files

Documentation

For more detailed documentation, please refer to the docs directory.

License

This project is licensed under the GNU General Public License v3 - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages