Contrary to long-held opinion, ecstasy, the popular rave-culture drug, may not harm your brain.

This is according to one of the largest studies ever conducted on the illegal drug's effect on cognition, published last week in the journal Addiction.

Though former studies have concluded quite the opposite about the drug (technical name 3,4-Methylenedioxymethamphetamine, or MDMA) there's been concern that these conclusions were overstated and reached through faulty methods.

The latest research, a $1.8 million study funded by the National Institute on Drug Abuse (NIDA), set out to correct these methods by eliminating all other factors that could possibly contribute to mental impairment: 1) sleep deprivation and dehydration commonplace in rave culture, 2) previous habitual drug or alcohol use, or 3) former cognitive damage for any reason.

After screening subjects for these factors (even testing hair samples to make sure they weren't lying about drug use) researchers whittled down the initial pool of 1,500 people to just 52 cognitively clean subjects, the Guardian reports.

John Halpern, lead researcher from the Harvard Medical School team, told Addition:

Researchers have known for a long time that earlier studies of ecstasy use had problems that later studies should try to correct. When NIDA decided to fund this project, we saw an opportunity to design a better experiment and advance our knowledge of this drug.

Ecstasy is most commonly associated with the 1980s and 90s rave scene -- all-night dance complete with strobe lights and glow sticks to enhance the drug's effect. Ecstasy's symptoms include a feeling of euphoria, a heightened sense of intimacy and pleasure, and decreased anxiety. Negative side effects include blurred vision, and in rare cases overdoses can be fatal.

The common understanding, and certainly the argument from the anti-drug camp, has been that ecstasy can cause memory loss, pose a serious brain damage risk, and have long-lasting effects on behavior.

Researchers are quick to point out that despite the study's conclusion, ecstasy is still a dangerous drug. The illegal pills have no warning labels, and can contain a number of harmful contaminants.

Studies have also looked into MDMA-assisted psychotherapy as a possible treatment for post-traumatic stress disorder (PTSD). The idea is to provide at least a brief experience of what life feels like without the aftermath of trauma, to provide a state in which learning can occur.