Name | LDAQ JSON |
Version |
1.0.3
JSON |
| download |
home_page | |
Summary | Data acquisition and generation with live visualization. |
upload_time | 2023-11-14 07:46:19 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.10 |
license | |
keywords |
data acquisition
data generation
live visualization
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
|
coveralls test coverage |
No coveralls.
|
LDAQ
====
Data acquisition and generation with live visualization.
Installation
============
The package can be installed from PyPI using pip:
.. code-block::
pip install LDAQ
Getting started
===============
Create the acquisition object
-----------------------------
The first step to starting the measurement is to create an acquisition object. Depending on your measurement hardware,
you can select the appropriate acquisition class.
In this example, we use the ``LDAQ.national_instruments.NIAcquisition`` class, which is
a wrapper for the National Instruments DAQmx driver. The class accepts the name of the input task as an argument:
.. code-block:: python
acq = LDAQ.national_instruments.NIAcquisition(input_task_name, acquisition_name='DataSource')
If the ``acquisition_name`` argument is not specified, the name of the acquisition object will be set to the value of ``input_task_name``.
The ``acquisition_name`` argument is important when using multiple acquisition objects in the same measurement, and when specifying the layout of the
live `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_.
Create the ``Core`` object
--------------------------
The ``acq`` object can now be added to the ``LDAQ.Core`` class:
.. code-block:: python
ldaq = LDAQ.Core(acq)
.. note::
To add live visualization of the measurement, the visualization object can be added to the ``LDAQ.Core`` object:
.. code-block:: python
ldaq = LDAQ.Core(acq, visualization=vis)
Read how to prepare the ``vis`` object in the `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_ section.
Set the trigger
---------------
Often the measurement is started when one of the signal excedes a certain level. This can be achieved by setting the trigger on one of the data sources by calling the ``set_trigger`` method:
.. code-block:: python
ldaq.set_trigger(
source='DataSource',
level=100,
channel=0,
duration=11,
presamples=10
)
Where:
- ``source``: the name of the acquisition object on which the trigger is set.
- ``level``: the trigger level.
- ``channel``: the channel on which the trigger is set.
- ``duration``: the duration of the trigger in seconds.
- ``presamples``: the number of samples to be acquired before the trigger is detected.
.. note::
The ``LDAQ.Core`` may seem unnecessary when using a single acquisition source.
However, it enables the simultaneous usage of signal `generation <https://ldaq.readthedocs.io/en/latest/generation.html>`_, live `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_
and `multiple acquisition/generation <https://ldaq.readthedocs.io/en/latest/multiple_sources.html>`_ sources.
Run the measurement
-------------------
The measurement can now be started by calling the ``run`` method:
.. code-block:: python
ldaq.run()
Save the measurement
--------------------
After the measurement is completed, the data can be saved by calling:
.. code-block:: python
ldaq.save_measurement(
name='my_measurement',
root=path_to_save_folder,
timestamp=True,
comment='my comment'
)
Where:
- ``name``: required, the name of the measurement, without extension (``.pkl`` is added automatically).
- ``root``: optional, the path to the folder where the measurement will be saved. If it is not given, the measurement will be saved in the current working directory.
- ``timestamp``: optional, add a timestamp at the beginning of the file name.
- ``comment``: optional, a comment to be saved with the measurement.
What else can I do with LDAQ?
-----------------------------
- Add generation to the ``LDAQ.Core`` object (see `generation <https://ldaq.readthedocs.io/en/latest/generation.html>`_).
- Apply virtual channels to acquisition objects, to perform calculations on the acquired data (see `virtual channels <https://ldaq.readthedocs.io/en/latest/virtual_channels.html>`_).
- Add visualization to the ``LDAQ.Core`` object (see `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_).
- Apply functions to measured data in real-time visualization (see `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_).
- Add multiple acquisition and signal generation objects to ``LDAQ.Core`` (see `multiple sources <https://ldaq.readthedocs.io/en/latest/multiple_sources.html>`_).
- Define a NI Task in your program and use it with ``LDAQ`` (see `NI Task <https://ldaq.readthedocs.io/en/latest/ni_task.html>`_).
- Currently the package supports a limited set of devices from National Instruments, Digilent, FLIR, Basler and devices using serial communication (see `supported devices <https://ldaq.readthedocs.io/en/latest/supported_devices.html>`_).
- Create your own acquisition class by overriding just few methods (see `custom acquisition <https://ldaq.readthedocs.io/en/latest/custom_acquisitions_and_generations.html>`_).
Raw data
{
"_id": null,
"home_page": "",
"name": "LDAQ",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "\"Tilen Ko\u0161ir, Klemen Zaletelj\" <klemen.zaletelj@fs.uni-lj.si>",
"keywords": "data acquisition,data generation,live visualization",
"author": "",
"author_email": "\"Tilen Ko\u0161ir, Klemen Zaletelj, Janko Slavi\u010d\" <janko.slavic@fs.uni-lj.si>",
"download_url": "https://files.pythonhosted.org/packages/2f/1c/42a297f362ab1ef83a9e66dc669db684bbe9504eb1fc167140527e219b66/ldaq-1.0.3.tar.gz",
"platform": null,
"description": "LDAQ\n====\n\nData acquisition and generation with live visualization.\n\nInstallation\n============\n\nThe package can be installed from PyPI using pip:\n.. code-block::\n\n pip install LDAQ\n\nGetting started\n===============\n\nCreate the acquisition object\n-----------------------------\n\nThe first step to starting the measurement is to create an acquisition object. Depending on your measurement hardware,\nyou can select the appropriate acquisition class. \n\nIn this example, we use the ``LDAQ.national_instruments.NIAcquisition`` class, which is\na wrapper for the National Instruments DAQmx driver. The class accepts the name of the input task as an argument:\n\n.. code-block:: python\n\n acq = LDAQ.national_instruments.NIAcquisition(input_task_name, acquisition_name='DataSource')\n\nIf the ``acquisition_name`` argument is not specified, the name of the acquisition object will be set to the value of ``input_task_name``.\n\nThe ``acquisition_name`` argument is important when using multiple acquisition objects in the same measurement, and when specifying the layout of the\nlive `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_.\n\nCreate the ``Core`` object\n--------------------------\n\nThe ``acq`` object can now be added to the ``LDAQ.Core`` class:\n\n.. code-block:: python\n\n ldaq = LDAQ.Core(acq)\n\n.. note::\n\n To add live visualization of the measurement, the visualization object can be added to the ``LDAQ.Core`` object:\n\n .. code-block:: python\n\n ldaq = LDAQ.Core(acq, visualization=vis)\n\n Read how to prepare the ``vis`` object in the `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_ section.\n\nSet the trigger\n---------------\n\nOften the measurement is started when one of the signal excedes a certain level. This can be achieved by setting the trigger on one of the data sources by calling the ``set_trigger`` method:\n\n.. code-block:: python\n \n ldaq.set_trigger(\n source='DataSource',\n level=100,\n channel=0, \n duration=11, \n presamples=10\n )\n\nWhere:\n\n- ``source``: the name of the acquisition object on which the trigger is set.\n- ``level``: the trigger level.\n- ``channel``: the channel on which the trigger is set.\n- ``duration``: the duration of the trigger in seconds.\n- ``presamples``: the number of samples to be acquired before the trigger is detected.\n\n.. note::\n\n The ``LDAQ.Core`` may seem unnecessary when using a single acquisition source.\n However, it enables the simultaneous usage of signal `generation <https://ldaq.readthedocs.io/en/latest/generation.html>`_, live `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_ \n and `multiple acquisition/generation <https://ldaq.readthedocs.io/en/latest/multiple_sources.html>`_ sources.\n\nRun the measurement\n-------------------\n\nThe measurement can now be started by calling the ``run`` method:\n\n.. code-block:: python\n\n ldaq.run()\n\nSave the measurement\n--------------------\n\nAfter the measurement is completed, the data can be saved by calling:\n\n.. code-block:: python\n\n ldaq.save_measurement(\n name='my_measurement',\n root=path_to_save_folder,\n timestamp=True,\n comment='my comment'\n )\n\nWhere:\n\n- ``name``: required, the name of the measurement, without extension (``.pkl`` is added automatically).\n- ``root``: optional, the path to the folder where the measurement will be saved. If it is not given, the measurement will be saved in the current working directory.\n- ``timestamp``: optional, add a timestamp at the beginning of the file name.\n- ``comment``: optional, a comment to be saved with the measurement.\n\nWhat else can I do with LDAQ?\n-----------------------------\n\n- Add generation to the ``LDAQ.Core`` object (see `generation <https://ldaq.readthedocs.io/en/latest/generation.html>`_).\n- Apply virtual channels to acquisition objects, to perform calculations on the acquired data (see `virtual channels <https://ldaq.readthedocs.io/en/latest/virtual_channels.html>`_).\n- Add visualization to the ``LDAQ.Core`` object (see `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_).\n- Apply functions to measured data in real-time visualization (see `visualization <https://ldaq.readthedocs.io/en/latest/visualization.html>`_).\n- Add multiple acquisition and signal generation objects to ``LDAQ.Core`` (see `multiple sources <https://ldaq.readthedocs.io/en/latest/multiple_sources.html>`_).\n- Define a NI Task in your program and use it with ``LDAQ`` (see `NI Task <https://ldaq.readthedocs.io/en/latest/ni_task.html>`_).\n- Currently the package supports a limited set of devices from National Instruments, Digilent, FLIR, Basler and devices using serial communication (see `supported devices <https://ldaq.readthedocs.io/en/latest/supported_devices.html>`_).\n- Create your own acquisition class by overriding just few methods (see `custom acquisition <https://ldaq.readthedocs.io/en/latest/custom_acquisitions_and_generations.html>`_).",
"bugtrack_url": null,
"license": "",
"summary": "Data acquisition and generation with live visualization.",
"version": "1.0.3",
"project_urls": {
"documentation": "https://ldaq.readthedocs.io/en/latest/",
"homepage": "https://github.com/ladisk/LDAQ",
"source": "https://github.com/ladisk/LDAQ"
},
"split_keywords": [
"data acquisition",
"data generation",
"live visualization"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c4875f49b605b9e6985da820a69e4dc0a24ed551879bc1a4d753877ba2d66416",
"md5": "b46c71739125500c5a915f04ee081086",
"sha256": "c96923b663978558ae49cc477fc08a142bf506e55f96a02c942e9361a1b769a8"
},
"downloads": -1,
"filename": "ldaq-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b46c71739125500c5a915f04ee081086",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 110328,
"upload_time": "2023-11-14T07:46:17",
"upload_time_iso_8601": "2023-11-14T07:46:17.383023Z",
"url": "https://files.pythonhosted.org/packages/c4/87/5f49b605b9e6985da820a69e4dc0a24ed551879bc1a4d753877ba2d66416/ldaq-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2f1c42a297f362ab1ef83a9e66dc669db684bbe9504eb1fc167140527e219b66",
"md5": "6610c8ee908ebdd75976278ba1aab20c",
"sha256": "063d2e06ce6850cbf9ee20615522c017e8f801af5b49f69ae2c5ab1ef961987b"
},
"downloads": -1,
"filename": "ldaq-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "6610c8ee908ebdd75976278ba1aab20c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 351852,
"upload_time": "2023-11-14T07:46:19",
"upload_time_iso_8601": "2023-11-14T07:46:19.238540Z",
"url": "https://files.pythonhosted.org/packages/2f/1c/42a297f362ab1ef83a9e66dc669db684bbe9504eb1fc167140527e219b66/ldaq-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-14 07:46:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ladisk",
"github_project": "LDAQ",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "ldaq"
}