-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Hello,
I'm encountering a problem with the synthetic data generated by MTUQ using CPS Green's function (GF) database. The synthetic waveforms from MTUQ differ from those created by my code. It seems to me there is something wrong there with reading/processing the CPS database in MTUQ. Any suggestions will be helpful. Many thanks.
Here are the details. I used CPS to generate the GFs for six stations, a given 1D model and a given depth, then read them into MTUQ as
model = 'mdj3'
db = open_db('/mypath/grn_2017_2d/mdj3', format='CPS', model=model)
greens = db.get_greens_tensors(stations, origin)
greens_sw = greens.map(process_sw)
where:
process_sw = ProcessData(
filter_type='Bandpass',
freq_min=0.02,
freq_max=0.05,
pick_type='CPS_metadata',
CPS_database='/mypath/grn_2017_2d/',
CPS_model=model,
window_type='surface_wave',
window_length=350,
capuaf_file=path_weights,
apply_scaling = False )
To generate synthetics, I output the greens_sw as:
from mtuq.misfit.waveform import level2 as level2
stations = level2._get_stations(data_sw) #data_sw = data.map(process_sw) is the surface wave data
components = level2._get_components(data_sw)
# collapse structures into NumPy arrays
obs = level2._get_data(data_sw, stations, components) #n_stat x n_comp x npts
greens_mtuq = level2._get_greens(greens_sw, stations, components) #n_stat x n_comp x 6 x npts, and in up-south-east convention
So far, I obtained the observations, array 'obs' and the elementary seismograms corresponding to six MT parameters, greens_mtuq. For comparison, I also used my own code to prepare the elementary seismograms corresponding to six MT parameters, greens_my, as
from CPS import load_CPS_greens_tensor #my CPS.py is attached at the bottom.
greens_my = load_CPS_greens_tensor(origin, stations, path_to_data, dt=0.05, npts=11000,
filter_dict={'fmin':0.02, 'fmax':0.05, 'corners':4, 'zerophase':False})
#the shape is 6 x n_stat x n_comp x npts
Then, I manually cut the 'greens_my' using the windows defined similarly to MTUQ. And here greens_my uses the north-east-down convention. After converting it into the up-south-east conventions by following the same code in MTUQ, I plot the comparison between greens_mtuq and greens_my for one station, as in the figure below. They are quite different.
The CPS GFs here are actually for the velocity model from Dreger et al. (2021) to study the DPRK2017 event. To further confirm this difference, I generated the waveforms for the MT solution from Dreger et al. (2021) by a linear combination of MT and greens_mtuq or greens_my, as
pred_mtuq = numpy.einsum('scet,e->sct', greens_mtuq, mt)
pred_my = numpy.einsum('esct,e->sct', greens_my, mt)
Here are two figures for each predicted dataset:
1)This is for predicted data (red) using greens_mtuq, compared with the observations (black). The variance reduction is 71.1%.

2)This is for predicted data (red) using greens_my, compared with the observations (black). The variance reduction is 90.9%, which is expected by Dreger et al. (2021).

Reference: Dreger et al. (2021). Path Calibration of the Democratic People’s Republic of Korea 3 September 2017 Nuclear Test, SRL, 10.1785/0220210105.
CPS.py
