Adam Orin

Software Portfolio

Ever since my dad showed me how to load a Basic progam off a cassette onto our TRS-80, I have been programming. Here are some of the things I have done on the software side:

 


 

APOLLO Automated Environmental Monitoring Programs -- Python, bash

I was a graduate student researcher on the APOLLO lunar-laser-ranging program. Simply put, we built a device ona telescope to shoot lasers at reflectors left on Moon, and caught the reflected light with our detectors on the telescope. The goal was to measure the orbit of Moon to great precision and use this as a test of general relativity.

Our device had some temperature dependencies. In addition, our device was attached to the cold telescope, and we did not want it leaking out heat into the environment, which would . So, our equipment was full of coolant pumps, hose, flow meters, and resistance thermometers. We had a control program that output the data from all this environment monitoring continually, but we needed some way to visualize this data. Thus, I was tasked with creating software to parse the data file, create graphs of our environmental data, and upload these graphs onto a webpage. And we wanted this software to run automatically and continually.

Here are some of the component scripts and programs that I wrote to perform this task:

  • update.script: A bash script that ran all the other scripts to update the plots and the webpage.
  • logclip.py: Python program that would clip out the most recent 1.5 days of data from our data logs.
  • env_parse.py: Python program that parse the relevant data from the clipped log and output friendly CSV data files.
  • env_plot.py: Python program that read the CSV data files and output lots of pretty plot images of the data. I used the matplotlib for this.
  • env_webpage.py: Python program that would update the html file with the most recent time and plots.

Here is a screenshot of of the webpage and the plots. Nothing fancy, but informative:

image

 


 

APOLLO STV camera interface library -- C

In order to aim our telescope at the reflectors on Moon, we needed to see what the telescope was looking at. So, our apparatus had a camera that could show us an image of what the telescope was aiming at. The camera had a control box that could be controlled via serial input from a computer. So I was tasked with creating a library that would allow us to sent commands to the camera remotely via the serial input.

The camera came with a guide to its serial command interface, but it was buggy and had many undocumented quirks. I was eventually able to write a set of functions that allowed us to remotely "press" keys on the keypad, "read" its display, and download images the camera took.

Here is a copy of the header file for the library to give you a feel for the funcitons I wrote: stv_lib.h

 


 

Serial controlled stepper motor interface -- C, Python

One of my responsibilities in APOLLO was to characterize our detectors, novel avalanche photodiodes. To do that, I needed to focus a laser into a tiny dot and move this dot around the laser. We had a couple serial-controlled stepper motors that I connected the focusing lens to. I was able to right a program to control the motors and move the laser dot in the desired direction. I also wrote a little GUI that let me control the motors and also visualized the resultant data as a 2D intensity plot.

Here is a copy of the program I wrote to control the motors: zabercom.c

Here is a screenshot of of the GUI I made to control the motors and run tests, scanning the laser across our detectors, written in Python.

image

 


 

NASA ISS EarthKAM rotation matrix library -- C++

As an undergraduate, I was a member of the NASA ISS EarthKAM team. EarthKAM was an outreach project that let middle school kids take photos of Earth using a camera aboard the International Space Station. My first task in the group was to work with another physics student to determine the lat/lon of each image based on the orientation data of the ISS. The current solution was a set of huge multi-line formulas filled with cosines and sines, and it did not produce the correct answer. We figured out hot to do the rotations and coded a very simple C++ class with "pitch" "yaw" and "roll" methods and reduce the calculations to a couple lines of very human-readable code. And, the code actually gave the correct response!

An example of the old code that did not work:

old rotation code

And an example of the more human-radable code we wrote to replace it!

new rotation code

 


 

Etch-a-Sketch Magnetometer -- LabVIEW

In one of my undergraduate physics labs, a friend and I had the clever idea to stick a Hall Effect probe (which outputs a voltage proportional to an applied magnetic field) onto an Etch-A-Sketch stylus. We connected the gears of the Etch-A-Sketch to stepper motors, and wrote a virtual instrument in LabVIEW to control the motors, read out the data, and create an intensity plot to visualize the magnetic field. It was a fun project and it worked! Go to my "hardware" section to see pictures of it and the data.