Skip to main content

Data types for NI Python APIs

Project description

Info Data types for NI Python APIs
Author National Instruments

Table of Contents

About

The nitypes Python package defines data types for NI Python APIs:

  • Analog and complex waveforms
  • Frequency spectrums
  • Complex integers
  • Time conversion

NI created and supports this package.

Documentation

See the API Reference.

Operating System Support

nitypes supports Windows and Linux operating systems.

Python Version Support

nitypes supports CPython 3.9+ and PyPy3.

Installation

Installing NI driver Python APIs that support waveforms will automatically install nitypes.

You can also directly install the nitypes package using pip or by listing it as a dependency in your project's pyproject.toml file.

Waveforms

Analog Waveforms

The nitypes.waveform.AnalogWaveform class represents a single analog signal with timing information and extended properties (such as channel name and units). Multi-channel analog data is represented using a collection of waveforms, such as list[nitypes.waveform.AnalogWaveform]. For more details, see Analog Waveforms in the API Reference.

Complex Waveforms

The nitypes.waveform.ComplexWaveform class represents a complex-number signal, such as I/Q data, with timing information and extended properties (such as channel name and units). For more details, see Complex Waveforms in the API Reference.

Frequency Spectrums

The nitypes.waveform.Spectrum class represents a frequency spectrum with frequency range information and extended properties (such as channel name and units). For more details, see Frequency Spectrums in the API Reference.

Complex Numbers

Complex Integers

nitypes.complex.ComplexInt32DType is a NumPy structured data type object representing a complex integer with 16-bit real and imag fields. This structured data type has the same memory layout as the NIComplexI16 C struct used by NI driver APIs. For more details, see Complex Integers in the API Reference.

Complex Number Conversion

You can use the nitypes.complex.convert_complex() function to convert complex-number NumPy arrays between nitypes.complex.ComplexInt32DType and the standard np.complex64 and np.complex128 data types. For more details, see Complex >> Conversion in the API Reference.

Time

Time Conversion

You can use the nitypes.time.convert_datetime() and nitypes.time.convert_timedelta() functions to convert time values between the standard datetime library, the high-precision hightime library, and bintime. For more details, see Time >> Conversion in the API Reference.

Binary Time

The nitypes.bintime module implements the NI Binary Time Format (NI-BTF), a high-resolution time format used by NI software. An NI-BTF time value is a 128-bit fixed point number consisting of a 64-bit whole seconds part and a 64-bit fractional seconds part. For more details, see NI Binary Time Format in the API Reference.

Scalar Values

Scalar

nitypes.scalar.Scalar is a data type that represents a single scalar value with units information. Valid types for the scalar value are bool, int, float, and str. For more details, see Scalar in the API Reference.

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

nitypes-0.1.0.dev2.tar.gz (42.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nitypes-0.1.0.dev2-py3-none-any.whl (59.8 kB view details)

Uploaded Python 3

File details

Details for the file nitypes-0.1.0.dev2.tar.gz.

File metadata

  • Download URL: nitypes-0.1.0.dev2.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nitypes-0.1.0.dev2.tar.gz
Algorithm Hash digest
SHA256 93a5ddb1e907cad9b52ad63a53a04822a29a73eec0244bd08ae4257e4f1764f6
MD5 2f91260f4f41de0d004ca3e18164ff81
BLAKE2b-256 e69a034427be73ed6a803d553c1dc3e7d839cc56f60b6656a22681bcb81f3b74

See more details on using hashes here.

Provenance

The following attestation bundles were made for nitypes-0.1.0.dev2.tar.gz:

Publisher: publish.yml on ni/nitypes-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nitypes-0.1.0.dev2-py3-none-any.whl.

File metadata

  • Download URL: nitypes-0.1.0.dev2-py3-none-any.whl
  • Upload date:
  • Size: 59.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nitypes-0.1.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 5ebc1cfc34298f81bfa8ab03803953e4fb3211d62dc224cb31bb65fc6e1b2260
MD5 c7da277fecf24efccfc0529c983e4aca
BLAKE2b-256 7075a7249df15eaafe5ab2e071dfc68ba56fdfdde8b17e4169fffeb251d140a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for nitypes-0.1.0.dev2-py3-none-any.whl:

Publisher: publish.yml on ni/nitypes-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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