Ignore:
Timestamp:
Nov 18, 2007 4:15:52 PM (15 years ago)
Author:
srkline
Message:

Three changes:

(1) in WorkfileUtils? - DetCorr?() now includes the correction to the detector efficiency at large angles as was described in John's memo of 3/20/2007. A small correction, increasing the measured intensity by at most a few percent at the largest scattering angles.

(2) Tweaks to the ascii output for Grasp, still untested.

(3) Changed beamstop x-tolerance to -8 cm to account for the 3" BS malfunction on NG3. Only affected recognition of transmission files, and easily worked around by resetting the BS position (NG1 Files to Trans function)

File:
1 edited

Legend:

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

    r201 r206  
    335335        String type,fullpath 
    336336        Variable dialog         //=1 will present dialog for name 
    337          
    338         Variable enter=StopMSTimer(-2) 
    339          
     337                 
    340338        String destStr="",ave="C",typeStr="" 
    341339        Variable step=1,refnum 
     
    396394        Endif 
    397395         
    398         Print "Before fill = ",(StopMSTimer(-2) - enter)/1e6 
    399396///////// 
    400397        Variable numTextLines=18 
     
    434431//              termStr = "\r\n" 
    435432//      Endif 
    436  
    437         Print "After fill = ",(StopMSTimer(-2) - enter)/1e6 
    438433         
    439434        Duplicate/O data,spWave          
    440435        Redimension/S/N=(pixelsX*pixelsY) spWave                //single precision (/S) 
    441436         
    442         Print "Before save = ",(StopMSTimer(-2) - enter)/1e6 
    443437        //not demo- compatible, but approx 100x faster!! 
    444438         
     
    457451        Print "2D ASCII File written: ", GetFileNameFromPathNoSemi(fullPath) 
    458452         
    459         Print "Before exit = ",(StopMSTimer(-2) - enter)/1e6 
    460453        return(0) 
    461454End 
    462455 
    463456 
    464 //// ASCII EXPORT in detector coordinates - mimicking the VAX ASCII/128 command 
     457//// ASCII EXPORT in detector coordinates - mimicking the VAX CONVERT command 
    465458// this is done simply to be able to produce converted raw data files that can be  
    466459// read in with Grasp. A rather awkward structure, definitely not the preferred export format 
     
    471464        String type,fullpath 
    472465        Variable dialog         //=1 will present dialog for name 
    473          
    474         Variable enter=StopMSTimer(-2) 
    475          
     466                 
    476467        String destStr="" 
    477468        String typeStr="" 
     
    522513        Endif 
    523514         
    524         Print "Before fill = ",(StopMSTimer(-2) - enter)/1e6 
    525515///////// 
    526516        String tmpStr="" 
     
    531521        labelWave[0] = tmpStr 
    532522        labelWave[1] = textw[6]         //label 
    533         sprintf tmpStr," %d   %g   %g   %g",intw[2],rw[0],rw[39],rw[2] 
     523         
     524        sprintf tmpStr," %d  %g  %g  %g",intw[2],rw[0],rw[39],rw[2] 
    534525        labelWave[2] = tmpStr 
    535526        labelWave[3] = " Cnt.Time(sec.)    Mon. Cnt.      Trans. Det. Cnt.  Tot. Det. Cnt." 
    536         sprintf tmpStr," %g   %g   %g   %g   %d   %d   %g",rw[4],rw[5],rw[8],rw[9],intw[4],intw[5],rw[6] 
     527         
     528        sprintf tmpStr," %g  %g  %g '%s' %g '%s' %d  %d  %g",rw[4],rw[5],rw[8],textw[7],rw[9],textw[8],intw[4],intw[5],rw[6] 
    537529        labelWave[4] = tmpStr 
    538530        labelWave[5] = " Trans.      Thckns       Temp.           H Field         Table  Holder  Pos" 
    539         sprintf tmpStr," %g   %g   %d   '%s'   %g",rw[26],rw[27],intw[9],textw[9],rw[7] 
     531         
     532        sprintf tmpStr," %g  %g  %d  '%s'  %g",rw[26],rw[27],intw[9],textw[9],rw[7] 
    540533        labelWave[6] = tmpStr 
    541534        labelWave[7] = " Wavelength &  Spread(FWHM)    Det.#  Type      Sample Rotation Angle" 
    542         sprintf tmpStr," %g   %g   %g   %g   %g   %g",rw[18],rw[19],rw[16],rw[17],rw[21],rw[3] 
     535         
     536        sprintf tmpStr," %g  %g  %g  %g  %g  %g",rw[18],rw[19],rw[16],rw[17],rw[21],rw[3] 
    543537        labelWave[8] = tmpStr 
    544538        labelWave[9] = " Sam-Det Dis.(m)   Det.Ang.(cm.)   Beam Center(x,y)  Beam Stop(mm)  Atten.No." 
    545         sprintf tmpStr," %g   %g   %g   %g   %g   %g",rw[10],rw[11],rw[12],rw[13],rw[14],rw[15] 
     539         
     540        sprintf tmpStr," %g  %g  %g  %g  %g  %g",rw[10],rw[11],rw[12],rw[13],rw[14],rw[15] 
    546541        labelWave[10] = tmpStr 
    547542        labelWave[11] = "        Det. Calib Consts. (x)           Det. Calib Consts. (y)" 
    548         sprintf tmpStr," %g  %g  %g  '%s'   %g   %g",rw[23],rw[24],rw[25],"    F",rw[32],rw[32] 
     543         
     544        sprintf tmpStr," %g  %g  %g  '%s'  %g  %g",rw[23],rw[24],rw[25],"    F",rw[45],rw[46] 
    549545        labelWave[12] = tmpStr 
    550546        labelWave[13] = " Aperture (A1,A2) Sizes(mm)    Sep.(m)    Flip ON   Horiz. and Vert. Cur.(amps)" 
     547         
    551548        sprintf tmpStr," %d  %d  %d  %d  %g  %g  %g",intw[19],intw[20],intw[21],intw[22],rw[47],rw[48],rw[49] 
    552549        labelWave[14] = tmpStr 
    553550        labelWave[15] = "      Rows        Cols       Factor   Qmin      Qmax" 
     551         
    554552        labelWave[16] = " Packed Counts by Rows (L -> R) and Top -> Bot" 
    555553          
     
    559557                labelWave[ii] = (labelWave[ii])[0,240] 
    560558        endfor 
    561  
    562         Print "After fill = ",(StopMSTimer(-2) - enter)/1e6 
    563559         
    564560        Duplicate/O data,spWave          
     
    581577                sPt=ePt 
    582578        while(ePt<len-1) 
    583          
    584         Print "Before save = ",(StopMSTimer(-2) - enter)/1e6 
    585          
     579                 
    586580        Open refNum as fullpath 
    587581        wfprintf refNum,"%s\r",labelWave                        //VAX uses just \r 
     
    593587        Print "2D ASCII File written for Grasp: ", GetFileNameFromPathNoSemi(fullPath) 
    594588         
    595         Print "Before exit = ",(StopMSTimer(-2) - enter)/1e6 
    596589        return(0) 
    597590End 
Note: See TracChangeset for help on using the changeset viewer.