Last summer, while filming for my new BBC4 series, The Brain - A Secret History, I took part in the UK's first scientific trial of psilocybin - the active component of magic mushrooms. It was one of the strangest experiences of my life.
Psilocybin is a hallucinogenic drug, so I was extremely apprehensive.
It also has a dark past. As well as being used recreationally, psilocybin and other hallucinogenic drugs were used in the 1950s and 60s as part of brain-washing experiments by the US military.
Since it is a class A drug, taking it would normally be illegal. But the former government drugs adviser, Professor David Nutt of Bristol University and a team from Imperial College believe that psilocybin is worth investigating as it may have a role to play in medicine, possibly as a treatment for severe depression.
They want to study what psilocybin does to the brains of healthy volunteers. They have permission to administer the drug within the controlled environment of a clinical trial.
Which is why, one rainy afternoon, I turned up at a brain scanning unit belonging to Cardiff University
"So am I going to enjoy this?" I asked Professor Nutt.
"I think so. Most of our volunteers have. Most people get something positive from it," he reassured me.
The team were expecting psilocybin to have a profound impact, so I was put through a battery of psychological tests to check my mental stability.
Hallucinogens are very unpredictable. I would not have been allowed to take part if I had not passed the tests. But there was still the risk of a "bad trip" which is said to feel like being trapped in a nightmare.
I asked Dr Robin Carhart-Harris, also running the trial, what I was likely to experience.
"It can be quite dramatic", he told me. "The last volunteer said it was like an intense, spiritual experience, an existential experience, that his whole sense of self dissolved and he only existed as a concept."
I think this was intended to be reassuring, but it wasn't. I was pretty sure that I didn't want to find out what it was like to exist as a concept.
Alone in a tube
After a thorough physical examination, I was placed in a brain scanner, so the team could map in detail how my brain reacted.
Then the drug was injected.
For an instant there was nothing. Then it was like that moment in a Star Trek film when the space ship goes into hyperdrive. The walls of the scanner dissolved and I took off to the stars. I saw intense colours and patterns.
It was beautiful, but disturbing. It was also intensely frustrating because I wanted someone to share the experience with, and I was all alone in a metal and plastic tube.
Prof Nutt and his team, who were monitoring the effects on my brain, told me later that my brain registered an intense response.
After about ten minutes they had collected enough data, so they let me out of the scanner. Although I now felt as if the psilocybin was wearing off, I was still feeling most unusual and had an uncontrollable urge to talk. . . and talk . . . and talk.
My results were then merged into the consolidated scans from the other participants in the trial, and Professor Nutt showed me what they had learnt.
"Our aim was to identify the precise areas inside the brain where the drug is active. We thought when we started that psilocybin would activate different parts of the brain. But we haven't found any activation anywhere. All we have found are reductions in blood flow"
A fall in blood flow suggests that brain activity has reduced. The areas affected were those parts of the brain that tell us who we are, where we are and what we are. When these areas were dampened down, I was no longer locked into my everyday constraints.
This is also one of the reasons why magic mushrooms and other psychedelic drugs are so potentially dangerous. Without a sense of who and what they are, there are cases of people running into busy roads or trying to fly with fatal consequences.
But David thinks that because psilocybin can dampen activity in critical areas of the brain it may, in future, also have a place in the treatment of mental disorders like depression.
"In conditions like depression or obsessive compulsive disorder, where people get locked into a maladaptive mindsets, these regions can be overactive. So maybe dampening down these areas will help people move into another mindset which might be better and healthier".
American researchers, using non-hallucinogenic versions, have already begun researching the use of former "psychedelics" for treating depression, obsessive compulsion disorder, alcoholism, and addiction.
David is not suggesting that people who are depressed treat themselves with class A drugs. NHS advice warns that people with mental conditions are at particular risk from hallucinogens which can make existing conditions worse. But he does think that it is an area of research that could prove extremely fruitful.
"It would be wonderful if we had a new way of treating depression, wouldn't it? Particularly if you could hold on to those effects and maintain them."
So hallucinogenic drugs may have a part to play in the future as a therapeutic tool. It's a far cry from the military ambitions of would be brainwashers.
As for me, well it was an interesting experience. But not one I will be repeating.
Dr Michael Mosley presents The Brain: A Secret History, a three part series on BBC Four on Thursdays at 2100GMT from 6 January.