Quickstart¶
Simple Heat Flow and Anomaly Analysis¶
A quick analysis can be done using just a few commands. This assumes that
the heat flow data has already been loaded to the variables hf_x
,
hf_y
, and hf_mWm2
, where the former are the data point
coordinates in a map-projected coordinate system and the latter is an array
of the heat flow data (in \(\mathrm{mWm}^{-2}\)). For instance, the data
could be loaded from the NGHF [L2019] using the reheatfunq.data
module. All arrays are assumed to be one-dimensional continuous numpy arrays.
First, perform the necessary imports:
import numpy as np
import matplotlib.pyplot as plt
from reheatfunq.regional import (default_prior,
HeatFlowPredictive)
from reheatfunq.anomaly import (HeatFlowAnomalyPosterior,
AnomalyLS1980)
Obtain the default GammaConjugatePrior
and
compute the predictive cumulative distribution function, that is, the estimate
of the regional aggregate heat flow distribution:
gcp = default_prior()
predictive = HeatFlowPredictive(hf_mWm2, hf_x, hf_y, gcp,
dmin=20e3)
qplt = np.linspace(30, 90)
cdf = predictive.cdf(qplt)
Now qplt
is a range of heat flow values from
\(30\,\mathrm{mWm}^{-2}\) to \(90\,\mathrm{mWm}^{-2}\), and
cdf
holds the corresponding values of the estimated heat flow CDF.
Fault-generated heat flow anomaly¶
Let’s assume that the variable fault_trace
is a (N,2)
-shaped
NumPy array that holds the consecutive coordinates of a fault trace
[(x0,y0), ..., (xN,yN)]
. We would like to investigate the strength of
the potential heat flow anomaly generated by this fault. Let’s assume
furthermore that we are content with approximating the heat conduction from that
fault by the AnomalyLS1980
class (implying that
in the relevant vicinity of the data the fault is vertical and straight, and
heat transport conductive, and that heat production increases linearly with
depth). Finally, let D
be the uniform depth of the fault in meters.
Then we can use the following code to quantify the heat-generating power on the fault through the heat flow anomaly strength:
anomaly = AnomalyLS1980(fault_trace, D)
post = HeatFlowAnomalyPosterior(hf_mWm2, hf_x, hf_y, anomaly,
gcp)
P_H = np.linspace(0, post.PHmax, 200)
pdf_P_H = post.pdf(P_H)
tail_P_H = post.tail(P_H)
The parameter post.PHmax
is the maximum heat production power on the
fault, that is, for all greater powers the posterior has zero probability
density. The variables pdf_P_H
and tail_P_H
now hold the
marginal posterior density and tail distribution, respectively, of the heat
production power \(P_H\).
A readymade Jupyter notebook for this analysis can be found in jupyter/Quickstart.ipynb.
REHEATFUNQ Paper¶
To repeat the analysis performed in the REHEATFUNQ paper, you can use the notebooks prefixed 01 to 06 in the jupyter/REHEATFUNQ/ folder.