 Timestamp:
 Feb 2, 2018 3:26:19 PM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_FileCatalog.ipf
r1076 r1082 4 4 5 5 // 6 // UPDATED for VSANS  only the simplest implementation to start with6 // UPDATED for VSANS  7 7 // June 2016 SRK 8 // more columns + improved handling Jan 2018 9 // 8 10 // included ANSTO sort panel from david m 11 // 12 13 // Adding columns to the table now means: 14 // 1Make the wave in V_BuildCatVeryShortTable 15 // 2Declare the wave in V_GetHeaderInfoToWave, and read/fill in the value 9 16 // 10 17 … … 13 20 // TODO 14 21 // x clean up and remove all of the references to other facilities, since they will not have VSANS modules 15 //  add in more appropriate and some missing fields more useful to VSANS (intent, multiple beam centers, etc.)22 // x add in more appropriate and some missing fields more useful to VSANS (intent, multiple beam centers, etc.) 16 23 //  can I make the choice of columns customizable? There are "sets" of columns that are not used for 17 24 // some experiments (magnetic, rotation, temperature scans, etc.) but are necessary for others. 18 //  SortColumns operation may be of help in managing the long list of files to sort25 // x SortColumns operation may be of help in managing the long list of files to sort 19 26 // 20 27 // (DONE): … … 77 84 Endif 78 85 Endif 79 86 87 // 88 // WaveList will list waves in the order that they were created  so at a first pass, 89 // create the waves in the order that I want them in the table. 90 // The user can rearrange the columns, but likely won't 91 // 80 92 DoWindow/F CatVSANSTable 81 93 82 94 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 83 // Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix"84 95 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 85 96 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 86 // Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 97 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 98 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Purpose" 99 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 100 101 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD_F" 102 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts_F" 103 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate_F" 104 105 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD_M" 106 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts_M" 107 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate_M" 108 109 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD_B" 110 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts_B" 111 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate_B" 112 87 113 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 114 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 88 115 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 89 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts" 90 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate" 116 117 91 118 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 92 119 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 120 93 121 // Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 94 122 // Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 95 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 123 96 124 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 97 // Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 98 // Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 125 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 126 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" //added Mar 2010 127 99 128 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 100 129 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 101 130 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Field" 102 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 103 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" //added Mar 2010 104 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 105 Make/O/T/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Purpose" 106 Make/O/D/N=0 $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 131 132 107 133 108 134 109 135 WAVE/T Filenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 110 // WAVE/T Suffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix"111 136 WAVE/T Labels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 112 137 WAVE/T DateAndTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" … … 114 139 WAVE Lambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 115 140 WAVE CntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 116 WAVE TotCnts = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts"117 WAVE CntRate = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate"118 141 WAVE Transmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 119 142 WAVE Thickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" … … 123 146 WAVE/T nGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 124 147 WAVE NumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 125 // WAVE RunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber"126 // WAVE IsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans"127 148 WAVE RotAngle = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 128 149 WAVE Temperature = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" … … 137 158 If(V_Flag==0) 138 159 V_BuildTableWindow() 139 // ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD)=40140 160 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda)=40 141 161 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime)=50 142 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts)=60143 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate)=60144 162 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission)=40 145 163 ModifyTable width(root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness)=40 … … 366 384 367 385 // 386 // this is called BEFORE the notRAWfiles are added to the fileNames wave 387 // so that the waves are still all the same length and can properly be sorted. 388 // 368 389 Function V_SortWaves() 369 Wave/T GFilenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 370 // Wave/T GSuffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 371 Wave/T GLabels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 372 Wave/T GDateTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 373 // Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 374 Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 375 Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 376 Wave GTotCnts = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts" 377 Wave GCntRate = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate" 378 Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 379 Wave GThickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 380 // Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 381 // Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 382 383 Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 384 Wave GNumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 385 // Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 386 // Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 387 Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 388 Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 389 Wave GField = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Field" 390 Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 391 Wave GPos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 392 Wave/T GIntent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 393 Wave/T GPurpose = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Purpose" 394 Wave G_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 395 396 397 // DONE 398 // x the default sort is by SUFFIX, which does not exist for VSANS. So decide on a better key 399 // now, the sort is by FileName by default 400 // Sort GFilenames, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,GPos,gNumGuides 401 Sort GFilenames, GFilenames, GLabels, GDateTime, GIntent, GPurpose, G_ID, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens,GRot,GTemp,GField,GMCR,GPos,gNumGuides 402 390 // Wave/T GFilenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 391 //// Wave/T GSuffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix" 392 // Wave/T GLabels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 393 // Wave/T GDateTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 394 //// Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 395 // Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 396 // Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 397 // Wave GTotCnts = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts" 398 // Wave GCntRate = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate" 399 // Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 400 // Wave GThickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 401 //// Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 402 //// Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 403 // 404 // Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 405 // Wave GNumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 406 //// Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 407 //// Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 408 // Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 409 // Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 410 // Wave GField = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Field" 411 // Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 412 // Wave GPos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 413 // Wave/T GIntent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 414 // Wave/T GPurpose = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Purpose" 415 // Wave G_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 416 // 417 // 418 //// DONE 419 //// x the default sort is by SUFFIX, which does not exist for VSANS. So decide on a better key 420 //// now, the sort is by FileName by default 421 //// Sort GFilenames, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,GPos,gNumGuides 422 // 423 // Sort GFilenames, GFilenames, GLabels, GDateTime, GIntent, GPurpose, G_ID, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens,GRot,GTemp,GField,GMCR,GPos,gNumGuides 424 425 SetDataFolder root:Packages:NIST:VSANS:CatVSHeaderInfo: 426 427 String list = WaveList("*",",","") 428 String cmd 429 430 list = list[0,strlen(list)2] //remove the trailing comma or "invalid column name" error 431 432 sprintf cmd, "Sort Filenames, %s", list 433 // Print cmd // For debugging 434 435 Execute cmd 436 437 SetDataFolder root: 403 438 return(0) 404 439 End … … 407 442 //this table is just like any other table 408 443 Function V_BuildTableWindow() 409 Wave/T Filenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 410 Wave/T Labels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 411 Wave/T DateAndTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 412 // Wave SDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 413 Wave Lambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 414 Wave CntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 415 Wave TotCnts = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts" 416 Wave CntRate = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate" 417 Wave Transmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 418 Wave Thickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 419 // Wave XCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 420 // Wave YCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 421 422 Wave/T NumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 423 Wave NumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 424 Wave RotAngle = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 425 Wave Temperature = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 426 Wave Field= $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Field" 427 Wave MCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 428 Wave Pos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 429 Wave/T Intent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 430 Wave/T Purpose = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Purpose" 431 Wave Group_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 432 433 // original order, magnetic at the end 434 // Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR as "Data File Catalog" 435 // with numGuides 436 // Edit Filenames, Labels, DateAndTime, SDD, Lambda, numGuides, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR, Pos as "Data File Catalog" 437 Edit Filenames, Labels, DateAndTime, Intent, Purpose, Group_ID, Lambda, numGuides, CntTime, TotCnts, CntRate, Transmission, Thickness, NumAttens, RotAngle, Temperature, Field, MCR, Pos as "Data File Catalog" 438 444 445 SetDataFolder root:Packages:NIST:VSANS:CatVSHeaderInfo: 446 447 String list = WaveList("*",",","") 448 String cmd 449 450 list = list[0,strlen(list)2] //remove the trailing comma or "invalid column name" error 451 452 sprintf cmd, "Edit %s", list 453 // Print cmd // For debugging 454 455 Execute cmd 439 456 440 457 String name="CatVSANSTable" 441 458 DoWindow/C $name 459 460 SetDataFolder root: 461 462 // Wave/T Filenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 463 // Wave/T Labels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 464 // Wave/T DateAndTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 465 //// Wave SDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 466 // Wave Lambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 467 // Wave CntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 468 // Wave TotCnts = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts" 469 // Wave CntRate = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate" 470 // Wave Transmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 471 // Wave Thickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 472 //// Wave XCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 473 //// Wave YCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 474 // 475 // Wave/T NumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 476 // Wave NumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 477 // Wave RotAngle = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 478 // Wave Temperature = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 479 // Wave Field= $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Field" 480 // Wave MCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" //added Mar 2008 481 // Wave Pos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 482 // Wave/T Intent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 483 // Wave/T Purpose = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Purpose" 484 // Wave Group_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 485 // 486 //// original order, magnetic at the end 487 //// Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR as "Data File Catalog" 488 //// with numGuides 489 //// Edit Filenames, Labels, DateAndTime, SDD, Lambda, numGuides, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR, Pos as "Data File Catalog" 490 491 // Edit Filenames, Labels, DateAndTime, Intent, Purpose, Group_ID, Lambda, numGuides, CntTime, TotCnts, CntRate, Transmission, Thickness, NumAttens, RotAngle, Temperature, Field, MCR, Pos as "Data File Catalog" 492 493 442 494 return(0) 443 495 End … … 458 510 Wave/T GDateTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 459 511 460 // Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 512 WAVE sdd_f = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD_F" 513 WAVE sdd_m = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD_M" 514 WAVE sdd_b = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD_B" 515 461 516 Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 462 517 Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 463 Wave GTotCnts = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts" 464 Wave GCntRate = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate" 518 519 Wave TotCnts_F = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts_F" 520 Wave CntRate_F = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate_F" 521 Wave TotCnts_M = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts_M" 522 Wave CntRate_M = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate_M" 523 Wave TotCnts_B = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts_B" 524 Wave CntRate_B = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate_B" 525 465 526 Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 466 527 Wave GThickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" … … 507 568 //read the reals 508 569 //detector count and (derived) count rate 509 // TODO  this is hardwired for a single detector, which is WRONG510 570 detcnt = V_getDet_IntegratedCount(fname,"FL") 571 detcnt += V_getDet_IntegratedCount(fname,"FR") 572 detcnt += V_getDet_IntegratedCount(fname,"FT") 573 detcnt += V_getDet_IntegratedCount(fname,"FB") 511 574 cntrate = detcnt/ctime 512 InsertPoints lastPoint,1,GTotCnts 513 GTotCnts[lastPoint]=detcnt 514 InsertPoints lastPoint,1,GCntRate 515 GCntRate[lastPoint]=cntrate 516 575 InsertPoints lastPoint,1,TotCnts_F 576 TotCnts_F[lastPoint]=detcnt 577 InsertPoints lastPoint,1,CntRate_F 578 CntRate_F[lastPoint]=cntrate 579 580 detcnt = V_getDet_IntegratedCount(fname,"ML") 581 detcnt += V_getDet_IntegratedCount(fname,"MR") 582 detcnt += V_getDet_IntegratedCount(fname,"MT") 583 detcnt += V_getDet_IntegratedCount(fname,"MB") 584 cntrate = detcnt/ctime 585 InsertPoints lastPoint,1,TotCnts_M 586 TotCnts_M[lastPoint]=detcnt 587 InsertPoints lastPoint,1,CntRate_M 588 CntRate_M[lastPoint]=cntrate 589 590 detcnt = V_getDet_IntegratedCount(fname,"B") 591 cntrate = detcnt/ctime 592 InsertPoints lastPoint,1,TotCnts_B 593 TotCnts_B[lastPoint]=detcnt 594 InsertPoints lastPoint,1,CntRate_B 595 CntRate_B[lastPoint]=cntrate 596 597 517 598 //Attenuators 518 599 // (DONE) x this is the "number" of the attenuator … … 540 621 // GYCenter[lastPoint]=V_getDet_beam_center_y(fname,detStr) 541 622 542 // // TODO  SDD has no real meaning  sincethere are multiple distances to report623 // there are multiple distances to report 543 624 // //SDD 544 // InsertPoints lastPoint,1,GSDD 545 // GSDD[lastPoint]=V_getDet_ActualDistance(fname,detStr) 546 625 InsertPoints lastPoint,1,sdd_f 626 sdd_f[lastPoint]=V_getDet_ActualDistance(fname,"FL") 627 628 InsertPoints lastPoint,1,sdd_m 629 sdd_m[lastPoint]=V_getDet_ActualDistance(fname,"ML") 630 631 InsertPoints lastPoint,1,sdd_b 632 sdd_b[lastPoint]=V_getDet_ActualDistance(fname,"B") 633 547 634 //wavelength 548 635 InsertPoints lastPoint,1,GLambda … … 561 648 InsertPoints lastPoint,1,GField 562 649 GField[lastPoint]=999 563 564 565 // //the run number (not displayed in the table, but carried along) 566 // InsertPoints lastPoint,1,GRunNumber 567 // GRunNumber[lastPoint] = V_GetRunNumFromFile(sname) 568 // 569 // // TODO  the isTransFile utility has not yet been written 570 // // 0 if the file is a scattering file, 1 (truth) if the file is a transmission file 571 // InsertPoints lastPoint,1,GIsTrans 572 // GIsTrans[lastPoint] = V_isTransFile(fname) //returns one if beamstop is "out" 573 650 574 651 // Monitor Count Rate 575 652 InsertPoints lastPoint,1,GMCR … … 664 741 String ctrlName 665 742 743 // still need to declare these to access notRaw files and to get count of length 666 744 Wave/T GFilenames = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames" 667 // Wave/T GSuffix = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Suffix"668 745 Wave/T GLabels = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels" 669 Wave/T GDateTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 670 // Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 671 Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 672 Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 673 Wave GTotCnts = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts" 674 Wave GCntRate = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate" 675 Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 676 Wave GThickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 677 // Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 678 // Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 679 Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 680 Wave GNumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 681 // Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 682 // Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 683 Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 684 Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 685 Wave GField = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Field" 686 Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" 687 Wave GPos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 688 Wave/T GIntent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 689 Wave/T GPurpose = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Purpose" 690 Wave G_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 746 747 // Wave/T GDateTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:DateAndTime" 748 //// Wave GSDD = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:SDD" 749 // Wave GLambda = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Lambda" 750 // Wave GCntTime = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntTime" 751 // Wave GTotCnts = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:TotCnts" 752 // Wave GCntRate = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:CntRate" 753 // Wave GTransmission = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission" 754 // Wave GThickness = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Thickness" 755 //// Wave GXCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:XCenter" 756 //// Wave GYCenter = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:YCenter" 757 // Wave/T GNumGuides = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:nGuides" 758 // Wave GNumAttens = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:NumAttens" 759 //// Wave GRunNumber = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RunNumber" 760 //// Wave GIsTrans = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:IsTrans" 761 // Wave GRot = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:RotAngle" 762 // Wave GTemp = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Temperature" 763 // Wave GField = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Field" 764 // Wave GMCR = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:MCR" 765 // Wave GPos = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Pos" 766 // Wave/T GIntent = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent" 767 // Wave/T GPurpose = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Purpose" 768 // Wave G_ID = $"root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID" 691 769 692 770 … … 701 779 DeletePoints rawCount, notRAWcount, GFilenames 702 780 endif 703 781 782 783 // get the list 784 SetDataFolder root:Packages:NIST:VSANS:CatVSHeaderInfo: 785 786 String list = WaveList("*",",",""),sortKey="" 787 String cmd 788 789 list = list[0,strlen(list)2] //remove the trailing comma or "invalid column name" error 790 791 // set the sortKey string 704 792 strswitch (ctrlName) 705 793 706 794 case "SortFilenamesButton": 707 795 // Sort GFilenames, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 708 Sort GFilenames, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 796 // Sort GFilenames, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 797 sortKey = "Filenames" 709 798 break 710 799 711 800 case "SortLabelsButton": 712 801 // Sort GLabels, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 713 Sort GLabels, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 802 // Sort GLabels, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 803 sortKey = "Labels" 714 804 break 715 805 716 806 case "SortDateAndTimeButton": 717 807 // Sort GDateTime, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 718 Sort GDateTime, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 808 // Sort GDateTime, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 809 sortKey = "DateAndTime" 719 810 720 811 break 721 812 722 813 case "SortIntentButton": 723 Sort GIntent, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 814 // Sort GIntent, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 815 sortKey = "Intent" 816 724 817 break 725 818 726 819 case "SortIDButton": 727 Sort G_ID, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 820 // Sort G_ID, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 821 sortKey = "Group_ID" 822 728 823 break 729 824 730 825 case "SortLambdaButton": 731 826 // Sort GLambda, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 732 Sort GLambda, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 827 // Sort GLambda, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 828 sortKey = "Lambda" 733 829 734 830 break … … 736 832 case "SortCountTimButton": 737 833 // Sort GCntTime, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 738 Sort GCntTime, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 834 // Sort GCntTime, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 835 sortKey = "CntTime" 739 836 740 837 break … … 742 839 case "SortTotalCountsButton": 743 840 // Sort GTotCnts, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 744 Sort GTotCnts, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 841 // Sort GTotCnts, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 842 sortKey = "TotCnts" 745 843 746 844 break … … 748 846 case "SortCountRateButton": 749 847 // Sort GCntRate, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 750 Sort GCntRate, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 848 // Sort GCntRate, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 849 sortKey = "CntRate" 751 850 752 851 break 753 852 754 853 case "SortMonitorCountsButton": 854 SetDataFolder root: 855 return(0) 755 856 break 756 857 757 858 case "SortTransmissionButton": 758 859 // Sort GTransmission, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 759 Sort GTransmission, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 860 // Sort GTransmission, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 861 sortKey = "Transmission" 760 862 761 863 break … … 763 865 case "SortPurposeButton": 764 866 // Sort GThickness, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens, GRunNumber, GIsTrans, GRot, GTemp, GField, GMCR 765 Sort GPurpose, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 867 // Sort GPurpose, GPurpose, GFilenames, GLabels, GDateTime, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GNumAttens, GRot, GTemp, GField, GMCR, GIntent, G_ID 868 sortKey = "Purpose" 766 869 767 870 break 768 871 769 872 endswitch 873 874 //do the sort 875 sprintf cmd, "Sort %s, %s", sortKey,list 876 // Print cmd // For debugging 877 878 Execute cmd 879 770 880 771 881 // insert the "notRAWFiles" again … … 774 884 GFilenames[rawCount, fileCount1] = notRAWlist[prawCount] 775 885 endif 886 887 SetDataFolder root: 888 776 889 end 777 890
Note: See TracChangeset
for help on using the changeset viewer.