The first time Californian photographer Patrick Coyne saw a pod of dolphins dancing in bioluminescent waters, it was on Netflix. The second time, it was in person - camera in hand - on what he now describes as one of the most magical nights of his life.

After searching for hours in the pitch black off the coast of California's Newport beach, Coyne recently captured a rare glimpse of these glowing torpedos on a local nightly tour.

"We were out for a few hours and on our final stretch back we finally had 2 Dolphins [sic] pop up to start the incredible glowing show," writes Coyne on his Instagram.

"A few minutes later and we were greeted by a few more which was insane. I'm honestly still processing this all… "

The video Coyne has made from the trip is truly breathtaking, but he says it was challenging to film. Bioluminescence is hard to spot and ephemeral by nature, so getting footage requires the perfect conditions and a bit of luck.

In coastal regions, bioluminescence is caused by microscopic organisms called dinoflagellates. These tiny marine "fire plants" are members of the plankton family and they are quite sensitive to movement of any sort.

So much so, that when they are poked or prodded by a predator, each cell emits a flash of light lasting up to 100 milliseconds, almost like a burglar alarm. If there's a whole bunch of algae concentrated together, as Coyne's video shows, a flip of the fin can lead to quite the show.

Retweeting the video, ecologist Rebecca Helm from the University of North Carolina Asheville used a funnier metaphor to describe the phenomenon - although it's not entirely correct. "Ahhh beautiful: dolphins scaring algae so bad they poop light."

She later corrected herself because dinoflagellates don't actually eject the chemicals - it's more like "luminous little panic attacks", she explained.

Dinoflagellates produce two chemicals that create a glowing reaction when they're startled. These are known as the enzyme luciferase and the compound luciferin, and together they cause the dinoflagellate to glow at night when they are mechanically disturbed.

In fact, this very phenomenon is where we get the name "night light", and it's known to occur inside and outside several different marine species, often as a way of scaring off predators.

Turns out, not so effective on humans - to us it just looks stunning.