sv = save_acceleration_vector(timeID,
                                  fname="a_vectors_{}".format(pName),
                                  alt_loc=data_folder + '/' +
                                  "{}_data".format(pName))

    pbar = tqdm(pulseIDs,
                ascii=True,
                unit_scale=True,
                dynamic_ncols=True,
                position=0)
    for pulseID in pbar:
        pbar.set_description("Processing pulse {}".format(pulseID))
        """
			sort station names according to zenith angle (Z) and impose a Z requirement
		"""
        station_names = natural_sort(station_timing_offsets.keys())
        Z = np.array([])
        for station in station_names:
            #station location is determined from the average antenna locations
            antenna_locations = TBB_data[station].get_LOFAR_centered_positions(
            )[::2]
            avg_station_loc = np.average(antenna_locations, axis=0)

            #source location
            source_XYZ = source_info[str(pulseID)]['XYZT'][:3]

            Z = np.append(Z, zenith_to_src(source_XYZ, avg_station_loc))

        sort_indices = np.argsort(Z)
        Z = Z[sort_indices]
        station_names = np.array(station_names)[sort_indices]
    polarization_flips = read_antenna_pol_flips(processed_data_folder + '/' +
                                                polarization_flips)
    bad_antennas = read_bad_antennas(processed_data_folder + '/' +
                                     bad_antennas)
    additional_antenna_delays = read_antenna_delays(processed_data_folder +
                                                    '/' +
                                                    additional_antenna_delays)
    station_timing_offsets = read_station_delays(processed_data_folder + '/' +
                                                 station_delay_file)

    raw_fpaths = filePaths_by_stationName(timeID)
    raw_data_files = {sname:MultiFile_Dal1(fpaths, force_metadata_ant_pos=True, polarization_flips=polarization_flips, bad_antennas=bad_antennas, additional_ant_delays=additional_antenna_delays) \
                      for sname,fpaths in raw_fpaths.items() if sname in station_timing_offsets}

    sorted_station_names = natural_sort(raw_data_files.keys())

    data_filters = {
        sname: window_and_filter(timeID=timeID, sname=sname)
        for sname in station_timing_offsets
    }

    trace_locator = getTrace_fromLoc(raw_data_files, data_filters,
                                     station_timing_offsets)

    plt.figure(figsize=(20, 10))
    H = 0
    for sname in sorted_station_names:
        input_file = raw_data_files[sname]
        antenna_names = input_file.get_antenna_names()[::2]  ## even antennas
        antenna_locations = input_file.get_LOFAR_centered_positions()[::2]