|
28 | 28 | from front_tracker.py to plot the time evolution of flame front θ. |
29 | 29 | ''') |
30 | 30 |
|
31 | | -parser.add_argument('tracking_fname', type=str, |
| 31 | +parser.add_argument('tracking_fnames', nargs='+', type=str, |
32 | 32 | help='cvs file generated from front_tracker.py to track flame front position') |
33 | 33 | parser.add_argument('--tmin', default=0.0, type=float, |
34 | 34 | help='minimum time for curve fitting. Note that this will not affect plotting') |
|
37 | 37 |
|
38 | 38 | args = parser.parse_args() |
39 | 39 |
|
40 | | -# Read in data |
41 | | -# data has columns: fname, time, front_theta, theta_max_avg, max_avg, theta_max, max_val. |
42 | | -tracking_data = pd.read_csv(args.tracking_fname) |
| 40 | +all_data = [] |
| 41 | + |
| 42 | +# Loop over all tracking files and append them |
| 43 | +for fname in args.tracking_fname: |
| 44 | + df = pd.read_csv(fname) |
| 45 | + all_data.append(df) |
| 46 | + |
| 47 | +# concatenate all files together |
| 48 | +tracking_data = pd.concat(all_data, ignore_index=True) |
43 | 49 |
|
| 50 | +# sort by the time |
| 51 | +tracking_data = tracking_data.sort_values(by='time[ms]') |
| 52 | + |
| 53 | +# data has columns: fname, time, front_theta, theta_max_avg, max_avg, theta_max, max_val. |
44 | 54 | # Get time and theta, these should already be time-sorted |
45 | 55 | times = tracking_data['time[ms]'] |
46 | 56 | front_thetas = tracking_data['front_theta'] |
47 | 57 |
|
48 | 58 | # Only plot up to tmax |
49 | 59 | if args.tmax is not None: |
50 | 60 | cond = times < args.tmax |
51 | | - |
52 | | -times = times[cond] |
53 | | -front_thetas = front_thetas[cond] |
| 61 | + times = times[cond] |
| 62 | + front_thetas = front_thetas[cond] |
54 | 63 |
|
55 | 64 | # Now do a curve fit to the data. |
56 | 65 | # Now apply tmin so that we ignore the transient phase during fitting |
|
0 commit comments