Techniques developed by astronomers could help in the fight against breast and skin cancer.