pytomoatt.src_rec.SrcRec.read¶
- classmethod SrcRec.read(fname: str, dist_in_data=False, name_net_and_sta=False, conflicting_receiver_action='error', **kwargs)[source]¶
Read source <–> receiver file to pandas.DataFrame
Source indices in the file are treated as local labels and may be duplicated. Sources are reassigned consecutive
src_indexvalues from zero in file order, and all receiver records are remapped to the new indices using source blocks and unique event IDs.- Parameters:
fname (str) – Path to src_rec file
dist_in_data (bool) – Whether distance is included in the src_rec file
name_net_and_sta (bool) – Whether to include network and station name in the src_rec file
conflicting_receiver_action (str) – How to handle a receiver name that has multiple coordinates/elevations.
"error"lists every conflicting receiver location and stops reading;"remove"removes all observations involving those receiver names;"max_count"keeps the location with the highest occurrence count and removes observations at other locations; and"rename"keeps the locations and appends_A,_B, … to distinguish them.
- Returns:
class of SrcRec
- Return type: