Religious passion: a handy guide for the awkward atheist chorister.

XKCD - Beauty

Like many people, I'm an atheist that loves to sing. Throughout my life I've been lucky enough to sing a lot of really gorgeous music with a lot of incredibly talented people. I feel like a really important part of singing is to take the emotions behind a piece of music and try to express them in your voice, which is all very well and good, until you come across something like:

Glória in excélsis Deo
et in terra pax homínibus bonae voluntátis.

...which to me carries about the same amount of meaning as:

Lorem ipsum dolor sit amet,
consectetur adipisicing elit

That is to say, very little. It doesn't help that much of the liturgical music I've come across reads like very strange alternate universe bible fanfiction. Take this line from "Out of your Sleep" by Richard Rodney Bennett:

Blessed be God this game is begun
And his mother the Empress of hell.

I don't remember that from my RE lessons. And since when has Jesus Christ been an apple tree?

I find it helpful to try to a) suspend my disbelief and b) relate religious texts back to emotions that I've felt in everyday life. Anything that rhapsodises about the beauty and wonder of the world around us is an easy pass for me, as a biologist. I just think back to the first time I read The Selfish Gene or The Music of Life, or turned an E. coli colony a funny colour.

Songs that draw on the kind of quiet despair that comes of being in a truly desperate situation, like Elgar's The Shower, or Britten's Rejoice in the Lamb speak to me. Granted, Christopher Smart wrote the text to Rejoice in the Lamb while he was incarcerated inside a mental asylum, and the most wretched situation I've ever been in was the time I managed to get a paper cut on top of another paper cut, but I can summon sufficient emotion to empathise.

Christmas songs are often another easy pass, since so many of them are largely about how nice this new baby is. I get that - babies are great! Carols that describe Mary singing to her newborn son like Along the Little Road to Bethlehem and Bethlehem Down are some of my favourites for the same reason I love the Seal Lullaby: I can imagine them happening over a pram on the bus in the way into Oxford. Lovely.

My main problem has always been with attempting to summon up some enthusiasm for an all-powerful, omnipotent, sometimes vengeful deity. It's not something that I have much of a conception of - and frankly, I'm more likely to find it terrifying than wonderful.

So I thought, and I thought, and nothing came. Then one day, I opened up my hymn book and started singing Praise my Soul, the King of Heaven:

Angels, help us to adore him;
Ye behold him face to face;
Sun and moon, bow down before him,
Dwellers all in time and space:
Alleluia! Alleluia!
Praise with us the God of grace.

Something about that verse struck me. Was it the part about the angels? Was it the reference to time and space? Perhaps I will never know, but into my head at that moment came the perfect metaphor. A character who I could empathise with utterly, who held unknowable power, who was just and kind and loving but also could wipe out entire continents or blow up worlds.

Doctor Who

So there we have it: a simple method for faking your way through the vast majority of religious music. Fantastic.

In other news, if you're feeling like a bit of choral Christmas cheer, my very wonderful college choir have released our second CD Advent Calendar which would make an excellent Christmas present, or a very disappointing doorstop.

...

Pathos, Ethos, Logos, Porthos, Athos, Aramis.


Title page of presentation

I gave a presentation yesterday to the Cardiac group here at Oxford about my summer project and my plans for my PhD. It was, quite frankly, terrifying, which is fairly typical of all the presentations to group meetings that I've ever given. Talking to people who are experts in your subject about what you're doing is quite a nerve-wracking experience, no matter how prepared you feel you are.

Nonetheless, it was a really good opportunity to get feedback and advice on my results and on my next steps. I have been a bit concerned that because my simulations involve changing ionic channel conductances to up to 50x their usual level, my results wouldn't be physiologically relevant. Blanca brought up the point that a healthy heart isn't likely to have an arrhythmia, so ion channels that aren't operating outside normal limits aren't particularly relevant to my research.

