geoist.catalog package¶
Submodules¶
geoist.catalog.QCmulti module¶
Code for creating figures comparing two catalogs spanning the same time frame. Run QCmulti.py -h for command line options.
-
geoist.catalog.QCmulti.create_figures()¶ Generate and save all relevant figures and text files.
-
geoist.catalog.QCmulti.create_figures_new(db=None, catalog_file=None, startyear=2010, endyear=2012, minmag=-5, maxmag=12, pathname=None, dhrs=0)¶ Generate and save all relevant figures and text files.
-
geoist.catalog.QCmulti.generate_html(dirname, matchbool)¶ Generate an HTML file containing all of the generated images and test files.
geoist.catalog.QCreport module¶
Script for generating figures of catalog statistics. Run QCreport.py -h for command line usage.
-
geoist.catalog.QCreport.create_figures(to_plot=None)¶ Generate and save all relevant figures and text files.
-
geoist.catalog.QCreport.create_figures_new(to_plot=None, db=None, catalog_file=None)¶
-
geoist.catalog.QCreport.generate_html(pathname, prefix, to_show=None)¶ Generate an HTML file containing all of the generated images and text files.
-
geoist.catalog.QCreport.largest_ten(catalog, prefix)¶ Make a list of the 10 events with largest magnitude.
-
geoist.catalog.QCreport.qcinit()¶
geoist.catalog.QCutils module¶
-
geoist.catalog.QCutils.WW2000(mcval, mags, binsize)¶ Wiemer and Wyss (2000) method for determining a and b values.
-
geoist.catalog.QCutils.access_url(url)¶ Return list of lines in url; if HTTPError, repeat.
-
geoist.catalog.QCutils.add_centers(catalog, gridsize)¶ Add corresponding centers to catalog.
-
geoist.catalog.QCutils.draw_grid(lats, lons, col, alpha=1)¶ Draw rectangle with vertices given in degrees.
-
geoist.catalog.QCutils.format_time(ogtime)¶ Increase readability of given catalog times.
-
geoist.catalog.QCutils.get_azs_and_dists(cat1, cat2, cat1mids, cat2mids)¶ Calculate azimuths for all matches between two catalogs.
-
geoist.catalog.QCutils.get_data(catalog, dirname, startyear=2000, endyear=2000, minmag=-5, maxmag=12)¶ Download catalog data from earthquake.usgs.gov
-
geoist.catalog.QCutils.get_db_data(db2, dirname, startyear=2000, endyear=2000, minmag=-5, maxmag=12, dhrs=0)¶ Get catalog data from Database
-
geoist.catalog.QCutils.get_local_data(catafile, dirname, startyear=2000, endyear=2000, minmag=-5, maxmag=12, dhrs=0)¶ Download catalog data from earthquake.usgs.gov
-
geoist.catalog.QCutils.get_map_bounds(cat1, cat2=None)¶ Generate map bounds and gridsize.
-
geoist.catalog.QCutils.group_lat_lons(catalog, minmag=-5)¶ Group detections by nearest grid-square center and return min/max of counts.
-
geoist.catalog.QCutils.progress_bar(count, total, status='')¶ Show progress bar for the desired task.
-
geoist.catalog.QCutils.range2rgb(rmin, rmax, numcolors)¶ Create a list of red RGB values using colmin and colmax with numcolors number of colors.
-
geoist.catalog.QCutils.round2bin(number, binsize, direction)¶ Round number to nearest histogram bin edge (either ‘up’ or ‘down’).
-
geoist.catalog.QCutils.round2center(num, gridsize)¶ Round number to nearest grid-square center.
-
geoist.catalog.QCutils.round2lon(num)¶ Round number to nearest timezone longitude.
-
geoist.catalog.QCutils.to_epoch(ogtime)¶ Convert formatted time to Unix/epoch time.
-
geoist.catalog.QCutils.trim_times(cat1, cat2, otwindow=16)¶ Trim catalogs so they span the same time window.
geoist.catalog.decorators module¶
-
geoist.catalog.decorators.retry(ExceptionToCheck, tries=4, delay=4, backoff=1.5, logger=None)¶
geoist.catalog.findDuplicates module¶
-
geoist.catalog.findDuplicates.detect_duplicates(catfile, otwindow=16, distwindow=100, diffnet=True)¶ Return possible duplicate events within a catalog.
-
geoist.catalog.findDuplicates.eq_dist(lat1, lon1, lat2, lon2)¶ Calculate equirectangular distance between two points.
-
geoist.catalog.findDuplicates.main()¶ Main function. Defines command line arguments.
-
geoist.catalog.findDuplicates.to_epoch(ogtime)¶ Convert from catalog time format to Unix/epoch time.