|
1 | | -# `nitypes` |
| 1 | +| **Info** | Data types for NI Python APIs | |
| 2 | +| :------------ | :-----------------------------| |
| 3 | +| **Author** | National Instruments | |
2 | 4 |
|
3 | | -`nitypes` is a Python package that defines data types for NI Python APIs. |
| 5 | +# Table of Contents |
4 | 6 |
|
5 | | -TODO: describe a project in detail, what it does, how to use it, etc. |
| 7 | +- [Table of Contents](#table-of-contents) |
| 8 | +- [About](#about) |
| 9 | + - [Documentation](#documentation) |
| 10 | + - [Operating System Support](#operating-system-support) |
| 11 | + - [Python Version Support](#python-version-support) |
| 12 | +- [Installation](#installation) |
| 13 | +- [Waveforms](#waveforms) |
| 14 | + - [Analog Waveforms](#analog-waveforms) |
| 15 | + - [Complex Waveforms](#complex-waveforms) |
| 16 | + - [Frequency Spectrums](#frequency-spectrums) |
| 17 | +- [Complex Numbers](#complex-numbers) |
| 18 | + - [Complex Integers](#complex-integers) |
| 19 | + - [Complex Number Conversion](#complex-number-conversion) |
| 20 | +- [Time](#time) |
| 21 | + - [Time Conversion](#time-conversion) |
| 22 | + |
| 23 | +# About |
| 24 | + |
| 25 | +The `nitypes` Python package defines data types for NI Python APIs: |
| 26 | + |
| 27 | +- Analog and complex waveforms |
| 28 | +- Frequency spectrums |
| 29 | +- Complex integers |
| 30 | +- Time conversion |
| 31 | + |
| 32 | +NI created and supports this package. |
| 33 | + |
| 34 | +## Documentation |
| 35 | + |
| 36 | +See the [API Reference](https://nitypes.readthedocs.io/). |
| 37 | + |
| 38 | +## Operating System Support |
| 39 | + |
| 40 | +`nitypes` supports Windows and Linux operating systems. |
| 41 | + |
| 42 | +## Python Version Support |
| 43 | + |
| 44 | +`nitypes` supports CPython 3.9+ and PyPy3. |
| 45 | + |
| 46 | +# Installation |
| 47 | + |
| 48 | +Installing NI driver Python APIs that support waveforms will automatically install `nitypes`. |
| 49 | + |
| 50 | +You can also directly install the `nitypes` package using `pip` or by listing it as a dependency in |
| 51 | +your project's `pyproject.toml` file. |
| 52 | + |
| 53 | +# Waveforms |
| 54 | + |
| 55 | +## Analog Waveforms |
| 56 | + |
| 57 | +The `nitypes.waveform.AnalogWaveform` class represents a single analog signal with timing |
| 58 | +information and extended properties (such as channel name and units). Multi-channel analog data is |
| 59 | +represented using a collection of waveforms, such as `list[nitypes.waveform.AnalogWaveform]`. For |
| 60 | +more details, see [Analog |
| 61 | +Waveforms](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#analog-waveforms) |
| 62 | +in the API Reference. |
| 63 | + |
| 64 | +## Complex Waveforms |
| 65 | + |
| 66 | +The `nitypes.waveform.ComplexWaveform` class represents a complex-number signal, such as I/Q data, |
| 67 | +with timing information and extended properties (such as channel name and units). For more details, |
| 68 | +see [Complex |
| 69 | +Waveforms](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#complex-waveforms) |
| 70 | +in the API Reference. |
| 71 | + |
| 72 | +## Frequency Spectrums |
| 73 | + |
| 74 | +The `nitypes.waveform.Spectrum` class represents a frequency spectrum with frequency range |
| 75 | +information and extended properties (such as channel name and units). For more details, see |
| 76 | +[Frequency |
| 77 | +Spectrums](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#frequency-spectrums) |
| 78 | +in the API Reference. |
| 79 | + |
| 80 | +# Complex Numbers |
| 81 | + |
| 82 | +## Complex Integers |
| 83 | + |
| 84 | +`nitypes.complex.ComplexInt32DType` is a NumPy structured data type object representing a complex |
| 85 | +integer with 16-bit `real` and `imag` fields. This structured data type has the same memory layout |
| 86 | +as the NIComplexI16 C struct used by NI driver APIs. For more details, see [Complex |
| 87 | +Integers](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/complex/index.html#complex-integers) |
| 88 | +in the API Reference. |
| 89 | + |
| 90 | +## Complex Number Conversion |
| 91 | + |
| 92 | +You can use the `nitypes.complex.convert_complex()` function to convert complex-number NumPy arrays |
| 93 | +between `nitypes.complex.ComplexInt32DType` and the standard `np.complex64` and `np.complex128` data |
| 94 | +types. For more details, see [Complex >> |
| 95 | +Conversion](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/complex/index.html#conversion) |
| 96 | +in the API Reference. |
| 97 | + |
| 98 | +# Time |
| 99 | + |
| 100 | +## Time Conversion |
| 101 | + |
| 102 | +You can use the `nitypes.time.convert_datetime()` and `nitypes.time.convert_timedelta()` functions |
| 103 | +to convert time values between the standard `datetime` library and the high-precision `hightime` |
| 104 | +library.For more details, see [Time >> |
| 105 | +Conversion](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/time/index.html#conversion) in |
| 106 | +the API Reference. |
0 commit comments