made function for reading in .dat files much better. no longer loops through all lines in file, instead using np.fromfile to get all lines at once