\hypertarget{structSpotNegProbabilityDiffWithSampledBackground}{
\subsection{SpotNegProbabilityDiffWithSampledBackground Struct Reference}
\label{structSpotNegProbabilityDiffWithSampledBackground}\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
}


Compute the derivative of the negative log probability with respect to the parameters of one spot, given some samples of the other spots.  


Inheritance diagram for SpotNegProbabilityDiffWithSampledBackground:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{structSpotNegProbabilityDiffWithSampledBackground}
\end{center}
\end{figure}
\subsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structSpotNegProbabilityDiffWithSampledBackground_aec6676dff9abf8283c5d4f349f928b55}{SpotNegProbabilityDiffWithSampledBackground} (const \hyperlink{structSampledBackgroundData}{SampledBackgroundData} \&d)
\item 
Vector$<$ 4 $>$ \hyperlink{structSpotNegProbabilityDiffWithSampledBackground_a522773c514e1fd7704ce056badea4c97}{operator()} (const Vector$<$ 4 $>$ \&spot) const 
\end{DoxyCompactItemize}
\subsubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
const vector$<$ vector$<$ vector$<$ double $>$ $>$ $>$ \& \hyperlink{structSampledBackgroundData_adcbd6324e5df8b91ea311278fe78f8ce}{sample\_\-intensities\_\-without\_\-spot}
\item 
const vector$<$ vector$<$ double $>$ $>$ \& \hyperlink{structSampledBackgroundData_ac2c55329846402b7de359b23e3728aaa}{pixel\_\-intensities}
\item 
const vector$<$ ImageRef $>$ \hyperlink{structSampledBackgroundData_a0948dde4bc339e352152f2b2866d6aa4}{pixels}
\item 
double \hyperlink{structSampledBackgroundData_ae6b50a3f61a228c6eb9822496ab8faab}{mu\_\-brightness}
\item 
double \hyperlink{structSampledBackgroundData_ada62e8c18b4711839763e9daa1a27038}{sigma\_\-brightness}
\item 
double \hyperlink{structSampledBackgroundData_a2487e275eee06e12526d151b5dee0c6b}{mu\_\-blur}
\item 
double \hyperlink{structSampledBackgroundData_afd60120fc7f1135d7aa9f903a918f558}{sigma\_\-blur}
\item 
const Matrix$<$ 3 $>$ \hyperlink{structSampledBackgroundData_aad507304169dbb064172ac9a70a83e23}{A}
\item 
const Vector$<$ 3 $>$ \hyperlink{structSampledBackgroundData_aa93ae4e4618a7a33c074a70fe131030b}{pi}
\item 
double \hyperlink{structSampledBackgroundData_a7254bdbf45f90af7abdfa2dfb36f1a36}{variance}
\item 
const vector$<$ int $>$ \hyperlink{structSampledBackgroundData_a98c706202136571e4c82ee937aa577ad}{O}
\end{DoxyCompactItemize}


\subsubsection{Detailed Description}
Compute the derivative of the negative log probability with respect to the parameters of one spot, given some samples of the other spots. 

Definition at line 586 of file multispot5.cc.



\subsubsection{Constructor \& Destructor Documentation}
\hypertarget{structSpotNegProbabilityDiffWithSampledBackground_aec6676dff9abf8283c5d4f349f928b55}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{SpotNegProbabilityDiffWithSampledBackground}]{\setlength{\rightskip}{0pt plus 5cm}SpotNegProbabilityDiffWithSampledBackground::SpotNegProbabilityDiffWithSampledBackground (
\begin{DoxyParamCaption}
\item[{const {\bf SampledBackgroundData} \&}]{d}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{structSpotNegProbabilityDiffWithSampledBackground_aec6676dff9abf8283c5d4f349f928b55}

\begin{DoxyParams}{Parameters}
{\em d} & Necessary data for construction \\
\hline
\end{DoxyParams}


Definition at line 589 of file multispot5.cc.


\begin{DoxyCode}
    :SampledBackgroundData(d)
    {
    }
\end{DoxyCode}


\subsubsection{Member Function Documentation}
\hypertarget{structSpotNegProbabilityDiffWithSampledBackground_a522773c514e1fd7704ce056badea4c97}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!operator()@{operator()}}
\index{operator()@{operator()}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{operator()}]{\setlength{\rightskip}{0pt plus 5cm}Vector$<$4$>$ SpotNegProbabilityDiffWithSampledBackground::operator() (
\begin{DoxyParamCaption}
\item[{const Vector$<$ 4 $>$ \&}]{spot}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{structSpotNegProbabilityDiffWithSampledBackground_a522773c514e1fd7704ce056badea4c97}


Compute the probability of spot. 


\begin{DoxyParams}{Parameters}
{\em spot} & \hyperlink{classSpot}{Spot} position \\
\hline
\end{DoxyParams}


Definition at line 596 of file multispot5.cc.



References SampledMultispot::compute\_\-spot\_\-intensity\_\-derivatives(), diff\_\-log\_\-log\_\-normal(), and forward\_\-algorithm\_\-deriv().


\begin{DoxyCode}
    {
        if(spot[0] <= 0 || spot[1] <= 0)
            return Ones * std::numeric_limits<double>::quiet_NaN();

        vector<pair<double, Vector<4> > > spot_intensities = 
      compute_spot_intensity_derivatives(pixels, spot);

        Vector<4> sum_diff_log = Zeros;

        for(unsigned int s=0; s < sample_intensities_without_spot.size(); s++)
        {
            SpotWithBackground B(sample_intensities_without_spot[s], spot_intensi
      ties, pixel_intensities, variance);

            pair<double, Vector<4> > r = forward_algorithm_deriv(A, pi, B, O);
            
            sum_diff_log += r.second;
        }

        Vector<4> diff_log = sum_diff_log / sample_intensities_without_spot.size(
      );

        //Compute the log probability of the prior
        Vector<4> logprior_deriv = makeVector(diff_log_log_normal(spot[0], 
      mu_brightness, sigma_brightness),
                                              diff_log_log_normal(spot[1], 
      mu_blur, sigma_blur), 0, 0);
        
        return -(diff_log + logprior_deriv);
    }
\end{DoxyCode}


\subsubsection{Member Data Documentation}
\hypertarget{structSampledBackgroundData_adcbd6324e5df8b91ea311278fe78f8ce}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!sample\_\-intensities\_\-without\_\-spot@{sample\_\-intensities\_\-without\_\-spot}}
\index{sample\_\-intensities\_\-without\_\-spot@{sample\_\-intensities\_\-without\_\-spot}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{sample\_\-intensities\_\-without\_\-spot}]{\setlength{\rightskip}{0pt plus 5cm}const vector$<$vector$<$vector$<$double$>$ $>$ $>$\& {\bf SampledBackgroundData::sample\_\-intensities\_\-without\_\-spot}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_adcbd6324e5df8b91ea311278fe78f8ce}


Definition at line 505 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_ac2c55329846402b7de359b23e3728aaa}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!pixel\_\-intensities@{pixel\_\-intensities}}
\index{pixel\_\-intensities@{pixel\_\-intensities}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{pixel\_\-intensities}]{\setlength{\rightskip}{0pt plus 5cm}const vector$<$vector$<$double$>$ $>$\& {\bf SampledBackgroundData::pixel\_\-intensities}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_ac2c55329846402b7de359b23e3728aaa}


