Ignore:
Timestamp:
Aug 23, 2017 10:03:41 AM (5 years ago)
Author:
srkline
Message:

Added USANS loader/initializer

Updated units of distance for q-calculation (SDD)

status display bug fixed

File:
1 edited

Legend:

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

    r1055 r1061  
    565565 
    566566        sdd = V_getDet_ActualDistance(fname,detStr)             //sdd derived, including setback [cm] 
    567         sdd/=100                // sdd reported in cm, pass in m 
     567 
    568568        // this is the ctr in pixels --xx-- (now it is in cm!) 
    569569//      xCtr = V_getDet_beam_center_x(fname,detStr) 
     
    587587 
    588588// calculate all of the q-values 
     589// sdd is passed in [cm] 
    589590        qTot = V_CalcQval(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
    590591        qx = V_CalcQX(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
     
    605606//    to each pixel 
    606607// 
    607 //sdd is in meters 
     608//sdd is in [cm] 
     609// distX and distY are in [mm] 
    608610//wavelength is in Angstroms 
    609611// 
     
    616618        Variable dx,dy,qval,two_theta,dist 
    617619                 
    618         sdd *=100               //convert to cm 
     620 
    619621        dx = (distX[xaxval][yaxval] - xctr)             //delta x in mm 
    620622        dy = (distY[xaxval][yaxval] - yctr)             //delta y in mm 
     
    648650        qval = V_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
    649651         
    650         sdd *=100               //convert to cm 
     652 
    651653        dx = (distX[xaxval][yaxval] - xctr)             //delta x in mm 
    652654        dy = (distY[xaxval][yaxval] - yctr)             //delta y in mm 
     
    682684        qval = V_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
    683685         
    684         sdd *=100               //convert to cm 
     686 
    685687        dx = (distX[xaxval][yaxval] - xctr)             //delta x in mm 
    686688        dy = (distY[xaxval][yaxval] - yctr)             //delta y in mm 
     
    717719        qval = V_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
    718720         
    719         sdd *=100               //convert to cm 
     721 
    720722        dx = (distX[xaxval][yaxval] - xctr)             //delta x in mm 
    721723        dy = (distY[xaxval][yaxval] - yctr)             //delta y in mm 
     
    755757//      orientation = V_getDet_tubeOrientation(fname,detStr) 
    756758        sdd = V_getDet_ActualDistance(fname,detStr) 
    757         sdd/=100                // sdd in cm, pass in m 
     759 
    758760 
    759761        // this is ctr in mm 
     
    775777         
    776778        tmp_dist /= 10  // convert mm to cm 
    777         sdd *=100               //convert to cm 
     779        // sdd is in [cm] 
    778780 
    779781        tmp_theta = atan(tmp_dist/sdd)          //this is two_theta, the scattering angle 
     
    988990//      orientation = V_getDet_tubeOrientation(fname,detStr) 
    989991        sdd = V_getDet_ActualDistance(fname,detStr) 
    990         sdd/=100                // sdd in cm, pass in m 
    991992 
    992993        // this is ctr in mm 
     
    10091010         
    10101011        tmp_dist /= 10  // convert mm to cm 
    1011         sdd *=100               //convert to cm 
     1012        // sdd is in [cm] 
    10121013 
    10131014        tmp_theta = atan(tmp_dist/sdd)          //this is two_theta, the scattering angle 
     
    12831284// 
    12841285// TODO: 
    1285 //   --         DoAlert 0,"This has not yet been updated for VSANS" 
    1286 //   -- how is the error propagation handled? 
     1286//   x-         DoAlert 0,"This has not yet been updated for VSANS" 
     1287//   -- how is the error propagation handled? Be sure it is calculated correctly when DIV is generated 
     1288//      and is applied correctly here... 
    12871289// 
    12881290//function will divide the contents of "workType" folder with the contents of  
     
    13141316 
    13151317        data /= div_data 
    1316          
     1318 
     1319// TODO: -- correct the error propagation        
    13171320        data_err /= div_data 
    13181321         
Note: See TracChangeset for help on using the changeset viewer.