Instead of having column number of the ground-motion types being hard-coded into the program through the dictionary gmDict = {"PGA": 2, "SA(0.3)": 3, "SA(0.6)": 4, "SA(1)": 5}, it is now being automatically created by reading the header of the ground-motion file.