# 5.17.1.4. eqcorrscan.utils.synth_seis.template_grid

`eqcorrscan.utils.synth_seis.``template_grid`(stations, nodes, travel_times, phase, PS_ratio=1.68, samp_rate=100, flength=False, phaseout='all')

  Generate a group of synthetic seismograms for a grid of sources.

  Used to simulate phase arrivals from a grid of known sources in a three-dimensional model. Lags must be known and supplied, these can be generated from the bright_lights function: read_tt, and resampled to fit the desired grid dimensions and spacing using other functions therein. These synthetic seismograms are very simple models of seismograms using the seis_sim function herein. These approximate body-wave P and S first arrivals as spikes convolved with damped sine waves.

  Parameters: | stations (list) List of the station names nodes (list) List of node locations in (lon,lat,depth) travel_times (numpy.ndarray) Array of travel times where travel_times[i][:] refers to the travel times for station=stations[i], and travel_times[i][j] refers to stations[i] for nodes[j] phase (str) Can be either ‘P’ or ‘S’ PS_ratio (float) P/S velocity ratio, defaults to 1.68 samp_rate (float) Desired sample rate in Hz, defaults to 100.0 flength (int) Length of template in samples, defaults to False phaseout (str) Either ‘S’, ‘P’, ‘all’ or ‘both’, determines which phases to clip around. ‘all’ Encompasses both phases in one channel, but will return nothing if the flength is not long enough, ‘both’ will return two channels for each stations, one SYN_Z with the synthetic P-phase, and one SYN_H with the synthetic S-phase.
  Returns: | List of `obspy.core.stream.Stream`