script for extracting data form fits files