The first time Julie Aitken saw the jumble of squiggly lines tracking the electrical impulses inside her husband's brain, they looked like old friends.

At that point, Aitken had spent decades as a geophysicist staring at seismic data, her own sets of jagged lines made by shooting sound waves deep into the earth. Rather than finding oil, the lines from the electroencephalogram (EEG) performed on her husband were supposed to explain why his memory was short-circuiting.

The diagnosis turned out to be a mild form of epilepsy, but doctors needed four EEGs to get there, leaving Aitken wondering if her work experience could have helped them get it right on the first try.

"I thought if we could clean up the signal we could make things more obvious for doctors, neuroscientists, psychiatrists, whoever," said Aitken, 58, who's now part of a team working at a brain lab at the University of Calgary. "The thing that really blows me away is that the frequency of seismic and the frequency of EEGs are exactly the same."

By taking out the noisy parts of an EEG — the frequencies that clutter a reading — Aitken believes doctors will be able to see more clearly the patterns in the data that really matter.

If she's right, it could help with diagnosing epilepsy, dementia, tumours and even depression. What's more, her early-stage theories, if they hold up for EEGs, could also work for ultrasounds, MRIs and CT scans.

Beyond medicine, her work is also a ray of hope for other geophysicists, who need all the good news they can find right now.

Thousands of oilpatch jobs lost

"This round of layoffs, this downturn, geophysicists have been more affected than anyone else," said Marian Hanna, a former president of the Canadian Society for Exploration Geophysicists (CSEG).

Even amid thousands of other lost oilpatch jobs, the plight of geophysicists is now an example of how abruptly an entire profession can find itself on the outside looking in.

It might also serve as a warning to other seemingly bulletproof career choices that could be blindsided by the forces of automation and artificial intelligence. A recent study by the Brookfield Institute suggests nearly half of the jobs in Canada, or some 7.7 million positions, could potentially be automated.

Such sweeping changes won't be limited to self-driving vehicles taking over from truckers and cabbies, because white collar professions, too, such as the law and accounting, are vulnerable.

A pessimistic view suggests that when the robots come for our jobs, many of us will be left unemployed with few options. More optimistically, history shows the creative destruction brought about by new technology, as Bank of Canada deputy governor Carolyn Wilkins outlined in a recent speech, also comes with new, previously unimagined spots opening for people.

Geophysics once a slam-dunk career

The case of geophysics shows that what looks smooth on paper can be much rougher in real life.

For decades, the decision to study geophysics — a math-and-physics-heavy sister discipline to geology that pays less attention to rocks and core samples and instead visualizes what's happening underground by analyzing data like seismic waves — was a choice that parents would dream about for their kids.

During the oilpatch boom times of the past decade, a seemingly endless string of six-figure jobs were just waiting for geophysicists to come fill them. Now, the evolution of hydraulic fracturing and horizontal drilling technology has so profoundly changed the nature of exploration in Canada, that many of those jobs are considered a luxury.

Energy companies now know where so many reserves are located that rather than finding the stuff, the business is only about getting it out of the ground, which makes it more of a game for engineers.

That's left geophysicists coming to terms with the realization that their once-golden profession will never be the same. Exact numbers on how many geophysics jobs the industry has shed are hard to pin down, but the CSEG, for one, has seen its membership tumble to below 800 from around 1,900 in 2014.

The industry will still need geophysicists, but not as many. Now, many mid-career geophysicists find themselves pounding the pavement in hopes of landing one of the remaining jobs. Others are leaving for different industries, while still others are abandoning the field all together.

Moirah Rempel is a student in geophysics at the University of Calgary (Paul Haavardsrud/CBC)

For Moriah Rempel, that last option isn't much of a choice at all.

A rock hound from the age of five, she still has buckets of fossils from the Elbow River, where her mom would take her to play. A relative once told her she could study rocks for a living, and she's been locked in ever since.

When she started her degree at the U of C in 2012, companies were still wooing up-and-coming geophysicists. The job market looked as ripe as ever. Now, recent graduates pick up restaurant jobs while hoping for an industry rebound that may not come.

'Morale is pretty low'

Some of Rempel's classmates have already switched majors, while others try to keep the faith.

"I know a lot of people feel like … they've wasted four years of their university career," said Rempel, a dean's list student and president of the Geophysics Undergraduate Students Society. "Morale is pretty low."

Despite the early career curveball, Rempel still likes what she sees in fields like hydrology, carbon capture and geothermal.

What's happened to geophysicists isn't necessarily a blueprint for what the rise of the machines will mean for millions of other jobs, but it may hold some lessons.

For geophysicists, the last few years have been hard and messy with jobs kept and lost, retraining and people leaving the field entirely.

Encouragingly, perhaps, at least for those who take an especially dim view of job prospects in the coming world of automation, as some doors have closed others have opened. Newly minted brain researcher Aitken, for one, never thought her skills would transfer to medicine, right until they did.

"I thought I'd be a geophysicist all my life, but if I was a student now, I'd go into biomedical engineering," she said. "That's the place to be."