Changeset 4179


Ignore:
Timestamp:
Oct 16, 2019 9:19:14 AM (4 years ago)
Author:
vondreele
Message:

a bit more speedup for polarization correction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r4166 r4179  
    234234
    235235    """
    236     pola = ((1.0-Pola)*npcosd(Azm)**2+Pola*npsind(Azm)**2)*npcosd(Tth)**2+   \
    237         (1.0-Pola)*npsind(Azm)**2+Pola*npcosd(Azm)**2
    238     dpdPola = -npsind(Tth)**2*(npsind(Azm)**2-npcosd(Azm)**2)
     236    cazm = npcosd(Azm)
     237    sazm = npsind(Azm)
     238    pola = ((1.0-Pola)*cazm**2+Pola*npsind(Azm)**2)*npcosd(Tth)**2+   \
     239        (1.0-Pola)*sazm**2+Pola*cazm**2
     240    dpdPola = -npsind(Tth)**2*(sazm**2-cazm**2)
    239241    return pola,dpdPola
    240242   
Note: See TracChangeset for help on using the changeset viewer.