Changeset 037aa3d in sasmodels


Ignore:
Timestamp:
Nov 2, 2016 3:33:30 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
fa6d6fc
Parents:
e85aa2e
Message:

implement forward conversion for core-shell ellipsoid, non XT model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/convert.py

    re85aa2e r037aa3d  
    162162        oldpars['rimC.width'] = 0.0 
    163163    elif name == 'core_shell_ellipsoid:1': 
     164        # Reverse translation (from new to old), from core_shell_ellipsoid.c 
     165        #    equat_shell = equat_core + thick_shell 
     166        #    polar_core = equat_core * x_core 
     167        #    polar_shell = equat_core * x_core + thick_shell*x_polar_shell 
     168        # Forward translation (from old to new), inverting reverse translation: 
     169        #    thick_shell = equat_shell - equat_core 
     170        #    x_core = polar_core / equat_core 
     171        #    x_polar_shell = (polar_shell - polar_core)/(equat_shell - equat_core) 
     172        # Auto translation (old <=> new) happens after hand_convert 
     173        #    equat_shell <=> thick_shell 
     174        #    polar_core <=> x_core 
     175        #    polar_shell <=> x_polar_shell 
     176        # So... 
     177        equat_core, equat_shell = oldpars['equat_core'], oldpars['equat_shell'] 
     178        polar_core, polar_shell = oldpars['polar_core'], oldpars['polar_shell'] 
     179        oldpars['equat_shell'] = equat_shell - equat_core 
     180        oldpars['polar_core'] = polar_core / equat_core 
     181        oldpars['polar_shell'] = (polar_shell-polar_core)/(equat_shell-equat_core) 
    164182    elif name == 'hollow_cylinder': 
    165183        # now uses radius and thickness 
Note: See TracChangeset for help on using the changeset viewer.