mtuq.grid_search.grid_search¶
- mtuq.grid_search.grid_search(data, greens, misfit, origins, sources, msg_interval=25, timed=True, verbose=1, gather=True)[source]¶
Evaluates misfit over grids
Usage
Carries out a grid search by evaluating misfit(data, greens.select(origin), source) over all origins and sources.
If origins and sources are regularly-spaced, returns an MTUQDataArray containing misfit values and corresponding grid points. Otherwise, an MTUQDataFrame is returned.
Input arguments
data(mtuq.Dataset): The observed data to be compared with synthetic datagreens(mtuq.GreensTensorList): Green’s functions used to generate synthetic datamisfit(mtuq.Misfit or some other function): Misfit functionorigins(list of mtuq.Origin objects): Origins to be searched oversources(mtuq.Grid or mtuq.UnstructuredGrid): Source mechanisms to be searched overmsg_interval(int): How frequently, as a percentage of total evaluations, should progress messages be displayed? (int between 0 and 100)timed(bool): Displays elapsed time at endgather(bool): If True, process 0 returns all results and any other processes return None. Otherwise, results are divided evenly among processes. (ignored outside MPI environment)