The next time I present my research plan (which will be in 2 weeks' time at my pre-PhD viva) I think I'll include a flow chart of the process, because most of the questions asked afterwards were along the lines of "Sorry, what?", which is non-optimal. I'm also determined to start using LaTeX for my slides - LibreOffice, while wonderful, refuses to display .eps images, for some reason. I'd like to be able to send data from my simulations straight through my Matlab scripts and into a presentation, without tedious faffing with the Gimp or ImageMagick and trying to avoid horrible pixellation.

I included appendices after the main presentation to answer questions that people might ask, which was an idea I stole off one of the students in the Computational Biology group. Nobody did ask the questions, in the end, but it was nice to have the extra information there just in case.

The one question I wasn't prepared for was "Why did you choose these particular models?" I chose them because they have been reported in the literature to show both DADs and EADs, but when I was asked the question I froze and stammered something about those models being the ones that didn't break my program (which is also true, but less relevant). That wouldn't have been appropriate for an appendix, but I'll make sure to write it on my cue cards the next time, so I have the information at my fingertips and don't have to rely on my memory — which is a notorious cad and bounder, and often deserts me at a moment's notice.

You can download my presentation from here if you are particularly interested.

...

Detecting afterdepolarisations - C++ version

I've spent the last few weeks (amongst other things) implementing my afterdepolarisations script in C++ within the Chaste framework. Here's some of my code broken down into sections and explained.

#include "DetectAfterDepolarisations.hpp"
#include <fstream>

bool DetectAfterDepolarisations::FindAD(std::vector<double> voltage, std::vector<double> simtimes,
    double end_time, double stim_start, double stim_period, double lowlimit, double highlimit)
{
This function takes as inputs: a vector containing the voltage trace for every time point, a vector of all the times, the end time of the simulation, the time at which the stimulus starts, the period of the stimulus, and the two boundary values for detection. It will output either "true", if there is an afterdepolarisation, or "false", if not.
    /* detect depolarisations*/
    std::vector<double> differences;
    std::vector<double> adtimes;
    for (unsigned int a=0; a < voltage.size()-1; a++)
    {
        /* list of voltage change at each time point*/
        differences.push_back(voltage[a+1]-voltage[a]);
        /* if the voltage is going up... */
        if (differences[a] > 0.1)
            /* store the time */
            adtimes.push_back(simtimes[a]);
    }

The way this works isn't desperately clever: it takes each point on the graph and subtracts it from the one after it, giving the gradient between each point. For all the positive changes in voltage (arbitrarily those over 0.1 mV), it keeps a note of the time.

    /* erase depolarisations provoked by stimulus */
    for (double e = stim_start; e < end_time; e=e+stim_period)
    {

        for (unsigned int f=0; f<adtimes.size(); f++)
        {

            if (adtimes[f] > e-lowlimit && adtimes[f] < e+highlimit)
            {

                adtimes.erase(adtimes.begin()+f);
                f--;
            }
        }

    }

These awkwardly nested loops check all of the depolarisation times and remove any that coincide with the stimulus. This means that the program finds only afterdepolarisations and not the ones we'd expect to be there. Lowlimit and highlimit can be changed for models with different lengths of action potential.


    /* find times when the AD starts */
    std::vector<double> diffadtimes;

    /* iterate through list of voltage upswing times*/

    if (adtimes.size()!=0)
    {
        for (unsigned int b=0; b < adtimes.size()-2; b++)
        {
            /* make a list of the differences */
            diffadtimes.push_back(adtimes[b+1]-adtimes[b]);
        }

    std::vector<double> adstarts;

    /* find minimum time difference */
    std::vector<double>::iterator step = std::min_element(diffadtimes.begin(),diffadtimes.end());
    double minsteps = *step;

    for (unsigned int d=0; d< diffadtimes.size(); d++)
    {

        /* find all points in diff(adtimes) that change more than the minimum*/
        if (diffadtimes[d] > minsteps + 0.0001 )
        {
            /* store times */
            adstarts.push_back(adtimes[d+2]);
            /*                std::cout << adtimes[d+2] << "\n";*/
        }
    }

This block of code is concerned with finding the start of each afterdepolarisation. Simply put, it looks for discontinuities in the list of times, and stores them.


    std::ofstream outputfile;
    outputfile.open("/auto/users/bethmc/Data/LatestADs.dat");
    outputfile << "Time(s) membrane_voltage(mV) AD\n";
    for (unsigned int d=0; d < voltage.size(); d++)
    {
        outputfile << simtimes[d] << " " << voltage[d] << " ";

        /*output 1 if AD, 0 if not */
        bool found = 0;
        for (unsigned int e=0; e < adtimes.size(); e++)
        {
            if (simtimes[d] == adtimes[e])
            {
                found = 1;
                break;
            }
        }
        outputfile << found;

        outputfile << "\n";
    }

The output file contains columns of the time, the voltage, and whether or not an afterdepolarisation has been detected at that point.


    if (adstarts.size()>0)
    {
        return 1;
    }
    }
    return 0;
}

This function is called by other programs and used to find thresholds for interventions that cause afterdepolarisations. Hopefully, this code will be useful for finding out whether a drug that affects a particular ion channel in the heart will cause an arrhythmia.

...