mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
211 stars 123 forks source link

SANS display:In place fitting and calculations #3025

Closed NickDraper closed 9 years ago

NickDraper commented 13 years ago

Allow in place plotting, fitting with a linear background on a user selected region and then claculations based on the gradient and intercept of the line.

See mockup SANS\Display_with_inplace_fitting


Rg = radius of gyration
Rg,xs = cross-sectional radius of gyration
R = equivalent spherical radius
T = thickness
Pi = 3.141592654...
C = concentration
Phi = volume fraction
Deltarho = difference in neutron scattering length densities (solute - solvent)
M = molecular weight
ML = mass per unit length
NA = Avogadro's number, 6.02214179(30)×10**23 mol−1
D = bulk density
n = Q-dependence
v = excluded volume exponent
zeta = characteristic length
(S/V) = surface area-to-volume ratio

    1: Guinier (spheres) - Ln(I)     v     Q**2    

Gradient = -(Rg**2)/3 = -(R**2)/5

Intercept = M.[(c.(deltarho**2) / (NA.d**2)] = M.[(phi.(deltarho**2) / (NA.d)]

    2: Guinier (rods)    - Ln(IQ)    v     Q**2                        

Gradient = -(Rg,xs**2)/2  (note dividing by 2 this time)

Intercept (Q**2=0) = Ln[(pi.c.(deltarho**2).ML) / (NA.d**2)]   

    3: Guinier (sheets)  - Ln(IQ**2) v     Q**2                        

Gradient = -(T**2)/12  (note dividing by 12 this time)

    4: Zimm              - 1/I       v     Q**2           

Gradient = (Rg**2)/3 = (R**2)/5  (no minuses this time!)

Intercept = (1/M).[(NA.d**2) / (c.(deltarho**2)] = (1/M).[(NA.d) / (phi.(deltarho**2)]

    5: Kratky            - IQ**2     v        Q       

Plateau Intercept = [(2.c.M.(deltarho**2)) / (NA.(d**2).(Rg**2))] = [(2.phi.M.(deltarho**2)) / (NA.d.(Rg**2))]

    6: Debye-Bueche      - 1/Sqrt(I) v     Q**2          

Zeta = (gradient / intercept)**0.5

    7: Log-Log           - Ln(I)     v    Ln(Q)  

Gradient = -n = 1/v

    8: Porod             - IQ**4     v        Q      

Plateau Intercept = [(2.pi.c.(deltarho**2)) / d].(S / V)

So some of these can be expressed to terms of c or phi, for example, depending on what the experimenter knows about their sample. The way I would see this working is that there would be a sort of circular calculation where the user can type in one set of cells and the algorithm populates others, if that makes sense. Obviously the user would have to complete all the cells for a particular version of the expression for anything to happen!!!

NickDraper commented 9 years ago

This issue was originally trac ticket 2178