Ignore:
Timestamp:
Jul 20, 2017 3:22:34 PM (5 years ago)
Author:
srkline
Message:

LOTS of changes to accommodate the beam center being reported in cm rather than pixels. Required a lot of changes to VCALC (to fill in simulated data), and in the reading and interpreting of data for display, and most importantly, the calculation of q.

There may still be a few residual bugs with this. I am still re-testing with new sample data sets.

File:
1 edited

Legend:

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

    r1051 r1055  
    6060                endif 
    6161                 
     62                // returns the total separation (assumed symmetric) in mm 
     63                val = VCALC_getPanelSeparation(detStr)           
     64                val /= 2*10                     // to get half of the separation, and convert to cm for the data file 
     65                // it's OK to call both of these. these functions check detStr for the correct value 
     66                V_writeDet_LateralOffset(fileName,detStr,val) 
     67                V_writeDet_VerticalOffset(fileName,detStr,val) 
     68 
    6269                // x and y pixel sizes for each detector should be correct in the "base" file - but if not... 
    6370                //Function VCALC_getPixSizeX(type)              // returns the pixel X size, in [cm] 
     
    6774         
    6875                // write out the xCtr and yCtr (pixels) that was used in the q-calculation, done in VC_CalculateQFrontPanels() 
    69                 V_writeDet_beam_center_x(fileName,detStr,V_getDet_beam_center_x("VCALC",detStr)) 
    70                 V_writeDet_beam_center_y(fileName,detStr,V_getDet_beam_center_y("VCALC",detStr)) 
     76                if(kBCTR_CM) 
     77                //  -- now write out the beam center in cm, not pixels 
     78                        V_writeDet_beam_center_x(fileName,detStr,0) 
     79                        V_writeDet_beam_center_y(fileName,detStr,0) 
     80                else 
     81                        V_writeDet_beam_center_x(fileName,detStr,V_getDet_beam_center_x("VCALC",detStr)) 
     82                        V_writeDet_beam_center_y(fileName,detStr,V_getDet_beam_center_y("VCALC",detStr))         
     83                endif 
     84 
     85                if(cmpstr(detStr,"B") == 0) 
     86                        //always write out the center of the detector since this is dummy data 
     87                        V_writeDet_beam_center_x(fileName,detStr,V_getDet_beam_center_x("VCALC",detStr)) 
     88                        V_writeDet_beam_center_y(fileName,detStr,V_getDet_beam_center_y("VCALC",detStr))                                 
     89                endif 
     90 
    7191                 
    7292                 
Note: See TracChangeset for help on using the changeset viewer.