Changeset 213


Ignore:
Timestamp:
Nov 29, 2007 5:25:04 PM (15 years ago)
Author:
srkline
Message:

Changed NSORT to have two new checkboxes:
1) Preview Only - if checked does the indicated scaling, does not write a file
2) Overlap warning - if AUTO overlap is 5% away from unity, a warning is presented. If you manually enter a number that is too big or small, that is your problem.

Defaults are for NO autoscale, NO preview, YES Warning. This has the effect of writing out files with all scalings == 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/SANSReduction/trunk/Put in User Procedures/SANS_Reduction_v5.00/NSORT.ipf

    r167 r213  
    372372        //Print "val = ",val 
    373373 
     374        Variable tol=1.05                       //5% is the preferred number (for Andrew and Lionel, at least) 
     375 
     376        ControlInfo/W=NSORT_Panel WarningCheck 
     377        if(( V_Value==1 ) && ( (val > tol) || (val < 1/tol) ) ) 
     378                String str="" 
     379                sprintf str,"The scaling factor is more than a factor of %g from 1. Proceed with caution.\r",tol 
     380                DoAlert 0,str 
     381        endif 
     382         
    374383        Return val 
    375384End 
     
    711720        DrawLine 0,363,346,363 
    712721        DrawText 31,357,"To Manually scale data, enter scale factors above" 
    713         Button NSORT_Done,pos={274,384},size={50,20},proc=NSORT_DoneButton,title="Done" 
     722        Button NSORT_Done,pos={274,387},size={50,20},proc=NSORT_DoneButton,title="Done" 
    714723        Button NSORT_Done,help={"closes the panel"} 
    715724        Button Plot_1,pos={279,63},size={50,20},proc=Plot_0_Button,title="Plot" 
     
    744753        SetVariable beg_3,fSize=10,help={"How many points to remove from the low-q end of this dataset"} 
    745754        SetVariable beg_3,limits={-Inf,Inf,0},value= root:myGlobals:NSORT:gPtsBeg3 
    746         Button DoCombine,pos={13,382},size={160,20},proc=WriteNSORTFileButton,title="Write Combined File" 
     755        Button DoCombine,pos={13,387},size={160,20},proc=WriteNSORTFileButton,title="Write Combined File" 
    747756        Button DoCombine,help={"Combine and normalize the selected files as specifed"} 
    748757        SetVariable scale_12,pos={159,305},size={160,14},proc=SetScale_12,title="Mult factor 1-2" 
     
    769778        CheckBox AutoCheck,pos={14,310},size={100,20},title="Auto Scale",value=0 
    770779        CheckBox AutoCheck,help={"If checked, the scale factor will be automatically determined, if not checked, the current values in the fields will be used"} 
     780        CheckBox PreviewCheck,pos={15,369},size={74,14},title="Preview Only",value= 0 
     781        CheckBox WarningCheck,pos={111,369},size={93,14},title="Overlap warning?",value= 1 
    771782EndMacro 
    772783 
     
    10611072                        Variable/G root:myGlobals:NSORT:gScale2_3 = 1 
    10621073                        //If any of them have three columns write three column data 
    1063                         err=Write3ColNSORTedFile(q12,i12,sig12,name1,name2,name3,normToStr,norm12,norm23) 
     1074                         
     1075                        ControlInfo/W=NSORT_Panel PreviewCheck 
     1076                        if( V_Value==0 )                //if zero skip the preview and write out the file 
     1077                                err=Write3ColNSORTedFile(q12,i12,sig12,name1,name2,name3,normToStr,norm12,norm23) 
     1078                        endif 
    10641079                        //cleanup waves before exiting 
    10651080                        KillWaves/Z q12,i12,sig12 
     
    11431158                //write out the set here and stop 
    11441159         
    1145                 err=Write3ColNSORTedFile(q123,i123,sig123,name1,name2,name3,normToStr,norm12,norm23) 
     1160                ControlInfo/W=NSORT_Panel PreviewCheck 
     1161                if( V_Value==0 )                //if zero skip the preview and write out the file 
     1162                        err=Write3ColNSORTedFile(q123,i123,sig123,name1,name2,name3,normToStr,norm12,norm23) 
     1163                endif 
    11461164                //cleanup waves before exiting 
    11471165                KillWaves/Z q12,i12,sig12,q123,i123,sig123 
     
    12511269                        norm23 = 1              //norm23 was not used 
    12521270                        Variable/G root:myGlobals:NSORT:gScale2_3 = 1 
    1253                         //If any of them have three columns write three column data 
    1254                         err=Write6ColNSORTedFile(q12,i12,sig12,sq12,qb12,fs12,name1,name2,name3,normToStr,norm12,norm23) 
    1255                         //cleanup waves before exiting 
     1271                         
     1272                        ControlInfo/W=NSORT_Panel PreviewCheck 
     1273                        if( V_Value==0 )                //if zero skip the preview and write out the file 
     1274                                //If any of them have three columns write three column data 
     1275                                err=Write6ColNSORTedFile(q12,i12,sig12,sq12,qb12,fs12,name1,name2,name3,normToStr,norm12,norm23) 
     1276                        endif 
     1277                        // always clean up waves before exiting 
    12561278                        KillWaves/Z q12,i12,sig12,sq12,qb12,fs12 
    12571279                        return err 
     
    13471369                //write out the set here and stop 
    13481370         
    1349                 err=Write6ColNSORTedFile(q123,i123,sig123,sq123,qb123,fs123,name1,name2,name3,normToStr,norm12,norm23) 
     1371                ControlInfo/W=NSORT_Panel PreviewCheck 
     1372                if( V_Value==0 )                //if zero skip the preview and write out the file 
     1373                        err=Write6ColNSORTedFile(q123,i123,sig123,sq123,qb123,fs123,name1,name2,name3,normToStr,norm12,norm23) 
     1374                endif 
    13501375                //cleanup waves before exiting 
    13511376                KillWaves/Z q12,i12,sig12,sq12,qb12,fs12,q123,i123,sig123,sq123,qb123,fs123 
Note: See TracChangeset for help on using the changeset viewer.