https://github.com/diamondlightsource/pmacparser
Delta Tau PMAC syntax parser and kinematics emulator
https://github.com/diamondlightsource/pmacparser
from-dls-controls
Last synced: about 1 month ago
JSON representation
Delta Tau PMAC syntax parser and kinematics emulator
- Host: GitHub
- URL: https://github.com/diamondlightsource/pmacparser
- Owner: DiamondLightSource
- License: apache-2.0
- Created: 2018-02-16T08:54:50.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-12T13:07:27.000Z (over 1 year ago)
- Last Synced: 2025-10-28T12:54:00.706Z (2 months ago)
- Topics: from-dls-controls
- Language: Python
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
PMACParser
================
|Build Status| |Coverage Status| |Code Health|
PMACParser is a library that parses PMAC programs.
It includes an emulator for forward kinematic programs,
which parses the program and then, using an input dictionary of
variables, runs the program, returning a dictionary of populated
variables based on the operations of the kinematic program.
Documentation
-------------
To use:
from pmacparser.pmac_parser import PMACParser
code_lines = ["Q1=(P(4800+1)*P1+P(4900+1))", "Q5=(P(4800+2)*P2+P(4900+2))"]
input_vars = {"P1": 51, "P2": 345.3, "P4801": 45.4, "P4802": 162.4, "P4901": 4, "P4902": 5}
parser = PMACParser(code_lines)
output_vars = parser.parse(input_vars)
.. |Build Status| image:: https://api.travis-ci.org/DiamondLightSource/pmacparser.svg
:target: https://travis-ci.org/DiamondLightSource/pmacparser
.. |Coverage Status| image:: https://coveralls.io/repos/github/DiamondLightSource/pmacparser/badge.svg?branch=master
:target: https://coveralls.io/github/DiamondLightSource/pmacparser?branch=master
.. |Code Health| image:: https://landscape.io/github/DiamondLightSource/pmacparser/master/landscape.svg?style=flat
:target: https://landscape.io/github/DiamondLightSource/pmacparser/master