![]() This was written extremely quickly and is missing some features. read ()) # For 32 bit windows exec ( open ( "cffi_build_win32.py" ). chdir ( 'G:/repos/python/adinstruments_sdk_python/adi' ) # For 64 bit windows exec ( open ( "cffi_build.py" ). call () install ( "cffi" ) import os #This would need to be changed based on where you keep the code os. Import subprocess import sys # def install ( package ): subprocess. Note the above path is specific to my computer, might need to change user name.cd to Python directory or run directly, these go to something like: C:\Users\RNEL\AppData\Local\Programs\Python\Python39-32\python.Jim note to self, rather than installing Anaconda I simply:.Within the interpreter I ran the following: The currently released code was compiled for Python 3.6-3.9 on Visual Studio 14.0 or greater was required.įor upgrading to 3.8, I installed Python 3.8.This might require installing cffi as well as some version of Visual Studio.This requires running cffi_build.py in the adi package.Running the code might require compiling the cffi code depending on your Python version.get_data ( record_id ) import matplotlib.pyplot as plt plt. read_file ( r 'C:\Users\RNEL\Desktop\test\test_file.adicht' ) # All id numbering is 1 based, first channel, first block # When indexing in Python we need to shift by 1 for 0 based indexing # Functions however respect the 1 based notation. ![]() A slightly more flushed out Matlab version can be found here.The code utilizes the SDK from ADIstruments to read files in Python as NumPy arrays. ![]() Interfacing with the ADIstruments DLL is done via cffi.
0 Comments
Leave a Reply. |