Skip to main content

LatticeJSON

LatticeJSON is a JSON based lattice file format. JSON is able to describe complex data structures, has a human readable syntax and is available in all common programming language. It is therefore an appropriate choice to characterize the magnetic lattice of a particle accelerator.

Specification

This repository contains the Specification of LatticeJSON in form of a JSON Schema.

Example

A LatticeJSON file for a FODO lattice:

{
  "name": "FODO_RING",
  "description": "This is the simplest possible strong focusing lattice.",
  "elements": {
    "D1": {"type": "Drift", "length": 0.55},
    "Q1": {"type": "Quadrupole", "length": 0.2, "k1": 1.2},
    "Q2": {"type": "Quadrupole", "length": 0.4, "k1": -1.2},
    "B1": {"type": "Dipole", "length": 1.5, "angle": 0.392701, "e1": 0.1963505, "e2": 0.1963505}
  },
  "sub_lattices": {
    "FODO": ["Q1", "D1", "B1", "D1", "Q2", "D1", "B1", "D1", "Q1"]
  },

  "lattice": ["FODO", "FODO", "FODO", "FODO", "FODO", "FODO", "FODO", "FODO"]
}

LatticeJSON CLI

Python Version PyPI CI

This repository also contains a Python based commandline tool which is able validate and convert LatticeJSON files into other common lattice file formats.

You can install and update it using pip or pipenv:

pip install -U latticejson

Validate a LatticeJSON file:

latticejson validate /path/to/lattice

Convert a LatticeJSON file into the elegant lattice format:

latticejson convert json elegant /path/to/lattice

To activate Bash completion add

eval "$(_LATTICEJSON_COMPLETE=source latticejson)"

to your .bashrc. Or, create an activation script with:

_LATTICEJSON_COMPLETE=source latticejson > latticejson-complete.sh

License

GNU General Public License v3.0

Metadata

Release files for LatticeJSON 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for LatticeJSON 0.0.2
File Size Uploaded Provenance Actions
latticeJSON-0.0.2.tar.gz 3.7 kB Without provenance Details for latticeJSON-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for LatticeJSON 0.0.2
File Interpreter ABI Platform Actions
latticeJSON-0.0.2-py3-none-any.whl Python 3 none any Details for latticeJSON-0.0.2-py3-none-any.whl

Total release size: 21.7 kB

Release files / latticeJSON-0.0.2.tar.gz

Download URL latticeJSON-0.0.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c7eb9650b386124682f2d77155b5243a9a100ae22a03489e3bf8b61631c75c53
BLAKE2b-256 checksum
How to use checksums
c36bd56c00365d3c963a108f1893a8615e683ab3b3c97bf74c76afad2ebb3c37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

Release files / latticeJSON-0.0.2-py3-none-any.whl

Download URL latticeJSON-0.0.2-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c715bb8f04a71595c8a9cdbbbfd9468f9b7b20b1e482d4c0de05aa79bc7e285c
BLAKE2b-256 checksum
How to use checksums
e5630d06edf994a718e1e84048be6d6bb2ebdd3daa0ef5f16e4b490223cfb41f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

Security for LatticeJSON 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page