Software#

Professional software development#

MBSE-lite: system requirement tracking and design with a simplified schema#

https://github.com/antonysigma/mbse-lite/blob/master/static/document-sources.png?raw=true

A simple platform to organize product design requirements. Text editor only. Execute a single command to generate technical document for weekly design review meetings. Inspired from Nichole Kass’s online presentation, the tools links the stakeholder’s needs, system design problems and solutions without paying for the unused MBSE features, e.g. code generation, nested diagrams, and Matlab/Zemax parametrics simulations.

Why I made my own tool. As a giga-pixel microscopy researcher dealing with increasingly complex systems, I found the need for an end-to-end requirement management system that traces stakeholders’ needs, functional requirements, design constraints, and physical architecture. Additionally, I needed a tool to analyze how design solutions (such as optical, mechanical, and electronic component specifications, software interface specifications, and SOPs) can verify the requirements and be validated with test plans.

The challenge arises from the prevalent document-oriented approach used by research labs, startups, and OEM vendors. Traditionally, we rely on a combination of PowerPoint slides, documents, and freehand drawings for communication. As a project owner serving as a liason among vendors and stakeholders, these methods are labor-intensive due to the use of incompatible document processing tools, namely Confluence, emails, PDFs, and Word documents. I often ended up spending more time copy editing documents from one vendor to another, rather than focusing on the design itself.

I also explored the model-based system engineering (MBSE) approach, but found that all existing commercial tools were overly bloated for medium-sized projects. My projects often involve fewer than 50 project members, including vendors; the commercial MBSE tools often intimidates them.

For example, I do not need the code generation feature since my software vendor will develop their own software and test plans. Furthermore, allocating a function to multiple instances is unnecessary as most functions in the system are used exactly once for giga-pixel imaging projects. Similarly, Zemax and Matlab integration into the parametric design module is not needed as most PhDs develop their own simulation tools for academic publications.

Ultimately, these commercial tools are designed to cater to NASA-scale projects and defense contractors with >1,000 head counts. For medium-sized projects, it is unnecessary to pay for features we don’t use.

ProxImaL: GPU-accelerated ISP code generation with 5th generation language#

_images/proximal-banner.png

ProxImaL is a modeling language for image reconstruction problems. It allows you to express the signal distortion process in the optical imaging system in a natural way that follows the math, and automatically determines an efficient algorithm for solving the problem on baremetal single-board computer, e.g. Nvidia Jetson Nano. ProxImaL makes it easy to experiment with the image features a posteriori, and the noise distribution of the optical hardware a priori, without worrying about the details of how the image restoration problem should be solved or implemented on hardware.

Note

I am the maintainer of the ProxImaL project. Please report the bugs at https://github.com/comp-imaging/ProxImaL/issues

The project is originally created by Felix Heide and Steve Diamond. Please cite: Felix Halide, Steven Diamond, et al. ProxImaL: efficient image optimization using proximal algorithms. ACM Trans. Graphics vol. 35 no. 4, July 2016.

Refer to the encyclopedia for the distinction betweeen a priori and a posteriori knowledge , in the conext of image restoration problems.

BioImage Coder for multi-camera, high-throughput instrument control#

BioImage Coder grew out of a very specific problem: programming a complex, high-throughput instrument where the cognitive load of reading low-level, asynchronous control code from 96 cameras was getting in the way of reasoning about the bio-imaging experiment goals itself. As a visual thinker, I wanted domain experts to be able to describe what the instrument is doing without having to mentally simulate that by monitoring packets/logs transmitted among dozens of devices under the hood.

Imagine a world where one can read music on a book featuring multi-page, multi-track music scores of the Beethoven symphony, rather than figuring out who plays what instrument by listening to the FM/AM radio, without the ability to playback the audio.

The result was a small domain-specific language (DSL) that emphasizes the experiment design intent of the bio-imaging protocols, while still compiling down to tightly controlled, timing-aware instrument control software with zero-cost abstraction enabled by the compiler.

https://github.com/antonysigma/bioimage-coder/raw/main/figures/language-workbench-mockup.png

The working principle#

The two branches of R&D: system engineering and system integration, is prone to impedance mismatch due to different pace of workload over the span of the project.

De novo, high‑throughput bioimaging systems evolve rapidly over the course of the project: optics, sensors, illumination, motion stages, and firmware pipelines are redesigned over successive iterations to improve speed and signal quality over the project lifetime. The pace of system engineering tapers to a near halt through a sequence of “design lockdowns” near the product launch phase.

In contrast, image capture protocols – the ordered sequence of excitation, exposure, motion, and acquisition steps – encode scientific intent and changes much more slowly. Protocol revision activities conducted by system integration teams, e.g. post-design-lockdown synchronization tweaks and performance mitigations, only ramps up when the project is close to product launch.

This asymmetry naturally forms an hourglass model:

  • Top-down (Wide): Diverse experimental protocols (time‑lapse, Z‑stacks, multi‑channel fluorescence, mixed modalities)

  • Middle (Narrow): A stable, precise, domain-expert‑readable DSL describing the protocol

  • Bottom-up (Wide): Diverse hardware and firmware implementations optimized for specific instruments

https://raw.githubusercontent.com/antonysigma/bioimage-coder/main/figures/hourglass.png

The hourglass architecture model for instrument control software design.#

Baremetal opto-mechanical hardware drivers#

Refer to the Electornics page for details.

Amateur software projects#

Android Star Catalog on E-ink devices#

_images/starchart.jpg

I created a “vanilla-flavoured” star map to run on E-ink readers, so I can focus on the what matters during outdoor star gazing; to look up not down. The star positions are replicated from the NASA’s Positions and Proper Motion Star Catalog. There are plans to add more deep sky objects (double stars, nebula, galaxies, etc.) from the WDS and NGC database.

“Computerized” Chinese abacus#

_images/abacus.jpg

Everybody knew that the abacus is the precursor of modern computer, but not many realize it can be “programmed” to perform complex arithmetic computation. Based on the 500 year old instruction set, I demonstrate its ability to perform basic arithmetic (positive or negative) on fixed point decimals down to 20-digit precision. I have plans to realize long division and square root in the future.

Online Cangjie Chinese input engine#

_images/cangjie-logo.png

Chinese language is a logographic writing system, where one composes a sentence by visually “assembling” individual character with shapes, rather then verbally spelling the words with letters as in other languages. Traditionally, Chinese was typed on a computer with Cangjie, a free, open source program called the Cangjie input method. However, in a mandarin dominated world, it is increasing harder to type (or to Google) in Chinese on library workstations, or on my friend’s smartphones. So, I created my own online input program and hosted it here:

Note

Refer to PRof Tom Mullaney’s seminar on the Chinese input method arms race in the 90’s <https://youtu.be/KSEoHLnIXYk?t=2889>`_.

Mathematical coding challenge on Project Euler#

_images/project_euler.png

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

Dataset#

Computational quantitative phase microscopy with widefield fluorescence channels#

_images/96-eyes-multi-channel.jpg

Complete dataset of the Fourier Ptychographic Microscopy (FPM) raw images, and the widefield fluorescence z-stack images, captured from the 96-camera parallel microscope system (project codename: 96-Eyes).

The dataset also contains the reconstructed quantiative phase images on all 96 wells, as well as the off-axis optical aberration decomposed into Zernike modes.

Pixel super-resolution of optofluidic time-stretch microscopy#

_images/pixelsr.jpg

Complete dataset of the imaging flow cytometry of multiple unlabelled living cell lines, acquired by ultrafast optical time-stretch microscopy technique.