turn_by_turn

I/O functionality for turn-by-turn BPM measurements data from different particle accelerators

https://github.com/pylhc/turn_by_turn

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary

Keywords

pandas particle-accelerators python read-write
Last synced: 6 months ago · JSON representation

Repository

I/O functionality for turn-by-turn BPM measurements data from different particle accelerators

Basic Info
Statistics
  • Stars: 1
  • Watchers: 9
  • Forks: 0
  • Open Issues: 0
  • Releases: 15
Topics
pandas particle-accelerators python read-write
Created over 4 years ago · Last pushed 8 months ago
Metadata Files
Readme License Zenodo

README.md

Turn-By-Turn

Cron Testing Code Climate coverage Code Climate maintainability (percentage) <!-- GitHub last commit --> PyPI Version GitHub release Conda-forge Version DOI

This package provides reading functionality for turn-by-turn BPM measurements data from different particle accelerators. It also provides writing functionality in the LHC's own SDDS format, through our sdds package. Files are read into a custom-made TbtData dataclass encompassing the relevant information.

See the API documentation for details.

Installing

Installation is easily done via pip: bash python -m pip install turn_by_turn

One can also install in a conda environment via the conda-forge channel with: bash conda install -c conda-forge turn_by_turn

Example Usage

The package is imported as turn_by_turn, and exports top-level functions for reading and writing: ```python import turnbyturn as tbt

Loading a file is simple and returns a custom dataclass named TbtData

data: tbt.TbtData = tbt.read("Beam2@BunchTurn@20181202@200849_739.sdds", datatype="lhc")

Easily access relevant information from the loaded data: transverse data, measurement date,

number of turns, bunches and IDs of the recorded bunches

firstbunchtransversepositions: tbt.TransverseData = data.matrices[0] measurementdate = data.date # a datetime.datetime object

Transverse positions are recorded as pandas DataFrames

firstbunchx = firstbunchtransversepositions.X.copy() firstbunchy = firstbunchtransversepositions.Y.copy()

Do any operations with these as you usually do with pandas

firstbunchmeanx = firstbunch_x.mean()

Average over all bunches/particles at all used BPMs from the measurement

averagedtbt: tbt.TbtData = tbt.utils.generateaverage_tbtdata(data)

Writing out to disk (in the LHC's SDDS format) is simple too, potentially with added noise

tbt.write("pathtooutput.sdds", averaged_tbt, noise=1e-5) ```

License

This project is licensed under the MIT License - see the LICENSE file for details.

Owner

  • Name: PyLHC
  • Login: pylhc
  • Kind: organization
  • Location: CERN

Organisation for the OMC Team at CERN, in BE-ABP-LNO.

GitHub Events

Total
  • Issues event: 1
  • Delete event: 3
  • Issue comment event: 11
  • Push event: 32
  • Pull request review event: 61
  • Pull request review comment event: 93
  • Pull request event: 6
  • Create event: 4
Last Year
  • Issues event: 1
  • Delete event: 3
  • Issue comment event: 11
  • Push event: 32
  • Pull request review event: 61
  • Pull request review comment event: 93
  • Pull request event: 6
  • Create event: 4

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 79
  • Total Committers: 5
  • Avg Commits per committer: 15.8
  • Development Distribution Score (DDS): 0.177
Past Year
  • Commits: 13
  • Committers: 5
  • Avg Commits per committer: 2.6
  • Development Distribution Score (DDS): 0.615
Top Committers
Name Email Commits
Felix Soubelet f****t@p****m 65
Felix Soubelet 1****t@u****m 7
JoschD 2****D@u****m 4
awegsche a****1@g****m 2
fscarlier f****r@u****m 1

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 2
  • Total pull requests: 20
  • Average time to close issues: 12 days
  • Average time to close pull requests: 3 days
  • Total issue authors: 1
  • Total pull request authors: 6
  • Average comments per issue: 1.0
  • Average comments per pull request: 1.3
  • Merged pull requests: 18
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 6
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 days
  • Issue authors: 0
  • Pull request authors: 4
  • Average comments per issue: 0
  • Average comments per pull request: 1.67
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • JoschD (2)
  • emaclean (1)
Pull Request Authors
  • fsoubelet (10)
  • JoschD (10)
  • Mael-Le-Garrec (2)
  • fscarlier (2)
  • jgray-19 (2)
  • awegsche (1)
Top Labels
Issue Labels
bug (1) help wanted (1) enhancement (1) Type: Feature (1)
Pull Request Labels
enhancement (10) CI/CD (5) Type: Release (4) Estimate: Normal (4) Status: Review Needed (4) documentation (3) Type: Feature (3) bug (2) Type: Bug (2) Priority: High (2) Domain: GUI (2) Priority: Medium (2) Estimate: Easy (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 1,329 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 23
  • Total maintainers: 1
pypi.org: turn_by_turn

Read and write turn-by-turn measurement files from different particle accelerator formats.

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,329 Last month
Rankings
Downloads: 6.9%
Dependent packages count: 8.9%
Average: 21.9%
Dependent repos count: 49.9%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: turn_by_turn

Python package to read and write BPM measurement files from different particle accelerators.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 34.0%
Dependent packages count: 51.2%
Average: 52.2%
Forks count: 61.1%
Stargazers count: 62.4%
Last synced: 7 months ago

Dependencies

.github/workflows/coverage.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/cron.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/documentation.yml actions
  • JamesIves/github-pages-deploy-action 3.7.1 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
setup.py pypi