Changeset 133 for sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00
- Timestamp:
- Jul 26, 2007 2:29:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Packages/LinearizedFits/LinearizedFits.ipf
r42 r133 143 143 //selection not null 144 144 partialName = S_value 145 //Print partialName146 145 Endif 147 146 //get a valid file based on this partialName and catPathName … … 154 153 155 154 //load in the data (into the root directory) 156 A_LoadOneDDataWithName(tempName )155 A_LoadOneDDataWithName(tempName,0) //let A_Rescale_Data() do the plotting 157 156 //Print S_fileName 158 157 //Print tempName 159 158 160 String cleanLastFileName = "root:"+CleanupName(root:myGlobals:gLastFileName,0)161 162 tempName= cleanLastFileName+"_q"159 String cleanLastFileName = CleanupName(partialName,0) 160 String dataStr = "root:"+cleanLastFileName+":" 161 tempName=dataStr + cleanLastFileName+"_q" 163 162 Duplicate/O $tempName xAxisWave 164 tempName= cleanLastFileName+"_i"163 tempName=dataStr + cleanLastFileName+"_i" 165 164 Duplicate/O $tempName yAxisWave 166 tempName= cleanLastFileName+"_s"165 tempName=dataStr + cleanLastFileName+"_s" 167 166 Duplicate/O $tempName yErrWave 168 167 169 168 //Plot, and adjust the scaling to match the axis scaling set by the popups 170 A_Rescale_Data( )169 A_Rescale_Data(dataStr) 171 170 172 171 End … … 209 208 // (does not fit the data) 210 209 // 211 Function A_Rescale_Data() 210 // dataStr is the root:folder: of the data that was loaded 211 Function A_Rescale_Data(dataStr) 212 String dataStr 212 213 213 214 //Scaling exponents and background value … … 250 251 //do the rescaling of the data 251 252 // get the current experimental q, I, and std dev. waves (as they would be loaded ) 252 253 //ControlInfo/W=A_FitPanel ywave 254 //get the filename from the global as it's loaded, rather from the popup - as version numbers 255 // do cause problems here. This global is also used later in this function 256 SVAR gLastFileName = root:myGlobals:gLastFileName 257 258 Wave xw = $( CleanupName((gLastFileName + "_q"),0) ) 259 Wave yw = $( CleanupName((gLastFileName + "_i"),0) ) 260 Wave ew = $( CleanupName((gLastFileName + "_s"),0) ) 253 String baseStr = ParseFilePath(0,dataStr,":",1,0) //give me the last part of the path 254 255 Wave xw = $(dataStr+baseStr+"_q") 256 Wave yw = $(dataStr+baseStr+"_i") 257 Wave ew = $(dataStr+baseStr+"_s") 261 258 262 259 //variables set for each model to control look of graph … … 420 417 //plot the data 421 418 422 String cleanLastFileName = "root:"+CleanupName(gLastFileName,0)419 // String cleanLastFileName = "root:"+CleanupName(gLastFileName,0) 423 420 If(WinType("A_FitWindow") == 0) 424 421 Display /W=(5,42,480,400)/K=1 yAxisWave vs xAxisWave … … 436 433 SetAxis/A 437 434 ModifyGraph tickUnit=1 //suppress tick units in labels 438 TextBox/C/N=textLabel/A=RB "File = "+ cleanLastFileName435 TextBox/C/N=textLabel/A=RB "File = "+baseStr 439 436 //clear the old fit from the window, if it exists 440 437 RemoveFromGraph/W=A_FitWindow/Z fit_yAxisWave … … 495 492 Abort "You must Load and Plot a File before fitting the data" 496 493 endif 494 497 495 // rescale the data, to make sure it's as selected on the panel 498 A_Rescale_Data() 496 ControlInfo/W=A_FitPanel $"ywave" 497 String partialName = CleanupName(S_value,0) 498 A_Rescale_Data("root:"+partialName+":") 499 499 500 500 // now go do the fit … … 524 524 //ystr and xstr are the axis strings - filter with a do-loop 525 525 String ystr="",xstr="" 526 SVAR gLastFileName = root:myGlobals:gLastFileName527 526 //ControlInfo/W=A_FitPanel ywave 528 Wave xw = $( CleanupName((gLastFileName + "_q"),0))527 Wave xw = $("root:"+partialName+":"+partialName + "_q") 529 528 ControlInfo/W=A_FitPanel yModel 530 529 ystr = S_Value … … 735 734 DoWindow/K $"A_FitWindow" 736 735 endif 736 SetDataFolder root: 737 Killwaves/Z xAxisWave,yAxisWave,yErrWave,residWave,yWtWave,fit_yAxisWave 737 738 Execute/P "DELETEINCLUDE \"LinearizedFits\"" 738 739 Execute/P "COMPILEPROCEDURES "
Note: See TracChangeset
for help on using the changeset viewer.