Changeset 981 for trunk/GSASIImath.py


Ignore:
Timestamp:
Jul 7, 2013 9:58:08 AM (8 years ago)
Author:
toby
Message:

introduce regress option; fix esd printing; more docs; new Mac app with drag & drop for open; control reset of ref list on load

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r978 r981  
    12811281        esdoff = 5
    12821282    valoff = 0
    1283     if esdoff < 0 or abs(value) > 1.0e6 or abs(value) < 1.0e-4: # use scientific notation
     1283    if abs(value) < abs(esdoff): # value is effectively zero
     1284        pass
     1285    elif esdoff < 0 or abs(value) > 1.0e6 or abs(value) < 1.0e-4: # use scientific notation
    12841286        # where the digit offset is to the left of the decimal place or where too many
    12851287        # digits are needed
     
    12971299        extra = -math.log10(abs(value))
    12981300        if extra > 0: extra += 1
     1301        print 'fmt=',"{:."+str(max(0,esdoff+int(extra)))+"f}"
    12991302        out = ("{:."+str(max(0,esdoff+int(extra)))+"f}").format(value) # format the value
    13001303    if esd > 0:
Note: See TracChangeset for help on using the changeset viewer.