- Timestamp:
- Jun 26, 2008 1:38:32 PM (15 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/NewModels_2006/LamellarPS_HG_v40.ipf
r379 r391 74 74 // make epsilon wave appropriate for integer number of lamellar repeats 75 75 Duplicate/O coef_LamellarPS_HG epsilon_LamellarPS_HG 76 epsilon_LamellarPS_HG = 1e-4 76 epsilon_LamellarPS_HG = 1e-4*coef_LamellarPS_HG 77 77 epsilon_LamellarPS_HG[7] = 1 //to make the derivative useful 78 78 AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) … … 113 113 Label bottom "q (A\\S-1\\M)" 114 114 Label left "I(q) (cm\\S-1\\M)" 115 116 // make epsilon wave appropriate for integer number of lamellar repeats 117 Duplicate/O smear_coef_LamellarPS_HG epsilon_LamellarPS_HG 118 epsilon_LamellarPS_HG = 1e-4*smear_coef_LamellarPS_HG 119 epsilon_LamellarPS_HG[7] = 1 //to make the derivative useful 115 120 116 121 SetDataFolder root: -
sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/NewModels_2006/LamellarPS_v40.ipf
r379 r391 74 74 // make epsilon wave appropriate for integer number of lamellar repeats 75 75 Duplicate/O coef_LamellarPS epsilon_LamellarPS 76 epsilon_LamellarPS = 1e-4 76 epsilon_LamellarPS = 1e-4*coef_LamellarPS 77 77 epsilon_LamellarPS[6] = 1 //to make the derivative useful 78 78 AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) … … 113 113 Label bottom "q (A\\S-1\\M)" 114 114 Label left "I(q) (cm\\S-1\\M)" 115 116 // make epsilon wave appropriate for integer number of lamellar repeats 117 Duplicate/O smear_coef_LamellarPS epsilon_LamellarPS 118 epsilon_LamellarPS = 1e-4*smear_coef_LamellarPS 119 epsilon_LamellarPS[6] = 1 //to make the derivative useful 115 120 116 121 SetDataFolder root: -
sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/Wrapper_v40.ipf
r385 r391 377 377 Wave eps = $("epsilon_"+suffix) 378 378 Wave coef=$popStr 379 eps = abs(coef*1e-4) + 1e-10 //default eps is proportional to the coefficients 379 if(eps[0] == 0) //if eps already if filled, don't change it 380 eps = abs(coef*1e-4) + 1e-10 //default eps is proportional to the coefficients 381 endif 380 382 endif 381 383 // default epsilon values, sometimes needed for the fit … … 451 453 switch( pa.eventCode ) 452 454 case 2: // mouse up 453 // Variable popNum = pa.popNum 454 // String funcStr = pa.popStr 455 // String coefStr = W_CoefPopupList() 455 // make sure that the cursors are on/off appropriately 456 // check to make sure there really is a "topmost" graph 457 // String topGraph= WinName(0,1) //this is the topmost graph 458 // if(cmpstr(topGraph,"")==0) //no graphs, uncheck and exit 459 // CheckBox check_0,value=0 460 // else 461 // String ciStr = CsrInfo(A , topGraph) 462 // 463 // ControlInfo/W=wrapperpanel popup_0 464 // String folderStr=S_Value 465 // String traceList = TraceNameList(topGraph, ";", 1 ) 456 466 // 457 //// Print "coefStr = ",coefStr 458 // 459 // ControlInfo/W=WrapperPanel popup_0 460 // String folderStr=S_Value 461 // 462 // String listStr = W_CoefPopupList() 463 // Variable num=WhichListItem(coefStr, listStr, ";") 464 // String str=StringFromList(num, listStr ,";") 465 //// print "str = ",str 466 // //set the item in the coef popup, and pop it 467 // PopupMenu popup_2 mode=(num+1) 468 467 // endif 468 469 // then cascade the function/coefficient popups 469 470 Struct WMPopupAction ps 470 471 ps.eventCode = 2 //fake mouse up … … 779 780 endif 780 781 782 // 20JUN if useCursors is true, and there are no cursors on the specified data set, uncheck and set to false 783 if(useCursors) 784 useCursors = AreCursorsCorrect(folderStr) 785 endif 781 786 //if useCursors, and the data is USANS, need to recalculate the matrix if the range is new 782 787 Variable pt1,pt2,newN,mPt1,mPt2 … … 1231 1236 return 0 1232 1237 End 1238 1239 // returns 1 if the specified data is on the top graph && has cursors on it 1240 // returns 0 and unchecks the box if anything is wrong 1241 // 1242 // only call this function if the cursor box is checked, to uncheck it as needed 1243 // if the box is unchecked, leave it be. 1244 // 1245 Function AreCursorsCorrect(folderStr) 1246 String folderStr 1247 1248 String topGraph= WinName(0,1) //this is the topmost graph 1249 if(cmpstr(topGraph,"")==0) //no graphs, uncheck and exit 1250 CheckBox check_0,win=wrapperpanel,value=0 1251 return(0) 1252 endif 1253 1254 String traceAisOn = CsrWave(A , "", 0) 1255 if( strsearch(traceAisOn, folderStr, 0) == -1) //data and cursors don't match 1256 CheckBox check_0,win=wrapperpanel,value=0 1257 return(0) 1258 endif 1259 1260 return(1) 1261 End
Note: See TracChangeset
for help on using the changeset viewer.