%
% Solve.tex
%
% SatNOGS Optical Unofficial Guide
%
% Copyright (C) 2022, Jeff Moe
%
% This document is licensed under the Creative Commons Attribution 4.0
% International Public License (CC BY-SA 4.0) by Jeff Moe.
%

\section{Plate Solver}
\label{sec:plate-solver}

A ``\gls{plate-solver}'' will take an image of stars and detect the time and place
of the picture. There are two main steps:

\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{enumerate}
 \item Extract stars from an image, such as a \gls{FITS} file generated by \texttt{\gls{stvid}}.
 \item ``Solve'' the image of the stars in the image against vast databases in a
  \gls{star-catalogue}.
\end{enumerate}
\end{mdframed}

See below for a list of software tools that detect/extract stars from
images (e.g. \gls{FITS}).
\index{detect}

\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{itemize}
 \item Source Extractor.
 \item \gls{KStars} with Ekos adds \texttt{Internal SEP}.
 \item \gls{KStars} with Ekos adds \texttt{Builtin method for solver}.
\end{itemize}
\end{mdframed}
\index{Source Extractor}\index{Ekos}

See below for a list of \glspl{plate-solver} that can be used.

\begin{mdframed}[backgroundcolor=blue!10,linecolor=blue!30]
\begin{itemize}
 \item astrometry.net locally.
 \item astrometry.net Internet.
 \item astap.
 \item Watney.
\end{itemize}
\end{mdframed}
\index{astap}\index{Watney}\index{astrometry.net}


\section{Source Extractor}
\label{sec:Source Extractor}
\index{Source Extractor}

\texttt{Source Extractor}, formerly \texttt{SExtractor} and some other names,
is an application to extract stars from images. The software has been
widely used for many years.

\url{https://www.astromatic.net/software/sextractor}


\section{astrometry.net}

Astrometry.net is a website and software that can be run locally to solve
a plate of stars that has been extracted from \texttt{Source Extractor}. XXX
\index{Source Extractor}\index{astrometry.net}

% https://nova.astrometry.net/
\begin{figure}[h!]
	\begin{framed}
	\centering
        \includegraphics[keepaspectratio=true,height=0.60\textheight,width=0.60\textwidth,angle=0]{astrometry-web.png}
        \caption{nova.astrometry.net website.}
        \label{fig:astrometry-web-web}
	\end{framed}
\end{figure}

\fbox{
        \parbox{\linewidth}{
                \textcolor{red}{NOTICE:} \\
                Using astrometry.net online requires an account with non-\gls{libre} services.
		The astrometry.net software can be installed locally to avoid this.
                \index{proprietary}\index{astrometry.net}
        }
}


\section{Star Catalogues}
\label{sec:star-catalogues}
To use a \gls{plate-solver}, you will need \glspl{star-catalogue}. They can get large.
The \texttt{stvid} application includes a basic \gls{star-catalogue}.
XXX The \texttt{4200} index series is also recommended.


\section{World Coordinate System}
\label{sec:wcs}
\gls{WCS} info. XXX


\section{SIP}
\label{sec:sip}
\gls{SIP} info. XXX


\section{Plate Solving with \texttt{stvid}}
\label{sec:plate-solving-stvid}
\index{process}

Use the \texttt{process.py} scripts described in section \ref{sec:plate-solver},
page \pageref{sec:plate-solver}, to solve plates
with \texttt{\gls{stvid}}.

