This page contains some of my programs and scripts. Most of them were written for fairly specific purposes, and they are not likely to do anything usefully when downloaded. That said some of them display knowledge that took me a good bit of trial and error to figure out and looking them over may give others a head start. If you have any comments I'd be glad to hear them. If you use PGP my PGP key can be found here.
Send me an ICQ at 7441516
or an AIM at kh418897 (My AIM status is likely the same as the above).
I just set up a web server at home, for personal pictures and such. It is here.
![]() |
I suppose this deserves some explaining. The tattoo is a diagram of the nervous system that controls the stomach of crustaceans. I am a technician in a neuroscience lab at Ohio University. We work on the stomatogastric ganglion, which is the small blob in the middle. Working on this prep has taught me a lot and has driven most of my learning on computers. Plus it looks cool and weird. |
| File | Size | Description | Image |
|---|---|---|---|
| PYLikeC/ |   | This is my current working directory for the PY model project up to the ms. If anybody actually uses this code I just (2005-12-02 15:36:41.000000000 -0500) fixed a bug in independent_assortment.c that may have been trashing the children. |   |
| Slice_Landmark_Registration/ |   | I'm trying to write some code that will register the images of the stomach based on pins placed in the epoxy. I'm using a combination of ITK and VTK. |
|
| balloon |   | To learn some more about the space around a given N-dimensional point I wrote this balloon algorithm. The in_out function decides wheather a given point is inside or outside of the region of interest. The one I've given is just a hypersphere. Given a point that is known to be inside the region, the algorithm adds new points and pushes them out until they are against the edge. It uses information from old points to push the new ones so it does not have to start over every time. |
|
| Doxygen! |   | This is doxygen generated html of the Parallel Genetic Algorithm. |   |
| SimpleModel-C.tar.gz | 673666 | This is the source code for the muscle isometric force model. It uses the GSL - GNU Scientific Library for the differential equations. It now is set up to have instantaneous stimulation. There are files for both simplex and for genetic algorithm searches on a single machine. |
|
| PYLikeC-Source_Only.tar.bz2 | 13938 | Here is the source of the genetic algorithm and my current model without any data. It has now been converted to use the GSL - GNU Scientific Library only. No more of that NAG crap. I've also put in some conditional build defines and some options to the build script. Enjoy! |   |
| Nov 26 2003 |   | Here is the newest set of pictures of the lobster Stomach. |   |
| Sep 29 2003 |   | Here are some stomach sections that I made on the mill, and some of my feature identification attempts. |
|
| drip.mpeg Kevin SFN 2003.cvx Kevin STG 2003.ppt | 12595814 2888690 20848128 | Here are my presentation files for SFN 2003 in case something bad happens. |   |
| trace_edge.m | 3223 | Here we have the script I am using to convert the pictures of the stomach into a 3d model of the stomach. The isosurface command is absolutely incredible. |
Uncompressed TIFF
Compressed JPEG
|
|   |   | This plot was made to show how sensitive the results from the genetic algorithm are to changes in each parameter one at a time. The parameters from the individual with the best fitness in each run were varied plus and minus 10%. The vertical line under each peak is where the value of the delayed rectifier stayed constant and other parameters were varied. The surprising thing is that as every parameter varies fitness jumps between at least three curves. We suspect some spike number match/mismatch, or proper/improper entrainment. I plan on looking at the delay and spike trains of the individual simulations to see. |
|
|   |   | Here is a stomach frozen in carbonite. It should be well preserved since it even survived the freezing process. No really, I just put graphite in the epoxy to make it black and opaque. I also desiccated the stomach in alcohol, died it with methylene blue, left it in a vacuum overnight between the first and second stages, and placed it in a vacuum for a few minutes while the epoxy for the second stage cured to remove voids. We'll see how this one turns out. |
|
|   |   | These are some pictures from my
newest project, creating a 3D computer model of the lobster
stomach. So far I have been working on a good mounting of the
stomach in epoxy. At right are some pictures of my best fills so
far. Due to the enormous size of the sample I have to do a multi
stage casting. Otherwise the heat of the curing epoxy boils the
water in the tissue and we get interior voids. The best method I
have now is to inject epoxy into the stomach then surround it in
two stages. If we ever get a really good fill, I plan on cutting it on Ralph's mill and then take photographs after each cut. |
|
| PYLikeC.tar.bz2 | 547M | This file contains the new and improved genetic algorithm, written in C to run on a beowulf cluster. The model it fits is Einats PY like model that I've rewritten in C. | ![]() |
| genetic_drip.m | 2810 294 |
This is a matlab script for visualizing
the results of the genetic algorithm. It shows how the mean and standard
deviation of the parameters, chosen two at a time, and fitness change
over the generations for all runs. The effect looks like plastic pouring
from above into piles. We wanted to see how results clustered in parameter
space and it was very difficult to see with point cloud plots.
A sub-function called by the uicontrol lines. |
![]() |
| bandFlop.m | 4633 | A script similar to breakpoint.m, but this script does repeated runs on either side of a range adjusting two model parameters making a band or notch filter neuron. |   |
| equalspiralband300.mdl | 259826 | This is a model used in our duration sensitive neurons paper. It was tuned with the bandFlop.m script. With different sets of parameters it can become any of our models. Be warned that it does not use workspace variable names as the Simulink parameters so you have to go digging through the model to change anything. |   |
| breakpoint.m | 1099 | Does repeated simulation runs adjusting a model parameter until only a certain number of spikes occur during the run. We used this to create high and low-pass neurons. |   |
| chuckMats.m | 271 | This script was written to learn how to use meshgrid and interp3 to deal with some strange data. |   |
| countspikes.m | 1493 | Used to make plots of how our duration sensitive neurons responded over a range of durations. |   |
| event2wave.m | 454 | Used to convert the output of a spike4 event channel to a delta function suitable for use in a Simulink model. |   |
| fitfun2.m | 412 | This script is used by MyFit. It takes parameter values, runs a simulation, and returns an error value. |   |
| freqPlot.m | 438 | Used to make frequency response curves. This can use a lot of RAM. |   |
| LowpassSearch.m | 3537 | This does a brute force search of parameter space for low-pass duration sensitive neurons. It wasn't the smartest idea as the parameter space is very large. |   |
| MyFit.m | 329 | This uses fitfun2 to tune a model so that it reproduces the output of a real system. |   |
| planeMeetsCone.m | 797 | Plots a plane and a cone in 3D cutting and pasting of figure elements can put the two together. This is not really usefully but it looks cool if the color scheme is interesting. |   |
| PrintVariableNames.m | 87 | This script is for figuring out where different variables are in the structure type output of Simulink. |   |
| ThreeBodyBiff.m | 1588 | This script runs my three body model many times with different initial conditions. It then produces a bifurcation diagram of the final state of the model. This turns out to be rather pretty as the system is chaotic with islands of stability in parameter space. One interesting feature of the script is that the sim command is inside a try catch block. This, along with some features of the model, prevent the script from waisting CPU cycles on conditions where the dt of the simulation can not be reduced because of precision issues. |   |
| ThreeBody.mdl | 50228 | This model simulates three free bodies orbiting one another on a plane. It uses workspace variables for it's parameters so there is almost no need to dig around in the model if all you want to do is mess with parameters just use a setup script. Plus there is certainly no reason to save a new version of the model after fooling with parameters. This solves a major version control problem we had during work on the duration sensitive neuron work. |   |
| ThreeBodySetup.m | 516 | Note the small size and readability of this file. It amounts to a simple list of the parameters in a model. Saving and manipulating these is far easier than manipulating the model files. For example a diff of two setup files is short and sweet compared to a diff of two Simulink models. All you have to do is run the script in the Matlab command window before running a simulation. |   |
| Make_Devil.m | 499 | This script generates the values found in the "Devil's Staircase" which is a fractal like ruler which shows up in coupled oscillators like our entrainment models. |   |
| AdjCP-DC.pls | 2698 | This is a Spike2 sequencer file that goes through period and duty cycle ranges. It was tough to write because it requires division which is a function conspicuously absent from the sequencer operations, but subtraction can do nicely. |   |
| Smooth Event Adjust.s2s | 877 | This is a Spike2 script that adds and removes events from an event channel but requires very few mouse clicks. |   |
| pga.m | 3570 | This is a Matlab program made in part from the GAOT package. I wrote it in such a way that it can be made to run on parallel computers. Next I will be writing a fitness function that contains the actual parallel parts. |   |
| pga.tar.gz | 2169 | This is more or less identical to the pga.m file above except that I have written the bash scripts to start Matlab on both the Windows XP and Red Hat GNU/Linux 7.3 computers. The message passing is extremely unrefined, and adds several seconds of overhead per generation however we intend to use a fitness function that takes several seconds on its own with large population size so this effect should be small. In any case I use Cygwin on the Windows boxes so that all of the machines have ssh client/server and bash. I use DSA identity keys on all of the hosts so that no passwords need to be entered. |   |
| PYLike.tar.gz | 427156 | This contains an updated PGA that does a much better job of assigning subpopulations to hosts. It keeps track of how many individuals each host evaluates and how long it took. Then the subpopulations can be made such that all hosts finish there work within a few seconds of one another. This keeps computers from sitting idle for a long time each generation. This file also contains the model and data it is set up to fit. |   |
|   |   | A lot has changed with the genetic algorithm. Most notably, a drastic shift in the evolutionary operators. Now each individual caries a set of standard deviations, one for each parameter. An amount from normal distributions with these standard deviations is added to every parameter and every standard deviation in every member of the population every generation to make children. The children and the parents participate in a tournament to join the next generation. This is MUCH faster than uniform mutation. Secondly, I am rewriting the whole thing in C to run on the OSC cluster at OU. |   |
| blinkin_cells.m | 4413 | This file is a Matlab script that creates a movie of a network diagram with flashing cells and moving recordings in either avi or mpeg format. The movie to mpeg program is on the mathworks website. |   |
| spikes.m | 760 | This creates the sound to go with the above movie. |   |
| network.wmv | 5515190 | And finally, the movie of the STG with blinking cells, sound, and moving traces. W had to use M$ movie maker to combine the sound and video. (Xine can play it in Linux.) |   |
| delay.zip | 63539099 | This is all of the dynamic delay data from Jeff, Adam, and Einat that I am trying to model above. |   |