Class SpectraCalculator
java.lang.Object
gov.llnl.gnem.apps.coda.calibration.service.impl.processing.SpectraCalculator
-
Constructor Summary
ConstructorDescriptionSpectraCalculator
(WaveformToTimeSeriesConverter converter, SyntheticCodaModel syntheticCodaModel, MdacCalculatorService mdacService, MdacParametersFiService mdacFiService, MdacParametersPsService mdacPsService, VelocityConfiguration velConf) -
Method Summary
Modifier and TypeMethodDescriptioncalcTotalEnergyInfo
(SortedMap<FrequencyBand, Double> measurements, double mwMDAC, double apparentStress, MdacParametersFI mdacFI, Spectra spec) Now compute the total energy by summing the squared product of the discrete path-corrected moment rate spectra and omega.computeFitSpectra
(MeasuredMwParameters event, Collection<FrequencyBand> bands, PICK_TYPES selectedPhase) computeReferenceSpectra
(ReferenceMwParameters refEvent, List<FrequencyBand> bands, PICK_TYPES selectedPhase) computeSpecificSpectra
(Double mw, Double apparentStress, EnergyInfo energyInfo, Collection<FrequencyBand> bands, PICK_TYPES selectedPhase, SPECTRA_TYPES type) computeSpecificSpectraFromM0
(double moment, double apparentStress, double startBand, double stopBand, int bandCount) double[]
fitMw
(Event event, Map<FrequencyBand, org.apache.commons.math3.stat.descriptive.SummaryStatistics> measurements, PICK_TYPES phase, MdacParametersFI mdacFi, MdacParametersPS mdacPs, Function<Map<Double, Double>, SortedMap<Double, Double>> weightFunction) Grid search across a range of corner frequency and stress parameters looking for the best fit theoretical source spectra and return the resulting MW measurement.double
log10ESHcorrection
(double s1, double s2, double xcross, double xtrans, double distance) Extended Street and Herrmann path correction calculate log10 extended Street-Herrmann model for one distance no site, no Q terms translated from Scott Phillips original fortran function eshmoddouble
log10ESHcorrection
(double lowfreq, double highfreq, double alpha1, double alpha2, double xc, double xt, double q, double distance, VelocityConfiguration velocityConfig) Scott Phillips Extended Street and Hermann path correction including distance and QmeasureAmplitudes
(List<SyntheticCoda> generatedSynthetics, Map<FrequencyBand, SharedFrequencyBandParameters> frequencyBandParameterMap, VelocityConfiguration velocityConfig) measureAmplitudes
(List<SyntheticCoda> generatedSynthetics, Map<FrequencyBand, SharedFrequencyBandParameters> frequencyBandParameterMap, VelocityConfiguration velocityConfig, Map<FrequencyBand, Map<Station, SiteFrequencyBandParameters>> frequencyBandSiteParameterMap) measureMws
(MwMeasurementInputData inputData, PICK_TYPES selectedPhase, MdacParametersFI mdacFi) An estimate of the Mw and corner frequency based on Mdac spectra Based on the MDAC2 spectra calculations published by Walter and Taylor, 2001 UCRL-ID-146882protected static double
-
Constructor Details
-
SpectraCalculator
@Autowired public SpectraCalculator(WaveformToTimeSeriesConverter converter, SyntheticCodaModel syntheticCodaModel, MdacCalculatorService mdacService, MdacParametersFiService mdacFiService, MdacParametersPsService mdacPsService, VelocityConfiguration velConf)
-
-
Method Details
-
measureAmplitudes
public List<SpectraMeasurement> measureAmplitudes(List<SyntheticCoda> generatedSynthetics, Map<FrequencyBand, SharedFrequencyBandParameters> frequencyBandParameterMap, VelocityConfiguration velocityConfig) -
measureAmplitudes
public List<SpectraMeasurement> measureAmplitudes(List<SyntheticCoda> generatedSynthetics, Map<FrequencyBand, SharedFrequencyBandParameters> frequencyBandParameterMap, VelocityConfiguration velocityConfig, Map<FrequencyBand, Map<Station, SiteFrequencyBandParameters>> frequencyBandSiteParameterMap) -
log10ESHcorrection
public double log10ESHcorrection(double lowfreq, double highfreq, double alpha1, double alpha2, double xc, double xt, double q, double distance, VelocityConfiguration velocityConfig) Scott Phillips Extended Street and Hermann path correction including distance and Q- Parameters:
lowfreq
- the low frequency cuthighfreq
- the high frequency cutalpha1
-alpha2
-xc
- xcrossxt
- xtransdistance
- source-receiver distanceq
- the attenuation term- Returns:
- -log10(esh) + distance*pi*f0*log10(e) / (vphase* q)
-
log10ESHcorrection
public double log10ESHcorrection(double s1, double s2, double xcross, double xtrans, double distance) Extended Street and Herrmann path correction calculate log10 extended Street-Herrmann model for one distance no site, no Q terms translated from Scott Phillips original fortran function eshmod -
computeReferenceSpectra
public Spectra computeReferenceSpectra(ReferenceMwParameters refEvent, List<FrequencyBand> bands, PICK_TYPES selectedPhase) -
computeFitSpectra
public Spectra computeFitSpectra(MeasuredMwParameters event, Collection<FrequencyBand> bands, PICK_TYPES selectedPhase) -
computeSpecificSpectraFromM0
public Spectra computeSpecificSpectraFromM0(double moment, double apparentStress, double startBand, double stopBand, int bandCount) -
computeSpecificSpectra
public Spectra computeSpecificSpectra(Double mw, Double apparentStress, EnergyInfo energyInfo, Collection<FrequencyBand> bands, PICK_TYPES selectedPhase, SPECTRA_TYPES type) -
measureMws
public List<MeasuredMwParameters> measureMws(MwMeasurementInputData inputData, PICK_TYPES selectedPhase, MdacParametersFI mdacFi) An estimate of the Mw and corner frequency based on Mdac spectra Based on the MDAC2 spectra calculations published by Walter and Taylor, 2001 UCRL-ID-146882 -
calcTotalEnergyInfo
public EnergyInfo calcTotalEnergyInfo(SortedMap<FrequencyBand, Double> measurements, double mwMDAC, double apparentStress, MdacParametersFI mdacFI, Spectra spec) Now compute the total energy by summing the squared product of the discrete path-corrected moment rate spectra and omega. Then divide by (Radiation)/4*pi*pi*rho*(vel**5) Radiation=(2/5) Then finally multiply by delta omega at the front. Mayeda, K., and Walter, W. R. (1996), Moment, energy, stress drop, and source spectra of western United States earthquakes from regional coda envelopes, J. Geophys. Res., 101( B5), 11195– 11208, doi:10.1029/96JB00112.- Parameters:
spec
-
-
fitMw
public double[] fitMw(Event event, Map<FrequencyBand, org.apache.commons.math3.stat.descriptive.SummaryStatistics> measurements, PICK_TYPES phase, MdacParametersFI mdacFi, MdacParametersPS mdacPs, Function<Map<Double, Double>, SortedMap<Double, Double>> weightFunction) Grid search across a range of corner frequency and stress parameters looking for the best fit theoretical source spectra and return the resulting MW measurement.- Parameters:
event
-measurements
- - the measured spectra values by frequency bandphase
- - the phase (e.g. "Lg") this should be present in the Mdac parameter set- Returns:
- double[] containing the final fit measurements
-
WCVRMSD
- Parameters:
weightMap
-dataMap
-- Returns:
-