#!/usr/bin/env python # ----------------------------------------------------------------------------------- # # # Python/ROOT macro for reading data for problem on Free Fall # # Author: Troels C. Petersen (NBI) # Email: petersen@nbi.dk # Date: 3rd of December 2016 # # ----------------------------------------------------------------------------------- # from ROOT import * from array import array # ----------------------------------------------------------------------------------- # # Read the data file: # ----------------------------------------------------------------------------------- # file = open( 'data_FreeFall.txt', 'r' ) for line in file: line = line.strip() columns = line.split() t = float(columns[0]) d = float(columns[1]) print t, d file.close() raw_input( ' ... Press Enter to exit ... ' )