Plotting API#
These functions create/save/show figures and normally return None. They read existing input/result files; they do not compute new stress. See plotting workflows.
Common parameters#
Parameters |
Meaning |
|---|---|
|
Source input directory or calculation output root |
|
Single observation ID or ordered ID list |
|
One shape or matching list of |
|
Source ID or list |
|
Corresponding source grid shapes |
|
Patch dimensions in km for 2D plots |
|
Patch dimensions in km for 3D geometry |
|
Symmetric stress limit in Pa for CFS plots; slip scale in m for slip plots; None chooses from data |
|
Tick stride in plotted grid samples for fault-plane maps |
|
Plot interpolation factors, not physical grid refinement |
|
Display interactively and/or save the figure |
|
Zero-based CFS sample index or index list |
|
STF sample cutoff or cutoff list |
|
Seconds per sample for labels and source-time handling |
|
Camera angles in degrees |
|
Receiver depth in km |
|
Two-entry geographic ranges in degrees |
|
Geographic grid spacing in degrees |
|
Map tick spacing in degrees, automatic if None |
|
Slip threshold in m |
|
Explicit scalar stress array in Pa |
Map range/spacing arguments must be supplied despite their None defaults. Fault plotters read fixed-mechanism filenames; use an explicit array to plot optimized results. Some plotting modules set global Matplotlib rcParams on import.
- dyncfs.plot_cfs_static_2d.plot_cfs_static_2d(path_output, ind_obs, obs_shape, sub_length_strike_km, sub_length_dip_km, color_saturation=None, tick_interval=5, zoom_strike=1, zoom_dip=1, show=True, save=True)#
Static fault-plane CFS map, displayed in MPa.
- dyncfs.plot_cfs_static_2d.plot_cfs_static_fix_depth(path_output, sub_stress, obs_depth, obs_lat_range=None, obs_lon_range=None, obs_delta_lat=None, obs_delta_lon=None, color_saturation=None, zoom_lat=1, zoom_lon=1, show=True, save=True, delta_tick=None)#
Plot the supplied scalar array on a latitude–longitude grid.
- dyncfs.plot_cfs_static_3d.plot_staic_coulomb_stress_3d(elev, azim, path_input, path_output, obs_inds, obs_shapes, sub_length_strike, sub_length_dip, color_saturation=None, show=True, save=True)#
Static CFS on 3D receiver patches. The spelling
staicis the actual exported function name.
- dyncfs.plot_cfs_dynamic_2d.plot_cfs_dynamic_2d_nt(path_output, nt, sampling_interval_cfs, ind_obs, obs_shape, sub_length_strike_km, sub_length_dip_km, color_saturation=None, tick_interval=5, zoom_strike=1, zoom_dip=1, show=True, save=True)#
Dynamic CFS snapshot at sample
nt.
- dyncfs.plot_cfs_dynamic_2d.plot_cfs_dynamic_2d_series(path_output, nt_list, sampling_interval_cfs, ind_obs, obs_shape, sub_length_strike_km, sub_length_dip_km, color_saturation=None, tick_interval=5, zoom_strike=1, zoom_dip=1, show=True, save=True)#
Series of fault-plane dynamic CFS snapshots.
- dyncfs.plot_cfs_dynamic_2d.plot_cfs_dynamic_fix_depth_one_time_point(path_output, nt, sampling_interval_cfs, obs_depth, obs_lat_range=None, obs_lon_range=None, obs_delta_lat=None, obs_delta_lon=None, color_saturation=None, zoom_lat=1, zoom_lon=1, show=True, save=True, delta_tick=None)#
Geographic dynamic snapshot, reading fixed-mechanism depth output.
- dyncfs.plot_cfs_dynamic_3d.plot_dynamic_coulomb_stress_3d_nt(elev, azim, nt, sampling_interval_cfs, path_input, path_output, obs_inds, obs_shapes, sub_length_strike, sub_length_dip, color_saturation=None, show=True, save=True)#
3D dynamic snapshot. Patch lengths may be scalars, per-plane entries or per-patch arrays; use entries matching the selected plane’s patch count.
- dyncfs.plot_slip_2d.plot_slip_2d(path_input, nt_cut, sampling_interval_stf, ind_source, source_shape, sub_length_strike_km, sub_length_dip_km, slip_thresh=0, color_saturation=None, tick_interval=5, zoom_strike=1, zoom_dip=1, show=True, save=True)#
2D source slip map at an STF cutoff.
- dyncfs.plot_slip_2d.plot_slip_2d_series(path_input, nt_cut_list, sampling_interval_stf, ind_source, source_shape, sub_length_strike_km, sub_length_dip_km, color_saturation=None, tick_interval=5, zoom_strike=1, zoom_dip=1, show=True, save=True)#
Series of 2D source slip maps.
- dyncfs.plot_slip_3d.plot_slip_3d(elev, azim, nt_cut, sampling_interval_stf, path_input, plane_inds, plane_shapes, slip_thresh=0, color_saturation=None, save=True, show=True)#
3D source slip geometry from the selected source CSVs.
- dyncfs.plot_gif.images_to_gif(image_files, output_file, duration=0.2, loop=0)#
image_filesis an ordered path list andoutput_filethe GIF destination.durationis forwarded unchanged to imageio’s writer; verify its timing convention.loop=0requests indefinite looping. Requires the optionalimageiopackage and returns None.