Ignore:
Timestamp:
Mar 16, 2010 5:50:17 PM (13 years ago)
Author:
srkline
Message:

A variety of changes to get some of the basic reduction functions working with HFIR raw data files.

Patch now works correctly without duplicating file names in the popup list.

Transmissions can be assigned and calculated now that I've changed the critera for deciding if a file is a transmission file. Hopefully this will always work - it's based on the beamstop y-position being less than 30 mm for all four beam stops.

When checking for a DIV file, it returns an OK if the extension is .xml, since the raw data and div files can't be distinguished like the binary VAX data.

The file catalog is correct, but still excruciatingly slow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/CatVSTable.ipf

    r605 r641  
    2424         
    2525        Variable err 
     26        Variable t1 = ticks 
     27         
    2628        PathInfo catPathName 
    2729        if(v_flag==0) 
     
    102104#endif 
    103105 
     106#if (exists("NCNR")==6) 
    104107                ModifyTable width(:myGlobals:CatVSHeaderInfo:nGuides)=40 
     108#endif 
    105109 
    106110                ModifyTable width(Point)=0              //JUN04, remove point numbers - confuses users since point != run 
     
    124128        Make/T/O/N=0 notRAWlist 
    125129        do 
     130         
    126131                //get current item in the list 
    127132                partialName = StringFromList(ii, list, ";") 
    128133                //get a valid file based on this partialName and catPathName 
    129134                tempName = FindValidFilename(partialName) 
     135                 
    130136                If(cmpstr(tempName,"")==0)              //a null string was returned 
    131137                        //write to notebook that file was not found 
     
    141147                        //make sure the file is really a RAW data file 
    142148                        ok = CheckIfRawData(fullName) 
     149                 
    143150                        if (!ok) 
    144151                                //write to notebook that file was not a RAW SANS file 
     
    159166        KillWaves/Z notRAWlist 
    160167// 
    161  
     168        Print "Total time (s) = ",(ticks - t1)/60.15 
     169        Print "Time per raw data file (s) = ",(ticks - t1)/60.15/(numItems-numpnts(notRawList)) 
     170        return(0) 
    162171End 
    163172 
     
    200209        Wave GField = $"root:myGlobals:CatVSHeaderInfo:Field" 
    201210        Wave GMCR = $"root:myGlobals:CatVSHeaderInfo:MCR"               //added Mar 2008 
     211         
    202212#if (exists("ILL_D22")==6) 
    203213        Wave GReactPow = $"root:myGlobals:CatVSHeaderInfo:ReactorPower"         //activate for ILL June 2008 ( and the sort line too) 
    204214        Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,GReactPow 
     215#endif 
     216 
     217#if (exists("NCNR")==6) 
     218        //      Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR 
     219        Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,gNumGuides 
    205220#else 
    206 //      Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR 
    207         Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,gNumGuides 
    208 #endif 
     221        //must be HFIR or ANSTO 
     222        Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR 
     223#endif 
     224 
    209225 
    210226        return(0) 
     
    236252        Wave ReactorPower = $"root:myGlobals:CatVSHeaderInfo:reactorpower"       //activate for ILL, June 08 (+ edit line) 
    237253        Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR, ReactorPower as "Data File Catalog" 
    238 #else 
     254#endif 
     255 
     256#if (exists("NCNR")==6) 
    239257// original order, magnetic at the end 
    240258//      Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR as "Data File Catalog" 
     
    243261// alternate ordering, put the magnetic information first 
    244262//      Edit Filenames, Labels, RotAngle, Temperature, Field, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens as "Data File Catalog" 
     263#else 
     264        // either HFIR or ANSTO 
     265        Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR as "Data File Catalog" 
    245266#endif 
    246267 
     
    379400#endif   
    380401 
    381 // number of guides 
     402// number of guides, only for NCNR 
     403#if (exists("NCNR")==6) 
    382404        InsertPoints lastPoint,1,GNumGuides 
    383405        GNumGuides[lastPoint]  = numGuides(getSourceToSampleDist(fname)) 
     406#endif 
    384407 
    385408        return(0) 
Note: See TracChangeset for help on using the changeset viewer.