Changeset 1101


Ignore:
Timestamp:
May 22, 2018 3:29:01 PM (4 years ago)
Author:
srkline
Message:

bug fixes for the back detector dimensions and beam center (pixels)

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
Files:
9 edited

Legend:

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

    r1100 r1101  
    863863        Edit panelWave,newXCtr_cm,newYCtr_cm 
    864864         
    865         DoAlert 0, "enter the measured beam center for FR and MR panels" 
     865        DoAlert 0, "enter the measured beam center reference for Front and Middle panels" 
    866866        V_fDeriveBeamCenters() 
    867867         
     
    900900         
    901901         
    902         // dummy value for B 
    903         newXCtr_cm[8] = 340 
    904         newYCtr_cm[8] = 828 
     902        // default value for B 
     903        newXCtr_cm[8] = 0 
     904        newYCtr_cm[8] = 0 
    905905 
    906906                 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_DetectorCorrections.ipf

    r1095 r1101  
    272272        endif 
    273273 
    274 Print "***Cal_X and Cal_Y for Back are using default values instead of file values ***" 
    275  
    276                 cal_x[0] = VCALC_getPixSizeX(detStr)*10                 // pixel size in mm  VCALC_getPixSizeX(detStr) is [cm] 
    277                 cal_x[1] = 1 
    278                 cal_x[2] = 10000 
    279                 cal_y[0] = VCALC_getPixSizeY(detStr)*10                 // pixel size in mm  VCALC_getPixSizeX(detStr) is [cm] 
    280                 cal_y[1] = 1 
    281                 cal_y[2] = 10000 
     274Print "***Cal_X and Cal_Y for Back are using file values ***" 
     275 
     276//              cal_x[0] = VCALC_getPixSizeX(detStr)*10                 // pixel size in mm  VCALC_getPixSizeX(detStr) is [cm] 
     277//              cal_x[1] = 1 
     278//              cal_x[2] = 10000 
     279//              cal_y[0] = VCALC_getPixSizeY(detStr)*10                 // pixel size in mm  VCALC_getPixSizeX(detStr) is [cm] 
     280//              cal_y[1] = 1 
     281//              cal_y[2] = 10000 
    282282 
    283283         
     
    300300//      Wave cal_y = V_getDet_cal_y(folder,detStr) 
    301301         
    302         data_realDistX[][] = cal_x[0]*p 
    303         data_realDistY[][] = cal_y[0]*q 
     302        data_realDistX[][] = cal_x[0]*p*10              // cal_x and cal_y are in [cm], need mm 
     303        data_realDistY[][] = cal_y[0]*q*10 
    304304         
    305305        return(0) 
     
    551551         
    552552         
    553         DoAlert 0,"Error - Beam center is being interpreted as pixels, but needs to be in cm. V_ConvertBeamCtr_to_mmB()" 
     553//      DoAlert 0,"Error - Beam center is being interpreted as pixels, but needs to be in cm. V_ConvertBeamCtr_to_mmB()" 
    554554         
    555555        Wave data_realDistX = $(destPath + ":entry:instrument:detector_"+detStr+":data_realDistX") 
     
    14331433        String destPath="" 
    14341434 
     1435        NVAR gIgnoreDetB = root:Packages:NIST:VSANS:Globals:gIgnoreDetB 
     1436        if(cmpstr(detStr,"B")==0 && gIgnoreDetB) 
     1437                return(0) 
     1438        endif 
     1439 
     1440 
    14351441        if(WaveExists(data) == 0) 
    14361442                Print "The data wave does not exist in V_DIVCorrection()" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_EventMode_Utils.ipf

    r1100 r1101  
    998998// 
    999999//main entry procedure to open the panel, initializing if necessary 
    1000 Macro V_ReduceEventFiles() 
     1000Proc V_ReduceEventFilesPanel() 
    10011001         
    10021002        DoWindow/F V_Event_Reduce_Panel 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_RW_Utils.ipf

    r1093 r1101  
    173173                        V_NonLinearCorrection_B(folder,w,cal_x,cal_y,detStr,destPath) 
    174174 
    175                         if(kBCTR_CM) 
    176  
    177                                 Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
    178                                 Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
    179                                 WAVE x_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
    180                                 WAVE y_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
    181                                 x_mm[0] = V_getDet_beam_center_x(folder,detStr) * 10            // convert cm to mm 
    182                                 y_mm[0] = V_getDet_beam_center_y(folder,detStr) * 10            // convert cm to mm 
    183                                  
    184                                 // now I need to convert the beam center in mm to pixels 
    185                                 // and have some rational place to look for it... 
    186                                 V_ConvertBeamCtr_to_pixB(folder,detStr,destPath) 
    187                         else 
     175// "B" is always naturally defined in terms of a pixel center. This can be converted to mm,  
     176// but the experiment will measure pixel x,y - just like ordela detectors. 
     177 
     178//                      if(kBCTR_CM) 
     179// 
     180//                              Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
     181//                              Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
     182//                              WAVE x_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
     183//                              WAVE y_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
     184//                              x_mm[0] = V_getDet_beam_center_x(folder,detStr) * 10            // convert cm to mm 
     185//                              y_mm[0] = V_getDet_beam_center_y(folder,detStr) * 10            // convert cm to mm 
     186//                               
     187//                              // now I need to convert the beam center in mm to pixels 
     188//                              // and have some rational place to look for it... 
     189//                              V_ConvertBeamCtr_to_pixB(folder,detStr,destPath) 
     190//                      else 
     191 
    188192                                // beam center is in pixels, so use the old routine 
    189193                                V_ConvertBeamCtr_to_mmB(folder,detStr,destPath) 
    190194 
    191                         endif 
     195//                      endif 
    192196                        V_Detector_CalcQVals(folder,detStr,destPath) 
    193197 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_Read.ipf

    r1097 r1101  
    12161216 
    12171217// == diameter if shape = CIRCLE 
     1218// value is expected in [mm] diameter 
    12181219Function V_getBeamStopC2_size(fname) 
    12191220        String fname 
     
    19041905 
    19051906//      shape (data folder) 
     1907// height and width are reported in [cm] 
    19061908Function V_getSampleAp2_height(fname) 
    19071909        String fname 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Initialize.ipf

    r1100 r1101  
    341341         
    342342        NewDataFolder/O root:Packages:NIST:VSANS:Globals:Protocols 
    343         Make/O/T $"root:Packages:NIST:VSANS:Globals:Protocols:Base"={"none","none","ask","ask","none","AVTYPE=Circular;SAVE=Yes;NAME=Manual;PLOT=Yes","DRK=none,DRKMODE=0,","","","","",""} 
    344         Make/O/T $"root:Packages:NIST:VSANS:Globals:Protocols:DoAll"={"ask","ask","ask","ask","ask","AVTYPE=Circular;SAVE=Yes;NAME=Manual;PLOT=Yes","DRK=none,DRKMODE=0,","","","","",""} 
     343        Make/O/T $"root:Packages:NIST:VSANS:Globals:Protocols:Base"={"none","none","ask","ask","none","AVTYPE=Circular;SAVE=Yes;NAME=Auto;PLOT=Yes;BINTYPE=F4-M4-B;","DRK=none,DRKMODE=0,","","","","",""} 
     344        Make/O/T $"root:Packages:NIST:VSANS:Globals:Protocols:DoAll"={"ask","ask","ask","ask","ask","AVTYPE=Circular;SAVE=Yes;NAME=Auto;PLOT=Yes;BINTYPE=F4-M4-B;","DRK=none,DRKMODE=0,","","","","",""} 
    345345        Make/O/T/N=(kNumProtocolSteps) $"root:Packages:NIST:VSANS:Globals:Protocols:CreateNew"                  //null wave 
    346346        //Initialize waves to store values in 
     
    348348        String/G root:Packages:NIST:VSANS:Globals:Protocols:gProtoStr="" 
    349349        String/G root:Packages:NIST:VSANS:Globals:Protocols:gNewStr="" 
    350         String/G root:Packages:NIST:VSANS:Globals:Protocols:gAvgInfoStr = "AVTYPE=Circular;SAVE=Yes;NAME=Auto;PLOT=Yes;BINTYPE=One;" 
     350        String/G root:Packages:NIST:VSANS:Globals:Protocols:gAvgInfoStr = "AVTYPE=Circular;SAVE=Yes;NAME=Auto;PLOT=Yes;BINTYPE=F4-M4-B;" 
    351351         
    352352        String/G root:Packages:NIST:VSANS:Globals:Protocols:gBegPtsStr="" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MainPanel.ipf

    r1095 r1101  
    315315                V_Show_Event_Panel() 
    316316        endif 
     317         
     318End 
     319 
     320Proc V_Event_MultReduceButtonProc(ctrlName) : ButtonControl 
     321        String ctrlName 
     322         
     323                V_ReduceEventFilesPanel() 
    317324         
    318325End 
     
    459466//      Button MainButton_3f,pos={150,120},size={110,20},title="WorkFile Math",proc=V_WorkMath_MainButtonProc 
    460467//      Button MainButton_3f,help={"Perfom simple math operations on workfile data"} 
    461         Button MainButton_3g,pos={150,180},size={100,20},title="Event Data",proc=V_Event_MainButtonProc 
     468        Button MainButton_3g,pos={150,150},size={100,20},title="Event Data",proc=V_Event_MainButtonProc 
    462469        Button MainButton_3g,help={"Manipulate VSANS Event Mode data"} 
     470        Button MainButton_3h,pos={150,180},size={140,20},title="Event Reduction",proc=V_Event_MultReduceButtonProc 
     471        Button MainButton_3h,help={"Reduce VSANS Event Mode data"} 
     472                 
    463473         
    464474        Button MainButton_3a,disable=1 
     
    469479//      Button MainButton_3f,disable=1 
    470480        Button MainButton_3g,disable=1 
     481        Button MainButton_3h,disable=1 
    471482 
    472483//on tab(4) - Miscellaneous operations 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf

    r1100 r1101  
    8989        String/G root:Packages:NIST:VSANS:Globals:Protocols:gMASK="ask" 
    9090        String/G root:Packages:NIST:VSANS:Globals:Protocols:gAbsStr="ask" 
    91         String/G root:Packages:NIST:VSANS:Globals:Protocols:gAVE="AVTYPE=Circular;SAVE=Yes - Concatenate;NAME=Auto;PLOT=No;BINTYPE=One;" 
     91        String/G root:Packages:NIST:VSANS:Globals:Protocols:gAVE="AVTYPE=Circular;SAVE=Yes - Concatenate;NAME=Auto;PLOT=No;BINTYPE=F4-M4-B;" 
    9292        String/G root:Packages:NIST:VSANS:Globals:Protocols:gDRK="DRK=none,DRKMODE=0," 
    9393         
     
    27812781//      activeType = "COR" 
    27822782        //add in DRK mode (0= not used, 10 = used) 
    2783         val = NumberByKey("DRKMODE",drkStr,"=","," ) 
    2784         mode += val 
     2783        // TODO: DRK has been de-activated for now 
     2784//      val = NumberByKey("DRKMODE",drkStr,"=","," ) 
     2785//      mode += val 
     2786 
    27852787//              print "mode = ",mode 
     2788 
    27862789        err = V_Correct(mode) 
    27872790        if(err) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WorkFolderUtils.ipf

    r1094 r1101  
    599599                 
    600600                V_NonLinearCorrection_B(fname,w,cal_x,cal_y,detStr,destPath) 
    601                  
    602                 if(kBCTR_CM) 
    603  
    604                         Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
    605                         Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
    606                         WAVE x_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
    607                         WAVE y_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
    608                         x_mm[0] = V_getDet_beam_center_x(fname,detStr) * 10             // convert cm to mm 
    609                         y_mm[0] = V_getDet_beam_center_y(fname,detStr) * 10             // convert cm to mm 
    610                          
    611                         // now I need to convert the beam center in mm to pixels 
    612                         // and have some rational place to look for it... 
    613                         V_ConvertBeamCtr_to_pixB(fname,detStr,destPath) 
    614                 else 
     601 
     602// "B" is always naturally defined in terms of a pixel center. This can be converted to mm,  
     603// but the experiment will measure pixel x,y - just like ordela detectors. 
     604                 
     605//              if(kBCTR_CM) 
     606// 
     607//                      Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
     608//                      Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
     609//                      WAVE x_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
     610//                      WAVE y_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
     611//                      x_mm[0] = V_getDet_beam_center_x(fname,detStr) * 10             // convert cm to mm 
     612//                      y_mm[0] = V_getDet_beam_center_y(fname,detStr) * 10             // convert cm to mm 
     613//                       
     614//                      // now I need to convert the beam center in mm to pixels 
     615//                      // and have some rational place to look for it... 
     616//                      V_ConvertBeamCtr_to_pixB(fname,detStr,destPath) 
     617//              else 
    615618                        // beam center is in pixels, so use the old routine 
    616619                        V_ConvertBeamCtr_to_mmB(fname,detStr,destPath) 
    617620 
    618                 endif 
     621//              endif 
    619622                V_Detector_CalcQVals(fname,detStr,destPath) 
    620623                 
Note: See TracChangeset for help on using the changeset viewer.