Changeset 934 for sans/Dev/trunk/NCNR_User_Procedures

Ignore:
Timestamp:
Mar 27, 2014 4:22:59 PM (9 years ago)
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

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

 r926 // // This is for when an anisotropic 2D result is desired // This is for when an anisotropic 2D result is desired. That is, you have a sample that is // oriented in the beam, and then the detection plane matters. If you have any other structure that // is orientationally averaged, use the Isotropic calculation (say, if you have a dispersion of cylinders, // you only need to draw one, and do the isotropic average) // // these steps calculate the slit-smeared USANS from the FFT //// this is for when an isotropic 2D result is desired // // This is for when an ISOTROPIC 2D result is desired. If you have a structure that // is orientationally averaged, use this Isotropic calculation (say, if you have a dispersion of cylinders, // you only need to draw one, and do the isotropic average). If you have a sample that is // oriented in the beam, and then the detection plane matters, and use the ANISOTROPIC calculation. // // FIRST -- do the FFT - this calculates the 1D averaged result // SECOND -- get the 2D slice. this sets up a 2D matrix appropriately scaled to the q-space. // --then to plot -- DisplayFFT_to2DAverage() // // // finally, you can use the 2D result to either interpolate to a real 2D range, or more useful, convert // the 2D results to a USANS result. Then the case of an oddly shaped object can be converted to USANS. Previously FFT_Get2DSlice("") // now get the isotropically averaged I(Q) = iBin Duplicate/O avg2d logAvg2d logAvg2d = log(avg2d) ModifyGraph btLen=3 ModifyGraph tlOffset=-2 SetAxis/A/R left //              SetAxis/A/R left endif End ModifyGraph btLen=3 ModifyGraph tlOffset=-2 SetAxis/A/R left //              SetAxis/A/R left endif ModifyGraph btLen=3 ModifyGraph tlOffset=-2 SetAxis/A/R left endif End //              SetAxis/A/R left endif End
• sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_Cubes_Includes.ipf

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

 r926 Button FFTButton_15,pos={209,430},size={90,20},proc=Interp2DSliceButton,title="Interp 2D" Button FFTButton_16,pos={14,460},size={70,20},proc=FFTHelpButton,title="Help" Button FFTButton_17,pos={13,400},size={120,20},proc=FFT_Iso2USANS,title="Iso to USANS" Button FFTButton_18,pos={13,430},size={120,20},proc=FFT_Aniso2USANS,title="Aniso to USANS" EndMacro ModifyGraph btLen=3 ModifyGraph tlOffset=-2 SetAxis/A/R left //      SetAxis/A/R left End ModifyGraph btLen=3 ModifyGraph tlOffset=-2 SetAxis/A/R left //      SetAxis/A/R left End ModifyGraph btLen=3 ModifyGraph tlOffset=-2 SetAxis/A/R left //      SetAxis/A/R left End Proc Slice2_1D() // FFTButton_8a = Debye = _full // FFTButton_14a = SLD = _SLD // 17 = iso USANS // 18 = Anisotropic USANS // strswitch(ctrlName) case "FFTButton_4": endif break case "FFTButton_14a": if(!isTraceOnGraph("ival_SLD","FFT_IQ") && exists("ival_SLD")==1)               //only append if it's not already there AppendToGraph /W=FFT_IQ ival_SLD vs qval_SLD ModifyGraph mode=4,marker=19,msize=2,rgb(ival_SLD)=(2,39321,1) endif break case "FFTButton_17": if(!isTraceOnGraph("FFT_iUSANS_i","FFT_IQ") && exists("FFT_iUSANS_i")==1)               //only append if it's not already there AppendToGraph /W=FFT_IQ FFT_iUSANS_i vs FFT_iUSANS_q ModifyGraph mode=4,marker=19,msize=2,rgb(FFT_iUSANS_i)=(39321,1,31457) endif break case "FFTButton_18": if(!isTraceOnGraph("FFT_aUSANS_i","FFT_IQ") && exists("FFT_aUSANS_i")==1)               //only append if it's not already there AppendToGraph /W=FFT_IQ FFT_aUSANS_i vs FFT_aUSANS_q ModifyGraph mode=4,marker=19,msize=2,rgb(FFT_aUSANS_i)=(52428,34958,1) endif break endswitch End Function FFT_Iso2USANS(ctrlName) : ButtonControl String ctrlName Execute "Isotropic_FFT_to_USANS()" FFT_PlotResultsButtonProc(ctrlName) End Function FFT_Aniso2USANS(ctrlName) : ButtonControl String ctrlName Execute "Anisotropic_FFT_to_USANS()" FFT_PlotResultsButtonProc(ctrlName) End // do the rotation as a matrix multiplication // putting zero is no rotation around that axis // the triplet wave "trip" is overwritten with the output DoRotation(trip,angleX,angleY,angleZ) Wave rotated=root:rotated //      Wave rotated=root:rotated // translate back to a 0->N based coordinate fTranslateCoordinate(rotated,-dist) //      fTranslateCoordinate(rotated,-dist) fTranslateCoordinate(trip,-dist) Wave values=root:values // convert the triplet back to a volume // this CLIPS anything that has rotated out of the NxNxN volume fXYZTripletToVolume(rotated,values,"rotVol",FFT_N) //      fXYZTripletToVolume(rotated,values,"rotVol",FFT_N) fXYZTripletToVolume(trip,values,"rotVol",FFT_N) // clean up by killng the extra waves that were generated MatrixOp/O rotated = Rx x Ry x Rz x triplet //      MatrixOp/O rotated = Rx x Ry x Rz x triplet MatrixOp/O triplet = Rx x Ry x Rz x triplet return(0) end Variable dist MatrixOp/O trip = trip - dist //      MatrixOp/O trip = trip - dist trip = trip - dist return(0)
• sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/EventModeProcessing.ipf

 r923 // // // -- the slice display "fails" for data sets that have 3 or 4 slices, as the ModifyImage command // X- the slice display "fails" for data sets that have 3 or 4 slices, as the ModifyImage command //     interprets the data as being RGB - and so does nothing. //     need to find a way around this //     need to find a way around this. This was fixed by displaying the data using the G=1 flag on AppendImage //     to prevent the "atuo-detection" of data as RGB // // -- Do something with the PP events. Currently, only the PP events that are XY (just the Display/W=(10,170,460,610)/HOST=# AppendImage/T :Packages:NIST:Event:dispsliceData AppendImage/T/G=1 :Packages:NIST:Event:dispsliceData            //  /G=1 flag prevents interpretation as RGB so 3, 4 slices display correctly ModifyImage dispsliceData ctab= {*,*,ColdWarm,0} ModifyImage dispsliceData ctabAutoscale=3 // TODO // TODO (DONE) // this "fails" for data sets that have 3 or 4 slices, as the ModifyImage command // interprets the data as being RGB - and so does nothing. // need to find a way around this // ////  When first plotted, AppendImage/G=1 flag prevents interpretation as RGB so 3, 4 slices display correctly /// // 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.