Ignore:
Timestamp:
Mar 27, 2014 4:22:59 PM (9 years ago)
Author:
srkline
Message:

Updated help files with information about FFT to USANS

Updated FFT routines and menu to include FFT to USANS routines and help

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_Cubes.ipf

    r926 r934  
    583583 
    584584// 
    585 // This is for when an anisotropic 2D result is desired 
     585// This is for when an anisotropic 2D result is desired. That is, you have a sample that is 
     586// oriented in the beam, and then the detection plane matters. If you have any other structure that 
     587// is orientationally averaged, use the Isotropic calculation (say, if you have a dispersion of cylinders, 
     588// you only need to draw one, and do the isotropic average) 
    586589// 
    587590// these steps calculate the slit-smeared USANS from the FFT 
     
    659662//// this is for when an isotropic 2D result is desired 
    660663// 
     664// This is for when an ISOTROPIC 2D result is desired. If you have a structure that 
     665// is orientationally averaged, use this Isotropic calculation (say, if you have a dispersion of cylinders, 
     666// you only need to draw one, and do the isotropic average). If you have a sample that is 
     667// oriented in the beam, and then the detection plane matters, and use the ANISOTROPIC calculation. 
     668// 
    661669// FIRST -- do the FFT - this calculates the 1D averaged result 
    662670// SECOND -- get the 2D slice. this sets up a 2D matrix appropriately scaled to the q-space. 
     
    671679// --then to plot -- DisplayFFT_to2DAverage() 
    672680// 
    673 // 
    674681// finally, you can use the 2D result to either interpolate to a real 2D range, or more useful, convert 
    675682// the 2D results to a USANS result. Then the case of an oddly shaped object can be converted to USANS. Previously 
     
    707714        FFT_Get2DSlice("") 
    708715 
    709  
    710          
    711716// now get the isotropically averaged I(Q) = iBin        
    712717 
     
    732737        Duplicate/O avg2d logAvg2d 
    733738        logAvg2d = log(avg2d) 
    734  
    735          
    736739 
    737740         
     
    795798                ModifyGraph btLen=3 
    796799                ModifyGraph tlOffset=-2 
    797                 SetAxis/A/R left 
     800//              SetAxis/A/R left 
    798801        endif 
    799802End 
     
    817820                ModifyGraph btLen=3 
    818821                ModifyGraph tlOffset=-2 
    819                 SetAxis/A/R left 
     822//              SetAxis/A/R left 
    820823        endif 
    821824         
     
    835838                ModifyGraph btLen=3 
    836839                ModifyGraph tlOffset=-2 
    837                 SetAxis/A/R left 
    838         endif 
    839          
    840 End 
     840//              SetAxis/A/R left 
     841        endif 
     842         
     843End 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_Cubes_Includes.ipf

    r925 r934  
    4040                "Put X-axis Cylinders Hexagonal Grid",PutXAxisCylindersHexagonal() 
    4141                "Core-shell Cylinders Hex Grid",PutXAxisCoreShellCyl_HexGrid() 
    42                 "-" 
    43                 "Anisotropic_FFT_to_USANS" 
    44                 "Isotropic_FFT_to_USANS" 
     42//              "-" 
     43//              "Anisotropic_FFT_to_USANS" 
     44//              "Isotropic_FFT_to_USANS" 
    4545        end 
    4646        Submenu "Matrix Viewing" 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_Panel.ipf

    r926 r934  
    115115        Button FFTButton_15,pos={209,430},size={90,20},proc=Interp2DSliceButton,title="Interp 2D" 
    116116        Button FFTButton_16,pos={14,460},size={70,20},proc=FFTHelpButton,title="Help" 
     117         
     118        Button FFTButton_17,pos={13,400},size={120,20},proc=FFT_Iso2USANS,title="Iso to USANS" 
     119        Button FFTButton_18,pos={13,430},size={120,20},proc=FFT_Aniso2USANS,title="Aniso to USANS" 
     120 
    117121EndMacro 
    118122 
     
    453457        ModifyGraph btLen=3 
    454458        ModifyGraph tlOffset=-2 
    455         SetAxis/A/R left 
     459//      SetAxis/A/R left 
    456460End 
    457461 
     
    471475        ModifyGraph btLen=3 
    472476        ModifyGraph tlOffset=-2 
    473         SetAxis/A/R left 
     477//      SetAxis/A/R left 
    474478End 
    475479 
     
    489493        ModifyGraph btLen=3 
    490494        ModifyGraph tlOffset=-2 
    491         SetAxis/A/R left 
     495//      SetAxis/A/R left 
    492496End 
    493497Proc Slice2_1D() 
     
    735739        // FFTButton_8a = Debye = _full 
    736740        // FFTButton_14a = SLD = _SLD 
     741        // 17 = iso USANS 
     742        // 18 = Anisotropic USANS 
     743        // 
    737744        strswitch(ctrlName)      
    738745                case "FFTButton_4": 
     
    760767                        endif            
    761768                        break 
     769                case "FFTButton_14a": 
     770                        if(!isTraceOnGraph("ival_SLD","FFT_IQ") && exists("ival_SLD")==1)               //only append if it's not already there 
     771                                AppendToGraph /W=FFT_IQ ival_SLD vs qval_SLD 
     772                                ModifyGraph mode=4,marker=19,msize=2,rgb(ival_SLD)=(2,39321,1) 
     773                        endif            
     774                        break 
     775                case "FFTButton_17": 
     776                        if(!isTraceOnGraph("FFT_iUSANS_i","FFT_IQ") && exists("FFT_iUSANS_i")==1)               //only append if it's not already there 
     777                                AppendToGraph /W=FFT_IQ FFT_iUSANS_i vs FFT_iUSANS_q 
     778                                ModifyGraph mode=4,marker=19,msize=2,rgb(FFT_iUSANS_i)=(39321,1,31457) 
     779                        endif            
     780                        break 
     781                case "FFTButton_18": 
     782                        if(!isTraceOnGraph("FFT_aUSANS_i","FFT_IQ") && exists("FFT_aUSANS_i")==1)               //only append if it's not already there 
     783                                AppendToGraph /W=FFT_IQ FFT_aUSANS_i vs FFT_aUSANS_q 
     784                                ModifyGraph mode=4,marker=19,msize=2,rgb(FFT_aUSANS_i)=(52428,34958,1) 
     785                        endif            
     786                        break 
     787                         
     788                         
    762789        endswitch 
    763790         
     
    823850End 
    824851 
     852Function FFT_Iso2USANS(ctrlName) : ButtonControl 
     853        String ctrlName 
     854 
     855        Execute "Isotropic_FFT_to_USANS()" 
     856        FFT_PlotResultsButtonProc(ctrlName) 
     857End 
     858 
     859Function FFT_Aniso2USANS(ctrlName) : ButtonControl 
     860        String ctrlName 
     861 
     862        Execute "Anisotropic_FFT_to_USANS()" 
     863        FFT_PlotResultsButtonProc(ctrlName) 
     864End 
    825865 
    826866 
     
    10771117// do the rotation as a matrix multiplication    
    10781118// putting zero is no rotation around that axis 
     1119// the triplet wave "trip" is overwritten with the output 
    10791120        DoRotation(trip,angleX,angleY,angleZ) 
    1080         Wave rotated=root:rotated 
     1121//      Wave rotated=root:rotated 
    10811122 
    10821123// translate back to a 0->N based coordinate 
    1083         fTranslateCoordinate(rotated,-dist) 
     1124//      fTranslateCoordinate(rotated,-dist) 
     1125        fTranslateCoordinate(trip,-dist) 
    10841126        Wave values=root:values 
    10851127 
    10861128// convert the triplet back to a volume 
    10871129// this CLIPS anything that has rotated out of the NxNxN volume 
    1088         fXYZTripletToVolume(rotated,values,"rotVol",FFT_N) 
     1130//      fXYZTripletToVolume(rotated,values,"rotVol",FFT_N) 
     1131        fXYZTripletToVolume(trip,values,"rotVol",FFT_N) 
    10891132 
    10901133// clean up by killng the extra waves that were generated 
     
    12241267         
    12251268         
    1226         MatrixOp/O rotated = Rx x Ry x Rz x triplet 
    1227          
    1228          
     1269//      MatrixOp/O rotated = Rx x Ry x Rz x triplet 
     1270        MatrixOp/O triplet = Rx x Ry x Rz x triplet 
     1271         
     1272 
    12291273        return(0) 
    12301274end 
     
    12371281        Variable dist 
    12381282         
    1239         MatrixOp/O trip = trip - dist 
     1283//      MatrixOp/O trip = trip - dist 
     1284        trip = trip - dist 
    12401285         
    12411286        return(0) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/EventModeProcessing.ipf

    r923 r934  
    2626// 
    2727// 
    28 // -- the slice display "fails" for data sets that have 3 or 4 slices, as the ModifyImage command 
     28// X- the slice display "fails" for data sets that have 3 or 4 slices, as the ModifyImage command 
    2929//     interprets the data as being RGB - and so does nothing. 
    30 //     need to find a way around this 
     30//     need to find a way around this. This was fixed by displaying the data using the G=1 flag on AppendImage 
     31//     to prevent the "atuo-detection" of data as RGB 
    3132// 
    3233// -- Do something with the PP events. Currently, only the PP events that are XY (just the 
     
    274275         
    275276        Display/W=(10,170,460,610)/HOST=#  
    276         AppendImage/T :Packages:NIST:Event:dispsliceData 
     277        AppendImage/T/G=1 :Packages:NIST:Event:dispsliceData            //  /G=1 flag prevents interpretation as RGB so 3, 4 slices display correctly 
    277278        ModifyImage dispsliceData ctab= {*,*,ColdWarm,0} 
    278279        ModifyImage dispsliceData ctabAutoscale=3 
     
    11301131 
    11311132 
    1132 // TODO 
     1133// TODO (DONE) 
    11331134// this "fails" for data sets that have 3 or 4 slices, as the ModifyImage command 
    11341135// interprets the data as being RGB - and so does nothing. 
    11351136// need to find a way around this 
     1137// 
     1138////  When first plotted, AppendImage/G=1 flag prevents interpretation as RGB so 3, 4 slices display correctly 
    11361139/// 
    11371140// I could modify this procedure to use the log = 0|1 keyword for the log Z display 
Note: See TracChangeset for help on using the changeset viewer.