Ignore:
Timestamp:
Jun 3, 2010 6:53:19 PM (13 years ago)
Author:
ajj
Message:

Updates and fixes to make ANSTO data reduction work.

  • Translated existing code from 6.x version of macros to 7.x

Plus!

  • Transmission calculation now works
  • Next/Prev? works (assuming contiguous numbering)
  • File associations for transmission are stored
  • Catalog is appropriately sorted
File:
1 edited

Legend:

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

    r689 r707  
    5858        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:MCR"              //added Mar 2008 
    5959        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:Pos"              //added Mar 2010 
     60        //For ANSTO 
     61        Make/O/T/N=0 $"root:myGlobals:CatVSHeaderInfo:SICS"      
     62        Make/O/T/N=0 $"root:myGlobals:CatVSHeaderInfo:HDF" 
    6063         
    6164        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:Reactorpower"       //only used for for ILL, June 2008, 
     
    8487        WAVE MCR = $"root:myGlobals:CatVSHeaderInfo:MCR"                //added Mar 2008 
    8588        WAVE Pos = $"root:myGlobals:CatVSHeaderInfo:Pos" 
    86          
     89        //For ANSTO 
     90        WAVE SICS = $"root:myGlobals:CatVSHeaderInfo:SICS"       
     91        WAVE HDF = $"root:myGlobals:CatVSHeaderInfo:HDF" 
    8792         
    8893        If(V_Flag==0) 
     
    101106                ModifyTable width(:myGlobals:CatVSHeaderInfo:Field)=50 
    102107                ModifyTable width(:myGlobals:CatVSHeaderInfo:MCR)=50 
     108#if (exists("QUOKKA")==6) 
     109                //ANSTO 
     110                ModifyTable width(:myGlobals:CatVSHeaderInfo:SICS)=80 
     111                ModifyTable width(:myGlobals:CatVSHeaderInfo:HDF)=40 
     112#endif           
     113                 
    103114#if (exists("ILL_D22")==6) 
    104115                ModifyTable width(:myGlobals:CatVSHeaderInfo:Reactorpower)=50           //activate for ILL, June 2008 
     
    135146                //get a valid file based on this partialName and catPathName 
    136147                tempName = FindValidFilename(partialName) 
     148                 
    137149                 
    138150                If(cmpstr(tempName,"")==0)              //a null string was returned 
     
    162174                ii+=1 
    163175        while(ii<numitems) 
    164 //Now sort them all based on the suffix data (orders them as collected) 
     176//Now sort them all based on some criterion that may be facility dependent (aim is to order them as collected) 
    165177        SortWaves() 
    166178//Append the files that are not raw files to the list 
     
    213225        Wave GPos = $"root:myGlobals:CatVSHeaderInfo:Pos" 
    214226        Wave/Z GReactPow = $"root:myGlobals:CatVSHeaderInfo:ReactorPower"               //activate for ILL June 2008 ( and the sort line too) 
     227        //For ANSTO 
     228        Wave/T GSICS = $"root:myGlobals:CatVSHeaderInfo:SICS" 
     229        Wave/T GHDF = $"root:myGlobals:CatVSHeaderInfo:HDF" 
    215230 
    216231#if (exists("ILL_D22")==6) 
     
    219234        //      Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR 
    220235        Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,GPos,gNumGuides 
     236#elif (exists("QUOKKA")==6) 
     237    //ANSTO 
     238        Sort GFilenames, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR, GSICS, GHDF 
    221239#else 
    222240//      Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR 
     
    251269        Wave Pos = $"root:myGlobals:CatVSHeaderInfo:Pos" 
    252270        Wave/Z ReactorPower = $"root:myGlobals:CatVSHeaderInfo:reactorpower"       //activate for ILL, June 08 (+ edit line) 
     271        Wave/Z SICS = $"root:myGlobals:CatVSHeaderInfo:SICS" // For ANSTO June 2010 
     272        Wave/Z HDF = $"root:myGlobals:CatVSHeaderInfo:HDF" // For ANSTO June 2010 
     273         
    253274#if (exists("ILL_D22")==6) 
    254275        Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR, ReactorPower as "Data File Catalog" 
     
    260281// alternate ordering, put the magnetic information first 
    261282//      Edit Filenames, Labels, RotAngle, Temperature, Field, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens as "Data File Catalog" 
     283#elif (exists("QUOKKA")==6) 
     284        //ANSTO 
     285        Edit Filenames, Labels, DateAndTime,  SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR,SICS, HDF as "Data File Catalog" 
    262286#else 
    263         // either HFIR or ANSTO 
     287        // HFIR or anything else 
    264288        Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR as "Data File Catalog" 
    265289#endif 
     
    286310        Wave/T GLabels = $"root:myGlobals:CatVSHeaderInfo:Labels" 
    287311        Wave/T GDateTime = $"root:myGlobals:CatVSHeaderInfo:DateAndTime" 
     312        //ANSTO 
     313        Wave/T GSICS = $"root:myGlobals:CatVSHeaderInfo:SICS" 
     314        Wave/T GHDF = $"root:myGlobals:CatVSHeaderInfo:HDF" 
     315        //END ANSTO 
    288316        Wave GSDD = $"root:myGlobals:CatVSHeaderInfo:SDD" 
    289317        Wave GLambda = $"root:myGlobals:CatVSHeaderInfo:Lambda" 
     
    328356        InsertPoints lastPoint,1,GLabels 
    329357        GLabels[lastPoint]=getSampleLabel(fname) 
     358         
     359        #if (exists("QUOKKA")==6) 
     360                InsertPoints lastPoint,1,GSICS 
     361                GSICS[lastPoint]=getSICSVersion(fname) 
     362                         
     363                //read the HDF version 
     364                InsertPoints lastPoint,1,GHDF 
     365                GHDF[lastPoint]=getHDFVersion(fname) 
     366        #endif 
    330367                 
    331368        //read the reals 
Note: See TracChangeset for help on using the changeset viewer.