Changeset 1079 for sans/Dev/trunk
- Timestamp:
- Jan 9, 2018 10:02:45 AM (5 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf
r1078 r1079 363 363 //TODO: be sure that this works correctly and can be included in either 364 364 // a VSANS reduction experiment, or a standalone analysis package 365 #if (exists("NCNR_VSANS")==6) //defined in the main #includes file. 366 DoAlert 0,"**Treating data as VSANS data**" 367 Duplicate/O $w3,$(baseStr+"_dQv") //save a copy for VSANS 368 $(baseStr+"_dQv") = -$(baseStr+"_dQv") 369 V_USANS_CalcWeights(baseStr,dQv) 370 #else 371 DoAlert 0,"Treating data as USANS (normal slit-smeared data)" 372 USANS_CalcWeights(baseStr,dQv) 373 #endif 365 // -- since this is a Proc, not a function, #conditional compile does not work, 366 // but, since it's a Proc, it is not compiled, so missing functions aren't flagged as a compile error 367 if (exists("NCNR_VSANS")==6) //defined in the main VSANS #includes file. 368 DoAlert 0,"**Treating data as VSANS data**" 369 Duplicate/O $w3,$(baseStr+"_dQv") //save a copy for VSANS 370 $(baseStr+"_dQv") = -$(baseStr+"_dQv") 371 V_USANS_CalcWeights(baseStr,dQv) 372 else 373 DoAlert 0,"Treating data as USANS (normal slit-smeared data)" 374 USANS_CalcWeights(baseStr,dQv) 375 endif 374 376 375 377 … … 1344 1346 list = RemoveFromList("DoAnnulusGraph;DoArcGraph;",list,";") 1345 1347 1348 // from 2017-2018 VSANS reduction 1349 list = RemoveFromList("V_BroadPeak_Pix2D;V_BroadPeak_Pix2D_noThread;V_CleanupTimes;V_I_BroadPeak_Pix2D;V_IndexForHistogram;V_MakeFibonacciWave;V_UpdatePix2Mat;xJointHistogram;",list,";") 1346 1350 1347 1351 list = SortList(list) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_BroadPeak_Pix_2D.ipf
r1043 r1079 73 73 // this sets the x and y waves of the triplet to be the pixel numbers 74 74 // 75 // TODO:75 // 76 76 // -- this will need to be changed if I want to fit based on real-space mm 77 77 // … … 223 223 224 224 // ASSUMPTION 225 // TODO (change this)225 // 226 226 // base the scaling on the xSize 227 227 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Combine_1D.ipf
r1074 r1079 461 461 endif 462 462 if(strlen(detListStr)==0) 463 DoAlert 0,"error in V_SaveTrimmed_Button" 463 464 return(0) 464 465 endif … … 696 697 697 698 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 //////////////// Below is unused -- it was started, but seems like the wrong approach,718 //////////////// so I have abandoned it for now719 //720 //721 // ((this approach using USANS ideas has temporarily been abandoned...))722 //723 // Preliminary routines for adjusting, masking, and combining 1D VSANS data sets.724 //725 // ideas taken from USANS to mask data sets726 // avoiding duplication of NSORT, since autoscale is not in favor, and there may be anywhere727 // from 3 to 9 data sets to combine728 //729 // masking waves are saved in the "Combine_1D" folder, BUT the masking may eventually be part730 // of the data reduction protocol - and anything in work folders will be lost731 //732 733 734 ////////////////735 // TODO:736 // x- add a popup to the load tab to set the work folder737 // x- add this file to the Includes list and to the SVN folder738 // -- add button (mask tab) to save mask739 // -- add button (mask tab) to recall mask740 // -- think of ways to run through the files batchwise (instead of adding this to the protocol)741 // -- link the main entry procedure to the main panel742 //743 // -- when do I concatenate the data sets?744 // ---- do I add a concatenate button to the Load tab, then this single set is the745 // starting point for the MASK tab746 // ---- the Load Data button could then be a loader for a single file, which is then the "concatenated"747 // starting point...748 //749 // x- make the graph larger for easier viewing of the data750 // -- increase the size of the tab control, rearrange the other controls751 //752 // -- how do I incorporate the rescaling?753 //754 // -- error bars on the graph755 // x- legend on the graph756 //757 // x- define a new folder for all of this -- NOT the protocol folder758 // x- define a string constant with this path759 //760 // -- button to mask based on relative error threshold for each data point. may be a good startng point for761 // masking762 //763 // -- remove the mask by relative error button - this is not really a good idea.764 //765 //766 //767 //768 //StrConstant ksCombine1DFolder = "root:Packages:NIST:VSANS:Globals:Combine_1D"769 //770 //// main entry routine771 //Proc V_Combine_1D()772 //773 // //check for the correct folder, initialize if necessary774 // //775 // if(DataFolderExists(ksCombine1DFolder) == 0)776 // Execute "V_Init_Combine_1D()"777 // endif778 //779 // SetDataFolder root:780 //781 // DoWindow/F V_Combine_1D_Graph782 // if(V_flag==0)783 // Execute "V_Combine_1D_Graph()"784 // endif785 //End786 //787 //Proc V_Init_Combine_1D()788 //789 // //set up the folder(s) needed790 // NewDataFolder/O $(ksCombine1DFolder)791 //792 // SetDataFolder $(ksCombine1DFolder)793 //794 // String/G gCurFile=""795 // String/G gStr1=""796 // Variable/G gFreshMask=1797 // Variable/G gNq=0798 //799 // SetDataFolder root:800 //End801 //802 //803 //////804 ////805 ////806 //Proc V_Combine_1D_Graph()807 //808 // PauseUpdate; Silent 1 // building window...809 // Display /W=(699,45,1328,779) /K=1810 // ModifyGraph cbRGB=(51664,44236,58982)811 // ModifyGraph tickUnit=1812 // DoWindow/C V_Combine_1D_Graph813 // ControlBar 160814 // // break into tabs815 // TabControl C1D_Tab,pos={5,3},size={392,128},proc=C1D_TabProc816 // TabControl C1D_Tab,labelBack=(49151,49152,65535),tabLabel(0)="Load"817 // TabControl C1D_Tab,tabLabel(1)="Mask",tabLabel(2)="Rescale",value=0818 //819 // //always visible - revert and save820 // //maybe the wrong place here?821 // Button C1DControlA,pos={225,135},size={80,20},proc=C1D_RevertButtonProc,title="Revert"822 // Button C1DControlA,help={"Revert the data to its original state and start over"}823 // Button C1DControlB,pos={325,135},size={50,20},proc=C1D_SaveButtonProc,title="Save"824 // Button C1DControlB,help={"Save the masked and scaled data set"}825 // Button C1DControlC,pos={25,135},size={50,20},proc=C1D_HelpButtonProc,title="Help"826 // Button C1DControlC,help={"Show the help file for combining VSANS data sets"}827 //828 // // add the controls to each tab ---- all names start with "C1DControl_"829 //830 // //tab(0) Load - initially visible831 // Button C1DControl_0a,pos={23,39},size={80,20},proc=C1D_LoadButtonProc,title="Load Data"832 // Button C1DControl_0a,help={"Load slit-smeared USANS data = \".cor\" files"}833 // CheckBox C1DControl_0b,pos={26,74},size={80,14},proc=C1D_LoadCheckProc,title="Log Axes?"834 // CheckBox C1DControl_0b,help={"Toggle Log/Lin Q display"},value= 1835 // TitleBox C1DControl_0c,pos={120,37},size={104,19},font="Courier",fSize=10836 // TitleBox C1DControl_0c,variable= $(ksCombine1DFolder+":gStr1")837 // PopupMenu C1DControl_0d,pos={120,75},size={71,20},title="Bin Type"838 // PopupMenu C1DControl_0d,help={"This popup selects how the y-axis will be linearized based on the chosen data"}839 // PopupMenu C1DControl_0d,value= ksBinTypeStr840 // PopupMenu C1DControl_0d,mode=1,proc=V_CombineModePopup841 // PopupMenu C1DControl_0e,pos={120,100},size={109,20},title="Data Source"842 // PopupMenu C1DControl_0e,mode=1,popvalue="RAW",value= #"\"RAW;SAM;EMP;BGD;COR;ABS;\""843 // Button C1DControl_0f,pos={200,39},size={120,20},proc=C1D_ConcatButtonProc,title="Concatenate"844 // Button C1DControl_0f,help={"Load slit-smeared USANS data = \".cor\" files"}845 //846 //847 // //tab(1) Mask848 // Button C1DControl_1a,pos={20,35},size={90,20},proc=C1D_MyMaskProc,title="Mask Point" //bMask849 // Button C1DControl_1a,help={"Toggles the masking of the selected data point"}850 // Button C1DControl_1a,disable=1851 // Button C1DControl_1b,pos={20,65},size={140,20},proc=C1D_MaskGTCursor,title="Mask Q >= Cursor" //bMask852 // Button C1DControl_1b,help={"Toggles the masking of all q-values GREATER than the current cursor location"}853 // Button C1DControl_1b,disable=1854 // Button C1DControl_1c,pos={20,95},size={140,20},proc=C1D_MaskLTCursor,title="Mask Q <= Cursor" //bMask855 // Button C1DControl_1c,help={"Toggles the masking of all q-values LESS than the current cursor location"}856 // Button C1DControl_1c,disable=1857 // Button C1DControl_1d,pos={180,35},size={90,20},proc=C1D_ClearMaskProc,title="Clear Mask" //bMask858 // Button C1DControl_1d,help={"Clears all mask points"}859 // Button C1DControl_1d,disable=1860 // Button C1DControl_1e,pos={180,65},size={90,20},proc=C1D_MaskPercent,title="Percent Mask" //bMask861 // Button C1DControl_1e,help={"Clears all mask points"}862 // Button C1DControl_1e,disable=1863 //864 //865 //// Button C1DControl_1b,pos={144,66},size={110,20},proc=C1D_MaskDoneButton,title="Done Masking"866 //// Button C1DControl_1b,disable=1867 //868 //// //tab(2) Rescale869 // Button C1DControl_2a,pos={31,42},size={90,20},proc=C1D_ExtrapolateButtonProc,title="Extrapolate"870 // Button C1DControl_2a,help={"Extrapolate the high-q region with a power-law"}871 // Button C1DControl_2a,disable=1872 // SetVariable C1DControl_2b,pos={31,70},size={100,15},title="# of points"873 // SetVariable C1DControl_2b,help={"Set the number of points for the power-law extrapolation"}874 // SetVariable C1DControl_2b,limits={5,100,1},value=_NUM:123875 // SetVariable C1DControl_2b,disable=1876 // CheckBox C1DControl_2c,pos={157,45},size={105,14},proc=C1D_ExtrapolationCheckProc,title="Show Extrapolation"877 // CheckBox C1DControl_2c,help={"Show or hide the high q extrapolation"},value= 1878 // CheckBox C1DControl_2c,disable=1879 // SetVariable C1DControl_2d,pos={31,96},size={150,15},title="Power Law Exponent"880 // SetVariable C1DControl_2d,help={"Power Law exponent from the fit = the DESMEARED slope - override as needed"}881 // SetVariable C1DControl_2d format="%5.2f"882 // SetVariable C1DControl_2d,limits={-inf,inf,0},value=_NUM:123883 // SetVariable C1DControl_2d,disable=1884 //885 // Legend/C/N=text0/J/X=72.00/Y=60.00886 //887 //888 // SetDataFolder root:889 //EndMacro890 //891 ////892 //// recalculate the I(q) binning. no need to adjust model function or views893 //// just rebin894 ////895 //// see V_BinningModePopup() in V_DataPlotting.ipf for a duplicate verison of this function896 //Function V_CombineModePopup(ctrlName,popNum,popStr) : PopupMenuControl897 // String ctrlName898 // Variable popNum // which item is currently selected (1-based)899 // String popStr // contents of current popup item as string900 //901 //// TODO902 //// x- replace the type with selection from the panel - don't use the current display type903 // ControlInfo C1DControl_0e904 // String type = S_Value905 //906 // SVAR gStr1 = $(ksCombine1DFolder+":gStr1")907 // gStr1 = type908 //909 //910 // V_QBinAllPanels(type,popNum)911 //912 //913 // String str,winStr="V_Combine_1D_Graph"914 // sprintf str,"(\"%s\",%d,\"%s\")",type,popNum,winStr915 //916 //// TODO:917 //// x- replace these calls -- they work with the 1d plot, not this panel. I want them to do basically the same918 //// exact things, but with a different target window919 //// *** these calls now take the target window as a parameter - so that there is only one version920 // Execute ("V_Back_IQ_Graph"+str)921 // Execute ("V_Middle_IQ_Graph"+str)922 // Execute ("V_Front_IQ_Graph"+str)923 //924 //925 // return(0)926 //End927 //928 //929 //// function to control the drawing of buttons in the TabControl on the main panel930 //// Naming scheme for the buttons MUST be strictly adhered to... else buttons will931 //// appear in odd places...932 //// all buttons are named C1DControl_NA where N is the tab number and A is the letter denoting933 //// the button's position on that particular tab.934 //// in this way, buttons will always be drawn correctly :-)935 ////936 //Function C1D_TabProc(ctrlName,tab) //: TabControl937 // String ctrlName938 // Variable tab939 //940 // String ctrlList = ControlNameList("",";"),item="",nameStr=""941 // Variable num = ItemsinList(ctrlList,";"),ii,onTab942 // for(ii=0;ii<num;ii+=1)943 // //items all start w/"C1DControl_" //11 characters944 // item=StringFromList(ii, ctrlList ,";")945 // nameStr=item[0,10]946 // if(cmpstr(nameStr,"C1DControl_")==0)947 // onTab = str2num(item[11]) //12th is a number948 // ControlInfo $item949 // switch(abs(V_flag))950 // case 1:951 // Button $item,disable=(tab!=onTab)952 // break953 // case 2:954 // CheckBox $item,disable=(tab!=onTab)955 // break956 // case 5:957 // SetVariable $item,disable=(tab!=onTab)958 // break959 // case 10:960 // TitleBox $item,disable=(tab!=onTab)961 // break962 // case 4:963 // ValDisplay $item,disable=(tab!=onTab)964 // break965 // case 3:966 // PopupMenu $item,disable=(tab!=onTab)967 // break968 // // add more items to the switch if different control types are used969 // endswitch970 //971 // endif972 // endfor973 //974 // // remove the mask if I go back to the data?975 // if(tab==0)976 // RemoveMask()977 //// RemoveConcatenated()978 // endif979 //980 // // masking981 // if(tab==1)982 // C1D_ClearMaskProc("") //starts with a blank mask983 // C1D_MyMaskProc("") //start masking if you click on the tab984 // else985 // C1D_MaskDoneButton("") //masking is done if you click off the tab986 // endif987 //988 // // rescaling989 // if(tab == 2)990 // // TODO991 // // -- fill this in992 // // -- this is still in the thought process at this point993 //994 //// do rescaling of the different sections of the data set995 //996 // endif997 //998 // return 0999 //End1000 //1001 //1002 //Proc AppendConcatenated()1003 //1004 // if( strsearch(TraceNameList("V_Combine_1D_Graph", "", 1),"I_exp_orig",0,2) == -1) //Igor 51005 // SetDataFolder $(ksCombine1DFolder)1006 // AppendToGraph/W=V_Combine_1D_Graph I_exp_orig vs Q_exp_orig1007 // ModifyGraph mode(I_exp_orig)=3,marker(I_exp_orig)=19,msize(I_exp_orig)=2,opaque(I_exp_orig)=11008 // ModifyGraph rgb(I_exp_orig)=(0,0,0)1009 //1010 // ModifyGraph tickUnit=1,log=11011 // Modifygraph grid=1,mirror=21012 //1013 // ErrorBars/T=0 I_exp_orig Y,wave=(S_exp_orig,S_exp_orig)1014 //1015 // setdatafolder root:1016 // endif1017 //end1018 //1019 //Function RemoveConcatenated()1020 //1021 // SetDataFolder $(ksCombine1DFolder)1022 // RemoveFromGraph/W=V_Combine_1D_Graph/Z I_exp_orig1023 // setdatafolder root:1024 //end1025 //1026 //Proc AppendMask()1027 //1028 // if( strsearch(TraceNameList("V_Combine_1D_Graph", "", 1),"MaskData",0,2) == -1) //Igor 51029 // SetDataFolder $(ksCombine1DFolder)1030 // AppendToGraph/W=V_Combine_1D_Graph MaskData vs Q_exp_orig1031 // ModifyGraph mode(MaskData)=3,marker(MaskData)=8,msize(MaskData)=2.5,opaque(MaskData)=11032 // ModifyGraph rgb(MaskData)=(65535,16385,16385)1033 //1034 // setdatafolder root:1035 // endif1036 //end1037 //1038 //1039 //1040 //Function RemoveMask()1041 //1042 // SetDataFolder $(ksCombine1DFolder)1043 // RemoveFromGraph/W=V_Combine_1D_Graph/Z MaskData1044 // setdatafolder root:1045 //end1046 //1047 //1048 //// concatenate the data, and replace the multiple data sets with the concatenated set1049 //// - then you can proceed to the mask tab1050 ////1051 //Function C1D_ConcatButtonProc(ctrlName) : ButtonControl1052 // String ctrlName1053 //1054 //1055 // ControlInfo C1DControl_0e1056 // String folderStr = S_Value1057 //1058 // SVAR gStr1 = $(ksCombine1DFolder+":gStr1")1059 // gStr1 = folderStr1060 //1061 //1062 // ControlInfo C1DControl_0d1063 // Variable binType = V_BinTypeStr2Num(S_Value)1064 //1065 // V_1DConcatenate("root:Packages:NIST:VSANS:",folderStr,"",binType)1066 //1067 //// sort the data set1068 // V_TmpSort1D("root:Packages:NIST:VSANS:",folderStr)1069 //1070 //// now copy the concatenated data over to the combine folder1071 // Duplicate/O $("root:Packages:NIST:VSANS:"+folderStr+":tmp_q") $(ksCombine1DFolder+":Q_exp")1072 // Duplicate/O $("root:Packages:NIST:VSANS:"+folderStr+":tmp_i") $(ksCombine1DFolder+":I_exp")1073 // Duplicate/O $("root:Packages:NIST:VSANS:"+folderStr+":tmp_s") $(ksCombine1DFolder+":S_exp")1074 // wave Q_exp = $(ksCombine1DFolder+":Q_exp")1075 // Wave I_exp = $(ksCombine1DFolder+":I_exp")1076 // Wave S_exp = $(ksCombine1DFolder+":S_exp")1077 //1078 //1079 ////1080 // Duplicate/O $(ksCombine1DFolder+":Q_exp") $(ksCombine1DFolder+":Q_exp_orig")1081 // Duplicate/O $(ksCombine1DFolder+":I_exp") $(ksCombine1DFolder+":I_exp_orig")1082 // Duplicate/O $(ksCombine1DFolder+":S_exp") $(ksCombine1DFolder+":S_exp_orig")1083 // wave I_exp_orig = $(ksCombine1DFolder+":I_exp_orig")1084 //1085 // Variable nq = numpnts($(ksCombine1DFolder+":Q_exp"))1086 ////1087 //1088 //// // append the (blank) wave note to the intensity wave1089 //// Note I_exp,"BOX=0;SPLINE=0;"1090 //// Note I_exp_orig,"BOX=0;SPLINE=0;"1091 ////1092 //// //add data to the graph1093 // Execute "AppendConcatenated()"1094 //1095 // // TODO:1096 // // -- do I clear off the old data here, or somewhere else?1097 // // clear off the old data from the individual panels1098 // // use ClearAllIQIfDisplayed()1099 // ClearIQIfDisplayed_AllBin(folderStr,"V_Combine_1D_Graph")1100 //1101 // RemoveMask()1102 //1103 // return(0)1104 //End1105 //1106 //// step (1) - get the data from a WORK folder, and plot it1107 //// clear out all of the "old" waves, remove them from the graph first1108 ////1109 //// ??produces Q_exp, I_exp, S_exp waves (and originals "_orig")1110 //// add a dummy wave note that can be changed on later steps1111 ////1112 //Function C1D_LoadButtonProc(ctrlName) : ButtonControl1113 // String ctrlName1114 //1115 //1116 // String qStr,iStr,sStr,sqStr1117 // Variable nq,dqv,numBad,val1118 //1119 // // remove any of the old traces on the graph and delete the waves and reset the global strings1120 // CleanUpJunk()1121 //1122 // SetDataFolder root:1123 //1124 // // go get the new data1125 // Execute "A_LoadOneDDataWithName(\"\",0)"1126 //1127 //// TODO:1128 // // x-Missing something here from the loader - go back to the LakeDesmearing ipf1129 // SVAR fname = root:Packages:NIST:gLastFileName //this is the 1D file loaded1130 //1131 ////1132 // qStr = CleanupName((fName + "_q"),0) //the q-wave1133 // iStr = CleanupName((fName + "_i"),0) //the i-wave1134 // sStr = CleanupName((fName + "_s"),0) //the s-wave1135 //// sqStr = CleanupName((fName + "sq"),0) //the sq-wave1136 ////1137 // String DFStr= CleanupName(fname,0)1138 ////1139 // Duplicate/O $("root:"+DFStr+":"+qStr) $(ksCombine1DFolder+":Q_exp")1140 // Duplicate/O $("root:"+DFStr+":"+iStr) $(ksCombine1DFolder+":I_exp")1141 // Duplicate/O $("root:"+DFStr+":"+sStr) $(ksCombine1DFolder+":S_exp")1142 // wave Q_exp = $(ksCombine1DFolder+":Q_exp")1143 // Wave I_exp = $(ksCombine1DFolder+":I_exp")1144 // Wave S_exp = $(ksCombine1DFolder+":S_exp")1145 //1146 //1147 ////1148 // Duplicate/O $(ksCombine1DFolder+":Q_exp") $(ksCombine1DFolder+":Q_exp_orig")1149 // Duplicate/O $(ksCombine1DFolder+":I_exp") $(ksCombine1DFolder+":I_exp_orig")1150 // Duplicate/O $(ksCombine1DFolder+":S_exp") $(ksCombine1DFolder+":S_exp_orig")1151 // wave I_exp_orig = $(ksCombine1DFolder+":I_exp_orig")1152 //1153 // nq = numpnts($(ksCombine1DFolder+":Q_exp"))1154 ////1155 //1156 //// // append the (blank) wave note to the intensity wave1157 //// Note I_exp,"BOX=0;SPLINE=0;"1158 //// Note I_exp_orig,"BOX=0;SPLINE=0;"1159 ////1160 //// //add data to the graph1161 // Execute "AppendConcatenated()"1162 //1163 // SetDataFolder root:1164 //End1165 //1166 //// remove any q-values <= val1167 //Function RemoveBadQPoints(qw,iw,sw,val)1168 // Wave qw,iw,sw1169 // Variable val1170 //1171 // Variable ii,num,numBad,qval1172 // num = numpnts(qw)1173 //1174 // ii=01175 // numBad=01176 // do1177 // qval = qw[ii]1178 // if(qval <= val)1179 // numBad += 11180 // else //keep the points1181 // qw[ii-numBad] = qval1182 // iw[ii-numBad] = iw[ii]1183 // sw[ii-numBad] = sw[ii]1184 // endif1185 // ii += 11186 // while(ii<num)1187 // //trim the end of the waves1188 // DeletePoints num-numBad, numBad, qw,iw,sw1189 // return(numBad)1190 //end1191 //1192 //// if mw = Nan, keep the point, if a numerical value, delete it1193 //Function RemoveMaskedPoints(mw,qw,iw,sw)1194 // Wave mw,qw,iw,sw1195 //1196 // Variable ii,num,numBad,mask1197 // num = numpnts(qw)1198 //1199 // ii=01200 // numBad=01201 // do1202 // mask = mw[ii]1203 // if(numtype(mask) != 2) //if not NaN1204 // numBad += 11205 // else //keep the points that are NaN1206 // qw[ii-numBad] = qw[ii]1207 // iw[ii-numBad] = iw[ii]1208 // sw[ii-numBad] = sw[ii]1209 // endif1210 // ii += 11211 // while(ii<num)1212 // //trim the end of the waves1213 // DeletePoints num-numBad, numBad, qw,iw,sw1214 // return(numBad)1215 //end1216 //1217 //// produces the _msk waves that have the new number of data points1218 ////1219 //Function C1D_MaskDoneButton(ctrlName) : ButtonControl1220 // String ctrlName1221 //1222 //1223 // Variable aExists= strlen(CsrInfo(A)) > 0 //Igor 51224 // if(!aExists)1225 // return(1) //possibly reverted data, no cursor, no Mask wave1226 // endif1227 //1228 // Duplicate/O $(ksCombine1DFolder+":Q_exp_orig"),$(ksCombine1DFolder+":Q_msk")1229 // Duplicate/O $(ksCombine1DFolder+":I_exp_orig"),$(ksCombine1DFolder+":I_msk")1230 // Duplicate/O $(ksCombine1DFolder+":S_exp_orig"),$(ksCombine1DFolder+":S_msk")1231 // Wave Q_msk=$(ksCombine1DFolder+":Q_msk")1232 // Wave I_msk=$(ksCombine1DFolder+":I_msk")1233 // Wave S_msk=$(ksCombine1DFolder+":S_msk")1234 //1235 // //finish up - trim the data sets and reassign the working set1236 // Wave MaskData=$(ksCombine1DFolder+":MaskData")1237 //1238 // RemoveMaskedPoints(MaskData,Q_msk,I_msk,S_msk)1239 //1240 // //reset the number of points1241 // NVAR gNq = $(ksCombine1DFolder+":gNq")1242 // gNq = numpnts(Q_msk)1243 //1244 // Cursor/K A1245 // HideInfo1246 //1247 // return(0)1248 //End1249 //1250 //1251 //// not quite the same as revert1252 //Function C1D_ClearMaskProc(ctrlName) : ButtonControl1253 // String ctrlName1254 //1255 // SetDataFolder $ksCombine1DFolder1256 //1257 // Wave Q_exp_orig1258 // Duplicate/O Q_exp_orig MaskData1259 // MaskData = NaN //use all data1260 //1261 // SetDataFolder root:1262 //1263 // return(0)1264 //end1265 //1266 //// when the mask tab is selected, A must be on the graph1267 //// Displays MaskData wave on the graph1268 ////1269 //Function C1D_MyMaskProc(ctrlName) : ButtonControl1270 // String ctrlName1271 //1272 //1273 // Wave data=$(ksCombine1DFolder+":I_exp_orig")1274 //1275 // SetDataFolder $ksCombine1DFolder1276 //1277 // Variable aExists= strlen(CsrInfo(A)) > 0 //Igor 51278 //1279 // if(aExists) //mask the selected point1280 // // toggle NaN (keep) or Data value (= masked)1281 // Wave MaskData1282 // MaskData[pcsr(A)] = (numType(MaskData[pcsr(A)])==0) ? NaN : data[pcsr(A)] //if NaN, doesn't plot1283 // else1284 // Wave I_exp_orig,Q_exp_orig1285 // Cursor /A=1/H=1/L=1/P/W=V_Combine_1D_Graph A I_exp_orig leftx(I_exp_orig)1286 // ShowInfo1287 // //if the mask wave does not exist, make one1288 // if(exists("MaskData") != 1)1289 // Duplicate/O Q_exp_orig MaskData1290 // MaskData = NaN //use all data1291 // endif1292 // Execute "AppendMask()"1293 // endif1294 //1295 // SetDataFolder root:1296 //1297 // return(0)1298 //End1299 //1300 //// when the mask button is pressed, A must be on the graph1301 //// Displays MaskData wave on the graph1302 ////1303 //Function C1D_MaskLTCursor(ctrlName) : ButtonControl1304 // String ctrlName1305 //1306 //1307 // Variable aExists= strlen(CsrInfo(A)) > 0 //Igor 51308 //1309 // if(!aExists)1310 // return(1)1311 // endif1312 //// need to get rid of old smoothed data if data is re-masked1313 //// Execute "RemoveSmoothed()"1314 //// SetDataFolder $(ksCombine1DFolder)1315 //// Killwaves/Z I_smth,Q_smth,S_smth1316 //1317 // SetDataFolder $(ksCombine1DFolder)1318 //1319 // Wave data=I_exp_orig1320 //1321 // Variable pt,ii1322 // pt = pcsr(A)1323 // for(ii=pt;ii>=0;ii-=1)1324 // // toggle NaN (keep) or Data value (= masked)1325 // Wave MaskData1326 // MaskData[ii] = (numType(MaskData[ii])==0) ? NaN : data[ii] //if NaN, doesn't plot1327 // endfor1328 //1329 // SetDataFolder root:1330 // return(0)1331 //End1332 //1333 //// when the mask button is pressed, A must be on the graph1334 //// Displays MaskData wave on the graph1335 ////1336 //Function C1D_MaskGTCursor(ctrlName) : ButtonControl1337 // String ctrlName1338 //1339 // Variable aExists= strlen(CsrInfo(A)) > 0 //Igor 51340 //1341 // if(!aExists)1342 // return(1)1343 // endif1344 //// need to get rid of old smoothed data if data is re-masked1345 //// Execute "RemoveSmoothed()"1346 //// SetDataFolder $(ksCombine1DFolder)1347 //// Killwaves/Z I_smth,Q_smth,S_smth1348 //1349 // SetDataFolder $(ksCombine1DFolder)1350 //1351 // Wave data=I_exp_orig1352 //1353 // Wave MaskData1354 //1355 // Variable pt,ii,endPt1356 // endPt=numpnts(MaskData)1357 // pt = pcsr(A)1358 // for(ii=pt;ii<endPt;ii+=1)1359 // // toggle NaN (keep) or Data value (= masked)1360 // Wave MaskData1361 // MaskData[ii] = (numType(MaskData[ii])==0) ? NaN : data[ii] //if NaN, doesn't plot1362 // endfor1363 //1364 // SetDataFolder root:1365 //1366 // return(0)1367 //End1368 //1369 //// when the mask button is pressed, A must be on the graph1370 //// Displays MaskData wave on the graph1371 ////1372 //Function C1D_MaskPercent(ctrlName) : ButtonControl1373 // String ctrlName1374 //1375 // Variable aExists= strlen(CsrInfo(A)) > 0 //Igor 51376 //1377 // if(!aExists)1378 // return(1)1379 // endif1380 //1381 //1382 // SetDataFolder $(ksCombine1DFolder)1383 //1384 // Wave data=I_exp_orig1385 // Wave s_orig = S_exp_orig1386 // Wave MaskData1387 //1388 //1389 // Variable pct,ii,endPt1390 // endPt=numpnts(MaskData)1391 //1392 // pct = 0.051393 //1394 // for(ii=0;ii<endPt;ii+=1)1395 // // toggle NaN (keep) or Data value (= masked)1396 //1397 // MaskData[ii] = (abs(s_orig[ii]/data[ii]) < pct) ? NaN : data[ii] //if NaN, doesn't plot1398 // endfor1399 //1400 //1401 // SetDataFolder root:1402 //1403 // return(0)1404 //End1405 //1406 //1407 //1408 //1409 //Function CleanUpJunk()1410 //1411 // // clean up the old junk on the graph, /Z for no error1412 // // TODO:1413 // // -- activate both of these functions to clean old data off of the graph1414 //// Execute "RemoveOldData()"1415 // Execute "RemoveMask()"1416 //1417 // //remove the cursor1418 // Cursor/K A1419 //1420 // //always re-initialize these1421 // String/G $(ksCombine1DFolder+":gStr1") = ""1422 //1423 // // clean up the old waves from smoothing and desmearing steps1424 // SetDataFolder $(ksCombine1DFolder)1425 // Killwaves/Z MaskData,Q_msk,I_msk,S_msk1426 // SetDataFolder root:1427 //End1428 //1429 //1430 //1431 //// I_dsm is the desmeared data1432 ////1433 //// step (7) - desmearing is done, write out the result1434 ////1435 //Function C1D_SaveButtonProc(ctrlName) : ButtonControl1436 // String ctrlName1437 //1438 //1439 // String saveStr1440 // SVAR curFile = $(ksCombine1DFolder+":gCurFile")1441 // saveStr = CleanupName((curFile),0) //the output filename1442 // //1443 //1444 // V_Write_VSANSMasked1D(saveStr,0,0,1) //use the full set (lo=hi=0) and present a dialog1445 //1446 // SetDataFolder root:1447 // return(0)1448 //End1449 //1450 //Function C1D_HelpButtonProc(ctrlName) : ButtonControl1451 // String ctrlName1452 //1453 // DisplayHelpTopic/Z/K=1 "Combining VSANS Data"1454 // if(V_flag !=0)1455 // DoAlert 0,"The Combining VSANS Data Help file could not be found"1456 // endif1457 // return(0)1458 //End1459 //1460 //1461 ////toggles the log/lin display of the loaded data set1462 //Function C1D_LoadCheckProc(ctrlName,checked) : CheckBoxControl1463 // String ctrlName1464 // Variable checked1465 //1466 // ModifyGraph log=(checked)1467 // return(0)1468 //End1469 //1470 //1471 //1472 //1473 //1474 //// TODO:1475 //// -- either update this to be correct for VSANS, or dispatch to some other data writer.1476 ////1477 //Function V_Write_VSANSMasked1D(fullpath,lo,hi,dialog)1478 // String fullpath1479 // Variable lo,hi,dialog //=1 will present dialog for name1480 //1481 //1482 // String termStr="\r\n"1483 // String destStr = ksCombine1DFolder1484 // String formatStr = "%15.6g %15.6g %15.6g %15.6g %15.6g %15.6g"+termStr1485 //1486 // Variable refNum,integer,realval1487 //1488 // //*****these waves MUST EXIST, or IGOR Pro will crash, with a type 2 error****1489 // WAVE Q_msk=$(destStr + ":Q_msk")1490 // WAVE I_msk=$(destStr + ":I_msk")1491 // WAVE S_msk=$(destStr + ":S_msk")1492 //1493 // //check each wave1494 // If(!(WaveExists(Q_msk)))1495 // Abort "Q_msk DNExist in WriteUSANSDesmeared()"1496 // Endif1497 // If(!(WaveExists(I_msk)))1498 // Abort "I_msk DNExist in WriteUSANSDesmeared()"1499 // Endif1500 // If(!(WaveExists(S_msk)))1501 // Abort "S_msk DNExist in WriteUSANSDesmeared()"1502 // Endif1503 //1504 // // TODO:1505 // // -- this remnant from desmearing creates fake resolution waves!!!1506 // // -- correctly handle the input resolution waves1507 // // make dummy waves to hold the "fake" resolution, and write it as the last 3 columns1508 // //1509 // Duplicate/O Q_msk,res1,res2,res31510 // res3 = 1 // "fake" beamstop shadowing1511 // res1 /= 100 //make the sigmaQ so small that there is no smearing1512 //1513 // if(dialog)1514 // Open/D refnum as fullpath+".cmb" //won't actually open the file1515 // If(cmpstr(S_filename,"")==0)1516 // //user cancel, don't write out a file1517 // Close/A1518 // Abort "no data file was written"1519 // Endif1520 // fullpath = S_filename1521 // Endif1522 //1523 // //write out partial set?1524 // Duplicate/O Q_msk,tq,ti,te1525 // ti=I_msk1526 // te=S_msk1527 // if( (lo!=hi) && (lo<hi))1528 // redimension/N=(hi-lo+1) tq,ti,te,res1,res2,res3 //lo to hi, inclusive1529 // tq=Q_msk[p+lo]1530 // ti=I_msk[p+lo]1531 // te=S_msk[p+lo]1532 // endif1533 //1534 // //tailor the output given the type of data written out...1535 // String samStr="",dateStr="",str1,str21536 //1537 //1538 // samStr = fullpath1539 // dateStr="CREATED: "+date()+" at "+time()1540 //1541 //1542 //1543 // //actually open the file1544 // Open refNum as fullpath1545 //1546 // fprintf refnum,"%s"+termStr,samStr1547 //// fprintf refnum,"%s"+termStr,str11548 //// fprintf refnum,"%s"+termStr,str21549 // fprintf refnum,"%s"+termStr,dateStr1550 //1551 // wfprintf refnum, formatStr, tq,ti,te,res1,res2,res31552 //1553 // Close refnum1554 //1555 // Killwaves/Z ti,tq,te,res1,res2,res31556 //1557 // Return(0)1558 //End1559 //1560 //1561 //1562 //1563 //Function V_GetScalingInOverlap(num2,wave1q,wave1i,wave2q,wave2i)1564 // Variable num2 //largest point number of wave2 in overlap region1565 // Wave wave1q,wave1i,wave2q,wave2i //1 = first dataset, 2= second dataset1566 //1567 // Variable ii,ival1,newi,ratio1568 // ratio=01569 // ii=01570 // do1571 // //get scaling factor at each point of wave 2 in the overlap region1572 // newi = interp(wave2q[ii],wave1q,wave1i) //get the intensity of wave1 at an overlap point1573 // ratio += newi/wave2i[ii] //get the scale factor1574 // //Print "ratio = ",ratio1575 // ii+=11576 // while(ii<=num2)1577 // Variable val1578 // val = ratio/(num2+1) // +1 counts for point zero1579 // //Print "val = ",val1580 //1581 // Variable tol=1.05 //5% is the preferred number (for Andrew and Lionel, at least)1582 //1583 //// ControlInfo/W=NSORT_Panel WarningCheck1584 //// if(( V_Value==1 ) && ( (val > tol) || (val < 1/tol) ) )1585 //// String str=""1586 //// sprintf str,"The scaling factor is more than a factor of %g from 1. Proceed with caution.\r",tol1587 //// DoAlert 0,str1588 //// endif1589 //1590 // Return val1591 //End1592 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_DIVUtils.ipf
r1078 r1079 3 3 // 4 4 // ******** 5 // TODO -- this is an incomplete DIV file. need to identify how to generate a real DIV file6 // for the different detectors, and how to fill it into a file.5 // TODO -- this file is preliminary. It has not yet been tested on enough real data 6 // to generate a DIV file. 7 7 // Not sure how it will be measured in practice on VSANS. 8 8 // 9 // JAN 201 79 // JAN 2018 10 10 // 11 11 // TODO: 12 // -- complete the description of the steps needed...12 // x- complete the description of the steps needed... 13 13 // Data needs to be reduced to the "COR" level - that means that the 14 14 // PLEX data has been added to work files, and the empty and blocked beam have been … … 35 35 36 36 37 /// TODO:38 // -- need a way to view the DIV data (each panel) and see the stats on the values37 /// DONE: 38 // x- need a way to view the DIV data (each panel) and see the stats on the values 39 39 // (maybe a simple panel viewer, one-at-a-time, or all 4 as individuals, not on the same scale) 40 40 … … 48 48 // x- then I need to be able to read the error in (done) 49 49 50 51 52 // Basic function:53 // -- Setup_VSANS_DIV_Struct()54 //55 // -- Clear the DIV data folder: V_KillWavesInFolder("DIV")56 //57 // -- reduce the data (to the COR level?)58 59 // -- V_NormalizeDIV() (one panel at a time, using the mask)60 // -- V_CopyDIVToSave() -or- V_CopyDIVToSave_OnePanel()61 62 // -- Save_VSANS_DIV_Nexus()63 //64 50 65 51 … … 192 178 // type is the work folder where the (? corrected) data is currently 193 179 // 194 // TODO180 // DONE 195 181 // x- data should be copied to some alternate work folder before this step 196 182 // x- for T/B detectors, this may not work as intended if the whole detector is not illuminated. … … 257 243 // type is the work folder where the (? corrected) data is currently 258 244 // 259 // TODO 245 // NOTE (Currently unused. use V_NormalizeDIV_onePanel() instead) 246 // 260 247 // -- data should be copied to some alternate work folder before this step 261 248 // -- for T/B detectors, this may not work as intended if the whole detector is not illuminated. … … 339 326 340 327 341 // TODO 328 342 329 // currently, there are no dummy fill values or attributes for the fake DIV file 343 330 // … … 381 368 End 382 369 383 ////////////// fakeDIV file tests370 ////////////// DIV file tests 384 371 // 385 372 // … … 389 376 // file header. nothing more is needed (possibly) 390 377 // 391 // TODO -- I want to re-visit the propagation of errors in the DIV file. No errors are ever calculated/saved 392 // during the generation of the file, but there's no reason it couldn't. the idea is that the plex 393 // is counted so long that the errors are insignificant compared to the data errors, but that may not 394 // always be the case. A bit of math may prove this. or not. Plus, the situation for VSANS may be different. 395 // 396 // 397 // TODO -- make the number of pixels GLOBAL 378 // 379 // 380 // TODO -- correct the number of pixels for the BACK detector 398 381 // 399 382 Proc H_Setup_VSANS_DIV_Structure() … … 500 483 // x- any manipulations, stats ? 501 484 // x- add an "update" button (to update the status of the data - this may be automatic with an operation) 502 // -- add a "load DIV" button 503 // -- add a "copy" button 485 // -- add a "load DIV" button (to make it easy) 486 // -- add a "copy" button (to fill move data to STO and SUB) 504 487 // x- add a "ratio" button 505 488 // x- add a "difference" button -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_DetectorCorrections.ipf
r1078 r1079 397 397 // both beam considitions (+/- 0.0 mm). FTB was +/- 0.8 mm, MTB +/- 2 mm 398 398 if(cmpstr(detStr,"FL") == 0 || cmpstr(detStr,"FR") == 0) 399 gap = 16.8 //mm399 gap = 3.8 //mm 400 400 endif 401 401 if(cmpstr(detStr,"FT") == 0 || cmpstr(detStr,"FB") == 0) 402 gap = 20//mm402 gap = 5 //mm 403 403 endif 404 404 if(cmpstr(detStr,"ML") == 0 || cmpstr(detStr,"MR") == 0) 405 gap = 14.6//mm405 gap = 5.9 //mm 406 406 endif 407 407 if(cmpstr(detStr,"MT") == 0 || cmpstr(detStr,"MB") == 0) 408 gap = 15 //mm408 gap = 5 //mm 409 409 endif 410 410 // TODO: this is the line to keep, to replace the hard-wired values … … 875 875 w_err /= solid_angle // 876 876 877 // TODO -- clean up after I'm satisfied computations are correct878 //KillWaves/Z tmp_theta,tmp_dist877 // DONE x- clean up after I'm satisfied computations are correct 878 KillWaves/Z tmp_theta,tmp_dist 879 879 880 880 return(0) … … 1125 1125 1126 1126 1127 // TODO -- clean up after I'm satisfied computations are correct1127 // DONE x- clean up after I'm satisfied computations are correct 1128 1128 KillWaves/Z tmp_theta,tmp_dist,tmp_err,lat_err 1129 1129 … … 1132 1132 1133 1133 1134 // 1135 // TODO: 1136 // -- DoAlert 0,"This has not yet been updated for VSANS" 1134 1137 1135 // 1138 1136 //test procedure, not called anymore -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_PatchFiles.ipf
r1070 r1079 18 18 19 19 // TODO 20 // -- not all of the functions here have been prefixed with "V_", especially the action procedures from the panel20 // x- not all of the functions here have been prefixed with "V_", especially the action procedures from the panel 21 21 // so this cannot be opened with the SANS Reduction, or there will be clashes 22 22 // -- same file load/reload issue as with other operations that read a field from the file. ANY read requires … … 1012 1012 //*****this function actually writes the data to disk***** 1013 1013 // 1014 // TODO- re-write a series of these function to mirror the "fill" functions1014 // DONE x- re-write a series of these function to mirror the "fill" functions 1015 1015 // specific to each tab 1016 1016 // 1017 // TODOx- clear out the old data and force a re-load from disk, or the old data1017 // DONE x- clear out the old data and force a re-load from disk, or the old data 1018 1018 // will be read in from the RawVSANS folder, and it will look like nothing was written 1019 1019 // (done in the calling function) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf
r1073 r1079 1933 1933 1934 1934 // 1935 // TODO:1935 // DONE: 1936 1936 // x- this is no longer done after the COR step, and CAL is not produced as output of DIV 1937 1937 // x- needs to be aware of the file name passed in … … 2257 2257 2258 2258 // 2259 // TODO2259 // DONE 2260 2260 // x- fill in the "ask" step 2261 // -- none is OK, except if the kill fails for any reason2261 // x- none is OK, except if the kill fails for any reason 2262 2262 // x- the regular case of the file name specified by the protocol works correctly 2263 2263 // x- don't create a null mask if not used, it will handle the error and print out that the mask is missing … … 2395 2395 endswitch 2396 2396 2397 // TODO2397 // DONE 2398 2398 // x- this call will bin the active type, then the next call bins the active type 2399 2399 // x- then later, I dispatch to bin the active type... … … 2550 2550 2551 2551 // 2552 // TODO2553 // -- fill in all of the functionality for calculation from direct beam2552 // DONE 2553 // x- fill in all of the functionality for calculation from direct beam 2554 2554 // and verify that the calculations are numerically correct 2555 2555 // … … 2589 2589 //empty beam flux file selected, prompt for file, and use this to calculate KAPPA 2590 2590 2591 // TODO2591 // DONE 2592 2592 // x- need an empty beam file name 2593 2593 // … … 2598 2598 endif 2599 2599 2600 // TODO2600 // DONE 2601 2601 // x- need panel 2602 2602 // -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_RAW_Data_Panel.ipf
r1075 r1079 17 17 // 18 18 // -- have the status automatically fill in when a new file is loaded, rather than needing a click of the "status" button 19 // -- need a place somewhere to show the currently displayed folder20 // -- checkboxes for "active" corrections?21 // -- display of Q, counts, QxQy, X and Y22 // -- do I need a color bar? or is this not used at all? I like it to be there, or the colors are a waste of information19 // x- need a place somewhere to show the currently displayed folder 20 // x- checkboxes for "active" corrections? 21 // x- display of Q, counts, QxQy, X and Y 22 // x- do I need a color bar? or is this not used at all? I like it to be there, or the colors are a waste of information 23 23 // (then... where do I put the color bar?) 24 // -- define the "hook" function, and attach it to the panel (or the main detector subwindow?)24 // x- define the "hook" function, and attach it to the panel (or the main detector subwindow?) 25 25 // 26 26 … … 400 400 // now figure out q 401 401 // calculate the q-values, will be different depending on which panel is up (pixel size, geometry, etc.) 402 // TODO: !!!! get rid of the hard-wired values403 // TODO: be sure that the units from HDF are what I expect404 // TODO: beam center XY are pixels in the file, expected in the function, but are better suited for mm or cm405 // TODO: units of xy pixel size are likely wrong402 // DONE: !!!! get rid of the hard-wired values 403 // DONE: be sure that the units from HDF are what I expect 404 // DONE: beam center XY are pixels in the file, expected in the function, but are better suited for mm or cm 405 // DONE: units of xy pixel size are likely wrong 406 406 // xctr = V_getDet_beam_center_x(gCurDispType,detStr) //written in pixels 407 407 // yctr = V_getDet_beam_center_y(gCurDispType,detStr) … … 419 419 Wave data_realDistY = $(destPath + ":entry:instrument:detector_"+detStr+":data_realDistY") 420 420 421 // TODO: figure out what coordinates I need to pass -- xloc, yloc, textX, testY, (+1 on any?)421 // DONE: figure out what coordinates I need to pass -- xloc, yloc, textX, testY, (+1 on any?) 422 422 //gQQ = VC_CalcQval(testX,testY,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 423 423 //gQX = VC_CalcQX(testX,testY,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) … … 718 718 End 719 719 720 // TODO720 // 721 721 // 722 722 // move one file number back … … 738 738 End 739 739 740 // TODO740 // 741 741 // 742 742 // move one file number forward … … 817 817 // if the data display is RAW, convert to the specified WORK data type 818 818 // 819 // TODO820 // -- better error checking821 // -- if the data type is not RAW, can I Copy Folder instead?819 // DONE 820 // x- better error checking 821 // x- if the data type is not RAW, can I Copy Folder instead? 822 822 // 823 823 Function V_ToWorkFileButtonProc(ba) : ButtonControl … … 827 827 case 2: // mouse up 828 828 // click code here 829 //Convert_to_Workfile(newtype, doadd) // a proc829 830 830 Execute "V_Convert_to_Workfile()" 831 831 … … 890 890 End 891 891 892 // TODO892 // 893 893 // 894 894 // gets the status of the currently displayed file and dumps it to the panel (not the cmd window) … … 1122 1122 End 1123 1123 1124 // TODO1124 // 1125 1125 // 1126 1126 // this "spreads" the display of panels to a nominal separation for easier viewing … … 1142 1142 End 1143 1143 1144 // TODO1144 // 1145 1145 // 1146 1146 // this "restores" the display of panels to their actual position based on the apparent beam center -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_TubeAdjustments.ipf
r1051 r1079 1101 1101 //////////////////////////////////// 1102 1102 // 1103 // TODO 1104 // -- document the "simple" save of the detector panels for import and subsequent fitting. 1103 // DONE 1104 // x- document the "simple" save of the detector panels for import and subsequent fitting. 1105 // Documentation is done in the "main" VSANS documentation, and is largely not needed, since Phil 1106 // is doing the nonlinear calibration calculations, not me. 1107 // 1105 1108 // 1106 1109 // takes the data from RAW, by default. This is OK, since even though whatever is in the calibration data -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_USANS_SlitSmearing_v40.ipf
r1078 r1079 2 2 #pragma version=3.00 3 3 #pragma IgorVersion=6.1 4 5 6 /////// 7 // JAN 2018 8 // 9 // 10 // This is a first approximation to model slit smeared VSANS data 11 // - the dQv value is now a "per-Q" quantity, rather than a single global value 12 // -- this still needs to be verified mathematically that this is valid 13 // - the wavelength smearing is not accounted for at all. 14 // -- this is significant issue for White Beam conditions 15 // 16 // To use this, include BOTH the VSANS reduction macros, and the Analysis Macros. 17 // (otherwise, slit smeared data will be interpreted as USANS) 18 // 19 20 21 22 4 23 5 24 //Functions for doing USANS Slit smearing by method of weight matrix … … 18 37 //// July 2008 SRK 19 38 // 20 // For fitting with ecursors, the matrix must be recalculated for the exact range of the data39 // For fitting with cursors, the matrix must be recalculated for the exact range of the data 21 40 // - but the inital dependency of the model (any number of them) was (were) set up to use the full matrix 22 41 // -- so: -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_General.ipf
r1073 r1079 430 430 431 431 // TODO 432 // -- getting the file_name from the root: global is a poor choice. 433 // Need a better, more reliable solution than this 434 // 435 // DONE 432 436 // x- load in the proper file 433 437 // x- re-click the I(q) button 434 438 // x- be sure that the globals are updated w/ filename 435 // -- getting the file_name from the root: global is a poor choice. 436 // Need a better, more reliable solution than this 437 // -- make a copy of "oldName" that is local and not the SVAR, as the SVAR changes 439 // x- make a copy of "oldName" that is local and not the SVAR, as the SVAR changes 438 440 // when the next file is loaded in (if it's not in RawVSANS), resulting in a "skipped" file number 439 441 // … … 788 790 // local function 789 791 // 790 // TODO -- is this really necessary anymore for the NON-VAX files of VSANS. 791 // -- can this be made a pass-through, or will there be another function that is needed for VSANS? 792 // DONE 793 // x- this is essentially a pass-through, since there are no version numbers for VSANS data files 794 // it is kept in case there are conditions in the future. 792 795 // 793 796 Function/S V_ValidFileString(partialName)
Note: See TracChangeset
for help on using the changeset viewer.