JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for CCP4BB Archives


CCP4BB Archives

CCP4BB Archives


CCP4BB@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CCP4BB Home

CCP4BB Home

CCP4BB  July 2013

CCP4BB July 2013

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: ctruncate bug?

From:

Douglas Theobald <[log in to unmask]>

Reply-To:

Douglas Theobald <[log in to unmask]>

Date:

Wed, 24 Jul 2013 14:38:41 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (100 lines)

Hi Randy,

So I've been playing around with equations myself, and I have some alternative results.  

As I understand your Mathematica stuff, you are using the data model:

ip = ij + ib'

ib

where ip is the measured peak (before any background correction), and ij is a random sample from the true intensity j.  Here ib is the measured background, whereas ib' is the background absorbed into ip.  Both ib and ib' are a random sample from background jb.  Again, only ip and ib are observed; ij and ib' are "hidden" variables.  

Now let me recap your treatment of that model (hopefully I get this right).

You assume Poisson distributions for ip, ij, ib, and ib', and find the joint probability of observed ip and ib given j and jb, p(ip,ib|j,jb).  You can consider ip and ib as statistically independent, since ip depends on ib', not ib.  You then marginalize over jb (the true background intensity) using a flat uninformative prior, giving p(ip,ib|j).  You find that p(ip,ib|j) is similar to F&W's p(ip-ib|j, sdj), where sdj=sqrt(ip+ib).  

Some sort of scaling is necessary, since in practice ib and ip are counted from different numbers of pixels.  You find that, for roughly equal scaling, the Poisson version is similar to F&W's Gaussian approximation for even moderate counts.    

However, in practice, we measure the background from a much larger area than the spot.  For example, in the mosflm window I have open now, the background area is > 20 times the spot area, for high res, low SNR spots.  Similarly, in xds the spot-to-background ratio, in terms of pixel #, is > 10 on average and > 5 for the great majority of spots.  Therefore, we typically know the value of jb to a much better precision than what we can get from ip (which is essentially an estimate of j+jb).  

If the relative sd of the background is about 2 or 3 times less than that of the spot ip, we can approximate the background estimate of jb as a constant (ie, ignore the uncertainty in its value).  This will be valid if the total area used for the background measurement is roughly >5 times the area of the spot (even less for "negative" peaks).  So what we can do is estimate jb using ib, and then find the conditional distribution of j given ip and jb.  Using your notation, this distribution is given by:

p(j|ip,jb) = exp(-(jb+j)) (jb+j)^ip / Gamma(ip+1,jb)

where Gamma(.,.) is the upper incomplete gamma function.  

