\documentclass{article}

%other packages
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{physics}

% \usepackage[
% 	style=phys, articletitle=false, biblabel=brackets, chaptertitle=false, pageranges=false, url=true
% ]{biblatex}

\usepackage{graphicx}
\usepackage{todonotes}
\usepackage{siunitx}

\usepackage{cleveref}

\title{Cliff Notes}

% \addbibresource{./bibliography.bib}

\graphicspath{{./figures/}}

\newcommand{\vf}{v_{\mathrm{F}}}
\newcommand{\qf}{q_{\mathrm{F}}}

\begin{document}

\maketitle

\section{Introduction \label{sec:intro}}

We are interested in characterising the $\Delta$-$\omega$ curve that shows where the superconducting low-noise behaviour gives way to the normal state high-noise behaviour.
\Cref{fig:cliffview} shows the cliff in the computation we've been looking at, filtered to only include $\tau$ large enough to make the material look clean.
If $\tau$ were decreased, then the cliff would begin to flatten and widen, which makes it somewhat harder to clearly determine the shape the cliff makes, so I ignore it for now.

\begin{figure}[htp]
	\centering
	\includegraphics[width=12cm]{sharpcliffview}
	\caption{A view of the cliff for clean materials} \label{fig:cliffview}
\end{figure}

As a zeroth order mental model, we should expect that the normal-SC boundary would be somewhere around $\omega \sim \Delta$, and that looks roughly okay in \cref{fig:cliffview}.
However, we shouldn't expect it to be a simple relationship, as the response function is a very nontrivial function of $\omega$ and $\Delta$.

\section{Identifying the points of the cliff}

To begin identifying the actual dependence, after some fruitless efforts with fitting functions in 3D and trying to get more mesh points around the cliff, I took slices of constant temperature.
In all of the following, I combined the three clean $\tau$ values from the mesh I'd previously computed on.

\begin{figure}[htp]
	\centering
	\includegraphics[width=12cm]{exampleconsttplot}
	\caption{An example slice of the 3D plot for constant temperature} \label{fig:exConstTPlot}
\end{figure}

In \cref{fig:exConstTPlot}, the cliff is visible as the jump around $\frac{\omega}{T_c} \approx 0.001$.
It's worth noting that the points within the width of the cliff likely has extra numerical noise;
the values jump up and down, which frustrates automated analysis somewhat.
For lower temperatures, this jump will occur at higher $\omega$, and for higher temperatures the jump occurs at small ones, as in \cref{fig:exConstTPlot}.

Now, to identify the lower boundary of the cliff, we can search for the frequency where there is a discontinuity in the derivative of the log-log plot.
Here, I used the restriction made earlier to look only at clean cases, by looking for the first point where the derivative was above a threshold.
This identified the frequency at which the cliff began for the given temperature.

\begin{figure}[htp]
	\centering
	\includegraphics[width=12cm]{exampleconsttplotwithline}
	\caption{\Cref{fig:exConstTPlot} with a line showing the lower boundary of the cliff.} \label{fig:exConstTPlotWithLine}
\end{figure}

This process gives us a lower cliff frequency for a given temperature.
By repeating as we take slices at different $T$, we can estimate the function $\omega_{lc}(T)$.
Lastly, we are really interested in the function $\omega_{lc}(\Delta)$, so we use $\frac{\Delta}{T_c} = 3.06 \sqrt{1 - t}$.
(Actually in the rest of these notes, I just used $\Delta \approx \sqrt{1 - t}$, because the $3.06$ factor doesn't really matter for the fit.)

\begin{figure}[htp]
	\centering
	\includegraphics[width=12cm]{cleancliff}
	\caption{The points $\omega_lc(\Delta)$ estimated to be the bottom edge of the cliff.} \label{fig:cleancliff}
\end{figure}

Doing this for the three values of $\tau$ mentioned above, and overlaying them together, we get the curve in \cref{fig:cleancliff}.
The purpose of overlaying these curves together is to try to eliminate a little bit of error caused by the mesh distance to the cliff edge by effectively averaging it over slightly different meshes relative to the cliff.
Because each of the $\tau$ chosen are large, the cliff is very similar between the three.

We can see in \cref{fig:cleancliff} that the cliff does not follow a simple power law near the highest and lowest $\Delta$, but appears to do so for intermediate values of $\Delta$.
I'm not sure if that's actually meaningful (some effect of the coherence factors in the integrals ``bunching up'' for sufficiently high temperature or something), or just that the integrals are less accurate in those regions.
Likely both.

\section{Fitting the cliff}

Finally, we want to actually fit this result.
In order to do so, I began by partitioning the curve with a cluster finding algorithm in order to automate ignoring the tail.
The most accurate thing to do would be to find linear fits (in the log log plot) and cluster based on the error away from the line, but this seemed unnecessary at this stage.
\Cref{fig:logclusters} has the three categories that the algorithm found.
\begin{figure}[htp]
	\centering
	\includegraphics[width=12cm]{logclusters}
	\caption{\Cref{fig:cleancliff} with the clusters from the cluster algorithm.} \label{fig:logclusters}
\end{figure}

Then, I did a power law fit on the expression $\omega_lc = A \Delta^B$ on only the middle cluster from \cref{fig:logclusters}, and obtained the parameter values
\begin{align}
	A &= 0.452107 \\
	B &= 1.34246.
\end{align}

This expression is plotted in \cref{fig:fittedcliff}, as the curve in blue.
The curve in orange is the best fit for $B = 1$, which would correspond to the zeroth order model I mentioned above.
I believe it's visually clear that $B = 1$ does not describe the shape of the cliff, but the actual value of $1.34$ seems very reasonable.
There are probably quite a few refinements yet to be made to this process, and it is still difficult to do dirtier metals (because the cliff is much flatter, and the process of finding the actual boundary is tougher).

\begin{figure}[htp]
	\centering
	\includegraphics[width=12cm]{fittedcliff}
	\caption{\Cref{fig:cleancliff} with fits, described in the text of the notes.} \label{fig:fittedcliff}
\end{figure}

% \printbibliography

\end{document}
