Archive for the “Computing” Category
After a few snags with a dependency that did not want to play nicely, I managed to get the MIIND simulator installed. This is required for the next step of the project.
I now need to demonstrate that as the mu increases (which we can now predict reasonably accurately), the output firing rate steadily increases. This produces a sigmoid shape on a histogram… after a fashion!
Today I ran the one population model [to test, we need to do the same with a two population model], with a variety of different rates, which equates to different mu values. The mu can also be varied by altering the synaptic weight as well, although this would be much less significant changes, and should in theory result in exactly the same curve.
Once I have done this in NEST I will need to replicate it in MIIND
No Comments »
Since last week I managed to track down and resolve the problems I had been having with help from Marc. It turned out to be a quota problem; the data exceed my quota and thus overwrote parts of itself. I thought I had modified my script to do this, but evidently not. Once I had got my script using /tmp/ (and my portable hdd) instead of my home folder, everything works fine again.
I now have a working, one population model. The input and output is consistent as far as I can tell. This is something that is bothering me though, I don’t feel like I am understanding the theory as well as I should. It is certainly making my progress slow, which is frustrating. I am trying to make sense of the Amit & Brunel papers, but they’re big papers and it is all too easy to get lost n the text.
A firm grasp on the background is becoming most apparent now that I have started my final report. I will not be able to write up that section well at all unless I do.
No Comments »
Yesterday was not a good day for my project; I found myself being propelled backwards from the doorstep of phase 2, ending up at the gates of phase 1, right where I started…. well sort of. It certainly felt that way.
The most significant acheivement I have made som far is confirming that I can correctly predict the properties of the output for a neuron population. The next stage is to use models with multiple populations. Before I could move on to this stage, I needed to remind myself of the tools that I had been using before.
The way to do this was to repeat the post-processing of the simulated output for the single population model. As the output files are mammoth in size, I can only store them in /tmp/. This means I had to run the simulation again as well.
Something is not right. While the size of the file is almost identical, the order of magnitude of spikes is correct, my post-processing tool was failing. Given that the output for any given model should be identical no matter how many times it is run, and that the tool worked before, this should not happen. I have modified the tool to cope with the error and produce the meaningful output.
The output I now get still fits the theoretical predictions, and so is correct. However, it is most disconcerting that it is not identical as it should be. I have yet to establish what exactly causes the NEST simulator to behave differently, or if the annomolies are due to the corrupt file. Even if that is the case, I do not know what is causing that to happen.
I will definately be mentioning this to Marc in our next meeting.
No Comments »
So far, I have sucessfully managed to implement a one populatuion model and estimate that its behaviour is consistent. I have done this by measuring the spikes generated by the poisson generators (input of the population) and the spikes generated by the population itself (output of the population).
The results from the latter step need to be checked against theory. The formulea to do so is extremely complex and I am expecting some software from Marc to help with these calculations. I was able to calculate the input rate as these formulae are relatively simple.
I have implemented (I believe) a two population model, with both excitatory and inhibitory populations. The model has a poisson generator for each excitatory neuron. These provides the initial stimulus for the excitatory population. The excitatory and inhibitory populations each have 0.1 * the population size, random connections to other neurons (self or cross population). Each population also has a spike detector attached.
Using the same variable values as previously used for the one population model, this yielded very little activity (17 ex-spikes and 0 in-spikes). However, if the weights are tweaked upwards, I found that the excitatory population started off barely spiking, until about 40ms where its rate increased exponetially to 50000 before 50ms, after which it maintained this firing rate. The inhibitory population displayed similar behaviour but on a smaller scale (as we would expect with a smaller population).
The resulting histograms derived from these spiking data clearly show a sigmoid shape. This indicates stable regular firing, though I have yet to confirm this.
No Comments »
Some of the examples have the following import:
from scipy.optimize import bisect
The scipy.optimize module does not appear to be available
1 Comment »
pyNEST is a python extension and interface for the NEST Neural Simulation Tool. I will be using it to create my models for the NEST simulator. My first task is to get familiar with pyNEST and its features.
So far with pyNest, I have been trying out the basics; creating a single neuron (as opposed to a population of neurons), a Poisson Generator (a stochastic function) to interact with the neuron and a voltmeter to record the voltage of the neuron.
It would appear that the Poisson Generators can have several different rates which have corresponding convergence values. To begin with, I created a Poisson Generator which had just one rate. I set the initial rate to 40000.0 and a convergence value of 1.0. I then ran the simulator for one second (1000 ms) with a heuristic output. This lead to a neuron which never fired, with its membrane potential hovering around the -60mV point. Neurons need to reach aprox -55mV to fire and discharge to the rest potential rate of -70mV.
I next modified the convergence value to 2.0. This had much more satisfactory results. The neuron fired and discharged with a frequency of 45/second (45Hz). The peaks had a very uniformed structure. Increasing the convergence rate further causes the neuron to fire more frequently. Increasing it to 3.0 causes a spike frequency of 93Hz, more than double then before. A rate of 4.0 gives a frequency of 128Hz which suggests that the difference in growth is logarithmic.
I also tried altering the initial rate for the Poisson Generator. I decreased the rate from 40000 to 30000 in steps of 1000. At each step the result was less spikes within the same timeframe until 31000 where the neuron ceased to spike, between 37000 and 31000 the curves became increasingly less uniformed.
Increasing the Poisson rate increases the number of spikes. Interestingly the ratio is exactly the same as when I altered the convergence rate. Multiplying the convergence by 5 (2.0*5 = 10.0) produces 252 spikes. Doing the same to the Poisson rate (40,000 * 5 = 200,000) gives the same result.
At this point I decided to add an additional rate to the Poisson Generator. On doing so, the effects were immediately clear; a secondary rate can be used to amplify or to counteract the first by assigning positive or negative values for its convergence. I used two identical rates, with identical convergence values, the firing frequency was greatly increased. Setting the second convergence rate as the negative of the first (2.0, -2.0) causes the neuron to not fire at all. Setting the convergence rate at a lower negative value reduced the firing rate, providing the second Poisson rate is set significantly lower than the first. While I can see these effects, I can not establish exactly why we would do this.
Questions:
-
What are the values being put into SetStatus() for the voltmeter and why are they required?
-
What is the final argument given in ConvergentConnect()? Only positive numbers, seems to offset the initial state of the neuron
-
Why would we use multiple rates in the Poisson Generator?
-
Is there any documentation for pyNEST?
No Comments »
Posted by: Matt in Computing
Oh what a wonderful language it is!
Whenever I start up my Windows desktop, it is programmed to wake up my Linux server where I keep all my music and movies. I often make the mistake of just opening up Winamp and expecting it to play whatever I choose from the media library. The reason this does not work, fundamentally, is because Windows is shite (on several counts in this case); The only way to automate tasks at startup is through the autoexec.bat batch file which means that if it tries to reconnect to a mapped drive at that time, it obviously fails as the server takes just over 40 seconds to boot. So I do not do this, instead I have to connect by opening the drive.
Having to remember to do this every time has been pissing me off. Today I’d finally had enough and decided to find a way to make the autoexec.bat file check if the drive is available, if not wait 60 seconds and set up the mapping. After looking into how to simply wait 60 seconds in Batch, I shuddered and heard a voice (which was actually George) say “If you’re gonna script, do it in Python!”. Excellent advice as the code to do it in python is import time, time.sleep(60). I had another problem though, again due to Windows’ inadequacies;
Unlike *nix, Windows does not have comprehensive command line tools. It is supposed to sometimes but its attempts are feeble! Try running net use <drive> <location> <user> on a letter already assigned and you will be in a world of pain! Even if you don’t it still seems to completely b0rk the gui created link to the drive and so still screws everything up. Excellent work! Luckily pyWin32 with its array of API extensions can handle this flawlessly.
One final problem here though is that using this script meant having my username and password for my server in plain text on a Windows machine. Not a good idea! Oh well, a distutil extension called py2exe sorts that out. It isn’t perfect as it turned a 500byte script into a 3.5Mb .exe file (its includes a python interpreter and deppendancies so it can run on systems without a python install) but still, a small price to pay to have a 2 line autoexec.bat file which wakes up the server, waits 60 seconds and connects the drive.
I ♥ Python!
No Comments »
After discovering that running my computers (modestly used as they are) cost over half of what I pay for electricity every year, I started thinking about how my computers could be put to better use.
I remembered a little known yet well established concept; volunteer computing, which I used to partake in years ago (I can’t think why I actually stopped being involved before). Which basically involves installing a program on your PC which uses your space cpu cycles to work on scientific projects. A central server for a project hands out small chunks to each volunteered computer over the internet and collates the results.
It would appear that this technology has come along in leaps and bounds since I last looked into it, as there are now dozens upon dozens of these projects, all of which have settled on a common framework known as BOINC (Berkeley Open Infrastructure for Network Computing).

