Giter Site home page Giter Site logo

lantz's Introduction

Lantz: Simple yet powerful instrumentation in Python

Lantz is an automation and instrumentation toolkit with a clean, well-designed and consistent interface. It provides a core of commonly used functionalities for building applications that communicate with scientific instruments allowing rapid application prototyping, development and testing.

The package is name lantzdev (not lantz) to avoid name collision with previous package.

Installing

You can install the full version very easily:

pip install -U "lantzdev[full]"

All requirements will be automatically installed for you except PyQt.

We suggest that you use Anaconda Python Distribution and use an environment

conda create --name lantz python=3.6 pyqt

conda activate lantz

Having fun

If you do not have the NI-VISA library installed, install the pure python replacement by running the following command in your terminal:

pip install pyvisa-py    

and then tell Lantz to use it:

lantz config core.visa_backend @py

Then start the simulator in one terminal:

lantz sims fungen tcp

and the testpanel in another:

lantz qtdemo testpanel

Installation options

Lantz is organized ina modular way. You can install what you need.

Minimal

If you just want to control instruments, simulate devices and create you own drivers.

pip install -U lantzdev

subpackages used: core, drivers, sims

Arduino

If in aditional to Minimal you want to build arduino drivers.

pip install -U "lantzdev[ino]"
  • subpackages used: core, drivers, sims, ino

  • suggested dependencies: arduino-cli

Qt

If in aditional to Minimal you want to build graphical Qt widgets.

pip install -U "lantzdev[qt]"
  • subpackages used: core, drivers, sims, qt

  • required dependencies: PyQt > 5

Full

pip install -U "lantzdev[full]"
  • subpackages used: core, drivers, sims, ino, qt

  • required dependencies: PyQt > 5

  • suggested dependencies: arduino-cli

Install from git

You can try the latest version by installing from git. On your terminal:

pip install -U https://github.com/lantzproject/lantz-core/zipball/master
pip install -U https://github.com/lantzproject/lantz-drivers/zipball/master
pip install -U https://github.com/lantzproject/lantz-qt/zipball/master
pip install -U https://github.com/lantzproject/lantz-sims/zipball/master
pip install -U https://github.com/lantzproject/lantz-ino/zipball/master
pip install -U https://github.com/lantzproject/lantz/zipball/master

lantz's People

Contributors

hgrecco avatar jondoesntgit avatar onealj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lantz's Issues

Symbols to export in 0.6

The following symbols should be re exported from lantz and imported by users directly from there (not from the subpackages)

  • LibraryDriver
  • ureg
  • InstrumentError

ValueError: '0' is not in list

When running lantz sims fungen tcp, I get the following error:

Traceback (most recent call last):
  File "/Users/wheelerj/miniconda3/lib/python3.6/site-packages/lantz/qt/widgets/common.py", line 162, in on_feat_value_changed
    self.setValue(value)
  File "/Users/wheelerj/miniconda3/lib/python3.6/site-packages/lantz/qt/widgets/nonnumeric.py", line 42, in setValue
    self.setCurrentIndex(self.__values.index(value))
ValueError: '0' is not in list

Multiple projects

Hi @hgrecco,

what has been the motivation behind splitting lantz into multiple repositories? I've just started to look into what changed in lantz with your reboot and have to say find the split somewhat confusing. If I want to look into the different aspects I will have to somehow combine them again into a single repository with submodules, which somewhat defeats the purpose. I thought the general advise for git repositories is to keep things that belong together (e.g. depend on each other) together (see e.g. this write-up https://tech.labs.oliverwyman.com/blog/2019/01/28/split-git/). I think you might make more difficult than necessary to get quick contributions. Hope this does not come across overly critical I really like lantz.

No module named 'visa'

I install lantz as described in README.md and get the following error when setting visa backend:

> pip install -U "lantzdev[full]"
> pip install pyvisa-py
> lantz config core.visa_backend @py
Traceback (most recent call last):
  File "C:\Tools\WPy64-31040\python-3.10.4.amd64\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Tools\WPy64-31040\python-3.10.4.amd64\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Tools\WPy64-31040\python-3.10.4.amd64\Scripts\lantz.exe\__main__.py", line 4, in <module>
  File "C:\Tools\WPy64-31040\python-3.10.4.amd64\lib\site-packages\lantz\__init__.py", line 7, in <module>
    from lantz.core import Driver, MessageBasedDriver
  File "C:\Tools\WPy64-31040\python-3.10.4.amd64\lib\site-packages\lantz\core\__init__.py", line 35, in <module>
    from .messagebased import MessageBasedDriver
  File "C:\Tools\WPy64-31040\python-3.10.4.amd64\lib\site-packages\lantz\core\messagebased.py", line 15, in <module>
    import visa
ModuleNotFoundError: No module named 'visa'

In python session I can import pyvisa but not visa:

>>> import visa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'visa'
>>> import pyvisa
>>>
```

No module named 'lantz.log'

After the install that I followed from the README.md, I get the following error:

>>> from lantz.log import log_to_screen
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'lantz.log'
>>>

module errors: ModuleNotFoundError: No module named 'lantz.errors'

Just installed lantz with pyvisa-py,
lantz sims fungen tcp is working but then lantz qtdemo testpanel fail

i can find error.py in lantz/core/ but dunno how to got further.

Thanks

(lantz) bruyant@tartampion:~$ lantz qtdemo testpanel
Please make sure that the simulator is running.
You can start it by running the following command in another terminal:

lantz sims fungen tcp
Traceback (most recent call last):
  File "/home/bruyant/anaconda3/envs/lantz/bin/lantz", line 11, in <module>
    sys.exit(main())
  File "/home/bruyant/anaconda3/envs/lantz/lib/python3.6/site-packages/lantz/__main__.py", line 33, in main
    parser.dispatch(args)
  File "/home/bruyant/anaconda3/envs/lantz/lib/python3.6/site-packages/lantz/__init__.py", line 40, in dispatch
    self.__choices[required_value](pending)
  File "/home/bruyant/anaconda3/envs/lantz/lib/python3.6/site-packages/lantz/qt/__main__.py", line 10, in main
    parser.dispatch(args)
  File "/home/bruyant/anaconda3/envs/lantz/lib/python3.6/site-packages/lantz/__init__.py", line 40, in dispatch
    self.__choices[required_value](pending)
  File "/home/bruyant/anaconda3/envs/lantz/lib/python3.6/site-packages/lantz/qt/__main__.py", line 29, in testpanel_demo
    from lantz.drivers.examples import LantzSignalGenerator
  File "/home/bruyant/anaconda3/envs/lantz/lib/python3.6/site-packages/lantz/drivers/examples/__init__.py", line 16, in <module>
    from .fungen import LantzSignalGenerator
  File "/home/bruyant/anaconda3/envs/lantz/lib/python3.6/site-packages/lantz/drivers/examples/fungen.py", line 13, in <module>
    from lantz.errors import InstrumentError
ModuleNotFoundError: No module named 'lantz.errors'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.