Definition at line 506 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_a0948dde4bc339e352152f2b2866d6aa4}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!pixels@{pixels}}
\index{pixels@{pixels}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{pixels}]{\setlength{\rightskip}{0pt plus 5cm}const vector$<$ImageRef$>$ {\bf SampledBackgroundData::pixels}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_a0948dde4bc339e352152f2b2866d6aa4}


Definition at line 507 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_ae6b50a3f61a228c6eb9822496ab8faab}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!mu\_\-brightness@{mu\_\-brightness}}
\index{mu\_\-brightness@{mu\_\-brightness}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{mu\_\-brightness}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf SampledBackgroundData::mu\_\-brightness}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_ae6b50a3f61a228c6eb9822496ab8faab}


Definition at line 509 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_ada62e8c18b4711839763e9daa1a27038}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!sigma\_\-brightness@{sigma\_\-brightness}}
\index{sigma\_\-brightness@{sigma\_\-brightness}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{sigma\_\-brightness}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf SampledBackgroundData::sigma\_\-brightness}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_ada62e8c18b4711839763e9daa1a27038}


Definition at line 509 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_a2487e275eee06e12526d151b5dee0c6b}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!mu\_\-blur@{mu\_\-blur}}
\index{mu\_\-blur@{mu\_\-blur}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{mu\_\-blur}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf SampledBackgroundData::mu\_\-blur}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_a2487e275eee06e12526d151b5dee0c6b}


Definition at line 509 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_afd60120fc7f1135d7aa9f903a918f558}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!sigma\_\-blur@{sigma\_\-blur}}
\index{sigma\_\-blur@{sigma\_\-blur}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{sigma\_\-blur}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf SampledBackgroundData::sigma\_\-blur}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_afd60120fc7f1135d7aa9f903a918f558}


Definition at line 509 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_aad507304169dbb064172ac9a70a83e23}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!A@{A}}
\index{A@{A}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{A}]{\setlength{\rightskip}{0pt plus 5cm}const Matrix$<$3$>$ {\bf SampledBackgroundData::A}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_aad507304169dbb064172ac9a70a83e23}


Definition at line 510 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_aa93ae4e4618a7a33c074a70fe131030b}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!pi@{pi}}
\index{pi@{pi}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{pi}]{\setlength{\rightskip}{0pt plus 5cm}const Vector$<$3$>$ {\bf SampledBackgroundData::pi}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_aa93ae4e4618a7a33c074a70fe131030b}


Definition at line 511 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_a7254bdbf45f90af7abdfa2dfb36f1a36}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!variance@{variance}}
\index{variance@{variance}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{variance}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf SampledBackgroundData::variance}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_a7254bdbf45f90af7abdfa2dfb36f1a36}


Definition at line 512 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().

\hypertarget{structSampledBackgroundData_a98c706202136571e4c82ee937aa577ad}{
\index{SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}!O@{O}}
\index{O@{O}!SpotNegProbabilityDiffWithSampledBackground@{SpotNegProbabilityDiffWithSampledBackground}}
\paragraph[{O}]{\setlength{\rightskip}{0pt plus 5cm}const vector$<$int$>$ {\bf SampledBackgroundData::O}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{structSampledBackgroundData_a98c706202136571e4c82ee937aa577ad}


Definition at line 514 of file multispot5.cc.



Referenced by sampled\_\-background\_\-spot\_\-hessian2(), sampled\_\-background\_\-spot\_\-hessian\_\-FAKE(), and sampled\_\-background\_\-spot\_\-hessian\_\-ffbs().



The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
\item 
\hyperlink{multispot5_8cc}{multispot5.cc}\end{DoxyCompactItemize}
