Ignore:
Timestamp:
Feb 17, 2017 1:55:05 PM (6 years ago)
Author:
srkline
Message:

many additions.

Moved unused igor/nexus testing files to Vx_ prefix since they're garbage. Pulled out the useful bits for mask and div R/W and moved those to theire appropriate procedures.

Testing the simple correction of data, only tested basic subtraction. All of it still needs to be verified since I don't have any real header numbers and units yet.

Adjusted the columns on the file catalog to be more appropriate, and added a hook to allow loading of raw data files directly from the table and a popup contextual menu. May add more functionality to it later.

Corrected how the 1D data is plotted so that it correctly uses the binning type. I(q) save now also uses the binning as specified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_FileCatalog.ipf

    r1018 r1023  
    1414// -- clean up and remove all of the references to other facilities, since they will not have VSANS modules 
    1515// -- add in more appropriate and some missing fields more useful to VSANS (intent, multiple beam centers, etc.) 
     16// -- can I make the choice of columns customizable? There are "sets" of columns that are not used for  
     17//    some experiments (magnetic, rotation, temperature scans, etc.) but are necessary for others. 
    1618// 
    1719// TODO PRIORITY: 
     
    1921//    files that are NOT RAW VSANS data (MASK and DIV, but these are HDF) 
    2022// x- WHY -- because if I PATCH anything, then re-run the catalog, the changes are NOT shown, since the  
    21 //    reader will g to the LOCAL copy first! So maybe I need to clear the folder out before I start the  
     23//    reader will go to the LOCAL copy first! So maybe I need to clear the folder out before I start the  
    2224//    file catalog 
    23 // -- maybe it's a good thing to wipe out the RawVSANS folder before an Experiment SAVE (to save a LOT of  
     25// x- maybe it's a good thing to wipe out the RawVSANS folder before an Experiment SAVE (to save a LOT of  
    2426//    space on disk and a potentially VERY long save 
    2527// x- see V_CleanOutRawVSANS() in V_Utilities_General for the start of this (this is now called in  
     
    3335//     the "patched" values are written locally too, then maybe the update from disk is not needed. 
    3436//     But typically, I'd like to see that the disk version really did get updated... 
    35 // 
     37// -- make a background task to periodically "kill" a few of the files? maybe too dangerous. 
     38 
     39 
     40 
    3641 
    3742// 
     
    6974         
    7075        Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 
    71         Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
     76//      Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
    7277        Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 
    7378        Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 
    74         Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
     79//      Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
    7580        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 
    7681        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 
     
    7984        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 
    8085        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 
    81         Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
    82         Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
     86//      Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
     87//      Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
    8388        Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 
    8489        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 
    85         Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
    86         Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
     90//      Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
     91//      Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
    8792        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 
    8893        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 
     
    9095        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR"            //added Mar 2008 
    9196        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos"            //added Mar 2010 
     97        Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 
     98        Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 
    9299 
    93100 
    94101        WAVE/T Filenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 
    95         WAVE/T Suffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
     102//      WAVE/T Suffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
    96103        WAVE/T Labels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 
    97104        WAVE/T DateAndTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 
    98         WAVE SDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
     105//      WAVE SDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
    99106        WAVE Lambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 
    100107        WAVE CntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 
     
    103110        WAVE Transmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 
    104111        WAVE Thickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 
    105         WAVE XCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
    106         WAVE YCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
     112//      WAVE XCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
     113//      WAVE YCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
    107114 
    108115        WAVE/T nGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 
    109116        WAVE NumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 
    110         WAVE RunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
    111         WAVE IsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
     117//      WAVE RunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
     118//      WAVE IsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
    112119        WAVE RotAngle = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 
    113120        WAVE Temperature = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 
     
    115122        WAVE MCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR"              //added Mar 2008 
    116123        WAVE Pos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 
     124        WAVE/T Intent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 
     125        WAVE Group_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 
    117126 
    118127         
    119128        If(V_Flag==0) 
    120129                V_BuildTableWindow() 
    121                 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD)=40 
     130//              ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD)=40 
    122131                ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda)=40 
    123132                ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime)=50 
     
    126135                ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission)=40 
    127136                ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness)=40 
    128                 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter)=40 
    129                 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter)=40 
     137//              ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter)=40 
     138//              ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter)=40 
    130139                ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens)=30 
    131140                ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle)=50 
     
    137146                ModifyTable sigDigits(root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos)=3                   //to make the display look nice, given the floating point values from ICE 
    138147                ModifyTable sigDigits(root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda)=3                //may not work in all situations, but an improvement 
    139                 ModifyTable sigDigits(root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD)=5 
     148//              ModifyTable sigDigits(root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD)=5 
    140149                ModifyTable trailingZeros(root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature)=1 
    141150                ModifyTable sigDigits(root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature)=4 
    142151 
    143152                ModifyTable width(Point)=0              //JUN04, remove point numbers - confuses users since point != run 
     153 
     154// TODO: 
     155//  -- experimental hook with contextual menu 
     156//               
     157                SetWindow kwTopWin hook=V_CatTableHook, hookevents=1    // mouse down events 
     158 
    144159        Endif 
    145160 
     
    147162// NEW for VSANS 
    148163// clear out the folders in the RawVSANS folder, otherwise any changes/patches written to disk 
    149 // will not be read in, the "bad" local copy will be read in. 
     164// will not be read in, the "bad" local copy will be read in for any subsequent operations. 
    150165// TODO: 
    151 //  -- this *may* be a very slow operation. Warn users. Give them a choice to keep local copies. If 
     166//  -- this *may* be a very slow operation. Warn users. Give them a choice to keep local copies? If 
    152167//     the "patched" values are written locally too, then maybe the update from disk is not needed. 
    153168//     But typically, I'd like to see that the disk version really did get updated... 
     
    155170        //      V_CleanOutRawVSANS() 
    156171// This will display a progress bar 
    157         V_CleanupData_w_Progress(0,1) 
    158  
     172        Variable numToClean 
     173        numToClean = V_CleanupData_w_Progress(0,1) 
     174 
     175        Print "Cleaned # files = ",numToClean 
     176        Print "Cleanup time (s) = ",(ticks - t1)/60.15 
     177        Variable cleanupTime = (ticks - t1)/60.15 
    159178 
    160179        //get a list of all files in the folder, some will be junk version numbers that don't exist      
     
    212231        KillWaves/Z notRAWlist 
    213232// 
    214 //      Print "Total time (s) = ",(ticks - t1)/60.15 
    215 //      Print "Time per raw data file (s) = ",(ticks - t1)/60.15/(numItems-numpnts(notRawList)) 
     233        Print "Total time (s) = ",(ticks - t1)/60.15 
     234        Print "Time per raw data file (without cleanup time) (s) = ",( (ticks - t1)/60.15 - cleanupTime)/(numItems-numpnts(notRawList)) 
    216235        // 
    217236        // clean out again, so that the file SAVE is not slow due to the large experiment size 
     
    223242        return(0) 
    224243End 
     244 
     245// 
     246// TODO: 
     247// -- this is experimental... 
     248// -- what else to add to the menu? 
     249// -- add directly to WORK files? 
     250// -- "set" as some special file type, intent, use? 
     251// -- "check" the reduction protocol for completeness? 
     252// 
     253// x- seems to not "let go" of a selection (missing the mouse up?) 
     254//    (possibly) less annoying if I only handle mouseup and present a menu then. 
     255// 
     256Function V_CatTableHook(infoStr) 
     257        String infoStr 
     258        String event= StringByKey("EVENT",infoStr) 
     259//      print infoStr 
     260//      Print "EVENT= ",event 
     261        strswitch(event) 
     262//              case "mousedown": 
     263                case "mouseup": 
     264//                      Variable xpix= NumberByKey("MOUSEX",infoStr) 
     265//                      Variable ypix= NumberByKey("MOUSEY",infoStr) 
     266//                      PopupContextualMenu/C=(xpix, ypix) "yes;no;maybe;" 
     267                        PopupContextualMenu "Load RAW;no;maybe;" 
     268                        strswitch(S_selection) 
     269                                case "Load RAW": 
     270                                        // do something because "yes" was chosen 
     271                                        //print "yes" 
     272                                        WAVE/T Filenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 
     273                                        GetSelection table,CatVSANSTable,1 
     274//                                      Print V_flag, V_startRow, V_startCol, V_endRow, V_endCol 
     275                                        Print "Loading " + FileNames[V_StartRow] 
     276                                        Variable err = V_LoadHDF5Data(FileNames[V_StartRow],"RAW") 
     277                                        if(!err)                //directly from, and the same steps as DisplayMainButtonProc(ctrlName) 
     278                                                SVAR hdfDF = root:file_name                     // last file loaded, may not be the safest way to pass 
     279                                                String folder = StringFromList(0,hdfDF,".") 
     280                                                 
     281                                                // this (in SANS) just passes directly to fRawWindowHook() 
     282                                                Execute "UpdateDisplayInformation(\"RAW\")"             // plot the data in whatever folder type 
     283                                                 
     284                                                FakeRestorePanelsButtonClick()          //so the panels display correctly 
     285                                                 
     286                                                // set the global to display ONLY if the load was called from here, not from the  
     287                                                // other routines that load data (to read in values) 
     288                                                SVAR gLast = root:Packages:NIST:VSANS:Globals:gLastLoadedFile 
     289                                                gLast = hdfDF 
     290                                                 
     291                                        endif 
     292                                        break; 
     293                                case "no": 
     294                                        print "no" 
     295                                        break; 
     296                                case "maybe": 
     297                                        // do something because "maybe" was chosen 
     298                                        break; 
     299                        endswitch 
     300        endswitch 
     301        return 0 
     302End 
     303 
     304 
    225305 
    226306//appends the list of files that are not RAW SANS data to the filename wave (1st column) 
     
    242322Function V_SortWaves() 
    243323        Wave/T GFilenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 
    244         Wave/T GSuffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
     324//      Wave/T GSuffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
    245325        Wave/T GLabels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 
    246326        Wave/T GDateTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 
    247         Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
     327//      Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
    248328        Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 
    249329        Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 
     
    252332        Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 
    253333        Wave GThickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 
    254         Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
    255         Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
     334//      Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
     335//      Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
    256336 
    257337        Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 
    258338        Wave GNumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 
    259         Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
    260         Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
     339//      Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
     340//      Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
    261341        Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 
    262342        Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 
     
    264344        Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR"             //added Mar 2008 
    265345        Wave GPos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 
    266  
    267  
    268 // TODO -- the default sort is by SUFFIX, which does not exist for VSANS. So decide on a better key 
    269         Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,GPos,gNumGuides 
     346        Wave/T GIntent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 
     347        Wave G_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 
     348 
     349 
     350// DONE 
     351// x- the default sort is by SUFFIX, which does not exist for VSANS. So decide on a better key 
     352//     now, the sort is by FileName by default 
     353//      Sort GFilenames, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,GPos,gNumGuides 
     354        Sort GFilenames, GFilenames, GLabels, GDateTime,  GIntent, G_ID, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,GRot,GTemp,GField,GMCR,GPos,gNumGuides 
    270355 
    271356        return(0) 
     
    278363        Wave/T Labels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 
    279364        Wave/T DateAndTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 
    280         Wave SDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
     365//      Wave SDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
    281366        Wave Lambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 
    282367        Wave CntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 
     
    285370        Wave Transmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 
    286371        Wave Thickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 
    287         Wave XCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
    288         Wave YCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
     372//      Wave XCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
     373//      Wave YCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
    289374 
    290375        Wave/T NumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 
     
    295380        Wave MCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR"              //added Mar 2008 
    296381        Wave Pos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 
    297  
     382        Wave/T Intent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 
     383        Wave Group_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 
    298384 
    299385// original order, magnetic at the end 
    300386//      Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR as "Data File Catalog" 
    301387// with numGuides 
    302         Edit Filenames, Labels, DateAndTime, SDD, Lambda, numGuides, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR, Pos as "Data File Catalog" 
    303 // alternate ordering, put the magnetic information first 
    304 //      Edit Filenames, Labels, RotAngle, Temperature, Field, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens as "Data File Catalog" 
     388//      Edit Filenames, Labels, DateAndTime, SDD, Lambda, numGuides, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR, Pos as "Data File Catalog" 
     389        Edit Filenames, Labels, DateAndTime,  Intent, Group_ID, Lambda, numGuides, CntTime, TotCnts, CntRate, Transmission, Thickness, NumAttens, RotAngle, Temperature, Field, MCR, Pos as "Data File Catalog" 
    305390 
    306391 
     
    321406 
    322407        Wave/T GFilenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 
    323         Wave/T GSuffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
     408//      Wave/T GSuffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
    324409        Wave/T GLabels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 
    325410        Wave/T GDateTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 
    326411 
    327         Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
     412//      Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
    328413        Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 
    329414        Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 
     
    332417        Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 
    333418        Wave GThickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 
    334         Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
    335         Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
     419//      Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
     420//      Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
    336421        Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 
    337422        Wave GNumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 
    338         Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
    339         Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
     423//      Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
     424//      Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
    340425        Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 
    341426        Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 
     
    343428        Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" 
    344429        Wave GPos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 
     430        Wave/T GIntent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 
     431        Wave G_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 
    345432 
    346433        lastPoint = numpnts(GLambda) 
     
    350437        GFilenames[lastPoint]=sname 
    351438         
    352         //read the file alphanumeric suffix 
    353         // TODO -- this does not exist for VSANS - so is there an equivalent, or delete? 
    354         InsertPoints lastPoint,1,GSuffix 
    355         GSuffix[lastPoint]="unknown" 
     439//      //read the file alphanumeric suffix 
     440//      // TODO -- this does not exist for VSANS - so is there an equivalent, or delete? 
     441//      InsertPoints lastPoint,1,GSuffix 
     442//      GSuffix[lastPoint]="unknown" 
    356443 
    357444        //read the counting time (integer) 
     
    392479        GThickness[lastPoint]=V_getSampleThickness(fname) 
    393480 
    394         // TODO --  the x and y center have different meaning, since there are multiple panels 
    395         // TODO -- remove the hard-wiring 
    396         String detStr = "FL" 
    397         //XCenter of beam on detector 
    398         InsertPoints lastPoint,1,GXCenter 
    399         GXCenter[lastPoint]=V_getDet_beam_center_x(fname,detStr) 
    400          
    401         // TODO --  the x and y center have different meaning, since there are multiple panels 
    402         //YCenter 
    403         InsertPoints lastPoint,1,GYCenter 
    404         GYCenter[lastPoint]=V_getDet_beam_center_y(fname,detStr) 
    405  
    406         // TODO -- SDD has no real meaning - since there are multiple distances to report 
    407         //SDD 
    408         InsertPoints lastPoint,1,GSDD 
    409         GSDD[lastPoint]=V_getDet_ActualDistance(fname,detStr) 
     481//      // TODO --  the x and y center have different meaning, since there are multiple panels 
     482//      // TODO -- remove the hard-wiring 
     483//      String detStr = "FL" 
     484//      //XCenter of beam on detector 
     485//      InsertPoints lastPoint,1,GXCenter 
     486//      GXCenter[lastPoint]=V_getDet_beam_center_x(fname,detStr) 
     487//       
     488//      // TODO --  the x and y center have different meaning, since there are multiple panels 
     489//      //YCenter 
     490//      InsertPoints lastPoint,1,GYCenter 
     491//      GYCenter[lastPoint]=V_getDet_beam_center_y(fname,detStr) 
     492 
     493//      // TODO -- SDD has no real meaning - since there are multiple distances to report 
     494//      //SDD 
     495//      InsertPoints lastPoint,1,GSDD 
     496//      GSDD[lastPoint]=V_getDet_ActualDistance(fname,detStr) 
    410497         
    411498        //wavelength 
     
    427514        GField[lastPoint]=1000 
    428515         
    429         //Beamstop position (not reported) 
    430         //strToExecute = GBLoadStr + "/S=368/U=1" + "\"" + fname + "\"" 
    431  
    432         //the run number (not displayed in the table, but carried along) 
    433         InsertPoints lastPoint,1,GRunNumber 
    434         GRunNumber[lastPoint] = V_GetRunNumFromFile(sname) 
    435  
    436         // TODO -- the isTransFile utility has not yet been written 
    437         // 0 if the file is a scattering  file, 1 (truth) if the file is a transmission file 
    438         InsertPoints lastPoint,1,GIsTrans 
    439         GIsTrans[lastPoint]  = V_isTransFile(fname)             //returns one if beamstop is "out" 
     516 
     517//      //the run number (not displayed in the table, but carried along) 
     518//      InsertPoints lastPoint,1,GRunNumber 
     519//      GRunNumber[lastPoint] = V_GetRunNumFromFile(sname) 
     520// 
     521//      // TODO -- the isTransFile utility has not yet been written 
     522//      // 0 if the file is a scattering  file, 1 (truth) if the file is a transmission file 
     523//      InsertPoints lastPoint,1,GIsTrans 
     524//      GIsTrans[lastPoint]  = V_isTransFile(fname)             //returns one if beamstop is "out" 
    440525         
    441526        // Monitor Count Rate 
     
    452537        InsertPoints lastPoint,1,GPos 
    453538        GPos[lastPoint] = str2num(V_getSamplePosition(fname)) 
     539 
     540// Intent (text) 
     541        InsertPoints lastPoint,1,GIntent 
     542        GIntent[lastPoint] = V_getReduction_intent(fname) 
     543         
     544// group_id (sample) 
     545        InsertPoints lastPoint,1,G_ID 
     546        G_ID[lastPoint] = V_getSample_group_ID(fname) 
    454547 
    455548        return(0) 
     
    489582        Button SortLabelsButton,                        pos={25,38},            size={140,24},proc=V_CatVSANSTable_SortProc,title="Labels" 
    490583        Button SortDateAndTimeButton,   pos={25,68},            size={140,24},proc=V_CatVSANSTable_SortProc,title="Date and Time" 
    491         Button SortSSDButton,                   pos={25,98},            size={140,24},proc=V_CatVSANSTable_SortProc,title="SSD" 
    492         Button SortSDDButton,                   pos={25,128},   size={140,24},proc=V_CatVSANSTable_SortProc,title="SDD" 
     584        Button SortIntentButton,                        pos={25,98},            size={140,24},proc=V_CatVSANSTable_SortProc,title="Intent" 
     585        Button SortIDButton,                    pos={25,128},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Group ID" 
    493586        Button SortLambdaButton,                        pos={25,158},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Lambda" 
    494587        Button SortCountTimButton,              pos={25,188},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Count Time" 
     
    520613 
    521614        Wave/T GFilenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 
    522         Wave/T GSuffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
     615//      Wave/T GSuffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 
    523616        Wave/T GLabels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 
    524617        Wave/T GDateTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 
    525         Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
     618//      Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 
    526619        Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 
    527620        Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 
     
    530623        Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 
    531624        Wave GThickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 
    532         Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
    533         Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
     625//      Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 
     626//      Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 
    534627        Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 
    535628        Wave GNumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 
    536         Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
    537         Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
     629//      Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 
     630//      Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 
    538631        Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 
    539632        Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 
     
    541634        Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" 
    542635        Wave GPos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 
     636        Wave/T GIntent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 
     637        Wave G_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 
    543638 
    544639         
     
    557652         
    558653                case "SortFilenamesButton": 
    559                         Sort GFilenames, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 
     654//                      Sort GFilenames, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 
     655                        Sort GFilenames,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
    560656                        break 
    561657                         
    562658                case "SortLabelsButton": 
    563                         Sort GLabels, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 
     659//                      Sort GLabels, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 
     660                        Sort GLabels,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
    564661                        break 
    565662                         
    566663                case "SortDateAndTimeButton": 
    567                         Sort GDateTime, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 
    568                         break 
    569                          
    570                 case "SortSSDButton": 
    571                         break 
    572                          
    573                 case "SortSDDButton": 
    574                         Sort GSDD, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     664//                      Sort GDateTime, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 
     665                        Sort GDateTime,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
     666 
     667                        break 
     668                         
     669                case "SortIntentButton": 
     670                        Sort GIntent,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
     671                        break 
     672                         
     673                case "SortIDButton": 
     674                        Sort G_ID,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
    575675                        break 
    576676                         
    577677                case "SortLambdaButton": 
    578                         Sort GLambda, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     678//                      Sort GLambda, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     679                        Sort GLambda,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
     680 
    579681                        break 
    580682                         
    581683                case "SortCountTimButton": 
    582                         Sort GCntTime, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     684//                      Sort GCntTime, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     685                        Sort GCntTime,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
     686 
    583687                        break 
    584688                         
    585689                case "SortTotalCountsButton": 
    586                         Sort GTotCnts, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     690//                      Sort GTotCnts, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     691                        Sort GTotCnts,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
     692 
    587693                        break 
    588694                         
    589695                case "SortCountRateButton": 
    590                         Sort GCntRate, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     696//                      Sort GCntRate, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     697                        Sort GCntRate,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
     698 
    591699                        break 
    592700                         
     
    595703                         
    596704                case "SortTransmissionButton": 
    597                         Sort GTransmission, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     705//                      Sort GTransmission, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     706                        Sort GTransmission,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
     707 
    598708                        break 
    599709                         
    600710                case "SortThicknessButton": 
    601                         Sort GThickness, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     711//                      Sort GThickness, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR  
     712                        Sort GThickness,  GFilenames, GLabels, GDateTime,  GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness,   GNumAttens,   GRot, GTemp, GField, GMCR, GIntent, G_ID 
     713 
    602714                        break 
    603715         
Note: See TracChangeset for help on using the changeset viewer.