Changes between Version 25 and Version 26 of ModelConvInst
- Timestamp:
- Dec 21, 2015 1:35:35 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModelConvInst
v25 v26 68 68 - Iq.vectorized = True or False. This is used to tag the definition as accepting a Q vector, or having to compute each Q individually. 69 69 - use functions from numpy rather than math 70 - don't use if statements. Instead do tricks like "a = x*(q>0) + y*(q<=0)" which sets a to x if q is positive or y if q is zero 70 - don't use if statements. Instead do tricks like "a = x*(q>0) + y*(q<=0)" which sets a to x if q is positive or y if q is zero or negative 71 - return np.NaN if the parameters are not valid (e.g., cap_radius < radius for barbell) 71 72 - def Iqxy. If this model does not have an oriented form just set it equal to the square root of the sum of Iq(x) squared and Iq(y) squared. 72 73 - [https://github.com/SasView/sasview/tree/master/src/sas/models src/sas/models] contains the pure python models, mixed together with the python + C models. … … 81 82 }}} 82 83 - the c file must contain the form_volume, Iq, Iqxy methods. These and any other functions defined (e.g. the _cyl() helper function) must be defined as doubles in the first lines of the file. 84 - return NAN if the parameters are not valid (e.g., cap_radius < radius for barbell) 83 85 - ''NOTE: for certain models, such as those that can be multiplied by a structure factor, the ER attribute should be set to the Equivalent Radius (of a sphere).'' 84 86 - ''NOTE: for certain models, namely core-shell type models, the VR attribute returns the volume ratio for the core-shell.''