SpotNegProbabilityDiffWithSampledBackground Struct Reference
[Storm classes]

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

Inheritance diagram for SpotNegProbabilityDiffWithSampledBackground:
SampledBackgroundData

List of all members.

Public Member Functions

 SpotNegProbabilityDiffWithSampledBackground (const SampledBackgroundData &d)
Vector< 4 > operator() (const Vector< 4 > &spot) const

Public Attributes

const vector< vector< vector
< double > > > & 
sample_intensities_without_spot
const vector< vector< double > > & pixel_intensities
const vector< ImageRef > pixels
double mu_brightness
double sigma_brightness
double mu_blur
double sigma_blur
const Matrix< 3 > A
const Vector< 3 > pi
double variance
const vector< int > O

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 565 of file multispot5.cc.


Constructor & Destructor Documentation

SpotNegProbabilityDiffWithSampledBackground::SpotNegProbabilityDiffWithSampledBackground ( const SampledBackgroundData d  )  [inline]
Parameters:
d Necessary data for construction

Definition at line 568 of file multispot5.cc.

00569     :SampledBackgroundData(d)
00570     {
00571     }


Member Function Documentation

Vector<4> SpotNegProbabilityDiffWithSampledBackground::operator() ( const Vector< 4 > &  spot  )  const [inline]

Compute the probability of spot.

Parameters:
spot Spot position

Definition at line 575 of file multispot5.cc.

References SampledBackgroundData::A, SampledMultispot::compute_spot_intensity_derivatives(), diff_log_log_normal(), forward_algorithm_deriv(), SampledBackgroundData::mu_blur, SampledBackgroundData::mu_brightness, SampledBackgroundData::O, SampledBackgroundData::pi, SampledBackgroundData::pixel_intensities, SampledBackgroundData::pixels, SampledBackgroundData::sample_intensities_without_spot, SampledBackgroundData::sigma_blur, SampledBackgroundData::sigma_brightness, and SampledBackgroundData::variance.

00576     {
00577         if(spot[0] <= 0 || spot[1] <= 0)
00578             return Ones * std::numeric_limits<double>::quiet_NaN();
00579 
00580         vector<pair<double, Vector<4> > > spot_intensities = compute_spot_intensity_derivatives(pixels, spot);
00581 
00582         Vector<4> sum_diff_log = Zeros;
00583 
00584         for(unsigned int s=0; s < sample_intensities_without_spot.size(); s++)
00585         {
00586             SpotWithBackground B(sample_intensities_without_spot[s], spot_intensities, pixel_intensities, variance);
00587 
00588             pair<double, Vector<4> > r = forward_algorithm_deriv(A, pi, B, O);
00589             
00590             sum_diff_log += r.second;
00591         }
00592 
00593         Vector<4> diff_log = sum_diff_log / sample_intensities_without_spot.size();
00594 
00595         //Compute the log probability of the prior
00596         Vector<4> logprior_deriv = makeVector(diff_log_log_normal(spot[0], mu_brightness, sigma_brightness),
00597                                               diff_log_log_normal(spot[1], mu_blur, sigma_blur), 0, 0);
00598         
00599         return -(diff_log + logprior_deriv);
00600     }


Member Data Documentation

const vector<vector<vector<double> > >& SampledBackgroundData::sample_intensities_without_spot [inherited]
const vector<vector<double> >& SampledBackgroundData::pixel_intensities [inherited]
const vector<ImageRef> SampledBackgroundData::pixels [inherited]
double SampledBackgroundData::mu_blur [inherited]
const Matrix<3> SampledBackgroundData::A [inherited]
const Vector<3> SampledBackgroundData::pi [inherited]
double SampledBackgroundData::variance [inherited]
const vector<int> SampledBackgroundData::O [inherited]

The documentation for this struct was generated from the following file:
Generated on Wed Nov 2 18:00:04 2011 for BCUBED by  doxygen 1.6.3