Skip to main content

A python library for longitudinal particle beam tomography

Project description

https://gitlab.cern.ch/longitudinaltomography/tomographyv3/badges/master/pipeline.svg https://gitlab.cern.ch/longitudinaltomography/tomographyv3/badges/master/coverage.svg

Copyright 2020 CERN. This software is distributed under the terms of the GNU General Public Licence version 3 (GPL Version 3), copied verbatim in the file LICENCE.txt. In applying this licence, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction.

INSTALLATION

The computationally intensive or time-critical parts of the library is written in C++ and python bindings are provided using pybind11. The installation and usage of the library is the same for all operating systems, but different dependencies are needed for different operating systems.

Prerequisites

Linux

You need a C++ compiler like g++ installed. This is not required if installing a prebuilt package from acc-py or pypi.

Windows

On Windows computers MSVC >= 14.0 with the Windows 10 SDK is required.

In MinGW and WSL environments the standard g++ compiler works out of the box.

MacOS

No offical tests have been done on MacOS, but presumably g++, clang/llvm should work.

Install

The Longitudinal Tomography package is available in prebuilt wheels for Python 3.6-3.9 on CERN Acc-Py and pypy.org as longitudinal-tomography. The package can thus easily be installed on a Linux machine using

pip install longitudinal-tomography

The package can be installed on a MacOS or Windows machine in the same manner, but the C++ extension will be built on install.

Other ways to install

Clone the repository and run

pip install .

The C++ extension will be built on install.

For development environments where it’s preferable to compile the C++ extension inplace, it’s possible to run the command

pip install -e .

which will compile the C++ extension using the available compiler (decided by setuptools).

Documentation

This development is based on the well tested and widely used FORTRAN95 code, documented and available here: http://tomograp.web.cern.ch/tomograp/ Details on the algorithms in both codes, and the differences between them, can be found here: https://cdsweb.cern.ch/record/2750116?ln=ka

Parallelization using OpenMP

The C++ extension is accelerated by OpenMP parallel for loops. It is possible to limit the number of launched threads by setting it in the extension, by

from longitudinal_tomography.cpp_routines import libtomo
libtomo.set_num_threads([num_threads])

which will set the maximum number of used threads to [num_threads].

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

longitudinal_tomography-3.4.2.dev0.tar.gz (79.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file longitudinal_tomography-3.4.2.dev0.tar.gz.

File metadata

  • Download URL: longitudinal_tomography-3.4.2.dev0.tar.gz
  • Upload date:
  • Size: 79.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for longitudinal_tomography-3.4.2.dev0.tar.gz
Algorithm Hash digest
SHA256 ec87ee43e8bccdf1e64879eca85250d332931a3672f863be912fbdbdf332c074
MD5 c61201d4cc2bbdb0af422f181187d21d
BLAKE2b-256 2261e3428f15a9333d85e37954a0897b86d6d4b7d7d61eafafe60a3f72f81e9f

See more details on using hashes here.

File details

Details for the file longitudinal_tomography-3.4.2.dev0-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for longitudinal_tomography-3.4.2.dev0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 018e7f3c49d6aa2d67c05fd2e8bd16c4e9559521e809b05ff111a46db065d805
MD5 0648e5f42a36266361682e043041d391
BLAKE2b-256 27d9bd8b84be64d4e06de1309583fcaa2ef7b50d97b1af349d1fefca7b26af79

See more details on using hashes here.

File details

Details for the file longitudinal_tomography-3.4.2.dev0-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for longitudinal_tomography-3.4.2.dev0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b312fc07942feaef30ab39b09d37210db0e5884cb3950e938c348e21e4d4d0e0
MD5 6add337e82885e40228492368cdf87fe
BLAKE2b-256 a90cdeb62b2fccc418e989308e68056b3503dd5823478c5d199c1fe8d2034c42

See more details on using hashes here.

File details

Details for the file longitudinal_tomography-3.4.2.dev0-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for longitudinal_tomography-3.4.2.dev0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b971db7522ff89b6d2b3282a101d54d02479b81755ea83bf34aa2b596c67a71
MD5 e1fdad278a289e6944f58c9fa6094d68
BLAKE2b-256 5e7a5b68f2f4829ad90704f63c04b345aebcf21aefdcf35a7722322884a73c88

See more details on using hashes here.

File details

Details for the file longitudinal_tomography-3.4.2.dev0-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for longitudinal_tomography-3.4.2.dev0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ec1d18f104c99b359ed1b64a52f740678f9a7b267d020a864a4b6ee1be07e5a
MD5 e7615607007947781136cd454d0a76d0
BLAKE2b-256 21853deb2646f9a795e68024afee52df357a8bc5832ab973f102a105a7b797e7

See more details on using hashes here.

Supported by

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