Thursday 26 July 2007

Quick book recommendation

This summer, I've got an undergraduate research bursary at our university's Systems Biology centre, which is wierd as I always viewed myself of more of a pure mathematician, but is absolutely fascinating.

I have jumped in at the deep end, however (my supervisor seems to think I know a lot more than I really do and maybe hasn't realised I haven't done any serious integration/differentiation or ODEs stuff since the first year...).

What I'm actually doing is looking at the response of Neurons to different types of presynaptic noise, which I am slowly learning more about. In particular, noise is random (well, duh) and so all of the models I end up with have Stochastic Differential Equations, which are typically quite unpleasant. For those interested, the toy models I'm playing with end up with Brownian motion in a harmonic potential.

So the book I'm recommending is:

Paul and Baschnagel, "Stochastic Processes, From Physics to Finance"

Don't let the reference to finance put you off - I've found it absolutely fantastic for explaining the basics of Wiener processes, brownian motion and so on. In particular, it is written for the scientist rather than the mathematician and so everything's done in the real numbers, rather than over wierd and wonderful probability spaces. I really believe that even if you want to learn stochastic integration properly as a mathematician, this is a worthwhile read, because you end up for a real feel for what's going on.

The book's published by Springer and is on Amazon here at the terrifying price of about £50 used, so you might want to try a university library!

Now back to work!

Thursday 5 July 2007

Fun with xorg.conf

So I've finally got my ALPS / Synaptics touchpad working along with a compose key on debian (the ALPS touchpad comes with, among many other laptops, the Dell Inspiron 500m which I own).

The touchpad

For the touchpad, I need to thank this walkthrough along with this forum thread.

Before anything will work, you need to make sure that the evdev module is being compiled in your kernel (it wasn't) and is being loaded (that bit worked for free for me, but one comment on the above forum post suggested you needed to add it to /etc/modules). You can find the option under Device Drivers/Input Device Support/Event Interface in the kernel config (e.g. make menuconfig)


Now you need to edit your xorg.conf (found in /etc/X11). There are three things that you need to do:

  • Load the synaptics module

  • Add a new input device to ServerLayout

  • Declare the input device


In order to load the synaptics module, add a line saying:

Load "synaptics"

to the "Module" section. Mine now looks like:

Section "Module"
Load "glx"
Load "extmod"
Load "xtrap"
Load "record"
Load "GLcore"
Load "dbe"
Load "dri"
Load "type1"
Load "synaptics"
EndSection


Now adding a new input device to ServerLayout is simple - just choose a name (I called it "ALPS") and add the line

InputDevice "your name for it here"

to the ServerLayout section just below the line saying

InputDevice "Configured Mouse"


Finally, add the declaration for the input device. A version with no clever options set is:

Section "InputDevice"
Identifier "ALPS"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/mouse1"
Option "Protocol" "evdev"
Option "SHMConfig" "on"
EndSection

(note that the identifier has to agree with the name you chose earlier). For a much more thorough list of settings you might wish to see the third page of the debuntu article here.

Assuming you got everything right, you should now be able to restart your X server and get exciting touchpad support. Note that to restart the X server, the best practice is to exit (gracefully) any open programs, log out of whatever desktop environment you're using and when you get to the display manager (xdm,kdm,gdm or whatever) hit Ctrl-Alt-Backspace.

The Compose Key

This is really simple, but it makes life much easier when writing auf Deutsch on an english keyboard. In your InputDevice section corresponding to your keyboard, add the line:
Option "XkbOptions" "lv3:ralt_switch, compose:ralt"
The relevant section in my xorg.conf now looks like this:

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "gb"
Option "XkbOptions" "lv3:ralt_switch, compose:ralt"
EndSection


Once you've restarted the X server, Alt-Gr S, S should give ß and you can have the fun of discovering umlauts, graves, circumflexes etc. yourself. It's a bit like a more logical version of the system they used in Microsoft Word.