pytomo3d.window package¶
Submodules¶
pytomo3d.window.window module¶
Methods that handles Window selection
copyright: | Wenjie Lei (lei@princeton.edu), 2016 |
---|---|
license: | GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html) |
- pytomo3d.window.window.load_window_config_yaml(filename)[source]¶
Load yaml and setup pyflex.Config object
Parameters: filename – Returns:
- pytomo3d.window.window.plot_window_figure(figure_dir, figure_id, ws, _verbose=False, figure_format='pdf')[source]¶
Plot window figure out
Parameters: - figure_dir (str) – output figure directory
- figure_id (str) – figure id to distinguish windows plots, for example, trace id could be used, like “II.AAK.00.BHZ”
- ws (pyflex.WindowSelector) – window selector object from pyflex
- _verbose (bool) – verbose output flag
- figure_format (str) – figure format, could be “pdf”, “png” and etc.
Returns:
- pytomo3d.window.window.window_on_stream(observed, synthetic, config_dict, station=None, event=None, figure_mode=False, figure_dir=None, _verbose=False)[source]¶
Window selection on a Stream
Parameters: - observed (obspy.Stream) – observed stream
- synthetic (obspy.Stream) – synthetic stream
- config_dict (dict) – window selection config dictionary, for example, {“Z”: pyflex.Config, “R”: pyflex.Config, “T”: pyflex.Config}
- station (obspy.Inventory or pyflex.Station) – station information which provids station location to calculate the epicenter distance
- event (pyflex.Event, obspy.Catalog or obspy.Event) – event information, providing the event information
- figure_mode (bool) – output figure flag
- figure_dir (str) – output figure directory
- _verbose (bool) – verbose flag
Returns:
- pytomo3d.window.window.window_on_trace(obs_tr, syn_tr, config, station=None, event=None, _verbose=False, figure_mode=False, figure_dir=None, figure_format='pdf')[source]¶
Window selection on a trace(obspy.Trace)
Parameters: - observed (obspy.Trace) – observed trace
- synthetic (obspy.Trace) – synthetic trace
- config – window selection config
- station (obspy.Inventory or pyflex.Station) – station information which provids station location to calculate the epicenter distance
- event (pyflex.Event, obspy.Catalog or obspy.Event) – event information, providing the event information
- figure_mode (bool) – output figure flag
- figure_dir (str) – output figure directory
- _verbose (bool) – verbose flag
Returns:
pytomo3d.window.write_window module¶
Methods that handles writing windows
copyright: | Wenjie Lei (lei@princeton.edu), 2016 |
---|---|
license: | GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html) |
- class pytomo3d.window.write_window.WindowEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None)[source]¶
Bases: json.encoder.JSONEncoder
- pytomo3d.window.write_window.get_json_content(window)[source]¶
Extract information from json to a dict
Parameters: window – Returns: