Skip to main content

Data acquisition and generation with live visualization.

Project description

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:

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.

Create the Core object

The acq object can now be added to the LDAQ.Core class:

ldaq = LDAQ.Core(acq)

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:

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.

Run the measurement

The measurement can now be started by calling the run method:

ldaq.run()

Save the measurement

After the measurement is completed, the data can be saved by calling:

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).

  • Apply virtual channels to acquisition objects, to perform calculations on the acquired data (see virtual channels).

  • Add visualization to the LDAQ.Core object (see visualization).

  • Apply functions to measured data in real-time visualization (see visualization).

  • Add multiple acquisition and signal generation objects to LDAQ.Core (see multiple sources).

  • Define a NI Task in your program and use it with LDAQ (see NI Task).

  • Currently the package supports a limited set of devices from National Instruments, Digilent, FLIR, Basler and devices using serial communication (see supported devices).

  • Create your own acquisition class by overriding just few methods (see custom acquisition).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ldaq-1.0.3.tar.gz (351.9 kB view details)

Uploaded Source

Built Distribution

ldaq-1.0.3-py3-none-any.whl (110.3 kB view details)

Uploaded Python 3

File details

Details for the file ldaq-1.0.3.tar.gz.

File metadata

  • Download URL: ldaq-1.0.3.tar.gz
  • Upload date:
  • Size: 351.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for ldaq-1.0.3.tar.gz
Algorithm Hash digest
SHA256 063d2e06ce6850cbf9ee20615522c017e8f801af5b49f69ae2c5ab1ef961987b
MD5 6610c8ee908ebdd75976278ba1aab20c
BLAKE2b-256 2f1c42a297f362ab1ef83a9e66dc669db684bbe9504eb1fc167140527e219b66

See more details on using hashes here.

File details

Details for the file ldaq-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: ldaq-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 110.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for ldaq-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c96923b663978558ae49cc477fc08a142bf506e55f96a02c942e9361a1b769a8
MD5 b46c71739125500c5a915f04ee081086
BLAKE2b-256 c4875f49b605b9e6985da820a69e4dc0a24ed551879bc1a4d753877ba2d66416

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page