read from fits instead of txt file