Advanced implementation reference#
The supported API is an explicit selection, not every name lacking an underscore. The following helpers remain available for inspecting formats, customizing native input files and reading old workflows. Their signatures are recorded here, but they do not carry the same compatibility guarantee as the supported reference.
Start with the backend tutorials and supported builders/readers. Low-level calls require the exact directory structure and binary layout produced by the corresponding program version. A helper from one backend must not be substituted into another backend solely because its arguments look similar.
Private names, backup modules, input-template string constants and command wrappers are excluded. The command-line guide describes installed executable wrappers. Historical utility aliases for create_rotate_z_mat and rotate_symmetric_tensor_series continue to point to the functions documented under geo.
pygrnwang.create_edcmp#
create_inp_edcmp2(path_green: str, event_depth: float, obs_depth: float, dist_range: tuple[float, float], delta_dist: float, mt_ind: int, output_observables: tuple[int, int, int, int], layered: bool=True, lam: float=30516224000.0, mu: float=33701888000.0)
call_edcmp2(event_depth, obs_depth, mt_ind, path_green, check_finished=False)
convert_edcmp2(path_sub_dir, output_type_ind, remove=False)
pygrnwang.create_edgrn#
create_inp_edgrn2(path_green, obs_depth, grn_dist_range, grn_delta_dist, grn_source_depth_range, grn_delta_source_depth, wavenumber_sampling_rate=12, path_nd=None, earth_model_layer_num=None)
call_edgrn2(obs_depth, path_green, check_finished=False)
pygrnwang.create_qseis06_bulk#
Deprecated backend: QSEIS06. For new calculations use QSEIS2025, rebuild the library and revalidate settings and results.
create_order_ind(order, diff_accu_order)
pygrnwang.create_qseis06#
Deprecated backend: QSEIS06. For new calculations use QSEIS2025, rebuild the library and revalidate settings and results.
create_dir_qseis06(path_green, event_depth, receiver_depth, dist_range, delta_dist, N_each_group=100, order=0)
create_inp_qseis06(path_sub_dir, event_depth, receiver_depth, dist_range, delta_dist, N_dist, N_dist_group, N_each_group, time_window, sampling_interval, slowness_int_algorithm=0, slowness_window=None, time_reduction_velo=0, wavenumber_sampling_rate=12, anti_alias=0.01, free_surface=True, wavelet_duration=4, wavelet_type=1, flat_earth_transform=True, path_nd=None, earth_model_layer_num=None, order=0)
create_inp_qseis06_points(path_green, event_depth, receiver_depth, n_group, points, time_window, sampling_interval, slowness_int_algorithm=0, slowness_window=None, time_reduction_velo=0, wavenumber_sampling_rate=2, anti_alias=0.01, free_surface=True, wavelet_duration=4, wavelet_type=1, flat_earth_transform=True, path_nd=None, earth_model_layer_num=None, order=0)
call_qseis06(event_depth, receiver_depth, n_group, order, path_green, check_finished=False)
convert_pd2bin_qseis06(path_greenfunc, remove=False)
pygrnwang.create_qseis2025#
create_dir_qseis2025(path_green, event_depth, receiver_depth, dist_range, delta_dist, N_each_group=500)
create_inp_qseis2025(path_green, event_depth, receiver_depth, dist_range, delta_dist, N_dist, N_dist_group, N_each_group, time_window, sampling_interval, output_observables, slowness_int_algorithm=0, eps_estimate_wavenumber=1e-06, source_radius_ratio=0.05, slowness_window=None, time_reduction_velo=0, wavenumber_sampling_rate=12, anti_alias=0.01, free_surface=0, wavelet_duration=4, wavelet_type=1, flat_earth_transform=True, path_nd=None, earth_model_layer_num=None)
call_qseis2025(event_depth, receiver_depth, n_group, path_green, check_finished=False)
convert_pd2bin_qseis2025(path_greenfunc, remove=False)
pygrnwang.create_qssp2020_bulk#
pre_process_spec(processes_num, path_green, event_depth_list, receiver_depth_list, spec_time_window, sampling_interval, max_frequency, max_slowness, anti_alias, turning_point_filter, turning_point_d1, turning_point_d2, free_surface_filter, gravity_fc, gravity_harmonic, cal_sph, cal_tor, min_harmonic, max_harmonic, source_radius, source_duration, time_window, time_reduction, dist_range, delta_dist, path_nd=None, earth_model_layer_num=None, physical_dispersion=0)
pre_process_func(processes_num, path_green, event_depth_list, receiver_depth_list, spec_time_window, sampling_interval, max_frequency, max_slowness, anti_alias, turning_point_filter, turning_point_d1, turning_point_d2, free_surface_filter, gravity_fc, gravity_harmonic, cal_sph, cal_tor, min_harmonic, max_harmonic, source_radius, source_duration, output_observables: list, time_window, time_reduction, dist_range, delta_dist, path_nd=None, earth_model_layer_num=None, physical_dispersion=0)
remove_dat_files(path_green)
pygrnwang.create_qssp2020#
create_dir_qssp2020(event_depth, receiver_depth, path_green)
create_points(dist_range, delta_dist)
create_locs(points, time_reduction)
create_inp_qssp2020(mt_com, path_green, event_depth, receiver_depth, spec_time_window, sampling_interval, max_frequency, max_slowness, anti_alias, turning_point_filter, turning_point_d1, turning_point_d2, free_surface_filter, gravity_fc, gravity_harmonic, cal_sph, cal_tor, min_harmonic, max_harmonic, source_radius, cal_gf, source_duration, output_observables: list, time_window, time_reduction, dist_range, delta_dist, path_nd=None, earth_model_layer_num=None, physical_dispersion=0)
call_qssp2020(event_depth, receiver_depth, mt_com, path_green, check_finished=False)
convert_pd2bin_qssp2020(path_green, event_depth, receiver_depth, output_type_ind)
pygrnwang.create_spgrn2012#
Deprecated backend: SPGRN2012. For new calculations use SPGRN2020, rebuild the library and revalidate settings, time alignment and results.
create_inp_spgrn2012(path_green, event_depth, receiver_depth, spec_time_window, sampling_interval, max_frequency, max_slowness, anti_alias, gravity_fc, gravity_harmonic, cal_sph, cal_tor, source_radius, cal_gf, time_window, t0, v0, source_duration, dist_range, delta_dist_range, path_nd=None, earth_model_layer_num=None, physical_dispersion=0)
call_spgrn2012(event_depth, receiver_depth, path_green, check_finished=False)
pygrnwang.create_spgrn2020_bulk#
update_green_info_lib_json(path_green, event_depth, receiver_depth)
pygrnwang.create_spgrn2020#
create_dir_spgrn(event_depth, receiver_depth, path_green)
create_inp_spgrn2020(path_green, event_depth, receiver_depth, spec_time_window, sampling_interval, max_frequency, max_slowness, anti_alias, gravity_fc, gravity_harmonic, cal_sph, cal_tor, source_radius, cal_gf, time_window, green_before_p, source_duration, dist_range, delta_dist_range, path_nd=None, earth_model_layer_num=None, physical_dispersion=0)
call_spgrn2020(event_depth, receiver_depth, path_green, check_finished=False)
pygrnwang.geo#
rotate_vector_x(v, gamma)
rotate_vector_y(v, gamma)
rotate_vector_z(v, gamma)
spherical_2_cartesian(r, phi, theta)
cartesian_2_spherical(x, y, z)
convert_sub_faults_geo2ned(sub_faults, source_point, approximate=True)
select_df_geo(df: pd.DataFrame, lat_range, lon_range, time_range)
geographic_centroid(points)
cal_max_dist_from_2d_points(A: np.ndarray, B: np.ndarray)
pygrnwang.plot_seismograms#
plot_seismograms(seismograms, srate, ylabel='u (m)', cut_length=None)
pygrnwang.read_by_qssp#
hash_read_pars(event_lat, event_lon, event_depth, receiver_lat, receiver_lon, receiver_depth)
create_inp_qssp2020_read(read_name, path_green, event_lat, event_lon, event_depth, receiver_lat, receiver_lon, receiver_depth, focal_mechanism, green_info)
call_qssp2020_read(path_green, path_inp, check_finished=False)
pygrnwang.read_edcmp#
read_edcmp_raw(path_green, output_type, grn_event_depth, grn_obs_depth, mt_ind)
interpolate_values(xmin, xmax, nx, ymin, ymax, ny, v_array, obs_array)
pygrnwang.read_qseis06_diff#
Deprecated backend: QSEIS06. Use QSEIS2025 direct tensor outputs for new calculations, after rebuilding and validating the library. This backend status does not deprecate generic tensor utilities.
diff_central_1order(v_array, diff_accu_order)
pygrnwang.read_qseis06#
Deprecated backend: QSEIS06. Use QSEIS2025 readers with a newly built and validated QSEIS2025 library for new calculations.
read_time_series_qseis06_bin(path_greenfunc, start_count, sampling_num)
read_time_series_qseis06_ascii(path_greenfunc, start_count)
synthesize_qseis06(time_series_list, m1, m2)
pygrnwang.read_qseis2025#
get_outfile_name_list(output_type)
read_time_series_qseis2025_ascii(path_greenfunc, start_count, output_type='disp')
read_time_series_qseis2025_bin(path_greenfunc, start_count, output_type, sampling_num)
synthesize_rzv(time_series, m1)
synthesize_t(time_series, m2)
get_sorted_grid_params(target, grid_list)
pygrnwang.read_qssp2020#
read_time_series_qssp2020(path_bin, ind, sampling_num)
seek_raw_qssp2020(path_green, event_depth, receiver_depth, dist, output_type='disp', green_info=None)
get_sorted_grid_params(target, grid_list)
pygrnwang.read_spgrn2020#
synthesize_spgrn(az_in_deg, time_series, focal_mechanism)
read_spgrn_data_by_index(path_grn_data, dist_index, green_info)
read_spgrn_data_two_indices(path_grn_data, dist_idx_low, dist_idx_high, green_info)
get_sorted_grid_params(target, grid_list)
pygrnwang.utils#
read_source_array(source_inds, path_input, shift2corner=False, source_shapes=None)
group(inp_list, num_in_each_group)
shift_green2real_tpts(seismograms, tpts_table, green_before_p, srate, event_depth_km, dist_in_km, receiver_depth_km=0, model_name='ak135')
group_planes(strike_array)
reshape_sub_faults(sub_faults, num_strike, num_dip)
call_exe(path_inp, path_finished, name)