
% Detect.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{Satellite Detection with stvid}
\label{sec:satellite-detection}
\index{detect}\index{process}

This is a description of \gls{satellite} detection processes.
To detect \gls{satellite} in a \gls{FITS} file using the \gls{stvid} \gls{toolchain},
run \texttt{process.py} or, if it exists, the \texttt{process\_new.py}
\gls{Python} script.

Note the \texttt{stvid} application's \texttt{process.py} and \texttt{process\_new.py}
will perform both the detection and identification steps.
\index{identify}\index{detect}

\subsection{\texttt{process\_new.py} Usage}
\index{process}

This assumes you have installed \texttt{\gls{stvid}} as shown in
section \ref{sec:stvid-setup}, page \pageref{sec:stvid-setup}.
Adjust the dated directory used in this example to the actual directory name.

\begin{minted}{sh}
cd stvid/
# Maybe you need to update TLE
./update_tle.py
# Process directory
./process_new.py -c config_new.ini -d data/obs/20220825_1/020502/
\end{minted}
\index{process}\index{TLE}\index{config\_new.ini}

\subsection{\texttt{process.py} Usage}

If there is no \texttt{process\_new.py} it has likely been merged into
\texttt{process.py}. Or perhaps, to use the ``older'' script it would
be run as shown below. Note, the old and new configuration files
are different and should be used with the correct corresponding \gls{Python}
script.

\begin{minted}{sh}
cd stvid/
./process.py -c configuration.ini -d data/obs/20220825_1/020502/
\end{minted}
\index{process}\index{configuration.ini}


\subsection{\texttt{process\_new.py Example Output}}
\label{sec:process-output}
\index{process}\index{config\_new.ini}

\begin{minted}{sh}
Computing astrometric calibration for /srv/obs/odroid-01/obs/20220902_1/043309/2022-09-02T04:33:09.871.fits
2022-09-02T04:33:09.871.fits 216.814874  31.756777  199/ 342  10.6  13.9  16.53 +-   0.69
48144 21 027BE  9999 G 20220902043314699 17 25 1431290+312311 37 S
51636 22 012Q   9999 G 20220902043314094 17 25 1413930+340692 37 S
File queue empty, waiting for new files...
2022-09-02T04:33:20.136.fits 216.815061  31.756834  198/ 345  10.8  13.2  16.53 +-   0.70
2022-09-02T04:33:30.223.fits 216.815420  31.756810  202/ 338  10.5  13.9  16.53 +-   0.70
90000 22 500A   9999 G 20220902043336020 17 25 1433368+375908 37 S
2022-09-02T04:33:40.315.fits 216.815570  31.756676  206/ 342  10.1  13.1  16.54 +-   0.70
\end{minted}
\index{astometry.net}\index{process}


\section{AstroImageJ}
\label{sec:astroimagej}
\index{identify}

Analyze data with applications, such as \gls{AstroImageJ}.

\gls{FITS} files are commonly used  in astronomy.%
\footnote{\cite{Wiki22:fitswikipfreeencyc}}
\gls{AstroImageJ} can read \gls{FITS} format files.
See
\ref{fig:astroimagej}, page \pageref{fig:astroimagej},
for a screenshot displaying a \gls{FITS} file generated by
\texttt{\gls{stvid}}.

\begin{sidewaysfigure}[p!]
	\begin{center}
		\includegraphics[keepaspectratio=true,height=1.00\textheight,width=1.00\textwidth,angle=0]{astroimagej.png}
		\caption{AstroImageJ screenshot viewing FITS file.}
		\label{fig:astroimagej}
	\end{center}
\end{sidewaysfigure}

