- Timestamp:
- Jul 28, 2008 5:19:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/Invariant/Invariant_v40.ipf
r393 r395 36 36 Variable/G gIsSlitSmeared=0 37 37 Variable/G gDqv = 0.117 //default value for USANS slit height (re-read from file) 38 39 // new July 2008 40 Variable/G gSlopeVal = -4 38 41 39 42 SetDataFolder root: … … 258 261 SetDataFolder root: //use absolute paths? 259 262 PauseUpdate; Silent 1 // building window... 260 NewPanel /W=(510,44,796,529) 263 NewPanel /W=(510,44,796,529) /K=2 261 264 DoWindow/C Invariant_Panel 262 265 ModifyPanel cbRGB=(65535,43690,0) … … 271 274 DrawLine 16,135,264,135 272 275 DrawLine 16,19,264,19 273 274 PopupMenu ywave,pos={10,60},size={154,19},title="Data File" 276 PopupMenu ywave,pos={10,60},size={231,20},proc=Inv_FilePopMenuProc,title="Data File" 275 277 PopupMenu ywave,help={"Select the experimental intensity values"} 276 PopupMenu ywave,mode=1,value=root:Packages:NIST:invariant:gDataPopList,proc=Inv_FilePopMenuProc 277 278 PopupMenu ywave,mode=1,popvalue="DDAB_EMATF_1p_25C.absb",value= #"root:Packages:NIST:invariant:gDataPopList" 278 279 Button loadButton,pos={10,90},size={130,20},proc=Inv_Load_Proc,title="Load and Plot File" 279 280 Button loadButton,help={"After choosing a file, load it into memory and plot it with this button."} 280 281 281 Button Inv_PathButton,pos={10,29},size={80,20},proc=Inv_PickPathButtonProc,title="Pick Path" 282 282 Button DoneButton,pos={215,453},size={50,20},proc=InvDoneButton,title="Done" 283 283 Button DoneButton,help={"This button will close the panel and the associated graph"} 284 285 SetVariable setvar_0,pos={27,249},size={80,15},title="# points" 284 SetVariable setvar_0,pos={27,255},size={80,15},title="# points" 286 285 SetVariable setvar_0,limits={5,50,0},value= root:Packages:NIST:invariant:gNumLow 287 SetVariable setvar_1,pos={16 6,249},size={80,15},title="# points"286 SetVariable setvar_1,pos={164,255},size={80,15},title="# points" 288 287 SetVariable setvar_1,limits={5,200,0},value= root:Packages:NIST:invariant:gNumHigh 289 CheckBox check_0,pos={23,202},size={ 50,14},proc=LowCheckProc,title="Guinier"288 CheckBox check_0,pos={23,202},size={48,14},proc=LowCheckProc,title="Guinier" 290 289 CheckBox check_0,value= 1 291 CheckBox check_1,pos={23,223},size={6 8,14},proc=LowCheckProc,title="Power Law"290 CheckBox check_1,pos={23,223},size={65,14},proc=LowCheckProc,title="Power Law" 292 291 CheckBox check_1,value= 0 293 Button button_0,pos={29,27 5},size={90,20},proc=InvLowQ,title="Calc Low Q"292 Button button_0,pos={29,279},size={90,20},proc=InvLowQ,title="Calc Low Q" 294 293 Button button_1,pos={56,141},size={170,20},proc=InvMeasQ,title="Calculate Measured Q" 295 Button button_2,pos={168,275},size={90,20},proc=InvHighQ,title="Calc High Q" 296 // Button button_3,pos={13,98},size={50,20},proc=Plot_Inv_Data,title="Plot" 294 Button button_2,pos={159,279},size={90,20},proc=InvHighQ,title="Calc High Q" 297 295 Button button_4,pos={230,29},size={25,20},proc=Inv_HelpButtonProc,title="?" 298 296 GroupBox group0,pos={14,165},size={123,144},title="Low Q" … … 311 309 ValDisplay valdisp0_3,limits={0,0,0},barmisc={0,1000} 312 310 ValDisplay valdisp0_3,value= #"root:Packages:NIST:invariant:gInvTotal" 313 314 CheckBox check0,pos={10,116},size={101,14},proc=SlitSmearedCheckProc,title="Slit-Smeared Data" 315 CheckBox check0,value= root:Packages:NIST:invariant:gIsSlitSmeared 311 CheckBox check0,pos={10,116},size={97,14},proc=SlitSmearedCheckProc,title="Slit-Smeared Data" 312 CheckBox check0,value= 0 316 313 SetVariable setvar0,pos={136,116},size={130,15},title="Slit Height (1/A)" 317 314 SetVariable setvar0,limits={-inf,inf,0},value= root:Packages:NIST:invariant:gDqv 315 CheckBox check2,pos={168,217},size={73,14},title="Fixed Slope?",value= 1 316 SetVariable setvar2,pos={164,235},size={80,15},title="Slope" 317 SetVariable setvar2,limits={-100,0,0},value= root:Packages:NIST:invariant:gSlopeVal 318 318 319 319 320 //set up a dependency to calculate the total invariant … … 447 448 Variable num=numpnts(iw),nume,inv 448 449 NVAR nend=root:Packages:NIST:invariant:gNumHigh //number of points for the fit 450 NVAR fixedSlope = root:Packages:NIST:invariant:gSlopeVal //fixed slope value at high q 451 452 if(fixedSlope == 0) 453 fixedSlope = -4 454 endif 449 455 450 456 Make/O/D P_coef={0,1,-4} //input 451 //(set background to zero and hold fixed) 452 CurveFit/H="100" Power kwCWave=P_coef iw[(num-1-nend),(num-1)] /X=qw /W=sw /D 457 P_coef[2] = fixedSlope 458 459 ControlInfo/W=Invariant_Panel check2 460 if(V_Value == 1) 461 //hold the slope fixed, and the background 462 CurveFit/H="101" Power kwCWave=P_coef iw[(num-1-nend),(num-1)] /X=qw /W=sw /D 463 else 464 //(set background to zero and hold fixed) 465 CurveFit/H="100" Power kwCWave=P_coef iw[(num-1-nend),(num-1)] /X=qw /W=sw /D 466 endif 467 453 468 extr_hqi=P_coef[0]+P_coef[1]*extr_hqq^P_coef[2] 454 469
Note: See TracChangeset
for help on using the changeset viewer.