This is a script I wrote to convert the data from a DekTak profilometer to a more useable format. At The University of Alabama, output from the profilometer is captured via serial port and dumped to a file. Within the file, only one coordinate (the height) is stored while the x-coordinate must be calculated using the recorded step size. This script generates the x-coordinate for each y-coordinate and displays the data so that it can be copy and pasted to a text file or spreadsheet. Additionally, each raw data file may contain any number of scans and each is automatically detected and parsed.