 Timestamp:
 Feb 17, 2017 1:55:05 PM (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_FileCatalog.ipf
r1018 r1023 14 14 //  clean up and remove all of the references to other facilities, since they will not have VSANS modules 15 15 //  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. 16 18 // 17 19 // TODO PRIORITY: … … 19 21 // files that are NOT RAW VSANS data (MASK and DIV, but these are HDF) 20 22 // x WHY  because if I PATCH anything, then rerun 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 the23 // reader will go to the LOCAL copy first! So maybe I need to clear the folder out before I start the 22 24 // file catalog 23 //  maybe it's a good thing to wipe out the RawVSANS folder before an Experiment SAVE (to save a LOT of25 // x maybe it's a good thing to wipe out the RawVSANS folder before an Experiment SAVE (to save a LOT of 24 26 // space on disk and a potentially VERY long save 25 27 // x see V_CleanOutRawVSANS() in V_Utilities_General for the start of this (this is now called in … … 33 35 // the "patched" values are written locally too, then maybe the update from disk is not needed. 34 36 // 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 36 41 37 42 // … … 69 74 70 75 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" 72 77 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 73 78 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" 75 80 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 76 81 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" … … 79 84 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 80 85 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" 83 88 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 84 89 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" 87 92 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 88 93 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" … … 90 95 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 91 96 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" 92 99 93 100 94 101 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" 96 103 WAVE/T Labels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 97 104 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" 99 106 WAVE Lambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 100 107 WAVE CntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" … … 103 110 WAVE Transmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 104 111 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" 107 114 108 115 WAVE/T nGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 109 116 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" 112 119 WAVE RotAngle = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 113 120 WAVE Temperature = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" … … 115 122 WAVE MCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 116 123 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" 117 126 118 127 119 128 If(V_Flag==0) 120 129 V_BuildTableWindow() 121 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD)=40130 // ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD)=40 122 131 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda)=40 123 132 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime)=50 … … 126 135 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission)=40 127 136 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness)=40 128 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter)=40129 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter)=40137 // ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter)=40 138 // ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter)=40 130 139 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens)=30 131 140 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle)=50 … … 137 146 ModifyTable sigDigits(root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos)=3 //to make the display look nice, given the floating point values from ICE 138 147 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)=5148 // ModifyTable sigDigits(root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD)=5 140 149 ModifyTable trailingZeros(root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature)=1 141 150 ModifyTable sigDigits(root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature)=4 142 151 143 152 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 144 159 Endif 145 160 … … 147 162 // NEW for VSANS 148 163 // 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. 150 165 // TODO: 151 //  this *may* be a very slow operation. Warn users. Give them a choice to keep local copies .If166 //  this *may* be a very slow operation. Warn users. Give them a choice to keep local copies? If 152 167 // the "patched" values are written locally too, then maybe the update from disk is not needed. 153 168 // But typically, I'd like to see that the disk version really did get updated... … … 155 170 // V_CleanOutRawVSANS() 156 171 // 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 159 178 160 179 //get a list of all files in the folder, some will be junk version numbers that don't exist … … 212 231 KillWaves/Z notRAWlist 213 232 // 214 //Print "Total time (s) = ",(ticks  t1)/60.15215 // Print "Time per raw data file (s) = ",(ticks  t1)/60.15/(numItemsnumpnts(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)/(numItemsnumpnts(notRawList)) 216 235 // 217 236 // clean out again, so that the file SAVE is not slow due to the large experiment size … … 223 242 return(0) 224 243 End 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 // 256 Function 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 302 End 303 304 225 305 226 306 //appends the list of files that are not RAW SANS data to the filename wave (1st column) … … 242 322 Function V_SortWaves() 243 323 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" 245 325 Wave/T GLabels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 246 326 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" 248 328 Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 249 329 Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" … … 252 332 Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 253 333 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" 256 336 257 337 Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 258 338 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" 261 341 Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 262 342 Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" … … 264 344 Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 265 345 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 270 355 271 356 return(0) … … 278 363 Wave/T Labels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 279 364 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" 281 366 Wave Lambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 282 367 Wave CntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" … … 285 370 Wave Transmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 286 371 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" 289 374 290 375 Wave/T NumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" … … 295 380 Wave MCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 296 381 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" 298 384 299 385 // original order, magnetic at the end 300 386 // Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR as "Data File Catalog" 301 387 // 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" 305 390 306 391 … … 321 406 322 407 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" 324 409 Wave/T GLabels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 325 410 Wave/T GDateTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 326 411 327 Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD"412 // Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 328 413 Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 329 414 Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" … … 332 417 Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 333 418 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" 336 421 Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 337 422 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" 340 425 Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 341 426 Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" … … 343 428 Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" 344 429 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" 345 432 346 433 lastPoint = numpnts(GLambda) … … 350 437 GFilenames[lastPoint]=sname 351 438 352 //read the file alphanumeric suffix353 // TODO  this does not exist for VSANS  so is there an equivalent, or delete?354 InsertPoints lastPoint,1,GSuffix355 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" 356 443 357 444 //read the counting time (integer) … … 392 479 GThickness[lastPoint]=V_getSampleThickness(fname) 393 480 394 // TODO  the x and y center have different meaning, since there are multiple panels395 // TODO  remove the hardwiring396 String detStr = "FL"397 //XCenter of beam on detector398 InsertPoints lastPoint,1,GXCenter399 GXCenter[lastPoint]=V_getDet_beam_center_x(fname,detStr)400 401 // TODO  the x and y center have different meaning, since there are multiple panels402 //YCenter403 InsertPoints lastPoint,1,GYCenter404 GYCenter[lastPoint]=V_getDet_beam_center_y(fname,detStr)405 406 // TODO  SDD has no real meaning  since there are multiple distances to report407 //SDD408 InsertPoints lastPoint,1,GSDD409 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 hardwiring 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) 410 497 411 498 //wavelength … … 427 514 GField[lastPoint]=1000 428 515 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" 440 525 441 526 // Monitor Count Rate … … 452 537 InsertPoints lastPoint,1,GPos 453 538 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) 454 547 455 548 return(0) … … 489 582 Button SortLabelsButton, pos={25,38}, size={140,24},proc=V_CatVSANSTable_SortProc,title="Labels" 490 583 Button SortDateAndTimeButton, pos={25,68}, size={140,24},proc=V_CatVSANSTable_SortProc,title="Date and Time" 491 Button Sort SSDButton, pos={25,98}, size={140,24},proc=V_CatVSANSTable_SortProc,title="SSD"492 Button Sort SDDButton, 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" 493 586 Button SortLambdaButton, pos={25,158}, size={140,24},proc=V_CatVSANSTable_SortProc,title="Lambda" 494 587 Button SortCountTimButton, pos={25,188}, size={140,24},proc=V_CatVSANSTable_SortProc,title="Count Time" … … 520 613 521 614 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" 523 616 Wave/T GLabels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 524 617 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" 526 619 Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 527 620 Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" … … 530 623 Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 531 624 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" 534 627 Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 535 628 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" 538 631 Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 539 632 Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" … … 541 634 Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" 542 635 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" 543 638 544 639 … … 557 652 558 653 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 560 656 break 561 657 562 658 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 564 661 break 565 662 566 663 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 575 675 break 576 676 577 677 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 579 681 break 580 682 581 683 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 583 687 break 584 688 585 689 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 587 693 break 588 694 589 695 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 591 699 break 592 700 … … 595 703 596 704 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 598 708 break 599 709 600 710 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 602 714 break 603 715
Note: See TracChangeset
for help on using the changeset viewer.