pytomoatt.src_rec

class pytomoatt.src_rec.SrcRec(fname: str, src_only=False)[source]

I/O for source <–> receiver file

Parameters:
  • fname (str) – Path to src_rec file

  • src_only (bool, optional) – Whether to read only source information, defaults to False

Attributes

src_points

Return a DataFrame of all sources

rec_points

Return a DataFrame of all receivers

rec_points_cs

Return a DataFrame of all common sources

rec_points_cr

Return a DataFrame of all common receivers

Method

add_noise

Add random noise on travel time

append

Append another SrcRec object to the current one

box_weighting

Weighting sources and receivers by number in each subgrid

calc_distaz

Calculate epicentral distance and azimuth for each receiver

copy

Return a copy of SrcRec object

count_events_per_station

count events per station

erase_duplicate_events

check and count how many events are duplicated, under given threshold of distance, depth, and time.

from_seispy

Read and convert source and station information from receiver function data calculated by Seispy

geo_weighting

Calculating geographical weights for sources

generate_double_difference

Generate double difference data

plot

Plot source and receivers for preview

read

Read source <--> receiver file to pandas.DataFrame

remove_rec_by_new_src

remove rec_points by new src_points

remove_specified_recs

Remove specified receivers

remove_src_by_new_rec

remove src_points by new receivers

reset_index

Reset index of source and receivers.

rotate

Rotate sources and receivers around a center point

select_by_azi_gap

Select sources with azimuthal gap greater and equal than a number

select_by_box_region

Select sources and station in a box region

select_by_datetime

select sources and station in a time range

select_by_depth

Select sources in a range of depth

select_by_distance

Select stations in a range of distance

select_by_phase

select interested phase and remove others

select_by_num_rec

select sources with recievers greater and equal than a number :param num_rec: threshold of minimum receiver number :type num_rec: int

select_one_event_in_each_subgrid

select one event in each subgrid

to_utm

Convert sources and receivers to UTM coordinates

update

Update SrcRec.src_points and SrcRec.rec_points with procedures:

update_num_rec

update num_rec in src_points by current rec_points

write

Write sources and receivers to ASCII file for TomoATT

write_receivers

Write receivers to a txt file.

write_sources

Write sources to a txt file.