- Timestamp:
- May 1, 2018 8:52:07 AM (5 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 2 added
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Q.ipf
r1097 r1098 1362 1362 String folderStr = "VCALC" 1363 1363 String collimationStr="pinhole" // TODO: fill this in from the VCALC panel 1364 Print "collimationStr hard-wired to pinhole: update as VCALC is filled in" 1364 1365 1365 1366 switch(binType) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Slit.ipf
r1078 r1098 268 268 // -- there is also wavelength smearing present 269 269 270 271 270 272 // ASSUMPTION: As a first approximation, ignore the wavelength smearing component 271 // TODO : do I use 1/2 of dQy due to the symmetry of my smearing calculation? 273 // TODO : do I use 1/2 of dQy due to the symmetry of my smearing calculation? (as infinite slit) 272 274 sigmaq = -delQy/2 273 275 qbar = -delQy/2 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Utils.ipf
r1097 r1098 1423 1423 1424 1424 // DDet = detector pixel resolution [cm] **assumes square pixel 1425 DDet = 0.8 // TODO -- this is hard-wired 1426 1425 // V_getDet_pixel_fwhm_x(folderStr,detStr) 1426 // V_getDet_pixel_fwhm_y(folderStr,detStr) 1427 // DDet = 0.8 // TODO -- this is hard-wired 1428 1429 if(strlen(type) == 1) 1430 // it's "B" 1431 DDet = V_getDet_pixel_fwhm_x(folderStr,type) // value is already in cm 1432 else 1433 DDet = V_getDet_pixel_fwhm_x(folderStr,type[0,1]) // value is already in cm 1434 endif 1435 1427 1436 // apOff = sample aperture to sample distance [cm] 1428 1437 apOff = 10 // TODO -- this is hard-wired 1429 1438 1430 1439 // S1 = source aperture diameter [mm] 1431 S1 = str2num(V_getSourceAp_size(folderStr)) 1440 // may be either circle or rectangle 1441 String s1_shape="",bs_shape="" 1442 Variable width,height,equiv_S1,equiv_bs 1443 1444 1445 s1_shape = V_getSourceAp_shape(folderStr) 1446 if(cmpstr(s1_shape,"CIRCLE") == 0) 1447 S1 = str2num(V_getSourceAp_size(folderStr)) 1448 else 1449 S1 = V_getSourceAp_height(folderStr) // TODO: need the width or at least an equivalent diameter 1450 endif 1451 1432 1452 1433 1453 // S2 = sample aperture diameter [cm] … … 1447 1467 // if the type is say, MLRTB, then the implicit assumption in combining all four panels is that the resolution 1448 1468 // is not an issue for the slightly different distances. 1449 L2 = V_getDet_ActualDistance(folderStr,type[0,1])/100 //convert cm to m 1469 if(strlen(type) == 1) 1470 // it's "B" 1471 L2 = V_getDet_ActualDistance(folderStr,type)/100 //convert cm to m 1472 else 1473 L2 = V_getDet_ActualDistance(folderStr,type[0,1])/100 //convert cm to m 1474 endif 1450 1475 1451 1476 // BS = beam stop diameter [mm] 1452 1477 //TODO:? which BS is in? carr2, carr3, none? 1453 // -- need to check the num_beamstops field, then description, then shape/size or shape/height and shape/width1478 // -- need to check the detector, num_beamstops field, then description, then shape/size or shape/height and shape/width 1454 1479 // 1455 1480 // TODO: the values in the file are incorrect!!! BS = 1000 mm diameter!!! 1456 1481 // BS = V_getBeamStopC2_size(folderStr) // Units are [mm] 1457 1482 BS = 25.4 //TODO hard-wired value 1483 1484 // bs_shape = V_getBeamStopC2_shape(folderStr) 1485 // if(cmpstr(s1_shape,"CIRCLE") == 0) 1486 // bs = V_getBeamStopC2_size(folderStr) 1487 // else 1488 // bs = V_getBeamStopC2_height(folderStr) 1489 // endif 1490 1491 1458 1492 1459 1493 // del_r = step size [mm] = binWidth*(mm/pixel) … … 1484 1518 // pinhole 1485 1519 // pinhole_whiteBeam 1520 // convergingPinholes 1521 // 1522 // *slit data should be reduced using the slit routine, not here, proceed but warn 1486 1523 // narrowSlit 1487 1524 // narrowSlit_whiteBeam 1488 // convergingPinholes1489 1525 1490 1526 if(cmpstr(collimationStr,"pinhole") == 0) … … 1536 1572 1537 1573 endif 1574 1575 1576 // should not end up here, except for odd testing cases 1577 if(cmpstr(collimationStr,"narrowSlit") == 0) 1578 1579 Print "??? Slit data is being averaged as pinhole - reset the AVERAGE parameters in the protocol ???" 1580 ii=0 1581 do 1582 V_getResolution(qBin_qxqy[ii],lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,del_r,usingLenses,ret1,ret2,ret3) 1583 sigmaq[ii] = ret1 1584 qbar[ii] = ret2 1585 fsubs[ii] = ret3 1586 ii+=1 1587 while(ii<nq) 1588 1589 endif 1590 1591 // should not end up here, except for odd testing cases 1592 if(cmpstr(collimationStr,"narrowSlit_whiteBeam") == 0) 1593 1594 // set lambdaWidth == 0 so that the gaussian resolution calculates only the geometry contribution. 1595 // the white beam distribution will need to be flagged some other way 1596 // 1597 Print "??? Slit data is being averaged as pinhole - reset the AVERAGE parameters in the protocol ???" 1598 1599 lambdaWidth = 0 1600 1601 ii=0 1602 do 1603 V_getResolution(qBin_qxqy[ii],lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,del_r,usingLenses,ret1,ret2,ret3) 1604 sigmaq[ii] = ret1 1605 qbar[ii] = ret2 1606 fsubs[ii] = ret3 1607 ii+=1 1608 while(ii<nq) 1609 1610 endif 1611 1612 1613 1538 1614 1539 1615 SetDataFolder root: -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VSANS_Includes.ipf
r1097 r1098 121 121 #include "V_DummyFunctions" 122 122 // VSANS Analysis functions (under Analysis trunk, not Reduction) 123 #include "V_ BroadPeak_WB"124 #include "V_ GaussSpheres_WB"123 #include "V_WB_BroadPeak" 124 #include "V_WB_GaussSpheres" 125 125 126 126 #include "V_Utilities_Comparisons" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_IQ_Utilities.ipf
r1097 r1098 666 666 for(ii=0;ii<num;ii+=1) 667 667 detStr = StringFromList(ii, detListStr) 668 nBeg = NumberByKey(detStr, nBegStr,"=",";") 669 nEnd = NumberByKey(detStr, nEndStr,"=",";") 670 if(!gIgnoreDetB) 668 if(cmpstr(detStr,"B")==0 && gIgnoreDetB) 669 //skip det B, do nothing 670 else 671 nBeg = NumberByKey(detStr, nBegStr,"=",";") 672 nEnd = NumberByKey(detStr, nEndStr,"=",";") 673 671 674 V_TrimOneSet(folderStr,detStr,nBeg,nEnd) 672 675 endif -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf
r1097 r1098 2549 2549 2550 2550 V_ConcatenateForSave("root:Packages:NIST:VSANS:",activeType,"",binType) // this removes q=0 point, concatenates, sorts 2551 2552 prot[9] = collimationStr 2553 2551 2554 V_Write1DData("root:Packages:NIST:VSANS:",activeType,newFileName+"."+exten) //don't pass the full path, just the name 2555 2552 2556 endif 2553 2557 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_Comparisons.ipf
r1097 r1098 366 366 367 367 guides = V_getNumberOfGuides(fname) 368 if(cmpstr(guides,"NARROW_SLIT ") == 0)368 if(cmpstr(guides,"NARROW_SLITS") == 0) 369 369 slit = 1 370 370 endif -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Write_VSANS_QIS.ipf
r1097 r1098 125 125 fprintf refnum, "Beginning Trim Points: %s\r\n",ProtoStr7 126 126 fprintf refnum, "End Trim Points: %s\r\n",ProtoStr8 127 fprintf refnum, "COLLIMATION=%s\r\n",proto[9] 127 128 128 129 // TODO
Note: See TracChangeset
for help on using the changeset viewer.