Changeset 0a4628d in sasmodels


Ignore:
Timestamp:
Feb 9, 2016 10:47:07 AM (9 years ago)
Author:
wojciech
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
a36c6d3
Parents:
43cb3b8
Message:

Scale and background paramters frozen in line model

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • doc/rst_prolog

    r19dcb933 r0a4628d  
    6060.. |g/cm^3| replace:: g\ |cdot|\ cm\ :sup:`-3` 
    6161.. |fm^2| replace:: fm\ :sup:`2` 
     62.. |Ang*cm^-1| replace:: |Ang|\ |cdot|\ cm\ :sup:`-1` 
  • multi_compare.sh

    r5753e4e r0a4628d  
    1 #!/bin/sh 
     1#!/bin/bash 
    22 
    33sasview=( ../sasview/build/lib.* ) 
  • sasmodels/convert.py

    r3964f92 r0a4628d  
    151151        pars['string_thickness_pd_n'] = 0 
    152152        pars['number_of_pearls_pd_n'] = 0 
     153    elif name == 'line': 
     154        pars['scale'] = 1 
     155        pars['background'] = 0 
    153156    elif name == 'rpa': 
    154157        pars['case_num'] = int(pars['case_num']) 
  • sasmodels/generate.py

    reafc9fa r0a4628d  
    233233    "degrees": "degree", 
    234234    "1/cm": "|cm^-1|", 
     235    "Ang/cm": "|Ang*cm^-1|", 
    235236    "": "None", 
    236237    } 
  • sasmodels/models/line.py

    r43cb3b8 r0a4628d  
    1919""" 
    2020from numpy import inf 
     21from numpy import cos 
     22from numpy import sin 
    2123 
    2224name = "line" 
     
    3335# pylint: disable=bad-whitespace, line-too-long 
    3436#             ["name", "units", default, [lower, upper], "type", "description"], 
    35 parameters = [["intercept",     "cm^-1",        1.0, [-inf, inf], "", "intercept in linear model"], 
    36               ["slope",     "Ang*cm^-1",    1.0, [-inf, inf], "", "slope in linear model"], 
     37parameters = [["intercept",     "1/cm",        1.0, [-inf, inf], "", "intercept in linear model"], 
     38              ["slope",     "Ang/cm",    1.0, [-inf, inf], "", "slope in linear model"], 
    3739              ] 
    3840# pylint: enable=bad-whitespace, line-too-long 
     
    5860    """ 
    5961    #TODO: Instrcution tels 2D has different deffinition than oher models 
    60     #return Iq(sqrt(qx ** 2 + qy ** 2), *args) 
    61     return  Iq(qx, *args)*Iq(qy, *args) 
     62    #Iq(qx*cos(qy), *args)*Iq(qy, *args 
     63    return  Iq(qx*cos(qy), *args)*Iq(qx*sin(qy), *args) 
    6264 
    6365Iqxy.vectorized = True # Iqxy accepts an array of qx, qy values 
    6466 
    65 demo = dict(intercept=1.0, slope=1.0) 
     67demo = dict(scale=1.0, background=0, intercept=1.0, slope=1.0) 
    6668 
    6769oldname = "LineModel" 
    68 oldpars = dict(intercept='A', slope='B', scale=None, background=None) 
     70oldpars = dict(intercept='A', slope='B', background=None, scale=None) 
    6971 
    7072tests = [ 
     
    8082    [{'intercept':   1.0, 
    8183      'slope': 1.0, 
    82      },0.5, 1.5], 
     84     }, 0.5, 1.5], 
    8385 
    8486    [{'intercept':   1.0, 
    8587      'slope': 1.0, 
    86      }, [0.4,0.5], [1.4,1.5]], 
     88     }, [0.4, 0.5], [1.4, 1.5]], 
    8789 
    8890    [{'intercept':   1.0, 
    8991      'slope': 1.0, 
    90      }, [1.3,1.57], [2.3,2.57]], 
     92     }, [1.3, 1.57], [2.3, 2.57]], 
    9193] 
Note: See TracChangeset for help on using the changeset viewer.