Skip to main content

"A program for calculating and plotting positron cross sections."

Project description

Positron Cross Section Analysis

This is a python application that assists with the analysis and plotting of positron cross sections

pre-commit

Installation

To install the positron cross section application, ensure that you have python version 3.7 or greater

python --version

and then install with

python -m pip install --upgrade pip
python -m pip install positron-cross-section

You can then run the application using the command

positron-cross-section cross_section_data.csv

which will produce total cross section plots in the output folder.

Development environment installation instructions

Setting up Python Environment

The python code in this application requires a development environment with python 3.9 or greater. To maintain the integrity of other python applications on your system, it is highly recommended to use a separate python environment for the positron cross section application, however it can also be installed directly if your python version meets the requirements.

Installing a python environment

To set up a separate python environment (recommended), we will use pyenv which allows us to isolate the positron cross section development environment and python version. To install pyenv, please follow the instructions detailed here. During this installation, you will get the warning

WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by adding
# the following to ~/.bashrc:

To add this text to ~./bashrc, run the command

echo 'export PATH="$HOME/.pyenv/bin:$PATH"
export PATH="$HOME/.pyenv/shims:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc

You now need to reload your shell which can be done by restarting your terminal or running the command

exec $SHELL

To create a pyenv environment called positrons for this application with python version 3.9.5, run the commands

  1. pyenv install 3.9.5

  2. pyenv virtualenv 3.9.5 positrons

Then, prior to following the installation steps below and before each time using the positron-cross-section application, you will need to enter the positrons python environment using the command

pyenv activate positrons

Downloading and installing the positron cross section application

To download the source code and install the application, please open a terminal, navigate to the folder in which you would like to perform the installation and run the commands

  1. git clone https://github.com/ryanstocks00/positron-cross-section

  2. cd positron-cross-section

  3. source tools/install-dev-env

Congratulations! The poistron cross section application is now (hopefully) successfully installed and can be run using the command

positron-cross-section --help

in a new terminal window.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

positron_cross_section-0.0.42.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

positron_cross_section-0.0.42-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page