Home - ACBJayichLab/NV_ABJ GitHub Wiki

Welcome to the NV_ABJ wiki, glad you're joining!

Installation

To install this repository, make sure to install Python on the system. It is recommended to use 3.8+ or newer, as this is what a majority of the base code was programmed in. There are also quirks to the system that are present solely due to using Windows as the base operating system. Feel free to try older versions of Python or different OS, but the majority of experiments are run with Windows at this time, so the target OS is Windows.

It is also recommended to use a Python package manager such as Anaconda. This will allow you to maintain different Python environments if needed and make updating packages and Python a little easier.

  1. Download the repository either by using a git client, allowing you to update periodically, or as a zip file
  2. Open the Python file labeled nv_abj_installer.py. This will create a temporary folder on your computer and install the files into your Python pip library.
  3. Install any additional programs needed for your experimental apparatus, pip installs, and also third-party command-line interfaces

[!NOTE] This is a Python package. If you wish to install the package in a different way, the core functionality is located in the NV_ABJ folder. Be aware that you may want to update the package as errors are found, so make sure the method of installation is compatible with updates

Third Party warning

Be aware that some of the applications of this code require a third-party command-line interface. The practical effect is that if you are running one of the following scripts for your hardware, you need to add certain folders to your environment variables. Depending on your coding IDE, you may need to restart the computer to have the added environment variable paths take effect. To test your commands, you will have to open a new command prompt after setting the variable. Adding environment variables on Windows 10

  • SpbiclPulseBlaster, You must link to the spin core folder containing spbicl.exe, usually located at C:\SpinCore\SpinAPI\interpreter. You can test this works by typing in spbicl into your command prompt and checking Windows recognizes the command. Installed from Spin Core
  • CacliJpe - You must link to the folder containing cacli.exe and the associated *.dll file, usually JpeCpscLIDLL.dll, but it depends on your version. Use cacli /USB to list the attached devices and check the commands work. Install the correct version from JPE Cryogenics

Experiment Repository

Below are the instructions for using the NV_ABJ module with an experimental configuration.

[!IMPORTANT] Make sure to create the following packages and folders in a private repository. NV_ABJ is for common use, and we therefore want to keep it relatively “clean” from experiment-specific code.

Creating an Experimental Configuration Module

The experimental folder provides the basic layout for a package that can be installed by running the ‘experimental_configuration_package_installer.py`

This will install the files you edit here. It is not necessary, but I added the files hardware_interfaces.py and experimental_logic.py as common breaks for the installation.

In the selected files, you can import the desired modules using the absolute paths for the NV_ABJ module and filling out the required fields.

If you would like to use the wildcard import, you have to use the __all__ method; an example of this is below.

[!NOTE] You can install these packages from any Python file after using the installer. Be aware that the implementation does not make a single instance of the class, so each separate file run will be a different class, and your current settings will not be preserved.

[!TIP] Example Experimental Configuration once you fill out all the needed information, remember to run the file named update_experimental_configuration.py. You will need to run this anytime you make a change to the files in the package.

Creating the Image Scan GUI

The user interfaces for many experiments will be relatively similar, and we can benefit from the ability to share that functionality with others. This is why the user interface is broken into “widgets” or smaller, contained items that can link together in a larger system. Below is a provided interface with basic functionality. You will simply need to update the fields of the different modules using the format provided in the code. This is all done using PyQt5, where you can use the GUI designer tool to edit the main layout of the GUI.

An example of setting up the “Image Scan Widget” is below.

[!CAUTION] Add link to folder