Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
model_name,dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax,ncpus)
#Now make synthetics for source/station pairs
if make_synthetics==1:
if ncpus<2:
runslip.make_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
static,tsunami,beta,hot_start,time_epi)
else:
runslip.make_parallel_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
static,tsunami,beta,hot_start,time_epi,ncpus,custom_stf=None)
#Run forward comptuation or solve for inverse problem
if solve==1:
if static==0: #Forward problem (full waveforms)
forward.waveforms_fakequakes(home,project_name,fault_name,None,GF_list,
model_name,run_name,dt,NFFT,G_from_file,G_name,source_time_function=stf_type,
stf_falloff_rate=4.0,rupture_name=rupture_name,epicenter=epicenter,time_epi=time_epi)
if static==1: #Forward problem (coseismics)
forward.coseismics_matrix(home,project_name,rupture_name,station_file,G_from_file,G_name)
Lstrike,num_modes,Nrealizations,rake,buffer_factor,rise_time_depths,time_epi,
max_slip,source_time_function,lognormal,slip_standard_deviation,scaling_law,ncpus,
force_magnitude=force_magnitude,force_area=force_area,mean_slip_name=mean_slip,
hypocenter=hypocenter,force_hypocenter=force_hypocenter,no_random=no_random,
shypo=center_subfault,use_hypo_fraction=use_hypo_fraction,shear_wave_fraction=shear_wave_fraction)
# Prepare waveforms and synthetics
if make_GFs==1 or make_synthetics==1:
runslip.inversionGFs(home,project_name,GF_list,None,fault_name,model_name,
dt,None,NFFT,None,make_GFs,make_synthetics,dk,pmin,
pmax,kmax,0,time_epi,0,ncpus,custom_stf,impulse=True)
# Synthesize the waveforms
if make_waveforms==1:
forward.waveforms_fakequakes(home,project_name,fault_name,rupture_list,GF_list,
model_name,run_name,dt,NFFT,G_from_file,G_name,source_time_function)
fakequakes.generate_ruptures(home,project_name,run_name,fault_name,slab_name,
mesh_name,load_distances,distances_name,UTM_zone,target_Mw,model_name,
hurst,Ldip,Lstrike,num_modes,Nrealizations,rake,buffer_factor,
rise_time_depths,time_epi,max_slip,source_time_function,lognormal,
slip_standard_deviation)
print '-- Now making plots --\n'
viewFQ.plot_KLslip(home,project_name,run_name,mesh_name)
# Prepare waveforms and synthetics
if make_GFs==1 or make_synthetics==1:
runslip.inversionGFs(home,project_name,GF_list,None,fault_name,model_name,
dt,None,NFFT,None,make_GFs,make_synthetics,dk,pmin,
pmax,kmax,0,time_epi,0,ncpus,custom_stf,impulse=True)
if make_waveforms==1:
forward.waveforms_fakequakes(home,project_name,fault_name,rupture_list,GF_list,
model_name,run_name,dt,NFFT,G_from_file,G_name,source_time_function)