Changeset c036ddb in sasmodels for sasmodels/modelinfo.py


Ignore:
Timestamp:
Aug 7, 2018 10:45:45 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
7e923c2
Parents:
7b0abf8
Message:

refactor so Iq is not needed if Fq is defined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/modelinfo.py

    r01c8d9e rc036ddb  
    417417    # scale and background are implicit parameters 
    418418    COMMON = [Parameter(*p) for p in COMMON_PARAMETERS] 
     419 
    419420    def __init__(self, parameters): 
    420421        # type: (List[Parameter]) -> None 
     
    440441        self.form_volume_parameters = [p for p in self.kernel_parameters 
    441442                                       if p.type == 'volume'] 
     443 
    442444        # Theta offset 
    443445        offset = 0 
     
    786788    info.category = getattr(kernel_module, 'category', None) 
    787789    info.structure_factor = getattr(kernel_module, 'structure_factor', False) 
     790    # TODO: find Fq by inspection 
     791    info.have_Fq = getattr(kernel_module, 'have_Fq', False) 
    788792    info.profile_axes = getattr(kernel_module, 'profile_axes', ['x', 'y']) 
    789793    info.source = getattr(kernel_module, 'source', []) 
     
    909913    #: provided in the file. 
    910914    structure_factor = None # type: bool 
     915    #: True if the model defines an Fq function with signature 
     916    #: void Fq(double q, double *F1, double *F2, ...) 
     917    have_Fq = False 
    911918    #: List of C source files used to define the model.  The source files 
    912919    #: should define the *Iq* function, and possibly *Iqac* or *Iqabc* if the 
Note: See TracChangeset for help on using the changeset viewer.