The Oscar-nominated film Hidden Figures tells the story of African-American women whose maths skills helped put a US astronaut into orbit in the 1960s. But the history of black women working for Nasa goes back much further - and they were still struggling to get the best jobs in the 1970s.
In 1943, two years after the US joined World War Two, Miriam Daniel Mann was 36 years old. She had three children, aged six, seven and eight - but she also had a Chemistry degree.
Job opportunities for married women were limited then, especially for those with children, and even more so for African-American women.
But as men went off to war, there was a skill shortage in vital industries. The president signed an executive order allowing black people to be employed in the defence sector for the first time, and Nasa's predecessor, the National Advisory Committee for Aeronautics (NACA), started looking for black women to work on mathematical calculations.
Through her husband, a college professor, Mann heard about the recruiters visiting black college campuses. She registered to take an exam, passed it, and became one of the first black women to work as a "human computer" at the NACA aeronautics research facility at Langley in Virginia.
These were the days before the machines we now know as computers were available to crunch numbers - and when they were invented, they took their name from the humans who had done the job before them.
Miriam Mann's daughter, Miriam Mann Harris, wrote in 2011: "My early memories are of my mother talking about doing math problems all day. Back then all of the math was done with a #2 pencil and the aid of a slide rule... She would relate stories about the 'colored' sign on a table in the back of the cafeteria. She brought the first one home, but there was a replacement the next day. New signs went up on the bathroom door, 'colored girls'."
Mann's granddaughter, Duchess Harris - a professor at Macalaster College and co-author of Hidden Human Computers, the Black Women of Nasa - points out that Mann was born in 1907, only half a century after the end of slavery.
But there had been a big drive to educate African Americans, most of whom had been illiterate before emancipation, Harris says, so by the 1940s there was a pool of talented black women with maths and science degrees waiting to be employed.
Thanks to them - and to white women, who had been employed as computers since the 1930s - male engineers could spend more time theorising and writing equations.Image copyright Twentieth Century Fox
"After the war in most industries the women were sent home again," says Bill Barry, Nasa's chief historian. "But in the computing business that didn't happen. In fact, Nasa started hiring more women, in large part because of the quantity of work going on."
Often jobs were held open for women to come back to after having a child.
"A skilled computer was an incredibly valuable resource," he says.
At Langley, in the 1940s and 1950s the women were split into two pools - the East computing unit for white women, and the West computing unit for black women. This segregation had been a requirement of Virginia state law, says Barry.
For most of the 50s, a woman called Dorothy Vaughan was the supervisor in charge of West Computing - she is one of the main characters in the film Hidden Figures.
When tasks from the engineers came in, she would allocate the work and show her team what they needed to do.
"Dorothy Vaughan would take the equation and break it into sections and tell you how to solve that equation in small parts. Tell you which columns you multiply, which ones you add," says Christine Darden, who started working for Nasa in 1967. "By the time you have followed all her directions across you would have the solution."
By the time Darden joined, the women were no longer in separate pools and had been allocated to specific engineering sections.Image copyright Christine Darden Image caption Christine Darden learned to programme the new IBM computers
She had fallen in love with maths as a teenager, but when she told her father she wanted to study it at college, he didn't like the idea. He could not see a career path.
"My father insisted I get a degree in teacher education because during that time black females generally didn't get very many jobs in math," says Darden. "He told me I had to be able to teach so I could get a job."
Darden listened to her father, but as she was determined to follow her passion she took extra maths classes and even carried on studying for a Master's while teaching. One day at college she was handed an application form for Nasa, and a few weeks later she was offered a job in one of their computer offices.
While most of the women were still carrying out their tasks using spreadsheets and a calculator, she was among a growing number who learned to programme the new IBM computers. These were capable of doing laborious calculations in a fraction of the time it took a human.
When Darden was given an equation to solve, she would work out the different steps required, and then write a programme telling the computer each step, by punching holes in a card that would be fed into the machine.
"We had a card punch in our office. I would punch the cards. I would take the cards over to the building that had the computer and they had people who would run the programme."
The work that these women did from the 1940s onwards was essential for Nasa's work, but their names didn't appear on research papers.Image copyright NASA Image caption Katherine Johnson calculated the trajectory for Alan Shepard, the first American in space
Slowly, however, some of these highly educated and intelligent women started to make their way into more advanced roles.
The film Hidden Figures features a woman named Katherine Johnson who helped work out the trajectories to launch the first American into orbit around the planet.
Another is Mary Jackson who fought for the right to be an engineer in her own right.Image copyright NASA Image caption Mary Jackson became Nasa's first black female engineer in 1958
But years later, Christine Darden, with her Masters degree, still had to struggle to be treated as an equal to the male engineers.
"When I found out that the engineers were doing very theoretical engineering - sitting at their desk working with equations, I decided that was what I wanted to do," she says.
Her manager told her it wasn't possible.
But in 1972, as funding for the space programme was scaled back, Christine feared she was about to be made redundant.
"That gave me the incentive to go to a higher-level boss and ask why men were assigned to engineering sections to do their own projects - write the paper, give the paper - but the females were assigned to the computer pools to do the calculating as a support role."
It worked - Christine was allocated to an engineering team that was studying planes flying faster than the speed of sound. She studied ways to minimise sonic booms which are caused by planes travelling at such speeds.
By the time she retired in 2007, as a Nasa senior executive, she had published more than 50 papers.
Join the conversation - find us on Facebook, Instagram, Snapchat and Twitter.