The moments of this distribution have nice analytical forms (well, at least as nice as F&W's).  Here's a table comparing the F&W estimates to this Poisson treatment, using Randy's ip and jb values, plus some others:

ip   jb    Exp[j]_fw  SD[j]_fw  h     Exp[j]_dt  SD[j]_dt  %diff
---- ----  ---------  --------  ---   ---------  --------  -----
  55   45 11.3        6.3       1.3   11.9       6.8         5.3
  45   55  3.0        2.6      -1.5    3.7       3.3         5.4
  35   65  1.1        1.1      -5.1    2.0       2.0        86
   6   10  1.0        0.91     -1.6    1.8       1.7        80
   1    3  0.37       0.34     -2.0    1.3       1.2       240
   4   12  0.45       0.43     -4.0    1.4       1.3       210 

 100  100  8.0        6.0       0      8.6       6.6         7.4
  85  100  3.9        3.4      -1.6    4.7       4.2        20
  75  100  2.5        2.4      -2.9    3.4       3.2        35
 500  500 17.8       13.5       0     18.4      14.0         3.3
 440  500  6.2        5.8      -2.9    7.0       6.6        14
1000 1000 25.2       19.1       0     25.8      21           2.3
 920 1000  9.4        8.8      -2.6   10.3       9.5         9.1
 940 1000 11.6       10.5      -2.0   12.4      11           7

In this table I've used sdj=sqrt(ip) for F&W, since I'm ignoring the uncertainty in jb --- Randy used sqrt(ip+ib).  

h = (ip-jb)/sdj  

%diff = (Exp[j]_dt - Exp[j]_fw)/Exp[j]_fw  

Here jb is the # background counts normalized to have the same pixel area as ip.  

Whether these would be considered important differences, I'm not sure.  The differences are greatest when ip<jb (that is, for "negative intensities").


As an aside:

It's easy to expand this to include the acentric Wilson prior:

p(j|ip,jb,w) = exp(-(jb+j)(w+1)) (jb+j)^ip (w+1)^(ip+1) / Gamma(ip+1,jb(w+1))

where w = 1/sigma_w, sigma_w = the Wilson sigma.  Again, the moments have analytical forms.  



On Jul 1, 2013, at 5:47 AM, Randy Read <[log in to unmask]> wrote:

> Hi,
> 
> I've been following this discussion, and I was particularly interested by the suggestion that some information might be lost by turning the separate peak and background measurements into a single difference.  I accept the point that there might be value in, e.g., TDS models that pay explicit attention to non-Bragg intensities, but this whole discussion started from the point of what estimates to use for diffracted Bragg intensities in processes such as molecular replacement, refinement, and map calculations.
> 
> I thought I'd run this past the two of you, in case I've missed something.  What I decided to look at is the probability distribution for the true diffraction intensity, given the peak and background measurements.  I'm assuming that the peak and background measurements have a Poisson distribution from counting statistics, which seems fine because I'm comparing the Poisson model with a Gaussian approximation, and if there were other sources of non-Poisson error the true distribution should become more Gaussian anyway.
> 
> Where I thought it might make a difference to consider the peak and background separately is that, if the net intensity comes out as negative in the simple difference, this implies that the random errors in the peak region are more negative than the random errors in the background region.  By considering a joint distribution of peak and background counts, connected by a common underlying background intensity probability, you might hope that this would make a difference.
> 
> However, what I get (which I hope you can follow from the PDF derived from a Mathematica notebook) is that, even for very small numbers of counts, the F&W model of integrating over the positive intensity values consistent with a Gaussian peak-background difference gives surprisingly good agreement with the difference of Poisson variables model.  
> 
> In the Poisson derivation, I'm using Bayes' rule to turn the joint probability of the pair of peak/background intensity measurements into the joint probability of the true underlying intensities.  Like F&W, this requires a prior probability distribution for the true underlying intensities.  I'm using an uninformative prior (allowing all positive values with equal probability) and comparing that to F&W also with uninformative priors.  Wilson priors could be used for both instead, but that wouldn't really change the result of the comparison.
> 
> I've allowed for the possibility that there are different scale factors for the peak and background regions (so that there are different sizes of random errors for the background component of both measurements), and that only seems to make a minor difference in the results.
> 
> So my conclusion is that, if what you're after is the probability distribution of the true intensity, there's no extra information gained in considering peak and background separately, and that the simple Gaussian approximation of the difference of two Poisson variables is surprisingly good.  In other words, for these purposes, the difference between peak and background (and the standard deviation of that difference) is a sufficient statistic.
> 
> Of course, I'd be very grateful if either of you found anything wrong with the reasoning!  Also, I've lost some of the messages in this thread, so I don't know if these probability distributions are reproducing anything that has already been discussed.
> 
> Best wishes,
> 
> Randy
> <pIntensityPeakBkg.pdf>
> ------
> Randy J. Read
> Department of Haematology, University of Cambridge
> Cambridge Institute for Medical Research      Tel: + 44 1223 336500
> Wellcome Trust/MRC Building                   Fax: + 44 1223 336827
> Hills Road                                    E-mail: [log in to unmask]
> Cambridge CB2 0XY, U.K.                       www-structmed.cimr.cam.ac.uk
> 

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager