eqcorrscan.core.bright_lights.brightness¶
-
eqcorrscan.core.bright_lights.
brightness
(stations, nodes, lags, stream, threshold, thresh_type, template_length, template_saveloc, coherence_thresh, coherence_stations=['all'], coherence_clip=False, gap=2.0, clip_level=100, instance=0, pre_pick=0.2, plotsave=True, cores=1, debug=0)[source]¶ Calculate the brightness function for a single day.
Written to calculate the brightness function for a single day of data, using moveouts from a 3D travel-time grid.
Note
Data in stream must be all of the same length and have the same sampling rates, see
eqcorrscan.utils.pre_processing.dayproc()
Parameters: - stations (list) List of station names from in the form where stations[i] refers to nodes[i][:] and lags[i][:]
- nodes (list) List of node points where nodes[i] refers to stations[i] and nodes[:][:][0] is latitude in degrees, nodes[:][:][1] is longitude in degrees, nodes[:][:][2] is depth in km.
- lags (numpy.ndarray) Array of arrays where lags[i][:] refers to stations[i]. lags[i][j] should be the delay to the nodes[i][j] for stations[i] in seconds.
- stream (obspy.core.stream.Stream) Data through which to look for detections.
- threshold (float) Threshold value for detection of template within the brightness function.
- thresh_type (str) Either MAD or abs where MAD is the Median Absolute Deviation and abs is an absolute brightness.
- template_length (float) Length of template to extract in seconds
- template_saveloc (str) Path of where to save the templates.
- coherence_thresh (tuple) Threshold for removing incoherent peaks in the network response, those below this will not be used as templates. Must be in the form of (a,b) where the coherence is given by: \(a-kchan/b\) where kchan is the number of channels used to compute the coherence.
- coherence_stations (list) List of stations to use in the coherence thresholding - defaults to all which uses all the stations.
- coherence_clip (tuple) Start and end in seconds of data to window around, defaults to False, which uses all the data given.
- gap (float) Minimum inter-event time in seconds for detections.
- clip_level (float) Multiplier applied to the mean deviation of the energy as an upper limit, used to remove spikes (earthquakes, lightning, electrical spikes) from the energy stack.
- instance (int) Optional, used for tracking when using a distributed computing system.
- pre_pick (float) Seconds before the detection time to include in template
- plotsave (bool) Save or show plots, if False will try and show the plots on screen - as this is designed for bulk use this is set to True to save any plots rather than show them if you create them - changes the backend of matplotlib, so if is set to False you will see NO PLOTS!
- cores (int) Number of cores to use, defaults to 1.
- debug (int) Debug level from 0-5, higher is more output.
Returns: list of templates as
obspy.core.stream.Stream
objectsReturn type: