Python Implementation for Organic Electrochemical Transistor Measurement
- scopefoundry
- numpy
- pyqt5
- qtpy
- h5py
- pyqtgraph
- pyvisa
- qtconsole
- ipython
- fbs
- pyusb
Note: For now, the .EXE files in releases do not work. We are trying to debug. In the meantime, you can run from FBS by cloning the source and following the instructions further below.
From releases: download the .zip file and run "OECT_Control.exe", or download the .exe installer. If you used the installer to install the application, the application must be run as administrator. Otherwise, a Permission Error will occur.
Note: that this control also uses two FT245R relay boards to power the source and drain connections. Please follow the instructions for using "Zadig" found at this site: https://github.com/vpatron/relay_ft245r
Refer to https://build-system.fman.io/manual/ for more info.
- Create a new virtual environment and activate it by running the following commands, replacing "envname" with what you want to name the new environment.
conda create -n envname python=3.6
conda activate envname
The specified Python version should be 3.5 or 3.6. Newer versions of Python are not yet supported by FBS.
- Install FBS and PyQt with
pip install fbs PyQt5==5.9.2
- Install NSIS from https://nsis.sourceforge.io/Download and add the NSIS path to your Windows PATH environment variable, if it is not already set. (Search "environment variable" in the Windows start menu)
- Install OECT dependencies with
pip install -r requirements/base.txt
-
Navigate to the directory containing the "src" folder for the app.
-
To test the app, run
fbs run
To save time, you can create a Anaconda Prompt shortcut and change "target" to (replace "Path\To" with the actual path) and replace "Start In" with whatever directory you have cloned this code to.
%windir%\System32\cmd.exe "/K" C:\Path\To\Anaconda3\Scripts\activate.bat C:\Path\To\Anaconda3\ && fbs run
- The build.json file, located in src/build/settings, is crucial for getting the FBS application to compile and build correctly.
"hidden_imports": ["ipykernel.datapub", "ipython", "qtconsole", "pyvisa"]
MUST be present in the build.json file to ensure it is properly packaged.- The application file's main method needs to create an ApplicationContext for FBS to run.
- The main application file is usually located in the src/main/python directory. However, if you need the file in another directory, you may specify it in the build.json file's "main_module" property.
- The rest of the modules and files needed to run the main app MUST be in the src/main/resources/base directory.
- The ScopeFoundry folder in this directory is needed for FBS to pull the base app UI file.
fbs freeze
Add the --debug flag to the command to get more details on the build process as it happens. You can create an installer for the app with
fbs installer