Changes in sasmodels/modelinfo.py [bd547d0:d321747] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/modelinfo.py
rbd547d0 rd321747 466 466 self.is_asymmetric = any(p.name == 'psi' for p in self.kernel_parameters) 467 467 self.magnetism_index = [k for k, p in enumerate(self.call_parameters) 468 if p.id. endswith('_M0')]468 if p.id.startswith('M0:')] 469 469 470 470 self.pd_1d = set(p.name for p in self.call_parameters … … 586 586 if self.nmagnetic > 0: 587 587 full_list.extend([ 588 Parameter('up _frac_i', '', 0., [0., 1.],588 Parameter('up:frac_i', '', 0., [0., 1.], 589 589 'magnetic', 'fraction of spin up incident'), 590 Parameter('up _frac_f', '', 0., [0., 1.],590 Parameter('up:frac_f', '', 0., [0., 1.], 591 591 'magnetic', 'fraction of spin up final'), 592 Parameter('up _angle', 'degrees', 0., [0., 360.],592 Parameter('up:angle', 'degrees', 0., [0., 360.], 593 593 'magnetic', 'spin up angle'), 594 594 ]) … … 596 596 for p in slds: 597 597 full_list.extend([ 598 Parameter( p.id+'_M0', '1e-6/Ang^2', 0., [-np.inf, np.inf],598 Parameter('M0:'+p.id, '1e-6/Ang^2', 0., [-np.inf, np.inf], 599 599 'magnetic', 'magnetic amplitude for '+p.description), 600 Parameter( p.id+'_mtheta', 'degrees', 0., [-90., 90.],600 Parameter('mtheta:'+p.id, 'degrees', 0., [-90., 90.], 601 601 'magnetic', 'magnetic latitude for '+p.description), 602 Parameter( p.id+'_mphi', 'degrees', 0., [-180., 180.],602 Parameter('mphi:'+p.id, 'degrees', 0., [-180., 180.], 603 603 'magnetic', 'magnetic longitude for '+p.description), 604 604 ]) … … 640 640 641 641 Parameters marked as sld will automatically have a set of associated 642 magnetic parameters ( p_M0, p_mtheta, p_mphi), as well as polarization643 information (up _theta, up_frac_i, up_frac_f).642 magnetic parameters (m0:p, mtheta:p, mphi:p), as well as polarization 643 information (up:theta, up:frac_i, up:frac_f). 644 644 """ 645 645 # control parameters go first … … 668 668 result.append(expanded_pars[name]) 669 669 if is2d: 670 for tag in ' _M0', '_mtheta', '_mphi':671 if name+tagin expanded_pars:672 result.append(expanded_pars[ name+tag])670 for tag in 'M0:', 'mtheta:', 'mphi:': 671 if tag+name in expanded_pars: 672 result.append(expanded_pars[tag+name]) 673 673 674 674 # Gather the user parameters in order … … 703 703 append_group(p.id) 704 704 705 if is2d and 'up _angle' in expanded_pars:705 if is2d and 'up:angle' in expanded_pars: 706 706 result.extend([ 707 expanded_pars['up _frac_i'],708 expanded_pars['up _frac_f'],709 expanded_pars['up _angle'],707 expanded_pars['up:frac_i'], 708 expanded_pars['up:frac_f'], 709 expanded_pars['up:angle'], 710 710 ]) 711 711 … … 1016 1016 for k in range(control+1, p.length+1) 1017 1017 if p.length > 1) 1018 for p in self.parameters.kernel_parameters:1019 if p.length > 1 and p.type == "sld":1020 for k in range(control+1, p.length+1):1021 base = p.id+str(k)1022 hidden.update((base+"_M0", base+"_mtheta", base+"_mphi"))1023 1018 return hidden
Note: See TracChangeset
for help on using the changeset viewer.