I have a very powerful desktop machine (quad-core Phenom 2.5Ghz) which means during daily use I barely scratch the surface of my computers ability.
With BOINC installed however I am constantly using nearly 100%, though despite this I do not notice any loss in performance while running applications.
This is because all other processes take priority over the BOINC client, it simply uses up whatever CPU power you have spare.
It makes me wonder how much quicker, big scientific problems could be solved if every computer in the world was running this software.
The BOINC client is available on most standard platforms and operating systems and is open source so can be modified to run on potentially any system.
Most linux distributions have the software available from their repositories via package management tools such as Yum and Aptitude. If you have a powerful computer that does not use 100% of it cpu time, can you justify not having this software installed?
Full details and install instructions can be found at http://boinc.berkeley.edu
2 Comments »
Posted by: Matt in Computing
Owing to the soaring cost of energy, I decided to invest in a plug in power meter. That is a handy little device that monitors how many volts/amps/watts and most importantly watts/hour is being drawn from a power socket. I decided to plug this into the socket which supplies my entire computer rig to see what my computing is costing me.
I had running my desktop PC, my file server, LCD monitor and speakers. One hour later and the meter was reading 0.34kWh which means that to keep this running for 24 hours would use 8.16kWh. It doesn’t look like much but lets do the maths!
Putting these figures into pounds and pennies is a convoluted process, and different for everyone, but here is how I worked it out. I assumed that the more expensive units (first 182 kWh per quarter) were used up by general household usage leaving just the daily and night time rates (17 hours @ 12.75p/kWh and 7 hours @ 5.4p/kWh). This means if my usual setup uses 0.34kWh every hour it will use (5.78kWh @ 12.75p + 2.38kWh @ 5.4p) meaning the cost per 24 hours is (73.695p+12.852p) = 86.547p, which is £315.90 over a whole year.
Now that is a LOT! Even though I do not run my computers 24/7 any more, the meter still read 5.14kWh after 24 hours. By the same calculations, that is still £200.18 per year that I spend just on running my computers.
The fridge/freezer has often been cited as the most wasteful and costly home appliance, however mine uses just 1kWh every day, which is just £38.72 per year. This means that my computers are over five times more expensive to run. I consider my own setup and usage modest among my peers. I know people who run several home servers 24/7. I wonder what sort of bills they are racking up. Furthermore, what must it cost to run a warehouse-sized data centre these days?!
The cost of computing? Very expensive indeed
No Comments »
Posted by: Matt in Computing
I discovered a wordpress plugin today called Advanced Category Excluder which facilitates a need I have regarding my RSS feed; My blog is syndicated to my Facebook page and I am concerned that some of my drafted posts are just a bit too long and techie for a Facebook audience (they probably won’t do my street cred much good either) and so I’ve been looking for a way to exclude certain posts (besides waiting for Facebook to syndicate and then deleting them before anyone sees them) and ACE fits the bill. Now I can chose to exclude certain categories (and soon tags) from the RSS feed (as well as other options) which will stop them popping up on Facebook. Just like this post .
It does have some limitations though. In order to exclude a post, it must only be listed under categories that are excluded otherwise it will still show up. It does also mean that anyone who uses an RSS reader to view my blog, whom I would normally want to see my techie posts will also not see them. It would really have been better to implement this at the Facebook end of the chain, but I’ve not found anything that does the trick thus far. If anyone comes across a Facebook crapplication that does this please let me know.
No Comments »
|