SPACE technology is set to help provide cleaner water for Huddersfield.
Equipment designed to find out the make-up of rocks on Mars is being adapted to improve water supplies to Marsden.
Yorkshire Water has teamed up with the Open University's Planetary and Space Science Research Institute to develop portable mini-laboratories for use at water treatment works.
The laboratories - each about the size of a briefcase - will be used to test water for compounds formed when waste material reacts to disinfectants during the treatment process.
They will also be used for early detection of compounds present in waste water as residue from pesticides, pills, personal hygiene products, industrial chemicals and plastics.
Some of those have been linked to conditions such as low sperm count and breast cancer.
The three-year project is being led by Dr Geraint Morgan and Prof Colin Pillinger, who worked together on the European Space Agency's Beagle Mission to Mars.
The lander included a mini-laboratory to test soil and rock samples on the Martian surface by heating them up to fierce temperatures and analysing the compounds in the gases given off.
The mission failed when the lander crashed into the surface of the Red Planet.
However, Dr Morgan said: "The technology that went into the testing laboratory is proven."
The institute, based at Milton Keynes, is also involved in the European Space Agency's 10-year Rosetta Mission to put a lander on one of the comets orbiting Jupiter to sample its geological make-up.
But the science has applications here on Earth.
Dr Morgan said the institute was working with the Wellcome Trust to develop equipment to help doctors with early diagnosis of conditions such as lung cancer and TB.
The institute is developing mini-labs to analyse the compounds present in a patient's breath for signs of the diseases.
Dr Morgan said: "This equipment could be used in hospital laboratories to provide results more quickly and at a far earlier stage than is possible with conventional clinical testing.
"In time, they could even become a standard part of the GP's surgery."
Yorkshire Water is the only utility company to look at using those techniques for testing water.
Dr Morgan added: "At present, the company has to send samples from its treatment works for analysis by commercial labs.
"We are working on developing portable labs which could be put in the back of a van and used to test water at the treatment works.
"The institute is very good at producing small analysis equipment and that has proved attractive to Yorkshire Water."