Moved power spec computation for fits and for dat/acsii/txt into two different functions, for easier readability. Also added itertools to read the next line of the txt/ascii/dat/ file, to check if at the end of a segment.