Ignore:
Timestamp:
Aug 24, 2012 5:16:39 PM (11 years ago)
Author:
srkline
Message:

Tweaking the labels on the polarization panels to add "?" to columns that require user input.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_FlipperPanel.ipf

    r858 r863  
    214214        WAVE/T cell=$("CondCell_"+popStr) 
    215215        cell[0] = "Enter cell name" 
     216//      SetDimLabel 0,-1,'Cell Name?',cell 
    216217 
    217218        Make/O/D/N=(1,8) $("Cond_"+popStr) 
    218219        WAVE cond = $("Cond_"+popStr) 
    219220        // set the column labels 
    220         SetDimLabel 1,0,UU_Trans,cond 
    221         SetDimLabel 1,1,DU_Trans,cond 
    222         SetDimLabel 1,2,DD_Trans,cond 
    223         SetDimLabel 1,3,UD_Trans,cond 
    224         SetDimLabel 1,4,Blocked,cond 
     221        SetDimLabel 1,0,'UU_Trans?',cond 
     222        SetDimLabel 1,1,'DU_Trans?',cond 
     223        SetDimLabel 1,2,'DD_Trans?',cond 
     224        SetDimLabel 1,3,'UD_Trans?',cond 
     225        SetDimLabel 1,4,'Blocked?',cond 
    225226        SetDimLabel 1,5,Pol_SM_FL,cond 
    226227        SetDimLabel 1,6,Pol_SM,cond                     //for a mask wave, non-zero is used in the fit 
    227         SetDimLabel 1,7,Include,cond 
     228        SetDimLabel 1,7,'Include?',cond 
    228229        cond[0][7] = 1                  //default to include the point 
    229230         
     
    380381 
    381382                                //include this row of data? 
    382                                 if(w[selRow][%Include] == 1) 
     383                                if(w[selRow][%'Include?'] == 1) 
    383384                                        nRowsIncluded += 1 
    384385                                         
     
    399400                                         
    400401                                        // do the calculations: 
    401 //                                      cr1 = TotalCR_FromRun(w[selRow][%UU_Trans],err_cr1,1) 
    402 //                                      cr2 = TotalCR_FromRun(w[selRow][%DU_Trans],err_cr2,1) 
    403 //                                      cr3 = TotalCR_FromRun(w[selRow][%DD_Trans],err_cr3,1)    
    404 //                                      cr4 = TotalCR_FromRun(w[selRow][%UD_Trans],err_cr4,1) 
    405 //                                      cr5 = TotalCR_FromRun(w[selRow][%Blocked],err_cr5,1)            //blocked beam is NOT normalized to zero attenuators 
     402//                                      cr1 = TotalCR_FromRun(w[selRow][%'UU_Trans?'],err_cr1,1) 
     403//                                      cr2 = TotalCR_FromRun(w[selRow][%'DU_Trans?'],err_cr2,1) 
     404//                                      cr3 = TotalCR_FromRun(w[selRow][%'DD_Trans?'],err_cr3,1)         
     405//                                      cr4 = TotalCR_FromRun(w[selRow][%'UD_Trans?'],err_cr4,1) 
     406//                                      cr5 = TotalCR_FromRun(w[selRow][%'Blocked?'],err_cr5,1)         //blocked beam is NOT normalized to zero attenuators 
    406407//                                      Print "The Blocked CR is *NOT* rescaled to zero attenuators -- FlipperAverageButtonProc" 
    407                                         cr1 = TotalCR_FromRun(w[selRow][%UU_Trans],err_cr1,0) 
    408                                         cr2 = TotalCR_FromRun(w[selRow][%DU_Trans],err_cr2,0) 
    409                                         cr3 = TotalCR_FromRun(w[selRow][%DD_Trans],err_cr3,0)    
    410                                         cr4 = TotalCR_FromRun(w[selRow][%UD_Trans],err_cr4,0) 
    411                                         cr5 = TotalCR_FromRun(w[selRow][%Blocked],err_cr5,0)            //blocked beam is normalized to zero attenuators 
     408                                        cr1 = TotalCR_FromRun(w[selRow][%'UU_Trans?'],err_cr1,0) 
     409                                        cr2 = TotalCR_FromRun(w[selRow][%'DU_Trans?'],err_cr2,0) 
     410                                        cr3 = TotalCR_FromRun(w[selRow][%'DD_Trans?'],err_cr3,0)         
     411                                        cr4 = TotalCR_FromRun(w[selRow][%'UD_Trans?'],err_cr4,0) 
     412                                        cr5 = TotalCR_FromRun(w[selRow][%'Blocked?'],err_cr5,0)         //blocked beam is normalized to zero attenuators 
    412413                                        Print "The Blocked CR *IS* rescaled to zero attenuators -- FlipperAverageButtonProc" 
    413414         
     
    506507        err_gam = NumberByKey("err_gamma", gCellKW, "=", ",", 0) 
    507508 
    508         fname = FindFileFromRunNumber(w[selRow][%UU_Trans]) 
     509        fname = FindFileFromRunNumber(w[selRow][%'UU_Trans?']) 
    509510        t1str = getFileCreationDate(fname) 
    510511        t1 = ElapsedHours(t0Str,t1Str) 
    511512         
    512         fname = FindFileFromRunNumber(w[selRow][%DU_Trans]) 
     513        fname = FindFileFromRunNumber(w[selRow][%'DU_Trans?']) 
    513514        t2str = getFileCreationDate(fname) 
    514515        t2 = ElapsedHours(t0Str,t2Str) 
     
    768769                        cond = 0 
    769770                        calc = 0 
    770                         cellW = "" 
     771//                      cellW = "" 
    771772                        cond[0][7] = 1                  //default to include the point 
    772773 
     
    867868         
    868869        // are all file numbers valid? 
    869         fname = FindFileFromRunNumber(w[selRow][%UU_Trans]) 
     870        fname = FindFileFromRunNumber(w[selRow][%'UU_Trans?']) 
    870871        if(cmpstr(fname,"")==0) 
    871                 DoAlert 0,"UU_Trans run "+num2str(w[selRow][%UU_Trans])+" is not a valid run number" 
     872                DoAlert 0,"UU_Trans run "+num2str(w[selRow][%'UU_Trans?'])+" is not a valid run number" 
    872873                err = 1 
    873874        else 
     
    876877        endif 
    877878         
    878         fname = FindFileFromRunNumber(w[selRow][%DU_Trans]) 
     879        fname = FindFileFromRunNumber(w[selRow][%'DU_Trans?']) 
    879880        if(cmpstr(fname,"")==0) 
    880                 DoAlert 0,"DU_Trans run "+num2str(w[selRow][%DU_Trans])+" is not a valid run number" 
     881                DoAlert 0,"DU_Trans run "+num2str(w[selRow][%'DU_Trans?'])+" is not a valid run number" 
    881882                err = 1 
    882883        else 
     
    885886        endif 
    886887         
    887         fname = FindFileFromRunNumber(w[selRow][%DD_Trans]) 
     888        fname = FindFileFromRunNumber(w[selRow][%'DD_Trans?']) 
    888889        if(cmpstr(fname,"")==0) 
    889                 DoAlert 0,"DD_Trans run "+num2str(w[selRow][%DD_Trans])+" is not a valid run number" 
     890                DoAlert 0,"DD_Trans run "+num2str(w[selRow][%'DD_Trans?'])+" is not a valid run number" 
    890891                err = 1 
    891892        else 
     
    894895        endif 
    895896         
    896         fname = FindFileFromRunNumber(w[selRow][%UD_Trans]) 
     897        fname = FindFileFromRunNumber(w[selRow][%'UD_Trans?']) 
    897898        if(cmpstr(fname,"")==0) 
    898                 DoAlert 0,"UD_Trans run "+num2str(w[selRow][%UD_Trans])+" is not a valid run number" 
     899                DoAlert 0,"UD_Trans run "+num2str(w[selRow][%'UD_Trans?'])+" is not a valid run number" 
    899900                err = 1 
    900901        else 
     
    903904        endif 
    904905         
    905         fname = FindFileFromRunNumber(w[selRow][%Blocked]) 
     906        fname = FindFileFromRunNumber(w[selRow][%'Blocked?']) 
    906907        if(cmpstr(fname,"")==0) 
    907                 DoAlert 0,"Blocked run "+num2str(w[selRow][%Blocked])+" is not a valid run number" 
     908                DoAlert 0,"Blocked run "+num2str(w[selRow][%'Blocked?'])+" is not a valid run number" 
    908909                err = 1 
    909910        else 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationPanels.ipf

    r859 r863  
    634634        WAVE decay = $("Decay_"+popStr) 
    635635        // set the column labels 
    636         SetDimLabel 1,0,Trans_He_In,decay 
    637         SetDimLabel 1,1,Trans_He_Out,decay 
    638         SetDimLabel 1,2,Blocked,decay 
     636        SetDimLabel 1,0,'Trans_He_In?',decay 
     637        SetDimLabel 1,1,'Trans_He_Out?',decay 
     638        SetDimLabel 1,2,'Blocked?',decay 
    639639        SetDimLabel 1,3,mu_star,decay 
    640640        SetDimLabel 1,4,Effective_Pol,decay 
    641641        SetDimLabel 1,5,Atomic_Pol,decay 
    642642        SetDimLabel 1,6,T_Major,decay 
    643         SetDimLabel 1,7,Include,decay                   //for a mask wave, non-zero is used in the fit 
     643        SetDimLabel 1,7,'Include?',decay                        //for a mask wave, non-zero is used in the fit 
    644644        SetDimLabel 1,8,elapsed_hr,decay 
    645645        decay[0][7] = 1                 //default to include the point 
     
    729729                                if(selRow == 0 && !overrideT0) 
    730730                                        //find T0 
    731                                         fname = FindFileFromRunNumber(w[0][%Trans_He_In]) 
     731                                        fname = FindFileFromRunNumber(w[0][%'Trans_He_In?']) 
    732732                                        t0str = getFileCreationDate(fname) 
    733733                                        SVAR gT0 = root:Packages:NIST:Polarization:Cells:gT0 
     
    758758                                // 1 for each file, return the count rate and err_CR (normalize to atten or not) 
    759759         
    760                                 cr1 = TotalCR_FromRun(w[selRow][%Trans_He_In],err_cr1,0) 
    761                                 cr2 = TotalCR_FromRun(w[selRow][%Trans_He_Out],err_cr2,0) 
    762 //                              cr3 = TotalCR_FromRun(w[selRow][%Blocked],err_cr3,1)                    //blocked beam is NOT normalized to zero attenuators 
     760                                cr1 = TotalCR_FromRun(w[selRow][%'Trans_He_In?'],err_cr1,0) 
     761                                cr2 = TotalCR_FromRun(w[selRow][%'Trans_He_Out?'],err_cr2,0) 
     762//                              cr3 = TotalCR_FromRun(w[selRow][%'Blocked?'],err_cr3,1)                 //blocked beam is NOT normalized to zero attenuators 
    763763//                              Print "************The Blocked CR is *NOT* rescaled to zero attenuators -- CalcRowParamButton" 
    764                                 cr3 = TotalCR_FromRun(w[selRow][%Blocked],err_cr3,0)                    //blocked beam is normalized to zero attenuators 
     764                                cr3 = TotalCR_FromRun(w[selRow][%'Blocked?'],err_cr3,0)                 //blocked beam is normalized to zero attenuators 
    765765                                Print "************The Blocked CR *is* rescaled to zero attenuators -- CalcRowParamButton " 
    766766 
     
    801801                                 
    802802                                // elapsed hours 
    803                                 fname = FindFileFromRunNumber(w[selRow][%Trans_He_In]) 
     803                                fname = FindFileFromRunNumber(w[selRow][%'Trans_He_In?']) 
    804804                                t1str = getFileCreationDate(fname) 
    805805                                w[selRow][%elapsed_hr] = ElapsedHours(t0Str,t1Str) 
     
    11051105                        Make/O/D/N=(num)                tmp_Mask,tmp_hr,tmp_Y,tmp_err_Y,tmp_Y2 
    11061106                         
    1107                         tmp_Mask = decay[p][%Include] 
     1107                        tmp_Mask = decay[p][%'Include?'] 
    11081108                        tmp_hr = decay[p][%elapsed_hr] 
    11091109                         
     
    14411441         
    14421442        // are all file numbers valid? 
    1443         fname = FindFileFromRunNumber(w[selRow][%Trans_He_In]) 
     1443        fname = FindFileFromRunNumber(w[selRow][%'Trans_He_In?']) 
    14441444        if(cmpstr(fname,"")==0) 
    1445                 DoAlert 0,"Trans_He_In run "+num2str(w[selRow][%Trans_He_In])+" is not a valid run number" 
     1445                DoAlert 0,"Trans_He_In run "+num2str(w[selRow][%'Trans_He_In?'])+" is not a valid run number" 
    14461446                err = 1 
    14471447        else 
     
    14501450        endif 
    14511451         
    1452         fname = FindFileFromRunNumber(w[selRow][%Trans_He_Out]) 
     1452        fname = FindFileFromRunNumber(w[selRow][%'Trans_He_Out?']) 
    14531453        if(cmpstr(fname,"")==0) 
    1454                 DoAlert 0,"Trans_He_Out run "+num2str(w[selRow][%Trans_He_Out])+" is not a valid run number" 
     1454                DoAlert 0,"Trans_He_Out run "+num2str(w[selRow][%'Trans_He_Out?'])+" is not a valid run number" 
    14551455                err = 1 
    14561456        else 
     
    14591459        endif 
    14601460         
    1461         fname = FindFileFromRunNumber(w[selRow][%Blocked]) 
     1461        fname = FindFileFromRunNumber(w[selRow][%'Blocked?']) 
    14621462        if(cmpstr(fname,"")==0) 
    1463                 DoAlert 0,"Blocked run "+num2str(w[selRow][%Blocked])+" is not a valid run number" 
     1463                DoAlert 0,"Blocked run "+num2str(w[selRow][%'Blocked?'])+" is not a valid run number" 
    14641464                err = 1 
    14651465        else 
Note: See TracChangeset for help on using the changeset viewer.