Changeset 712 for trunk/readexp.tcl


Ignore:
Timestamp:
Dec 4, 2009 5:10:45 PM (11 years ago)
Author:
toby
Message:

# on 2003/05/24 20:55:52, toby did:
fix absorption correction bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/readexp.tcl

    • Property rcs:date changed from 2003/05/22 21:45:46 to 2003/05/24 20:55:52
    • Property rcs:lines changed from +5 -3 to +13 -2
    • Property rcs:rev changed from 1.39 to 1.40
    r702 r712  
    17031703            }
    17041704            abscor2-set {
    1705                 if ![validreal value 15 7] {return 0}
    1706                 setexp "${key}ABSCOR" $value 16 15
     1705                # can't use validreal as the decimal must be in col 20
     1706                if {[catch {
     1707                    if {abs($value) < 99.99 && abs($value) > 1.e-4} {
     1708                        set tmp [format "%15.10f" $value]
     1709                        # make a final check of decimal
     1710                        if {[string range $tmp 4 4] != "."} {
     1711                            set tmp [format "%15.6E" $value]
     1712                        }
     1713                    } else {
     1714                        set tmp [format "%15.6E" $value]
     1715                    }
     1716                }]} {return 0}
     1717                setexp "${key}ABSCOR" $tmp 16 15
    17071718            }
    17081719            abstype-get {
Note: See TracChangeset for help on using the changeset viewer.