Changeset 819 for sans/Dev/trunk


Ignore:
Timestamp:
Jul 19, 2011 6:24:00 PM (12 years ago)
Author:
ajj
Message:
  • Temporary fix to PolyCore_and_NShells to have large enough number of integration steps. This required not using the XOP versions of the function. Fix of XOP will follow once build environments are setup again.
  • Added function to DataSetHandling?.ipf to resort a loaded dataset by Q. GRASP doesn't sort the data when joining data from different distances and this makes fits look odd. Note that function does not resort resolution wave at the moment. This was a quick hack for Hanna Wacklin and Lionel Porcar and a proper fix will be forthcoming.
Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/PolyCore_and_NShells_v40.ipf

    r570 r819  
    33 
    44//////////////////////////////////////////////// 
    5 // 
     5//   AJJ Modified 7/9/11 for H Wacklin - higher numbers of shells need more integration 
     6//   steps. Thus removed reference to XOP versions and made use of Make_N_GaussPoints 
     7// 
     8//   Need to update XOP version and this to properly deal with this requirement. 
     9// 
     10//////////////////////////////////////////////////// 
    611// this function is for the form factor of a  with some 
    712// number of shells around a central core (currently 1-2-3-4) 
     
    284289        Wave cw,yw,xw 
    285290         
    286 #if exists("PolyOneShellX") 
    287         yw = PolyOneShellX(cw,xw) 
    288 #else 
     291//#if exists("PolyOneShellX") 
     292//      yw = PolyOneShellX(cw,xw) 
     293//#else 
    289294        yw = fPolyOneShell(cw,xw) 
    290 #endif 
     295//#endif 
    291296        return(0) 
    292297End 
     
    295300        Wave cw,yw,xw 
    296301         
    297 #if exists("PolyTwoShellX") 
     302//#if exists("PolyTwoShellX") 
    298303        yw = PolyTwoShellX(cw,xw) 
    299 #else 
     304//#else 
    300305        yw = fPolyTwoShell(cw,xw) 
    301 #endif 
     306//#endif 
    302307        return(0) 
    303308End 
     
    306311        Wave cw,yw,xw 
    307312         
    308 #if exists("PolyThreeShellX") 
    309         yw =PolyThreeShellX(cw,xw) 
    310 #else 
     313//#if exists("PolyThreeShellX") 
     314//      yw =PolyThreeShellX(cw,xw) 
     315//#else 
    311316        yw = fPolyThreeShell(cw,xw) 
    312 #endif 
     317//#endif 
    313318        return(0) 
    314319End 
     
    317322        Wave cw,yw,xw 
    318323         
    319 #if exists("PolyFourShellX") 
    320         yw = PolyFourShellX(cw,xw) 
    321 #else 
     324//#if exists("PolyFourShellX") 
     325//      yw = PolyFourShellX(cw,xw) 
     326//#else 
    322327        yw = fPolyFourShell(cw,xw) 
    323 #endif 
     328//#endif 
    324329        return(0) 
    325330End 
     
    353358        NVAR/Z gNord=gNord 
    354359        if(! NVAR_Exists(gNord) ) 
    355                 nord=76         //use 76 pts as default 
     360                nord=120                //use 76 pts as default 
    356361        else 
    357362                if( (gNord == 20) || (gNord ==76) ) 
     
    458463 
    459464        //select number of gauss points by setting nord=20 or76 points 
    460         NVAR/Z gNord=gNord 
    461         if(! NVAR_Exists(gNord) ) 
    462                 nord=76         //use 76 pts as default 
    463         else 
    464                 if( (gNord == 20) || (gNord ==76) ) 
    465                         nord = gNord    // should only allow 20 or 76 points 
    466                 else 
    467                         abort "global value gNord in SchulzSpheres must be either 20 or 76" 
    468                 endif 
    469         endif 
    470          
     465//      NVAR/Z gNord=gNord 
     466//      if(! NVAR_Exists(gNord) ) 
     467                nord=120                //use 76 pts as default 
     468//      else 
     469//              if( (gNord == 20) || (gNord ==76) ) 
     470//                      nord = gNord    // should only allow 20 or 76 points 
     471//              else 
     472//                      abort "global value gNord in SchulzSpheres must be either 20 or 76" 
     473//              endif 
     474//      endif 
     475//       
    471476        weightStr = "gauss"+num2str(nord)+"wt" 
    472477        zStr = "gauss"+num2str(nord)+"z" 
     
    479484                        Make20GaussPoints(gauWt,gauZ) 
    480485                else 
    481                         Make76GaussPoints(gauWt,gauZ) 
     486                        Make_N_GaussPoints(gauWt,gauZ) 
    482487                endif    
    483488        else 
     
    568573 
    569574        //select number of gauss points by setting nord=20 or76 points 
    570         NVAR/Z gNord=gNord 
    571         if(! NVAR_Exists(gNord) ) 
    572                 nord=76         //use 76 pts as default 
    573         else 
    574                 if( (gNord == 20) || (gNord ==76) ) 
    575                         nord = gNord    // should only allow 20 or 76 points 
    576                 else 
    577                         abort "global value gNord in SchulzSpheres must be either 20 or 76" 
    578                 endif 
    579         endif 
     575//      NVAR/Z gNord=gNord 
     576//      if(! NVAR_Exists(gNord) ) 
     577                nord=120                //use 76 pts as default 
     578//      else 
     579//              if( (gNord == 20) || (gNord ==76) ) 
     580//                      nord = gNord    // should only allow 20 or 76 points 
     581//              else 
     582//                      abort "global value gNord in SchulzSpheres must be either 20 or 76" 
     583//              endif 
     584//      endif 
    580585         
    581586        weightStr = "gauss"+num2str(nord)+"wt" 
     
    589594                        Make20GaussPoints(gauWt,gauZ) 
    590595                else 
    591                         Make76GaussPoints(gauWt,gauZ) 
     596                        Make_N_GaussPoints(gauWt,gauZ) 
    592597                endif    
    593598        else 
     
    684689        //select number of gauss points by setting nord=20 or76 points 
    685690        NVAR/Z gNord=gNord 
    686         if(! NVAR_Exists(gNord) ) 
    687                 nord=76         //use 76 pts as default 
    688         else 
    689                 if( (gNord == 20) || (gNord ==76) ) 
    690                         nord = gNord    // should only allow 20 or 76 points 
    691                 else 
    692                         abort "global value gNord in SchulzSpheres must be either 20 or 76" 
    693                 endif 
    694         endif 
     691//      if(! NVAR_Exists(gNord) ) 
     692                nord=120                //use 76 pts as default 
     693//      else 
     694//              if( (gNord == 20) || (gNord ==76) ) 
     695//                      nord = gNord    // should only allow 20 or 76 points 
     696//              else 
     697//                      abort "global value gNord in SchulzSpheres must be either 20 or 76" 
     698//              endif 
     699//      endif 
    695700         
    696701        weightStr = "gauss"+num2str(nord)+"wt" 
     
    704709                        Make20GaussPoints(gauWt,gauZ) 
    705710                else 
    706                         Make76GaussPoints(gauWt,gauZ) 
     711                        Make_N_GaussPoints(gauWt,gauZ) 
    707712                endif    
    708713        else 
  • sans/Dev/trunk/NCNR_User_Procedures/Common/DataSetHandling.ipf

    r770 r819  
    17101710End 
    17111711 
     1712Function ReSortDataSet(set1name) 
     1713        String set1name 
     1714         
     1715        String set1Path = "root:"+set1Name+":" 
     1716        String curPath = GetDataFolder(1) 
     1717 
     1718        SetDataFolder set1Path 
     1719         
     1720        sort $(set1name+"_q"),$(set1name+"_q"),$(set1name+"_i"),$(set1name+"_s") 
     1721         
     1722        SetDataFolder curPath 
     1723 
     1724        return 0 
     1725End 
     1726 
    17121727 
    17131728///////////////////////////Other Utility functions //////////////////////////// 
Note: See TracChangeset for help on using the changeset viewer.