It's a warm summer afternoon in the Tanzanian village of Lupiro, and Mikkel Brydegaard is crouching in a brick hut, trying to fix a broken laser. Next to him, on a tall tripod, three telescopes point through a window at a tree in the distance. A laptop rests on an upturned box, waiting to receive a signal.
With a working laser, this system is known as lidar – like radar, Brydegaard tells me, but using a laser instead of radio waves. The setup is supposed to gather precise data about the movement of malaria mosquitoes. But as the sun starts to set outside, Brydegaard is getting nervous. He and his colleagues have spent a week in Tanzania, and their device still hasn't started collecting data. They're almost out of time.
Tomorrow, a solar eclipse will blot out the sun over Tanzania – an event that occurs only once every few decades here, and that Brydegaard and his team from Lund University in Sweden have travelled thousands of miles to see. Their immediate aim is to see if the eclipse affects the behaviour of disease-carrying insects. Their larger mission, however, is to demonstrate that lasers can revolutionise how insects are studied.
Lidar involves shooting a laser beam between two points – in this case, between the hut and the tree. When insects fly through the beam, they'll scatter and reflect light back to the telescopes, generating data from which the scientists hope to identify different species. At a time when pests destroy enough food to sustain entire countries – and when insect-borne diseases kill hundreds of thousands of people every year – this arrangement of beams and lenses could, just maybe, improve millions of lives.
But without a working laser, the trip to Tanzania will count for nothing.
Already, the team have come close to giving up. A few days ago, their two high-powered lasers failed to work. "My first thought was, OK – pack everything, we head back," Brydegaard tells me. "There's nowhere in Tanzania we can find a spare part." He thought bitterly about the tens of thousands of dollars they had spent on equipment and travel. But then he walked into town with Samuel Jansson, his graduate student, and over bottles of beer they scrolled through the contacts on their phones. Perhaps, they started to think, it was possible to salvage the trip after all.
Lasers may be a cutting-edge tool for identifying insects, but at the heart of the lidar method is an elegant and centuries-old principle of entomology. Almost every species of flying insect, from moth to midge to mosquito, has a unique wingbeat frequency. A female Culex stigmatosoma mosquito, for instance, might beat its wings at a frequency of 350 hertz, while a male Culex tarsalis might at 550 hertz. Because of these differences, an insect's wingbeat is like a fingerprint. And in recent years, the study of wingbeat has undergone a renaissance, especially in the field of human health.
Long before lasers or computers, wingbeat was thought of in auditory – even musical – terms. A careful listener could match the buzz of a fly to a key on the piano. That is exactly what Robert Hooke, a natural philosopher, did in the 17th century: "He is able to tell how many strokes a fly makes with her wings (those flies that hum in their flying) by the note that it answers to in musique during their flying," wrote Samuel Pepys, a British civil servant and friend of Hooke's.
But the fact that Hooke relied on his ears must have made his findings difficult to communicate. Knowledge was traditionally shared through scientific papers, letters and specimen drawings, and so entomologists tended to rely on vision rather than hearing. "The field has had a very, very narrow focus for a long time," says Laura Harrington, an entomologist and epidemiologist based at Cornell University, New York State.
In the 20th century, however, researchers began to break the mould. The main wingbeat detection method was visual: the chronophotographic method, which involved taking photographs in rapid succession. This had its limitations, and a few keen-eared researchers felt there was an advantage to Robert Hooke's auditory approach – especially Olavi Sotavalta, an entomologist from Finland who had the rare gift of absolute pitch. Just as a composer with absolute pitch might transcribe a musical passage by ear, Sotavalta could identify the precise tone of a mosquito's wings without the aid of a piano.
"The acoustic method makes it possible to observe insects in free flight," Sotavalta wrote in a 1952 paper in Nature. In other words, because he had absolute pitch, Sotavalta was able to make wingbeat observations not only with cameras in the laboratory, but also in nature, with his ears. Scientists are informed and constrained by the senses they choose to use.
Sotavalta's peculiar approach to research suggests that certain scientific insights emerge when separate disciplines collide: he used his canny ear not only to identify species during his research, but also for music. "He had a beautiful singing voice," says Petter Portin, an emeritus professor of genetics who was once a student of Sotavalta's. Portin remembers him as a tall, slender man who always wore a blue laboratory coat.
Sotavalta's papers in the National Library of Finland are a curious combination of letters, monographs on insect behaviour, and stacks of sheet music. Some of his compositions are named after birds and insects.
One of the strangest of Sotavalta's papers, published in the Annals of the Finnish Zoological Society, documents in astonishing detail the songs of two particular nightingales. Sotavalta heard them during successive summers while staying at his summer house in Lempäälä. The paper itself seems dry, until it becomes clear that he's trying to apply music theory to birdsong.
"The song of the two Sprosser nightingales (Luscinia luscinia L.) occurring in two successive years was recorded acoustically and presented with conventional stave notation," he wrote.
Following on from this are nearly 30 pages of notes, graphs and analysis of the rhythm and tonality of the birds. After highlighting the similarity between the two songs, he declares: "Because of the short distance between the places where they were singing, it was concluded that they were perhaps father and son." It is as though his work is a search for some kind of pattern, some musical idea, shared by members of the same species.
However, his paper in Nature was rather more consequential. There, Sotavalta describes the uses of his "acoustic method" of identifying insects using his absolute pitch, and theorises about the subtleties of insect wingbeat: how much energy it consumes, and how it varies according to air pressure and body size. Even so, only decades later did scientists such as Brydegaard reaffirm the relevance of wingbeat in the study of insects – for example, malaria-carrying mosquitoes.
In Tanzania, Brydegaard, Jansson and engineer Flemming Rasmussen do not have absolute pitch – and, even if they did, it wouldn't help much. There are millions of insects in and around the village, and they drone on in a symphony that never ends.
What these scientists have, in place of a keen ear, is a high-tech gadget and two broken lasers. And their phones.
When the lasers failed, it took a few false starts to find a solution. A researcher in Côte d'Ivoire had a working laser, but he was away in the USA. Brydegaard considered sending for a replacement by mail, but knew that – thanks to customs and the day-long drive from the airport in Dar es Salaam – it probably wouldn't arrive in time for the eclipse.
Finally, they sent a text message to Frederik Taarnhøj, CEO of FaunaPhotonics, their commercial partner, and asked if he would consider sending a scientist from Sweden with some spare lasers. Taarnhøj said yes.
So the trio made a few frantic calls and ultimately convinced another graduate student, Elin Malmqvist, to board a plane the very next day. When she did, she was carrying three small metal boxes in her suitcase.
The saga was not over yet, however. Even after the huge expense of the last-minute flight, the first replacement failed: Brydegaard, in his hurry, confused the anode with the cathode, which short-circuited the laser diode. The second laser yielded a beam, but, inexplicably, it was so faint as to be unusable.
It's the last laser that Brydegaard now unpacks, hoping that at least this one will work as expected. By the time he screws it onto the tripod, it is almost sunset, and his agitation is palpable. Within the hour, it will be too dark to calibrate even a working laser. Everything rides on this piece of equipment.
Laura Harrington's laboratory at Cornell looks a little like a restaurant kitchen. What resembles the door to a walk-in freezer actually leads to an incubation room. It's humid and lit by fluorescent lights. The shelves are covered in carefully labelled boxes. Harrington shows me mosquito eggs inside the kinds of disposable containers you'd carry soup in. Over the top of the containers, to prevent mosquitoes from escaping, there's some kind of net – bridal veil, she tells me. The method is not quite foolproof. A few mosquitoes have escaped, and they buzz around our ears and ankles while we chat.
When we talk about Sotavalta's approach, Harrington says that he was "definitely ahead of his time". Even in recent years, researchers who thought to listen to mosquitoes didn't realise how many insects are capable of listening, too. "For a long time, scientists thought that female mosquitoes were deaf – that they didn't pay attention to sound at all," Harrington says.
But in 2009, Harrington put that long-standing assumption to the test. In an unusual and intricate experiment, she and her colleagues tethered a female Aedes aegypti mosquito to a hair, installed a microphone nearby, and placed both inside an upside-down fish tank. Then they released male mosquitoes inside the tank and recorded the results.
The team's findings astonished Harrington, and led to a breakthrough in the study of sound and entomology. Aedes aegypti conducted a sort of mid-air mating dance that had everything to do with sound. Not only did female mosquitoes respond to the sounds of males, they also seemed to communicate with sounds of their own. "We discovered that males and females actually sing to each other," Harrington says. "They harmonise just prior to mating."
This 'mating song' isn't produced by vocal cords. It is produced by flapping wings. During normal flight, male and female mosquitoes have slightly different wingbeats. But Harrington found that during the mating process, males aligned their wingbeat frequency with that of females.
"We think the female is testing the male," Harrington explains. "How quickly he can converge harmonically." If so, mosquito songs may function like auditory peacock features. They seem to help females identify the fittest mates.
With these results in mind, and with a recent grant from the Bill & Melinda Gates Foundation, Harrington's lab has begun development of a novel mosquito trap for field research. Similar projects have been undertaken by teams at James Cook University in Australia and Columbia University in New York City, among others.
For a researcher, there are drawbacks to the mosquito traps that currently exist. Chemical traps have to be refilled, while electric traps tend to kill mosquitoes; Harrington wants her new trap to harness the power of sound to capture living specimens for monitoring and study. It would combine established methods for attracting mosquitoes, like chemicals and blood, with recorded mosquito sounds to mimic the mating song. Importantly, it could be used to capture mosquitoes of either sex.
Historically, scientists have focused on catching female mosquitoes, which twice each day go hunting for mammals to bite – and which may carry the malaria parasite (males do not). But scientists have recently started to consider male mosquitoes an important part of malaria control too. For instance, one current proposal for curbing the disease involves releasing genetically modified males that produce infertile offspring, to reduce the population of disease-carrying mosquitoes in a given area.
Harrington's hope is that an acoustic trap – using the mating song that attracts males – would help make new strategies such as this possible. "What we're trying to do is really think outside the box, and identify new and novel ways to control these mosquitoes," she says.
With the last laser finally in place, Brydegaard flips a switch. Suddenly, on the laptop screen next to the tripod, a small white dot appears. Everyone breathes a sigh of relief: the laser works.
The team – made up of Brydegaard, Jansson, Malmqvist and Rasmussen – spend the last 15 minutes of daylight bringing the beam into focus. Other than a few local children, who shout "mzungu" – Swahili for light-skinned foreigner – no one seems especially bothered by the Europeans tinkering with telescopes.
Sunset throws a beautiful, soft light across the marshy landscape around Lupiro, but it also marks the start of malaria transmission. As darkness starts to fall on the hut where the lidar system is set up, villagers walk in from the fields; pillars of smoke rise from cooking fires. Locals here rely on rice for their livelihood: the staple is served with two meals a day, and along the dusty main road, rice chaff piles up like leaves in autumn. But rice fields require standing water, and standing water fosters malaria mosquitoes. Insects have already begun to buzz around our legs.
Now that evening has settled around us, the lidar system has finally begun to record a torrent of data. The team sit around the hut in the dark; a gasoline generator hums outside, powering the laser and computer. On the laptop screen, a jagged red line shows peaks and valleys. Each one, Brydegaard tells me, represents an echo from the beam. Around dusk, dozens or hundreds of insects may cross the beam each minute. We are watching the period that entomologists refer to as "rush hour" – the wave of activity that begins when female mosquitoes swarm into the village and start their search for food.
Nicodemus Govella, a medical entomologist at Tanzania's prestigious Ifakara Health Institute – a local partner of FaunaPhotonics – has seen the evening mosquito rush hundreds, even thousands of times. He knows how it feels to shiver and vomit as the malaria parasite takes hold; he has experienced the symptoms time and again. "During my childhood, I can't count how many times," he tells me.
If Tanzanian epidemiologists are waging a war on malaria, the Ifakara Health Institute works like a ministry of intelligence – it tracks the density, distribution and timing of bites by malaria mosquitoes. Traditionally, Govella says, the "gold standard" of mosquito surveillance was a method called human-landing catch. It's low-tech but reliable: a volunteer is given medication to prevent malaria transmission and then sits outside with legs bare, letting mosquitoes land and bite.
The problem is that protection against malaria is no longer enough. Too many other diseases, from dengue fever to Zika, are also spread by mosquitoes. As a result, human-landing catch is now widely considered unethical. "It gives you information, but it is very risky," Govella says. "Other countries have already banned it." As health officials retire old strategies for malaria surveillance and control, the work on experimental techniques takes on new urgency – which is where the lasers will come in.
In parts of Tanzania, thanks in part to bednets and pesticides, malaria has "gone down tremendously," Govella tells me. But eradication of the disease has proved elusive. Some mosquitoes have developed resistance to pesticides. Likewise, bednets helped bring night-time transmission under control – but mosquitoes have adapted their behaviour, starting to bite at dusk and dawn, when people aren't protected.
In 2008, Govella's daughter contracted malaria. Thinking back, Govella's manner changes; his precise medical language gives way to a quiet passion. "I don't even want to remember," he says. "When I get to that memory, it really brings a lot of pain to me."
In its early stages, malaria may look like a common cold – which is why it's so important that scientists have the tools to track the spread of the parasite and the mosquitoes that carry it: to avoid misdiagnosis. In his daughter's case, the lack of information proved tragic. "Because it was not detected soon, it proceeded up to the level of convulsions," Govella says. His daughter ultimately died from complications of malaria. Almost every day since then, he has thought about eradication.
"I hate this disease," Govella says.
The persistence of malaria has frustrated generations of scientists. More than a century after the discovery of the parasite, it still afflicts hundreds of millions of people each year, of whom half a million die. Harrington has her own memories of the havoc wreaked by the disease: in 1998, she travelled to Thailand for a series of experiments and contracted malaria herself. "I was the only foreigner for miles and miles around," she says. As the fever set in, Harrington started to understand the real burden of the disease she studied.
"I could imagine myself as a Thai villager with those illnesses," she tells me. She was far from the nearest hospital and felt alone. "I felt like, if I died, maybe people wouldn't find out." Eventually, someone found her and put her in the back of a pickup truck. She remembers sinking into delirium, staring up at a fan that spun endlessly on the ceiling. "I saw a nurse with a syringe full of purple liquid," she recalls. It reminded her of when she worked, years before, in a veterinary clinic that used purple injections to euthanise sick animals. "I thought that was the end."
Finally, the fever broke, and Harrington knew that she was going to survive. "I felt incredibly grateful for my life," she says. The experience made her even more committed to her research. "I felt that I had the ability to try and dedicate my career to something that could eventually help other people."
Malaria provides a vivid example of how insects threaten human health – but there are many other ways that they can cause harm. Insects also spread other microbial diseases. Then there's the effect they have on agriculture. According to the Food and Agriculture Organization of the United Nations, insect pests destroy one-fifth of global crop yields. In other words, if the world's farmers had better ways to control species like locusts and beetles, they could feed millions more people.
Pesticides reduce the damage that insects cause, but when used indiscriminately, they can also harm people or kill the insects that we rely on. We remain deeply dependent on pollinators like bees, moths and butterflies, but a 2016 report showed that 40 per cent of invertebrate pollinator species are under threat of extinction. It's because of this love–hate relationship with insects that we urgently need better ways of tracking different species – better ways to differentiate between the bugs that help us and the bugs that hurt us.
On the day of the eclipse, at just before noon, in the blue skies above Lupiro the black disc of the moon passes in front of the sun. A group of children have gathered round; they hold in their hands small plates of welding glass that the Scandinavian scientists brought with them. By peering through the green-tinted glass, the children can see the narrowing crescent of the sun.
The village around us has gone dim; our shadows have grown less distinct. Judging by the light, it feels as if a sudden storm has set in, or someone has turned a dimmer that has made the sun go faint. The scientists from Sweden, along with their partners at the Ifakara Health Institute and FaunaPhotonics, want to know if in the dim light of an eclipse insects become more active, just as they do at dusk.
On the screen, we watch the red peaks, which have picked up again – not as many as we saw at sunset and sunrise, but more than usual. There's a simple reason this data matters: if the mosquitoes are more active during an eclipse, that suggests that they use light as a cue, knowing when to swarm each morning and evening by the dimness of the rising and setting sun.
As the data pours in, the scientists talk me through what we're looking at. Lidar was originally developed to study much larger-scale phenomena, like changes in atmospheric chemistry. This system has been simplified to a bare minimum.
Each of the three telescopes on the tripod has a separate function. The first directs the outgoing laser at a tree about half a kilometre away. Nailed to the tree trunk is a black board, where the beam terminates. (To clear a path for the laser, Jansson, the PhD student, had to cut a path through the underbrush with a machete.)
When insects fly through the laser beam, reflections bounce back at the device from their beating wings, and they're picked up by the second telescope. The third telescope allows the team to aim and calibrate the system; the whole apparatus is connected to a laptop computer that aggregates the data. The red peaks dancing across the screen represent insects crossing the laser beam.
To record the reflections, which Brydegaard calls the "atmospheric echo", the lidar system captures 4,000 snapshots per second. Later, the team will use an algorithm to comb through the snapshots for wingbeat frequency – the fingerprint of each species.
This device, in other words, achieves with optics what Olavi Sotavalta achieved with his ears, and what Harrington has achieved with the help of a microphone.
But there are some details in the lidar data that the human ear could never discern. For example, an insect's wingbeat frequency is accompanied by higher-pitched harmonics. (Harmonics are what lend richness to the sound of a violin; they're responsible for the resonant ring produced by a muted guitar string.) The lidar system can capture harmonic frequencies that are too high for the human ear to hear. In addition, laser beams are polarised, and when they reflect off different surfaces, their polarisation changes. The amount of change can tell Brydegaard and his colleagues whether an insect's wing is glossy or matte, which is also useful when trying to distinguish different species.
As the dark disc of the sun starts to brighten again, the scientists snap pictures and try, without much success, to explain how the lasers work to local children. Now that the data is flowing, the tension that accompanied the set-up of the lidar system has simply melted away.
It finally seems clear that the high price tag of the experiment won't be in vain. The team spent about $12,000 on the lidar system, not including the equally hefty costs of transport and labour. "That sounds like a lot, standing in an African village," Brydegaard admits. On the other hand, older forms of lidar, used to study the atmosphere, can cost hundreds of thousands of dollars. The burden of malaria, meanwhile, would be calculated in the billions of dollars – if it could be calculated at all.
Within a couple of hours, the bright round circle of the sun is again burning brightly. A couple of hours after that, it has started to set.
We re-apply bug spray to ward off the mosquitoes that, once again, will come flying in from the marshy fields around Lupiro. Then we walk into town for dinner, which, as usual, includes rice.
Three months after the experiment, I called FaunaPhotonics to learn how their analysis was progressing. After so many lasers had failed, I wanted to know whether the final one had given them the results they needed.
The data was messy, they said. "Around cooking time, there's lots of smoke and dust in the air," said Jord Prangsma, an engineer responsible for analysing the data that the team brought back. He added that the data did seem to show distinct wingbeats. But it's one thing to spot those beats on a graph. "To tell a computer, 'Please find me the correct frequency,' is another thing," he said. Unlike Sotavalta, who had studied individuals, the team in Tanzania had gathered data from many thousands of insects. They were trying to analyse all of those beating wings at once.
But the obstacles were not insurmountable. "We see a higher activity just around noon," said Samuel Jansson, speaking about the data from the eclipse. This suggests that mosquitoes were, indeed, using light as a cue to begin searching for food during rush hour. Prangsma added that an algorithm he had developed was starting to separate out the crucial data. "From a scientific point of view, this is a very rich dataset," he said.
Over the months that followed, FaunaPhotonics continued to make progress. "Despite initial laser problems," Brydegaard wrote in a recent email, "the systems performed to the satisfaction of all our expectations."
Each day that the system was in operation, he said, they had recorded a staggering 100,000 insect observations. "Indications are that we can discriminate several species and gender classes of insects," Brydegaard went on.
Along with his Lund University colleagues, Brydegaard will publish the results; FaunaPhotonics, as his commercial partner, will offer their lidar device, along with their analytic expertise, to companies and research organisations looking to track insects in the field. "If we have a customer that's interested in a certain species, then we'll tailor the algorithm a bit to target the species," Prangsma explained. "Each dataset is unique, and has to be tackled in its own way." Recently, FaunaPhotonics began a three-year collaboration with Bayer to continue developing its technology.
The study of wingbeat has come an incredibly long way since Olavi Sotavalta used his absolute pitch to identify insects – and yet in some ways, the Scandinavian scientists' work differs very little from the Finnish entomologist's. Just like Sotavalta, they are bringing separate disciplines together – in this case physics and biology, lidar and entomology – to uncover patterns in nature. But they have plenty of work left to do. FaunaPhotonics and its partners will start, in a forthcoming paper, by trying to connect the dots between light, lasers and mosquitoes. Then they'll try to demonstrate that the study of wingbeat frequency could help humans control diseases other than malaria, as well as insects that destroy crops.
"This is a journey that is not a few months," said Rasmussen, the engineer. "This is a journey that will go for years ahead."
Join over six million BBC Earth fans by liking us on Facebook, or follow us on Twitter and Instagram.
If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Capital, Culture, Earth Future and Travel, delivered to your inbox every Friday.