Changeset db03406 in sasmodels


Ignore:
Timestamp:
Dec 1, 2017 12:36:52 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Children:
13cf47a
Parents:
791281c
Message:

first pass at python to C translator for kernels

Location:
sasmodels
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/generate.py

    r2d81cfe rdb03406  
    709709        _add_source(source, code, path) 
    710710 
     711    if model_info.c_code: 
     712        source.append(model_info.c_code) 
     713 
    711714    # Make parameters for q, qx, qy so that we can use them in declarations 
    712715    q, qx, qy = [Parameter(name=v) for v in ('q', 'qx', 'qy')] 
  • sasmodels/modelinfo.py

    r2d81cfe rdb03406  
    1212from os.path import abspath, basename, splitext 
    1313import inspect 
     14import logging 
    1415 
    1516import numpy as np  # type: ignore 
     17 
     18from . import autoc 
    1619 
    1720# Optional typing 
     
    3235    TestCondition = Tuple[ParameterSetUser, TestInput, TestValue] 
    3336# pylint: enable=unused-import 
     37 
     38logger = logging.getLogger(__name__) 
    3439 
    3540# If MAX_PD changes, need to change the loop macros in kernel_iq.c 
     
    789794    info.structure_factor = getattr(kernel_module, 'structure_factor', False) 
    790795    info.profile_axes = getattr(kernel_module, 'profile_axes', ['x', 'y']) 
     796    info.c_code = getattr(kernel_module, 'c_code', None) 
    791797    info.source = getattr(kernel_module, 'source', []) 
    792798    # TODO: check the structure of the tests 
     
    812818 
    813819    _find_source_lines(info, kernel_module) 
     820    try: 
     821        autoc.convert(info, kernel_module) 
     822    except Exception as exc: 
     823        raise 
     824        logger.warn(str(exc)) 
    814825 
    815826    return info 
     
    935946    #: See :attr:`ER` for details on the parameters. 
    936947    VR = None               # type: Optional[Callable[[np.ndarray], Tuple[np.ndarray, np.ndarray]]] 
     948    #: Arbitrary C code containing supporting functions, etc., to be inserted 
     949    #: after everything in source.  This can include Iq and Iqxy functions with 
     950    #: the full function signature, including all parameters. 
     951    c_code = None 
    937952    #: Returns the form volume for python-based models.  Form volume is needed 
    938953    #: for volume normalization in the polydispersity integral.  If no 
  • sasmodels/special.py

    re65c3ba rdb03406  
    205205from numpy import arctan2 as atan2 
    206206from numpy import fmin, fmax, trunc, rint 
    207 from numpy import NAN, inf as INFINITY 
     207from numpy import pi, nan, inf 
     208NAN = nan 
     209INFINITY = inf 
    208210 
    209211from scipy.special import gamma as sas_gamma 
     
    226228    """return sin(x), cos(x)""" 
    227229    return sin(x), cos(x) 
     230sincos = SINCOS 
    228231 
    229232def square(x): 
     
    294297 
    295298# Gaussians 
    296  
    297 Gauss20Wt = np.array([ 
    298     .0176140071391521, 
    299     .0406014298003869, 
    300     .0626720483341091, 
    301     .0832767415767047, 
    302     .10193011981724, 
    303     .118194531961518, 
    304     .131688638449177, 
    305     .142096109318382, 
    306     .149172986472604, 
    307     .152753387130726, 
    308     .152753387130726, 
    309     .149172986472604, 
    310     .142096109318382, 
    311     .131688638449177, 
    312     .118194531961518, 
    313     .10193011981724, 
    314     .0832767415767047, 
    315     .0626720483341091, 
    316     .0406014298003869, 
    317     .0176140071391521 
    318 ]) 
    319  
    320 Gauss20Z = np.array([ 
    321     -.993128599185095, 
    322     -.963971927277914, 
    323     -.912234428251326, 
    324     -.839116971822219, 
    325     -.746331906460151, 
    326     -.636053680726515, 
    327     -.510867001950827, 
    328     -.37370608871542, 
    329     -.227785851141645, 
    330     -.076526521133497, 
    331     .0765265211334973, 
    332     .227785851141645, 
    333     .37370608871542, 
    334     .510867001950827, 
    335     .636053680726515, 
    336     .746331906460151, 
    337     .839116971822219, 
    338     .912234428251326, 
    339     .963971927277914, 
    340     .993128599185095 
    341 ]) 
    342  
    343 Gauss76Wt = np.array([ 
    344     .00126779163408536,         #0 
    345     .00294910295364247, 
    346     .00462793522803742, 
    347     .00629918049732845, 
    348     .00795984747723973, 
    349     .00960710541471375, 
    350     .0112381685696677, 
    351     .0128502838475101, 
    352     .0144407317482767, 
    353     .0160068299122486, 
    354     .0175459372914742,          #10 
    355     .0190554584671906, 
    356     .020532847967908, 
    357     .0219756145344162, 
    358     .0233813253070112, 
    359     .0247476099206597, 
    360     .026072164497986, 
    361     .0273527555318275, 
    362     .028587223650054, 
    363     .029773487255905, 
    364     .0309095460374916,          #20 
    365     .0319934843404216, 
    366     .0330234743977917, 
    367     .0339977794120564, 
    368     .0349147564835508, 
    369     .0357728593807139, 
    370     .0365706411473296, 
    371     .0373067565423816, 
    372     .0379799643084053, 
    373     .0385891292645067, 
    374     .0391332242205184,          #30 
    375     .0396113317090621, 
    376     .0400226455325968, 
    377     .040366472122844, 
    378     .0406422317102947, 
    379     .0408494593018285, 
    380     .040987805464794, 
    381     .0410570369162294, 
    382     .0410570369162294, 
    383     .040987805464794, 
    384     .0408494593018285,          #40 
    385     .0406422317102947, 
    386     .040366472122844, 
    387     .0400226455325968, 
    388     .0396113317090621, 
    389     .0391332242205184, 
    390     .0385891292645067, 
    391     .0379799643084053, 
    392     .0373067565423816, 
    393     .0365706411473296, 
    394     .0357728593807139,          #50 
    395     .0349147564835508, 
    396     .0339977794120564, 
    397     .0330234743977917, 
    398     .0319934843404216, 
    399     .0309095460374916, 
    400     .029773487255905, 
    401     .028587223650054, 
    402     .0273527555318275, 
    403     .026072164497986, 
    404     .0247476099206597,          #60 
    405     .0233813253070112, 
    406     .0219756145344162, 
    407     .020532847967908, 
    408     .0190554584671906, 
    409     .0175459372914742, 
    410     .0160068299122486, 
    411     .0144407317482767, 
    412     .0128502838475101, 
    413     .0112381685696677, 
    414     .00960710541471375,         #70 
    415     .00795984747723973, 
    416     .00629918049732845, 
    417     .00462793522803742, 
    418     .00294910295364247, 
    419     .00126779163408536          #75 (indexed from 0) 
    420 ]) 
    421  
    422 Gauss76Z = np.array([ 
    423     -.999505948362153,          #0 
    424     -.997397786355355, 
    425     -.993608772723527, 
    426     -.988144453359837, 
    427     -.981013938975656, 
    428     -.972229228520377, 
    429     -.961805126758768, 
    430     -.949759207710896, 
    431     -.936111781934811, 
    432     -.92088586125215, 
    433     -.904107119545567,          #10 
    434     -.885803849292083, 
    435     -.866006913771982, 
    436     -.844749694983342, 
    437     -.822068037328975, 
    438     -.7980001871612, 
    439     -.77258672828181, 
    440     -.74587051350361, 
    441     -.717896592387704, 
    442     -.688712135277641, 
    443     -.658366353758143,          #20 
    444     -.626910417672267, 
    445     -.594397368836793, 
    446     -.560882031601237, 
    447     -.526420920401243, 
    448     -.491072144462194, 
    449     -.454895309813726, 
    450     -.417951418780327, 
    451     -.380302767117504, 
    452     -.342012838966962, 
    453     -.303146199807908,          #30 
    454     -.263768387584994, 
    455     -.223945802196474, 
    456     -.183745593528914, 
    457     -.143235548227268, 
    458     -.102483975391227, 
    459     -.0615595913906112, 
    460     -.0205314039939986, 
    461     .0205314039939986, 
    462     .0615595913906112, 
    463     .102483975391227,                   #40 
    464     .143235548227268, 
    465     .183745593528914, 
    466     .223945802196474, 
    467     .263768387584994, 
    468     .303146199807908, 
    469     .342012838966962, 
    470     .380302767117504, 
    471     .417951418780327, 
    472     .454895309813726, 
    473     .491072144462194,           #50 
    474     .526420920401243, 
    475     .560882031601237, 
    476     .594397368836793, 
    477     .626910417672267, 
    478     .658366353758143, 
    479     .688712135277641, 
    480     .717896592387704, 
    481     .74587051350361, 
    482     .77258672828181, 
    483     .7980001871612,     #60 
    484     .822068037328975, 
    485     .844749694983342, 
    486     .866006913771982, 
    487     .885803849292083, 
    488     .904107119545567, 
    489     .92088586125215, 
    490     .936111781934811, 
    491     .949759207710896, 
    492     .961805126758768, 
    493     .972229228520377,           #70 
    494     .981013938975656, 
    495     .988144453359837, 
    496     .993608772723527, 
    497     .997397786355355, 
    498     .999505948362153            #75 
    499 ]) 
    500  
    501 Gauss150Z = np.array([ 
    502     -0.9998723404457334, 
    503     -0.9993274305065947, 
    504     -0.9983473449340834, 
    505     -0.9969322929775997, 
    506     -0.9950828645255290, 
    507     -0.9927998590434373, 
    508     -0.9900842691660192, 
    509     -0.9869372772712794, 
    510     -0.9833602541697529, 
    511     -0.9793547582425894, 
    512     -0.9749225346595943, 
    513     -0.9700655145738374, 
    514     -0.9647858142586956, 
    515     -0.9590857341746905, 
    516     -0.9529677579610971, 
    517     -0.9464345513503147, 
    518     -0.9394889610042837, 
    519     -0.9321340132728527, 
    520     -0.9243729128743136, 
    521     -0.9162090414984952, 
    522     -0.9076459563329236, 
    523     -0.8986873885126239, 
    524     -0.8893372414942055, 
    525     -0.8795995893549102, 
    526     -0.8694786750173527, 
    527     -0.8589789084007133, 
    528     -0.8481048644991847, 
    529     -0.8368612813885015, 
    530     -0.8252530581614230, 
    531     -0.8132852527930605, 
    532     -0.8009630799369827, 
    533     -0.7882919086530552, 
    534     -0.7752772600680049, 
    535     -0.7619248049697269, 
    536     -0.7482403613363824, 
    537     -0.7342298918013638, 
    538     -0.7198995010552305, 
    539     -0.7052554331857488, 
    540     -0.6903040689571928, 
    541     -0.6750519230300931, 
    542     -0.6595056411226444, 
    543     -0.6436719971150083, 
    544     -0.6275578900977726, 
    545     -0.6111703413658551, 
    546     -0.5945164913591590, 
    547     -0.5776035965513142, 
    548     -0.5604390262878617, 
    549     -0.5430302595752546, 
    550     -0.5253848818220803, 
    551     -0.5075105815339176, 
    552     -0.4894151469632753, 
    553     -0.4711064627160663, 
    554     -0.4525925063160997, 
    555     -0.4338813447290861, 
    556     -0.4149811308476706, 
    557     -0.3959000999390257, 
    558     -0.3766465660565522, 
    559     -0.3572289184172501, 
    560     -0.3376556177463400, 
    561     -0.3179351925907259, 
    562     -0.2980762356029071, 
    563     -0.2780873997969574, 
    564     -0.2579773947782034, 
    565     -0.2377549829482451, 
    566     -0.2174289756869712, 
    567     -0.1970082295132342, 
    568     -0.1765016422258567, 
    569     -0.1559181490266516, 
    570     -0.1352667186271445, 
    571     -0.1145563493406956, 
    572     -0.0937960651617229, 
    573     -0.0729949118337358, 
    574     -0.0521619529078925, 
    575     -0.0313062657937972, 
    576     -0.0104369378042598, 
    577     0.0104369378042598, 
    578     0.0313062657937972, 
    579     0.0521619529078925, 
    580     0.0729949118337358, 
    581     0.0937960651617229, 
    582     0.1145563493406956, 
    583     0.1352667186271445, 
    584     0.1559181490266516, 
    585     0.1765016422258567, 
    586     0.1970082295132342, 
    587     0.2174289756869712, 
    588     0.2377549829482451, 
    589     0.2579773947782034, 
    590     0.2780873997969574, 
    591     0.2980762356029071, 
    592     0.3179351925907259, 
    593     0.3376556177463400, 
    594     0.3572289184172501, 
    595     0.3766465660565522, 
    596     0.3959000999390257, 
    597     0.4149811308476706, 
    598     0.4338813447290861, 
    599     0.4525925063160997, 
    600     0.4711064627160663, 
    601     0.4894151469632753, 
    602     0.5075105815339176, 
    603     0.5253848818220803, 
    604     0.5430302595752546, 
    605     0.5604390262878617, 
    606     0.5776035965513142, 
    607     0.5945164913591590, 
    608     0.6111703413658551, 
    609     0.6275578900977726, 
    610     0.6436719971150083, 
    611     0.6595056411226444, 
    612     0.6750519230300931, 
    613     0.6903040689571928, 
    614     0.7052554331857488, 
    615     0.7198995010552305, 
    616     0.7342298918013638, 
    617     0.7482403613363824, 
    618     0.7619248049697269, 
    619     0.7752772600680049, 
    620     0.7882919086530552, 
    621     0.8009630799369827, 
    622     0.8132852527930605, 
    623     0.8252530581614230, 
    624     0.8368612813885015, 
    625     0.8481048644991847, 
    626     0.8589789084007133, 
    627     0.8694786750173527, 
    628     0.8795995893549102, 
    629     0.8893372414942055, 
    630     0.8986873885126239, 
    631     0.9076459563329236, 
    632     0.9162090414984952, 
    633     0.9243729128743136, 
    634     0.9321340132728527, 
    635     0.9394889610042837, 
    636     0.9464345513503147, 
    637     0.9529677579610971, 
    638     0.9590857341746905, 
    639     0.9647858142586956, 
    640     0.9700655145738374, 
    641     0.9749225346595943, 
    642     0.9793547582425894, 
    643     0.9833602541697529, 
    644     0.9869372772712794, 
    645     0.9900842691660192, 
    646     0.9927998590434373, 
    647     0.9950828645255290, 
    648     0.9969322929775997, 
    649     0.9983473449340834, 
    650     0.9993274305065947, 
    651     0.9998723404457334 
    652 ]) 
    653  
    654 Gauss150Wt = np.array([ 
    655     0.0003276086705538, 
    656     0.0007624720924706, 
    657     0.0011976474864367, 
    658     0.0016323569986067, 
    659     0.0020663664924131, 
    660     0.0024994789888943, 
    661     0.0029315036836558, 
    662     0.0033622516236779, 
    663     0.0037915348363451, 
    664     0.0042191661429919, 
    665     0.0046449591497966, 
    666     0.0050687282939456, 
    667     0.0054902889094487, 
    668     0.0059094573005900, 
    669     0.0063260508184704, 
    670     0.0067398879387430, 
    671     0.0071507883396855, 
    672     0.0075585729801782, 
    673     0.0079630641773633, 
    674     0.0083640856838475, 
    675     0.0087614627643580, 
    676     0.0091550222717888, 
    677     0.0095445927225849, 
    678     0.0099300043714212, 
    679     0.0103110892851360, 
    680     0.0106876814158841, 
    681     0.0110596166734735, 
    682     0.0114267329968529, 
    683     0.0117888704247183, 
    684     0.0121458711652067, 
    685     0.0124975796646449, 
    686     0.0128438426753249, 
    687     0.0131845093222756, 
    688     0.0135194311690004, 
    689     0.0138484622795371, 
    690     0.0141714592928592, 
    691     0.0144882814685445, 
    692     0.0147987907597169, 
    693     0.0151028518701744, 
    694     0.0154003323133401, 
    695     0.0156911024699895, 
    696     0.0159750356447283, 
    697     0.0162520081211971, 
    698     0.0165218992159766, 
    699     0.0167845913311726, 
    700     0.0170399700056559, 
    701     0.0172879239649355, 
    702     0.0175283451696437, 
    703     0.0177611288626114, 
    704     0.0179861736145128, 
    705     0.0182033813680609, 
    706     0.0184126574807331, 
    707     0.0186139107660094, 
    708     0.0188070535331042, 
    709     0.0189920016251754, 
    710     0.0191686744559934, 
    711     0.0193369950450545, 
    712     0.0194968900511231, 
    713     0.0196482898041878, 
    714     0.0197911283358190, 
    715     0.0199253434079123, 
    716     0.0200508765398072, 
    717     0.0201676730337687, 
    718     0.0202756819988200, 
    719     0.0203748563729175, 
    720     0.0204651529434560, 
    721     0.0205465323660984, 
    722     0.0206189591819181, 
    723     0.0206824018328499, 
    724     0.0207368326754401, 
    725     0.0207822279928917, 
    726     0.0208185680053983, 
    727     0.0208458368787627, 
    728     0.0208640227312962, 
    729     0.0208731176389954, 
    730     0.0208731176389954, 
    731     0.0208640227312962, 
    732     0.0208458368787627, 
    733     0.0208185680053983, 
    734     0.0207822279928917, 
    735     0.0207368326754401, 
    736     0.0206824018328499, 
    737     0.0206189591819181, 
    738     0.0205465323660984, 
    739     0.0204651529434560, 
    740     0.0203748563729175, 
    741     0.0202756819988200, 
    742     0.0201676730337687, 
    743     0.0200508765398072, 
    744     0.0199253434079123, 
    745     0.0197911283358190, 
    746     0.0196482898041878, 
    747     0.0194968900511231, 
    748     0.0193369950450545, 
    749     0.0191686744559934, 
    750     0.0189920016251754, 
    751     0.0188070535331042, 
    752     0.0186139107660094, 
    753     0.0184126574807331, 
    754     0.0182033813680609, 
    755     0.0179861736145128, 
    756     0.0177611288626114, 
    757     0.0175283451696437, 
    758     0.0172879239649355, 
    759     0.0170399700056559, 
    760     0.0167845913311726, 
    761     0.0165218992159766, 
    762     0.0162520081211971, 
    763     0.0159750356447283, 
    764     0.0156911024699895, 
    765     0.0154003323133401, 
    766     0.0151028518701744, 
    767     0.0147987907597169, 
    768     0.0144882814685445, 
    769     0.0141714592928592, 
    770     0.0138484622795371, 
    771     0.0135194311690004, 
    772     0.0131845093222756, 
    773     0.0128438426753249, 
    774     0.0124975796646449, 
    775     0.0121458711652067, 
    776     0.0117888704247183, 
    777     0.0114267329968529, 
    778     0.0110596166734735, 
    779     0.0106876814158841, 
    780     0.0103110892851360, 
    781     0.0099300043714212, 
    782     0.0095445927225849, 
    783     0.0091550222717888, 
    784     0.0087614627643580, 
    785     0.0083640856838475, 
    786     0.0079630641773633, 
    787     0.0075585729801782, 
    788     0.0071507883396855, 
    789     0.0067398879387430, 
    790     0.0063260508184704, 
    791     0.0059094573005900, 
    792     0.0054902889094487, 
    793     0.0050687282939456, 
    794     0.0046449591497966, 
    795     0.0042191661429919, 
    796     0.0037915348363451, 
    797     0.0033622516236779, 
    798     0.0029315036836558, 
    799     0.0024994789888943, 
    800     0.0020663664924131, 
    801     0.0016323569986067, 
    802     0.0011976474864367, 
    803     0.0007624720924706, 
    804     0.0003276086705538 
    805 ]) 
     299class Gauss: 
     300    def __init__(self, w, z): 
     301        self.n = len(w) 
     302        self.w = w 
     303        self.z = z 
     304 
     305gauss20 = Gauss( 
     306    w=np.array([ 
     307        .0176140071391521, 
     308        .0406014298003869, 
     309        .0626720483341091, 
     310        .0832767415767047, 
     311        .10193011981724, 
     312        .118194531961518, 
     313        .131688638449177, 
     314        .142096109318382, 
     315        .149172986472604, 
     316        .152753387130726, 
     317        .152753387130726, 
     318        .149172986472604, 
     319        .142096109318382, 
     320        .131688638449177, 
     321        .118194531961518, 
     322        .10193011981724, 
     323        .0832767415767047, 
     324        .0626720483341091, 
     325        .0406014298003869, 
     326        .0176140071391521 
     327    ]), 
     328    z=np.array([ 
     329        -.993128599185095, 
     330        -.963971927277914, 
     331        -.912234428251326, 
     332        -.839116971822219, 
     333        -.746331906460151, 
     334        -.636053680726515, 
     335        -.510867001950827, 
     336        -.37370608871542, 
     337        -.227785851141645, 
     338        -.076526521133497, 
     339        .0765265211334973, 
     340        .227785851141645, 
     341        .37370608871542, 
     342        .510867001950827, 
     343        .636053680726515, 
     344        .746331906460151, 
     345        .839116971822219, 
     346        .912234428251326, 
     347        .963971927277914, 
     348        .993128599185095 
     349    ]) 
     350) 
     351 
     352gauss76 = Gauss( 
     353    w=np.array([ 
     354        .00126779163408536,             #0 
     355        .00294910295364247, 
     356        .00462793522803742, 
     357        .00629918049732845, 
     358        .00795984747723973, 
     359        .00960710541471375, 
     360        .0112381685696677, 
     361        .0128502838475101, 
     362        .0144407317482767, 
     363        .0160068299122486, 
     364        .0175459372914742,              #10 
     365        .0190554584671906, 
     366        .020532847967908, 
     367        .0219756145344162, 
     368        .0233813253070112, 
     369        .0247476099206597, 
     370        .026072164497986, 
     371        .0273527555318275, 
     372        .028587223650054, 
     373        .029773487255905, 
     374        .0309095460374916,              #20 
     375        .0319934843404216, 
     376        .0330234743977917, 
     377        .0339977794120564, 
     378        .0349147564835508, 
     379        .0357728593807139, 
     380        .0365706411473296, 
     381        .0373067565423816, 
     382        .0379799643084053, 
     383        .0385891292645067, 
     384        .0391332242205184,              #30 
     385        .0396113317090621, 
     386        .0400226455325968, 
     387        .040366472122844, 
     388        .0406422317102947, 
     389        .0408494593018285, 
     390        .040987805464794, 
     391        .0410570369162294, 
     392        .0410570369162294, 
     393        .040987805464794, 
     394        .0408494593018285,              #40 
     395        .0406422317102947, 
     396        .040366472122844, 
     397        .0400226455325968, 
     398        .0396113317090621, 
     399        .0391332242205184, 
     400        .0385891292645067, 
     401        .0379799643084053, 
     402        .0373067565423816, 
     403        .0365706411473296, 
     404        .0357728593807139,              #50 
     405        .0349147564835508, 
     406        .0339977794120564, 
     407        .0330234743977917, 
     408        .0319934843404216, 
     409        .0309095460374916, 
     410        .029773487255905, 
     411        .028587223650054, 
     412        .0273527555318275, 
     413        .026072164497986, 
     414        .0247476099206597,              #60 
     415        .0233813253070112, 
     416        .0219756145344162, 
     417        .020532847967908, 
     418        .0190554584671906, 
     419        .0175459372914742, 
     420        .0160068299122486, 
     421        .0144407317482767, 
     422        .0128502838475101, 
     423        .0112381685696677, 
     424        .00960710541471375,             #70 
     425        .00795984747723973, 
     426        .00629918049732845, 
     427        .00462793522803742, 
     428        .00294910295364247, 
     429        .00126779163408536              #75 (indexed from 0) 
     430    ]), 
     431    z=np.array([ 
     432        -.999505948362153,              #0 
     433        -.997397786355355, 
     434        -.993608772723527, 
     435        -.988144453359837, 
     436        -.981013938975656, 
     437        -.972229228520377, 
     438        -.961805126758768, 
     439        -.949759207710896, 
     440        -.936111781934811, 
     441        -.92088586125215, 
     442        -.904107119545567,              #10 
     443        -.885803849292083, 
     444        -.866006913771982, 
     445        -.844749694983342, 
     446        -.822068037328975, 
     447        -.7980001871612, 
     448        -.77258672828181, 
     449        -.74587051350361, 
     450        -.717896592387704, 
     451        -.688712135277641, 
     452        -.658366353758143,              #20 
     453        -.626910417672267, 
     454        -.594397368836793, 
     455        -.560882031601237, 
     456        -.526420920401243, 
     457        -.491072144462194, 
     458        -.454895309813726, 
     459        -.417951418780327, 
     460        -.380302767117504, 
     461        -.342012838966962, 
     462        -.303146199807908,              #30 
     463        -.263768387584994, 
     464        -.223945802196474, 
     465        -.183745593528914, 
     466        -.143235548227268, 
     467        -.102483975391227, 
     468        -.0615595913906112, 
     469        -.0205314039939986, 
     470        .0205314039939986, 
     471        .0615595913906112, 
     472        .102483975391227,                       #40 
     473        .143235548227268, 
     474        .183745593528914, 
     475        .223945802196474, 
     476        .263768387584994, 
     477        .303146199807908, 
     478        .342012838966962, 
     479        .380302767117504, 
     480        .417951418780327, 
     481        .454895309813726, 
     482        .491072144462194,               #50 
     483        .526420920401243, 
     484        .560882031601237, 
     485        .594397368836793, 
     486        .626910417672267, 
     487        .658366353758143, 
     488        .688712135277641, 
     489        .717896592387704, 
     490        .74587051350361, 
     491        .77258672828181, 
     492        .7980001871612, #60 
     493        .822068037328975, 
     494        .844749694983342, 
     495        .866006913771982, 
     496        .885803849292083, 
     497        .904107119545567, 
     498        .92088586125215, 
     499        .936111781934811, 
     500        .949759207710896, 
     501        .961805126758768, 
     502        .972229228520377,               #70 
     503        .981013938975656, 
     504        .988144453359837, 
     505        .993608772723527, 
     506        .997397786355355, 
     507        .999505948362153                #75 
     508    ]) 
     509) 
     510 
     511gauss150 = Gauss( 
     512    z=np.array([ 
     513        -0.9998723404457334, 
     514        -0.9993274305065947, 
     515        -0.9983473449340834, 
     516        -0.9969322929775997, 
     517        -0.9950828645255290, 
     518        -0.9927998590434373, 
     519        -0.9900842691660192, 
     520        -0.9869372772712794, 
     521        -0.9833602541697529, 
     522        -0.9793547582425894, 
     523        -0.9749225346595943, 
     524        -0.9700655145738374, 
     525        -0.9647858142586956, 
     526        -0.9590857341746905, 
     527        -0.9529677579610971, 
     528        -0.9464345513503147, 
     529        -0.9394889610042837, 
     530        -0.9321340132728527, 
     531        -0.9243729128743136, 
     532        -0.9162090414984952, 
     533        -0.9076459563329236, 
     534        -0.8986873885126239, 
     535        -0.8893372414942055, 
     536        -0.8795995893549102, 
     537        -0.8694786750173527, 
     538        -0.8589789084007133, 
     539        -0.8481048644991847, 
     540        -0.8368612813885015, 
     541        -0.8252530581614230, 
     542        -0.8132852527930605, 
     543        -0.8009630799369827, 
     544        -0.7882919086530552, 
     545        -0.7752772600680049, 
     546        -0.7619248049697269, 
     547        -0.7482403613363824, 
     548        -0.7342298918013638, 
     549        -0.7198995010552305, 
     550        -0.7052554331857488, 
     551        -0.6903040689571928, 
     552        -0.6750519230300931, 
     553        -0.6595056411226444, 
     554        -0.6436719971150083, 
     555        -0.6275578900977726, 
     556        -0.6111703413658551, 
     557        -0.5945164913591590, 
     558        -0.5776035965513142, 
     559        -0.5604390262878617, 
     560        -0.5430302595752546, 
     561        -0.5253848818220803, 
     562        -0.5075105815339176, 
     563        -0.4894151469632753, 
     564        -0.4711064627160663, 
     565        -0.4525925063160997, 
     566        -0.4338813447290861, 
     567        -0.4149811308476706, 
     568        -0.3959000999390257, 
     569        -0.3766465660565522, 
     570        -0.3572289184172501, 
     571        -0.3376556177463400, 
     572        -0.3179351925907259, 
     573        -0.2980762356029071, 
     574        -0.2780873997969574, 
     575        -0.2579773947782034, 
     576        -0.2377549829482451, 
     577        -0.2174289756869712, 
     578        -0.1970082295132342, 
     579        -0.1765016422258567, 
     580        -0.1559181490266516, 
     581        -0.1352667186271445, 
     582        -0.1145563493406956, 
     583        -0.0937960651617229, 
     584        -0.0729949118337358, 
     585        -0.0521619529078925, 
     586        -0.0313062657937972, 
     587        -0.0104369378042598, 
     588        0.0104369378042598, 
     589        0.0313062657937972, 
     590        0.0521619529078925, 
     591        0.0729949118337358, 
     592        0.0937960651617229, 
     593        0.1145563493406956, 
     594        0.1352667186271445, 
     595        0.1559181490266516, 
     596        0.1765016422258567, 
     597        0.1970082295132342, 
     598        0.2174289756869712, 
     599        0.2377549829482451, 
     600        0.2579773947782034, 
     601        0.2780873997969574, 
     602        0.2980762356029071, 
     603        0.3179351925907259, 
     604        0.3376556177463400, 
     605        0.3572289184172501, 
     606        0.3766465660565522, 
     607        0.3959000999390257, 
     608        0.4149811308476706, 
     609        0.4338813447290861, 
     610        0.4525925063160997, 
     611        0.4711064627160663, 
     612        0.4894151469632753, 
     613        0.5075105815339176, 
     614        0.5253848818220803, 
     615        0.5430302595752546, 
     616        0.5604390262878617, 
     617        0.5776035965513142, 
     618        0.5945164913591590, 
     619        0.6111703413658551, 
     620        0.6275578900977726, 
     621        0.6436719971150083, 
     622        0.6595056411226444, 
     623        0.6750519230300931, 
     624        0.6903040689571928, 
     625        0.7052554331857488, 
     626        0.7198995010552305, 
     627        0.7342298918013638, 
     628        0.7482403613363824, 
     629        0.7619248049697269, 
     630        0.7752772600680049, 
     631        0.7882919086530552, 
     632        0.8009630799369827, 
     633        0.8132852527930605, 
     634        0.8252530581614230, 
     635        0.8368612813885015, 
     636        0.8481048644991847, 
     637        0.8589789084007133, 
     638        0.8694786750173527, 
     639        0.8795995893549102, 
     640        0.8893372414942055, 
     641        0.8986873885126239, 
     642        0.9076459563329236, 
     643        0.9162090414984952, 
     644        0.9243729128743136, 
     645        0.9321340132728527, 
     646        0.9394889610042837, 
     647        0.9464345513503147, 
     648        0.9529677579610971, 
     649        0.9590857341746905, 
     650        0.9647858142586956, 
     651        0.9700655145738374, 
     652        0.9749225346595943, 
     653        0.9793547582425894, 
     654        0.9833602541697529, 
     655        0.9869372772712794, 
     656        0.9900842691660192, 
     657        0.9927998590434373, 
     658        0.9950828645255290, 
     659        0.9969322929775997, 
     660        0.9983473449340834, 
     661        0.9993274305065947, 
     662        0.9998723404457334 
     663    ]), 
     664    w=np.array([ 
     665        0.0003276086705538, 
     666        0.0007624720924706, 
     667        0.0011976474864367, 
     668        0.0016323569986067, 
     669        0.0020663664924131, 
     670        0.0024994789888943, 
     671        0.0029315036836558, 
     672        0.0033622516236779, 
     673        0.0037915348363451, 
     674        0.0042191661429919, 
     675        0.0046449591497966, 
     676        0.0050687282939456, 
     677        0.0054902889094487, 
     678        0.0059094573005900, 
     679        0.0063260508184704, 
     680        0.0067398879387430, 
     681        0.0071507883396855, 
     682        0.0075585729801782, 
     683        0.0079630641773633, 
     684        0.0083640856838475, 
     685        0.0087614627643580, 
     686        0.0091550222717888, 
     687        0.0095445927225849, 
     688        0.0099300043714212, 
     689        0.0103110892851360, 
     690        0.0106876814158841, 
     691        0.0110596166734735, 
     692        0.0114267329968529, 
     693        0.0117888704247183, 
     694        0.0121458711652067, 
     695        0.0124975796646449, 
     696        0.0128438426753249, 
     697        0.0131845093222756, 
     698        0.0135194311690004, 
     699        0.0138484622795371, 
     700        0.0141714592928592, 
     701        0.0144882814685445, 
     702        0.0147987907597169, 
     703        0.0151028518701744, 
     704        0.0154003323133401, 
     705        0.0156911024699895, 
     706        0.0159750356447283, 
     707        0.0162520081211971, 
     708        0.0165218992159766, 
     709        0.0167845913311726, 
     710        0.0170399700056559, 
     711        0.0172879239649355, 
     712        0.0175283451696437, 
     713        0.0177611288626114, 
     714        0.0179861736145128, 
     715        0.0182033813680609, 
     716        0.0184126574807331, 
     717        0.0186139107660094, 
     718        0.0188070535331042, 
     719        0.0189920016251754, 
     720        0.0191686744559934, 
     721        0.0193369950450545, 
     722        0.0194968900511231, 
     723        0.0196482898041878, 
     724        0.0197911283358190, 
     725        0.0199253434079123, 
     726        0.0200508765398072, 
     727        0.0201676730337687, 
     728        0.0202756819988200, 
     729        0.0203748563729175, 
     730        0.0204651529434560, 
     731        0.0205465323660984, 
     732        0.0206189591819181, 
     733        0.0206824018328499, 
     734        0.0207368326754401, 
     735        0.0207822279928917, 
     736        0.0208185680053983, 
     737        0.0208458368787627, 
     738        0.0208640227312962, 
     739        0.0208731176389954, 
     740        0.0208731176389954, 
     741        0.0208640227312962, 
     742        0.0208458368787627, 
     743        0.0208185680053983, 
     744        0.0207822279928917, 
     745        0.0207368326754401, 
     746        0.0206824018328499, 
     747        0.0206189591819181, 
     748        0.0205465323660984, 
     749        0.0204651529434560, 
     750        0.0203748563729175, 
     751        0.0202756819988200, 
     752        0.0201676730337687, 
     753        0.0200508765398072, 
     754        0.0199253434079123, 
     755        0.0197911283358190, 
     756        0.0196482898041878, 
     757        0.0194968900511231, 
     758        0.0193369950450545, 
     759        0.0191686744559934, 
     760        0.0189920016251754, 
     761        0.0188070535331042, 
     762        0.0186139107660094, 
     763        0.0184126574807331, 
     764        0.0182033813680609, 
     765        0.0179861736145128, 
     766        0.0177611288626114, 
     767        0.0175283451696437, 
     768        0.0172879239649355, 
     769        0.0170399700056559, 
     770        0.0167845913311726, 
     771        0.0165218992159766, 
     772        0.0162520081211971, 
     773        0.0159750356447283, 
     774        0.0156911024699895, 
     775        0.0154003323133401, 
     776        0.0151028518701744, 
     777        0.0147987907597169, 
     778        0.0144882814685445, 
     779        0.0141714592928592, 
     780        0.0138484622795371, 
     781        0.0135194311690004, 
     782        0.0131845093222756, 
     783        0.0128438426753249, 
     784        0.0124975796646449, 
     785        0.0121458711652067, 
     786        0.0117888704247183, 
     787        0.0114267329968529, 
     788        0.0110596166734735, 
     789        0.0106876814158841, 
     790        0.0103110892851360, 
     791        0.0099300043714212, 
     792        0.0095445927225849, 
     793        0.0091550222717888, 
     794        0.0087614627643580, 
     795        0.0083640856838475, 
     796        0.0079630641773633, 
     797        0.0075585729801782, 
     798        0.0071507883396855, 
     799        0.0067398879387430, 
     800        0.0063260508184704, 
     801        0.0059094573005900, 
     802        0.0054902889094487, 
     803        0.0050687282939456, 
     804        0.0046449591497966, 
     805        0.0042191661429919, 
     806        0.0037915348363451, 
     807        0.0033622516236779, 
     808        0.0029315036836558, 
     809        0.0024994789888943, 
     810        0.0020663664924131, 
     811        0.0016323569986067, 
     812        0.0011976474864367, 
     813        0.0007624720924706, 
     814        0.0003276086705538 
     815    ]) 
     816) 
Note: See TracChangeset for help on using the changeset viewer.