As a fan of terminal user interfaces, I decided to construct a library that allows for widget-based interface construction, using only ascii characters in python. Usage-wise, py_cui is modelled after Tkinter, and relies on a grid-based layout. It supports most typical widget types, including labels, buttons, text boxes, and scroll menus/check boxes. It also supports popups of all kinds, including loading bars and icons. It is available to download with pip, and has sources on Github.
Using py_cui, I have constructed several applications to demo the library's abilities. PyAutoGit, is a terminal interface for working with multiple git repositories at once. It is pictured in action to the right, pushing to a repository on my personal github page. I also made py_cui_2048, a simple 2048 clone that runs in your terminal.
The library is cross platform, working on windows and linux, and the development is helped by automated unit testing through Github actions, as well as by automated documentation construction. It is still in a beta phase, and future work is planned to add more widgets and features.
Built a modern replacement website for the Stony Brook Crew team, as a part of a team consisting of several club members.
The site was built using a combination of handwritten html and css, bootstrap, and several open-source javascript libraries for animation and interactivity. The site is built to be responsive on both desktop and mobile, using a combination of navbar and hamburger menu to best support all kinds of devices. The site provides both information about the team's history and current activities for existing members, as well as a form for expressing interest in joining up for new prospective rowers. The built in form for new rowers is tied to the team email, so when an individual fills it out it is sent directly to the club e-board in order to facilitate contacting the new potential member.
As a way to add comprehensive OpenCV functionality to the EPICS areaDetector project, I worked on writing a plugin framework that allows for implementing a variety of OpenCV real-time image processing features while using the same, modular, EPICS backbone.
The project allows for OpenCV functions to be called in real time on images recieved from any areaDetector camera driver, and for the processed images to be pushed to other areaDetector plugins. Currently, there are 10 OpenCV functions implemented, including Canny and Laplacian edge detection, Centroid identification, object identification, real-time image subtraction and masking, sharpening, and distance computation. In addition, thanks to the plugin's modular design, new functionality requires only one additional function to be written, with an already existing template in place if a single new use case is desired.
ADCompVision has been used in several projects, including as a way to perform real time image subtraction for attaining dual threshold images from the X-Spectrum Lambda detector, and as a way to identify sample centroids for pre-experimental alignment (see image). ADCompVision is integrated into the main areaDetector repository, and thus sources can be seen on Github.
During my internship at Brookhaven National Laboratory, I constructed software that used focus stacking as a way of collecting high quality images with a shallow depth of field fixed microscope, as well as recreating three dimensional depth data.
The images to the left show some of my results. The two sets of images were the result of collecting 18 images of a mineral, and 38 images of a horse fly with a 5x microscope at a shallow depth of focus. The images were then merged into one, to create a single in-focus image. The results can be seen to the left with the two included images of the fly. The top of the two images was taken directly from the stack and exhibits large out-of-focus regions, while the lower image shows the results attained after merging the stack of 38 images into a single output. Finally, using OpenGL, the merged image, along with depth information that was collected simultaneously, was used to generate a 3D model of the sample. An example of a generated depth map for the mineral is also shown on the left.
This project has resulted in three co-authored publications, one of which, "Achieving 3D imaging through focus stacking," is linked above. Additionally, reconstructed model 3D videos have been uploaded to the youtube channel linked above.
For the final project for my Software Engineering course, I was tasked with building a web app for political canvassing. Working with three other students, we discussed, designed, and finally developed the app with a Java and MySQL database back end, and an html, css, and jsp front end. Some other technologies used were the Google maps API, Github for centralized version control, and Apache Tomcat for running the app on a server.
SAVJ-Canvassing allows for creating campaigns with a given set of target
canvassing addresses, which are then algorithmically assigned to an available Canvasser based on his or her schedule, workload, and
proximity. The Google Maps API is called via javascript for navigation to each destination by Canvassers, and a custom implementation of a Heuristic
solution to the travelling salesman problem is used to determine which order is best for visiting all locations.
Source code for SAVJ-Canvassing is not publically available. If you wish to view or discuss it, please contact me via the form on the homepage of
this site.
In order to gain support for USB Video Class (UVC) webcam devices for the EPICS area detector software suite, I developed a custom driver using the libusb and libuvc libraries. The driver implements most camera functionality including Exposure Time, Saturation, and Framerate, and supports both 8-bit and 16-bit output modes.
The current driver is available in version R1-6. It has been deployed on 6 beamlines at the National Synchrotron Light Source II (NSLS2), with the 17BM beamline currently having 12 devices in production as their main acquisition hardware, along with several more deployments planned. ADUVC has been tested with all areaDetector plugins, and has been used in tandem with several to perform real time data analysis on budget hardware.
UVC cameras range from cheap consumer webcams to high quality industrial cameras, giving them a wide breath of use cases. Some current use cases include test benches for further plugin development (because of the simplicity of their setup), monitoring (because of their inexpensiveness), and use in small form factors (they are available in a variety of sizes and shapes including pencil cameras). The average deployed ADUVC camera at NSLS2 costs under 100 $, while a comparable industrial GigE device (though obviously providing more features) could cost around 700 or 800 $, often more.
In order to improve string manipulation in C (splitting in particular), I wrote a small single header C library that contains some useful functions that allow for python-like string operations.
An example of csplit's python like usage would be passing an index of negative one to a function in order to perform the function starting from the end of the string. Csplit provides functions for splitting on characters or other strings, has support for performing these operations from the front or rear of the string, and adds support for other useful functions like strip(), startswith() and endswith(). The primary data structure used by csplit is a doubly-linked list called a CSplitList, and is composed of CSplitFragments. Essentially, csplit abstracts splitting C strings away replacing the archaic strtok, at the cost of some memory. I have used csplit in several other personal projects with success.
As part of the centralized areaDetector build project, I wrote a python module called installSynApps that is responsible for cloning, building, and packaging EPICS, synApps, and areaDetector with one command. In addition, using installSynApps, Dockerfiles were created for automatically creating release packages of EPICS and areaDetector on various architectures and linux distributions.
installSynApps is written as an MVC (Model, View, Controller) application, with strict divisions between the data model, the driver code, and the user interface. As a result, using the same back end code base, installSynApps supports a GUI version along with a CLI version that can be fully automated for scripting use. The GUI version allows users to fully control their build, editing all version numbers and included modules.
Once installSynApps could build and package EPICS and areaDetector, the goal of the project shifted to fully automate the process, and for this Docker containers were utilized. Containers for each supported OS, architecture, and linux distribution are generated, and then installSynApps is run through a script inside the Docker container. This process will eventually be moved onto a CI server that will automatically generate release packages when new versions of core software modules are released.
Working with two of my peers, I created a JavaScript based web game based on the Phaser WebGL game engine, with all original artwork.
Through the Ages is a game inspired by one of Rare's early titles - Jetpac. The player must collect items that are critical to the character's (Gareth's) survival. The player can carry one item at a time, and must carry it back to his base, avoiding enemies. Once all items are collected, the player advances to the next level, or age.
Through the Ages was written with a game design that allowed large amounts of code reuse between levels. In addition, enemy AI is state based, and gains access to a greater amount of states as the game progresses, making subsequent levels more challenging. Through the Ages was a finalist at the 2019 Stony Brook University game programming competition. You may play the game yourself by clicking on the link above, or see the source code on Github.
For my principles of database systems course at Stony Brook University, I worked as part of a small team to create a dating website using HTML, CSS, Javascript, and Bootstrap for the front end, and Java and MySQL for the website backend. We used .jsp files and servlets to integrate the html with the output of the jdbc based SQL queries, and we hosted the completed website on an Apache server.
Rower's Meet required handling profiles, location based data, and the arrangment dates between profiles. In addition, it was required that similar profies be "matched", so that they may initiate a date. The source code for Rower's Meet is available on Github.
A work in progress C#/WPF application that will allow easy file and directoiry management.
Supported Foldify use cases will include auto-sorting of directories into correct folders (i.e. images into Pictures/ folder etc.), sorting images based on date (useful for pulling images from a cell phone or camera), and user generated templates (in the form of custom xml files) for building file structures as well as organizing them.
I started building Foldify to both automate my file organization - I like to keep my files very organized - as well as to generate directory structures based on templates. For example, I am able to link Foldify to my University account, and Foldify will auto-generate folders for each of my courses, with homework/notes/etc. directories in each.
Foldify is currently a work in progress, so its source code is not yet available. If you would wish to view/discuss the source code, please contact me using the form on the home page.
As a way to simplify sample managment at National Synchrotron Light Source II beamlines, I worked on constructing a barcode reader plugin for the area detector project.
ADPluginBar uses the opencv and zbar libraries for image processing and barcode detection respectively, and writes detected barcode messages into Process Variables, or PVs. Database integration is the next step, and current work is focused on adding built in support for MySQL and MongoDB databases, with more specialized solutions being added later. ADPluginDmtx is an extension of ADPluginBar, and adds bindings to the libdmtx library, and data matrix barcode decode support.
The flexibility of this solution, however, lies in the fact that barcode/QR code information is stored in EPICS PVs, which can be accessed through a variety of methods including through a shell script or a python program, meaning that regardless of the database implementation in use at a particular beamline, even if the plugin itself doesn't natively support it, integrating it should not be difficult.
ADPluginBar and ADPluginDmtx are being tested for production use on several NSLS2 beamlines, and will likely be used primarily for robotic automation of sample mangement.
Many of the other projects I have worked on can be found on my github account. These include: libCGeo - a WIP pure C library for computational geometry, a Cryptogram encoder/decoder that I wrote in order to simplify completing my final project for my Graph Theory course, a program used to calculate the expected score of a particular card game, a python module for adding command line loading animations to your scripts, and both this website and a resesign of the Stony Brook rowing team website, a current in-progress project.