Skip to main content

Optical chip automated testing library equipped with a wide range of instruments interface.

Project description

PyOctal

PyOctal is a Python package equipped with sweep tests, analysis tools, and interfaces with equipments that are used primarily for optical chip testing. This package supports visa communications with a varitey of instruments.

More About PyOctal

This is a tool allowing you to do: remotely setup your instruments and run the sweeps. Please make some suggestions on what you would like to accomplish and we would love to help!

Take a look at here for detailed information of supported instruments.

Directory Structure

.
<folder>
├── pyoctal                  # core library - low-level definitions
├── tools                    # all sweep tests are stored here
├── tests                    # tests to run when commiting to Github
<files>
├── pyproject.toml           # pyoctal package setup 
├── requirements.txt         # contain all required python packages for this repository

Installation

Before installing any of the software, please make sure that you know exactly the operating system that you are running on and whether it is 32-bit or 64-bit.

Environment

This repository only works when two conditions are satisfied:

  • Windows OS machine - this is neccessary for pywin32 module
  • python version >= 3.6 - this is neccessary for f-string formatting

Method 1 - Install Python Run python -m pip install requirements.txt.

Method 1 - Install Anaconda:

The Anaconda version must

  • Support your current Windows OS system
  • Able to create a Python 3.6 environment

Install Anaconda version which supports your OS system and make sure all Listed packages in requirements.txt are installed.

To install packages, go to Enviornments tab, select not installed, and then search up the packages. There are some packages that might not be Listed because the channel which contain them are not imported upon installation. If that is the case, search up the python package and find the corresponding channel and include it in Anaconda environment.

If your Anaconda does not use Python 3.6 for its environment, it will fail to install pyvisa. Firstly, make sure that the current Anaconda python version is at least 3.6. Once the condition is satisfied, create a new environment with Anaconda Prompt and specify Python version as Python 3.6. After the new environment is successfully created, it can be viewed under Environments tab. The packages can then be installed on this new environment without errors.

# create a new conda environment
> conda create --name pyoctal_env python=<version>
# activate your new environment
> conda activate pyoctal_env
# deactivate
> conda deactivate
  • pyvisa requires "conda-forge" channel
  • pyaml requires "conda-forge" channel

NOTE FOR WINDOWS 7 USERS: If your system is running on Windows 7, please only install Anaconda versions which are equipped with Python versions older than 3.8. This is very important as versions since Python 3.9 do not support Windows 7. The safe option is install versions before anaconda3-2020-11.

If you attempt to install the later anaconda version on your Windows 7 system, you will get a "Failed to create menus" error. Refer to Using Anaconda on older operating systems for more information.

Method 2 - Use Virtual Python Environment:

Run this in the root-directory of this repository namely autotesting.

Platform Shell Command to activate virtual environment
Posix bash/zsh $ source .venv/bin/activate
fish $ source .venv/bin/activate.fish
csh/tcsh $ source .venv/bin/activate.csh
PowerShell $ .venv/bin/Activate.ps1
Windows cmd.exe > .venv\Scripts\activate.bat
PowerShell > .venv\Scripts\Activate.ps1
# This automatically setup your virtual environment
> python3 -m venv_setup

# Windows PS example
# Activate a venv machine.
> .venv\Scripts\Activate.ps1

# Deactivate a venv machine
> deactivate

Install PyOctal

For users, I recommend to update your current old repository to a newer version by cloning or downloading this repository again and delete the old ones.

Method 1 - Clone from Git (Preferred):

Getting the repository cloned to a local direcotory

# Create a directory named autotesting
> mkdir pyoctal
# Go into that directory
> cd pyoctal
# Clone this repository down to your autotesting directory
> git clone https://github.com/christina-chang-tw/PyOctal.git
# move into that directory
> cd PyOctal

Method 2 - Download from Github:

You can download a zip file containing this repository by navigating to <> Code tab and then select Local and Download ZIP.

Getting Started

How to Run a Test?

There has been a refactoring in this module. It used to be using argparse as an interface, but due to have more and more testings to be added, I have chosen to run each file individually and those files are stored in the tools directory.

Sweeps

# Example: 
> python -m tools.sweeps.pulse

Instrument Setup

An interface to easily setup an instrument. Go to tools > setups > config.yml to change the settings for the corresponding instrument.

Test Instrument Description
agilent816xB Agilent 8163B, 8164B Setup the multimeter to the auto-range and desired wavelength and output power
E3640A Set the output voltage and current limit for the DC power source
# Example: 
> python -m tools.setups.main 816xB

Debugging issues

  1. f-string formatting method cannot be used is an issues related to the python version. Only versions after Python 3.6 adopts f-string format.
  2. Contact me if need extra help: tyc1g20@soton.ac.uk

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

pyoctal-0.0.6.tar.gz (45.6 kB view details)

Uploaded Source

Built Distribution

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

pyoctal-0.0.6-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

Details for the file pyoctal-0.0.6.tar.gz.

File metadata

  • Download URL: pyoctal-0.0.6.tar.gz
  • Upload date:
  • Size: 45.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for pyoctal-0.0.6.tar.gz
Algorithm Hash digest
SHA256 f0b2f8e6e2bea8146bb86343b2228d4e01fa96fb3bd6305b8f60241ef7b3292e
MD5 96c9fb4c7757d1625a442d4abb4d9d8a
BLAKE2b-256 720267a4ced4c285689e3d520333b95aaf48ec11315eec3662f4f9af9afc1928

See more details on using hashes here.

File details

Details for the file pyoctal-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: pyoctal-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 51.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for pyoctal-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d8a7ed16b4314cbf53e22d0b7a994f26d2452639e678e62f9d5dc48b47c4d4e8
MD5 df9c06004b88345d86a817fd4af35d25
BLAKE2b-256 ef1ec34b2f3b97710de1d0024d94437c515c37d2b3d029c7f6773ef23a610812

See more details on using hashes here.

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