gemlog.rename_files¶
- gemlog.rename_files(infile_pattern, station_info, output_dir, output_format='mseed', outfile_pattern='{year}-{mon}-{day}T{hour}_{min}_{sec}.{net}.{sta}.{loc}.{chan}.{fmt}')¶
Rename a set of converted data files, assigning the correct network, station, and location codes (instead of the original code with empty location/network and the station code being the serial number).
- Parameters
infile_pattern (str) – glob-type pattern defining the input files
station_info (str or pandas.DataFrame) – file name for table assigning serial numbers to network, station, and location codes
output_dir (str) – folder where output files should be written
output_format (str) – default ‘mseed’; ‘sac’ also works, as do other obspy-supported formats
outfile_pattern (str) – format of output file names; note the abbreviations, and that ‘jd’ means ‘day of year’
- Returns
pandas.DataFrame containing the station_info table.