- Timestamp:
- Jul 11, 2016 2:59:08 PM (7 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/CatVSTable.ipf
r901 r1004 201 201 Wave/T Filenames = $"root:myGlobals:CatVSHeaderInfo:Filenames" 202 202 Variable lastPoint 203 204 if(numpnts(w) == 0) 205 return(0) 206 endif 207 203 208 lastPoint = numpnts(Filenames) 204 209 InsertPoints lastPoint,numpnts(w),Filenames -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_PatchFiles.ipf
r1003 r1004 438 438 Abort "wrong number of checkboxes GetEditedSetVarBoxes()" 439 439 Endif 440 440 441 //pass all as a text wave - so only one wave has to be passed (conversion 2x, though) 441 442 //global is set to the changed value when entered. read others directly from the control 443 442 444 //make sure the text label is exactly 60 characters long, to match VAX field length 443 445 SVAR dum=root:Packages:NIST:VSANS:Globals:Patch:gPS1 444 String str60="", junk="junk" 445 str60 = PadString(junk,60,0x20) 446 if(strlen(dum) <= 60) 447 if(strlen(dum) == 60) 448 str60 = dum 449 else 450 str60 = PadString(dum,60,0x20) 451 Endif 452 else 453 //too long, truncate 454 str60[0,59] = dum[0,59] 455 Endif 456 457 wt[0] = str60 458 446 // String str60="", junk="junk" 447 // str60 = PadString(junk,60,0x20) 448 // if(strlen(dum) <= 60) 449 // if(strlen(dum) == 60) 450 // str60 = dum 451 // else 452 // str60 = PadString(dum,60,0x20) 453 // Endif 454 // else 455 // //too long, truncate 456 // str60[0,59] = dum[0,59] 457 // Endif 458 // 459 // wt[0] = str60 460 wt[0] = dum //with Nexus, no need to enforce 60 character field 461 // 459 462 Variable ii 460 463 String baseStr="PV" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_General.ipf
r1003 r1004 504 504 //filtered out. 505 505 // 506 // 507 // -- with the run numbers incrementing from 1, there is no need to add leading zeros to the 508 // file names. simply add the number and go. 509 // 506 510 // called by Buttons.ipf and Transmission.ipf, and locally by parsing routines 507 511 // … … 510 514 511 515 String fullName="",partialName="",item="" 512 //get list of raw data files in folder that match "num" (add leading zeros) 513 if( (num>9999) || (num<=0) ) 514 Print "error in FindFileFromRunNumber(num), file number too large or too small" 515 Return ("") 516 Endif 517 //make a four character string of the run number 516 //get list of raw data files in folder that match "num" 517 // if( (num>9999) || (num<=0) ) 518 // Print "error in FindFileFromRunNumber(num), file number too large or too small" 519 // Return ("") 520 // Endif 518 521 String numStr="" 519 if(num<10) 520 numStr = "000"+num2str(num) 521 else 522 if(num<100) 523 numStr = "00"+num2str(num) 524 else 525 if(num<1000) 526 numstr = "0"+num2str(num) 527 else 528 numStr = num2str(num) 529 endif 530 Endif 531 Endif 522 numStr = num2str(num) 523 // if(num<10) 524 // numStr = "000"+num2str(num) 525 // else 526 // if(num<100) 527 // numStr = "00"+num2str(num) 528 // else 529 // if(num<1000) 530 // numstr = "0"+num2str(num) 531 // else 532 // numStr = num2str(num) 533 // endif 534 // Endif 535 // Endif 532 536 //Print "numstr = ",numstr 533 537 … … 636 640 //given a filename of a VSANS data filename of the form 637 641 // sansNNNN.nxs.ngv 638 //returns the run number "NNNN" as a STRING of FOUR characters 642 //returns the run number "NNNN" as a STRING of (x) characters 643 // 644 // -- the run number incements from 1, so the number of digits is UNKNOWN 645 // -- number starts at position [4] (the 5th character) 646 // -- number ends with the character prior to the first "." 647 // 639 648 //returns "ABCD" as an invalid file number 640 649 // … … 654 663 return (invalid) 655 664 else 656 //found, get the four characters preceeding it657 if (pos <= numChar-1)665 //found, get the characters preceeding it, but still after the "sans" characters 666 if (pos-1 <= 4) 658 667 //not enough characters 659 668 return (invalid) 660 669 else 661 runStr = item[ pos-numChar,pos-1]670 runStr = item[4,pos-1] 662 671 return (runStr) 663 672 Endif
Note: See TracChangeset
for help on using the changeset viewer.