Ignore:
Timestamp:
Oct 18, 2019 1:08:35 PM (3 years ago)
Author:
srkline
Message:

Updated help file for VSANS. Graphics were not PNG.

Removed HFIR SANS package since if requires XML XOP - no longer supported.

Improved quality of graphics export for Analysis reports.

Added more support for super_white_beam mode on VSANS

Corrected printf bug (Igor 8) when printing out % sign

Added utilities for patching wavelength and monochromator type on VSANS since the type is still not written out correctly by NICE, and super_white_beam is not yet defined in NICE

Adjusted panel dimensions for the temperature sensor display on VSANS (needed onWindows)

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/Wrapper_v40.ipf

    r1001 r1222  
    345345                        // make the necessary waves if they don't exist already 
    346346                        if(exists("Hold_"+suffix) == 0) 
    347                                 Make/O/D/N=(num) $("epsilon_"+suffix),$("Hold_"+suffix) 
    348                                 Make/O/T/N=(num) $("LoLim_"+suffix),$("HiLim_"+suffix) 
    349                                 Wave eps = $("epsilon_"+suffix) 
    350                                 Wave coef=$popStr 
    351                                 if(eps[0] == 0)         //if eps already if filled, don't change it 
    352                                         eps = abs(coef*1e-4) + 1e-10                    //default eps is proportional to the coefficients 
    353                                 endif 
    354                         endif 
     347                                Make/O/D/N=(num) $("Hold_"+suffix) 
     348                        endif 
     349                        if(exists("epsilon_"+suffix) == 0) 
     350                                Make/O/D/N=(num) $("epsilon_"+suffix) 
     351                        endif 
     352                        if(exists("LoLim_"+suffix) == 0) 
     353                                Make/O/T/N=(num) $("LoLim_"+suffix) 
     354                        endif 
     355                        if(exists("HiLim_"+suffix) == 0) 
     356                                Make/O/T/N=(num) $("HiLim_"+suffix) 
     357                        endif 
     358                                                 
     359                        Wave eps = $("epsilon_"+suffix) 
     360                        Wave coef=$popStr 
     361                        if(eps[0] == 0)         //if eps already if filled, don't change it 
     362                                eps = abs(coef*1e-4) + 1e-10                    //default eps is proportional to the coefficients 
     363                        endif 
     364                         
    355365                        // default epsilon values, sometimes needed for the fit 
    356366                         
     
    11691179         
    11701180        // insert graphs 
     1181        // extra flag "2" (Igor >=7.00) is 2x screen resolution 
    11711182        if(WaveExists(dataXw)) 
    11721183//              Notebook $nb picture={$topGraph(0, 0, 400, 300), -5, 1}, text="\r" 
    1173                 Notebook $nb scaling={50, 50}, picture={$topGraph(0, 0, 800, 600), -5, 1}, text="\r" 
     1184                Notebook $nb scaling={50, 50}, picture={$topGraph(0, 0, 800, 600), -5, 1,2}, text="\r" 
    11741185        // 
    11751186        else            //must be 2D Gizmo 
    11761187                Execute "ExportGizmo Clip"                      //this ALWAYS is a PICT or BMP. Gizmo windows are different... 
    11771188                LoadPict/Q/O "Clipboard",tmp_Gizmo 
    1178                 Notebook $nb picture={tmp_Gizmo(0, 0, 800, 600), 0, 1}, text="\r" 
     1189                Notebook $nb picture={tmp_Gizmo(0, 0, 800, 600), 0, 1,2}, text="\r" 
    11791190        endif 
    11801191         
     
    12111222///             SavePICT /E=-5/O/P=home /I/W=(0,0,3,3) as pictStr 
    12121223                if(WaveExists(dataXw)) 
    1213                         SavePICT /E=-5/O/P=home/WIN=$topGraph /W=(0,0,800,600) as pictStr 
     1224                        SavePICT /E=-5/O/B=144/P=home/WIN=$topGraph /W=(0,0,800,600) as pictStr 
    12141225                else 
    12151226                        Execute "ExportGizmo /P=home as \""+pictStr+"\""                //this won't be of very high quality 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/VSANS/V_SWB_Beaucage.ipf

    r1220 r1222  
    278278        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    279279        // using the empirical definition, "middle" of the peaks 
    280         loLim = 3.37/5.3 
    281         upLim = 20/5.3 
     280        loLim = 3.37/kSuperWhiteBeam_Mean 
     281        upLim = 20/kSuperWhiteBeam_Mean 
    282282         
    283283        inten = V_IntegrOneLevelSWB_mid(w,loLim,upLim,x) 
     
    285285// why do I need this? Is this because this is defined as the mean of the distribution 
    286286//  and is needed to normalize the integral? verify this on paper.       
    287         inten *= 5.3 
     287        inten *= kSuperWhiteBeam_Mean 
    288288 
    289289// normalize the integral        
    290         inten /= 30955          // "middle"  of peaks 
     290        inten /= kSuperWhiteBeam_Normalization          // "middle"  of peaks 
    291291 
    292292// additional normalization??? 
     
    321321//      FUNCREF SANSModel_proto func = $funcStr 
    322322 
    323         val = V_SuperWhiteBeamDist_mid(dum*5.3)*OneLevelX(cw,qq/dum) 
     323        val = V_SuperWhiteBeamDist_mid(dum*kSuperWhiteBeam_Mean)*OneLevelX(cw,qq/dum) 
    324324         
    325325        return (val) 
     
    350350        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    351351        // using the empirical definition, "middle" of the peaks 
    352         loLim = 3.37/5.3 
    353         upLim = 20/5.3 
     352        loLim = 3.37/kSuperWhiteBeam_Mean 
     353        upLim = 20/kSuperWhiteBeam_Mean 
    354354         
    355355        inten = V_IntegrTwoLevelSWB_mid(w,loLim,upLim,x) 
     
    357357// why do I need this? Is this because this is defined as the mean of the distribution 
    358358//  and is needed to normalize the integral? verify this on paper.       
    359         inten *= 5.3 
     359        inten *= kSuperWhiteBeam_Mean 
    360360 
    361361// normalize the integral        
    362         inten /= 30955          // "middle"  of peaks 
     362        inten /= kSuperWhiteBeam_Normalization          // "middle"  of peaks 
    363363 
    364364// additional normalization??? 
     
    393393//      FUNCREF SANSModel_proto func = $funcStr 
    394394 
    395         val = V_SuperWhiteBeamDist_mid(dum*5.3)*TwoLevelX(cw,qq/dum) 
     395        val = V_SuperWhiteBeamDist_mid(dum*kSuperWhiteBeam_Mean)*TwoLevelX(cw,qq/dum) 
    396396         
    397397        return (val) 
     
    422422        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    423423        // using the empirical definition, "middle" of the peaks 
    424         loLim = 3.37/5.3 
    425         upLim = 20/5.3 
     424        loLim = 3.37/kSuperWhiteBeam_Mean 
     425        upLim = 20/kSuperWhiteBeam_Mean 
    426426         
    427427        inten = V_IntegrThreeLevelSWB_mid(w,loLim,upLim,x) 
     
    429429// why do I need this? Is this because this is defined as the mean of the distribution 
    430430//  and is needed to normalize the integral? verify this on paper.       
    431         inten *= 5.3 
     431        inten *= kSuperWhiteBeam_Mean 
    432432 
    433433// normalize the integral        
    434         inten /= 30955          // "middle"  of peaks 
     434        inten /= kSuperWhiteBeam_Normalization          // "middle"  of peaks 
    435435 
    436436// additional normalization??? 
     
    465465//      FUNCREF SANSModel_proto func = $funcStr 
    466466 
    467         val = V_SuperWhiteBeamDist_mid(dum*5.3)*ThreeLevelX(cw,qq/dum) 
     467        val = V_SuperWhiteBeamDist_mid(dum*kSuperWhiteBeam_Mean)*ThreeLevelX(cw,qq/dum) 
    468468         
    469469        return (val) 
     
    496496        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    497497        // using the empirical definition, "middle" of the peaks 
    498         loLim = 3.37/5.3 
    499         upLim = 20/5.3 
     498        loLim = 3.37/kSuperWhiteBeam_Mean 
     499        upLim = 20/kSuperWhiteBeam_Mean 
    500500         
    501501        inten = V_IntegrFourLevelSWB_mid(w,loLim,upLim,x) 
     
    503503// why do I need this? Is this because this is defined as the mean of the distribution 
    504504//  and is needed to normalize the integral? verify this on paper.       
    505         inten *= 5.3 
     505        inten *= kSuperWhiteBeam_Mean 
    506506 
    507507// normalize the integral        
    508         inten /= 30955          // "middle"  of peaks 
     508        inten /= kSuperWhiteBeam_Normalization          // "middle"  of peaks 
    509509 
    510510// additional normalization??? 
     
    539539//      FUNCREF SANSModel_proto func = $funcStr 
    540540 
    541         val = V_SuperWhiteBeamDist_mid(dum*5.3)*FourLevelX(cw,qq/dum) 
     541        val = V_SuperWhiteBeamDist_mid(dum*kSuperWhiteBeam_Mean)*FourLevelX(cw,qq/dum) 
    542542         
    543543        return (val) 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/VSANS/V_SWB_BroadPeak.ipf

    r1209 r1222  
    124124        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    125125        // using the empirical definition, "middle" of the peaks 
    126         loLim = 3.37/5.3 
    127         upLim = 20/5.3 
     126        loLim = 3.37/kSuperWhiteBeam_Mean 
     127        upLim = 20/kSuperWhiteBeam_Mean 
    128128         
    129129        inten = V_IntegrBroadPeakSWB_mid(w,loLim,upLim,x) 
     
    133133// why do I need this? Is this because this is defined as the mean of the distribution 
    134134//  and is needed to normalize the integral? verify this on paper.       
    135         inten *= 5.3 
     135        inten *= kSuperWhiteBeam_Mean 
    136136 
    137137// normalize the integral        
    138         inten /= 30955          // "middle"  of peaks 
     138        inten /= kSuperWhiteBeam_Normalization          // "middle"  of peaks 
    139139 
    140140        inten -= w[6] 
     
    176176//      FUNCREF SANSModel_proto func = $funcStr 
    177177 
    178         val = V_SuperWhiteBeamDist_mid(dum*5.3)*BroadPeakX(cw,qq/dum) 
     178        val = V_SuperWhiteBeamDist_mid(dum*kSuperWhiteBeam_Mean)*BroadPeakX(cw,qq/dum) 
    179179         
    180180        return (val) 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/VSANS/V_SWB_GaussSpheres.ipf

    r1209 r1222  
    121121        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    122122        // using the empirical definition, "middle" of the peaks 
    123         loLim = 3.37/5.3 
    124         upLim = 20/5.3 
     123        loLim = 3.37/kSuperWhiteBeam_Mean 
     124        upLim = 20/kSuperWhiteBeam_Mean 
    125125         
    126126        inten = V_IntegrGaussSphereSWB_mid(w,loLim,upLim,xx) 
     
    128128// why do I need this? Is this because this is defined as the mean of the distribution 
    129129//  and is needed to normalize the integral? verify this on paper.       
    130         inten *= 5.3 
     130        inten *= kSuperWhiteBeam_Mean 
    131131 
    132132// normalize the integral        
    133         inten /= 30955          // "middle"  of peaks 
     133        inten /= kSuperWhiteBeam_Normalization          // "middle"  of peaks 
    134134 
    135135        inten -= w[5] 
     
    169169//      FUNCREF SANSModel_proto func = $funcStr 
    170170 
    171         val = V_SuperWhiteBeamDist_mid(dum*5.3)*GaussSpheresX(cw,qq/dum) 
     171        val = V_SuperWhiteBeamDist_mid(dum*kSuperWhiteBeam_Mean)*GaussSpheresX(cw,qq/dum) 
    172172         
    173173        return (val) 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/VSANS/V_WB_Beaucage.ipf

    r1099 r1222  
    278278        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    279279        // using the empirical definition, "middle" of the peaks 
    280         loLim = 3.37/5.3 
    281         upLim = 8.37/5.3 
     280        loLim = 3.37/kWhiteBeam_Mean 
     281        upLim = 8.37/kWhiteBeam_Mean 
    282282         
    283283        inten = V_IntegrOneLevelWB_mid(w,loLim,upLim,x) 
     
    285285// why do I need this? Is this because this is defined as the mean of the distribution 
    286286//  and is needed to normalize the integral? verify this on paper.       
    287         inten *= 5.3 
     287        inten *= kWhiteBeam_Mean 
    288288 
    289289// normalize the integral        
    290         inten /= 19933          // "middle"  of peaks 
     290        inten /= kWhiteBeam_Normalization               // "middle"  of peaks 
    291291 
    292292// additional normalization??? 
     
    321321//      FUNCREF SANSModel_proto func = $funcStr 
    322322 
    323         val = V_WhiteBeamDist_mid(dum*5.3)*OneLevelX(cw,qq/dum) 
     323        val = V_WhiteBeamDist_mid(dum*kWhiteBeam_Mean)*OneLevelX(cw,qq/dum) 
    324324         
    325325        return (val) 
     
    350350        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    351351        // using the empirical definition, "middle" of the peaks 
    352         loLim = 3.37/5.3 
    353         upLim = 8.37/5.3 
     352        loLim = 3.37/kWhiteBeam_Mean 
     353        upLim = 8.37/kWhiteBeam_Mean 
    354354         
    355355        inten = V_IntegrTwoLevelWB_mid(w,loLim,upLim,x) 
     
    357357// why do I need this? Is this because this is defined as the mean of the distribution 
    358358//  and is needed to normalize the integral? verify this on paper.       
    359         inten *= 5.3 
     359        inten *= kWhiteBeam_Mean 
    360360 
    361361// normalize the integral        
    362         inten /= 19933          // "middle"  of peaks 
     362        inten /= kWhiteBeam_Normalization               // "middle"  of peaks 
    363363 
    364364// additional normalization??? 
     
    393393//      FUNCREF SANSModel_proto func = $funcStr 
    394394 
    395         val = V_WhiteBeamDist_mid(dum*5.3)*TwoLevelX(cw,qq/dum) 
     395        val = V_WhiteBeamDist_mid(dum*kWhiteBeam_Mean)*TwoLevelX(cw,qq/dum) 
    396396         
    397397        return (val) 
     
    422422        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    423423        // using the empirical definition, "middle" of the peaks 
    424         loLim = 3.37/5.3 
    425         upLim = 8.37/5.3 
     424        loLim = 3.37/kWhiteBeam_Mean 
     425        upLim = 8.37/kWhiteBeam_Mean 
    426426         
    427427        inten = V_IntegrThreeLevelWB_mid(w,loLim,upLim,x) 
     
    429429// why do I need this? Is this because this is defined as the mean of the distribution 
    430430//  and is needed to normalize the integral? verify this on paper.       
    431         inten *= 5.3 
     431        inten *= kWhiteBeam_Mean 
    432432 
    433433// normalize the integral        
    434         inten /= 19933          // "middle"  of peaks 
     434        inten /= kWhiteBeam_Normalization               // "middle"  of peaks 
    435435 
    436436// additional normalization??? 
     
    465465//      FUNCREF SANSModel_proto func = $funcStr 
    466466 
    467         val = V_WhiteBeamDist_mid(dum*5.3)*ThreeLevelX(cw,qq/dum) 
     467        val = V_WhiteBeamDist_mid(dum*kWhiteBeam_Mean)*ThreeLevelX(cw,qq/dum) 
    468468         
    469469        return (val) 
     
    496496        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    497497        // using the empirical definition, "middle" of the peaks 
    498         loLim = 3.37/5.3 
    499         upLim = 8.37/5.3 
     498        loLim = 3.37/kWhiteBeam_Mean 
     499        upLim = 8.37/kWhiteBeam_Mean 
    500500         
    501501        inten = V_IntegrFourLevelWB_mid(w,loLim,upLim,x) 
     
    503503// why do I need this? Is this because this is defined as the mean of the distribution 
    504504//  and is needed to normalize the integral? verify this on paper.       
    505         inten *= 5.3 
     505        inten *= kWhiteBeam_Mean 
    506506 
    507507// normalize the integral        
    508         inten /= 19933          // "middle"  of peaks 
     508        inten /= kWhiteBeam_Normalization               // "middle"  of peaks 
    509509 
    510510// additional normalization??? 
     
    539539//      FUNCREF SANSModel_proto func = $funcStr 
    540540 
    541         val = V_WhiteBeamDist_mid(dum*5.3)*FourLevelX(cw,qq/dum) 
     541        val = V_WhiteBeamDist_mid(dum*kWhiteBeam_Mean)*FourLevelX(cw,qq/dum) 
    542542         
    543543        return (val) 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/VSANS/V_WB_BroadPeak.ipf

    r1099 r1222  
    121121        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    122122        // using the empirical definition, "middle" of the peaks 
    123         loLim = 3.37/5.3 
    124         upLim = 8.37/5.3 
     123        loLim = 3.37/kWhiteBeam_Mean 
     124        upLim = 8.37/kWhiteBeam_Mean 
    125125         
    126126        inten = V_IntegrBroadPeakWB_mid(w,loLim,upLim,x) 
     
    128128// why do I need this? Is this because this is defined as the mean of the distribution 
    129129//  and is needed to normalize the integral? verify this on paper.       
    130         inten *= 5.3 
     130        inten *= kWhiteBeam_Mean 
    131131 
    132132// normalize the integral        
    133         inten /= 19933          // "middle"  of peaks 
     133        inten /= kWhiteBeam_Normalization               // "middle"  of peaks 
    134134 
    135135// additional normalization??? 
     
    164164//      FUNCREF SANSModel_proto func = $funcStr 
    165165 
    166         val = V_WhiteBeamDist_mid(dum*5.3)*BroadPeakX(cw,qq/dum) 
     166        val = V_WhiteBeamDist_mid(dum*kWhiteBeam_Mean)*BroadPeakX(cw,qq/dum) 
    167167         
    168168        return (val) 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/VSANS/V_WB_GaussSpheres.ipf

    r1209 r1222  
    121121        // define limits based on lo/mean, hi/mean of the wavelength distribution 
    122122        // using the empirical definition, "middle" of the peaks 
    123         loLim = 3.37/5.3 
    124         upLim = 8.37/5.3 
     123        loLim = 3.37/kWhiteBeam_Mean 
     124        upLim = 8.37/kWhiteBeam_Mean 
    125125         
    126126        inten = V_IntegrGaussSphereWB_mid(w,loLim,upLim,xx) 
     
    128128// why do I need this? Is this because this is defined as the mean of the distribution 
    129129//  and is needed to normalize the integral? verify this on paper.       
    130         inten *= 5.3 
     130        inten *= kWhiteBeam_Mean 
    131131 
    132132// normalize the integral        
    133         inten /= 19933          // "middle"  of peaks 
     133        inten /= kWhiteBeam_Normalization               // "middle"  of peaks 
    134134 
    135135        inten -= w[5] 
     
    167167//      FUNCREF SANSModel_proto func = $funcStr 
    168168 
    169         val = V_WhiteBeamDist_mid(dum*5.3)*GaussSpheresX(cw,qq/dum) 
     169        val = V_WhiteBeamDist_mid(dum*kWhiteBeam_Mean)*GaussSpheresX(cw,qq/dum) 
    170170         
    171171        return (val) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/Automated_SANS_Reduction.ipf

    r954 r1222  
    599599        DoWindow/K SANS_Data 
    600600 
    601         Printf "Kappa was successfully calculated as = %g +/- %g (%g %)\r",kappa,kappa_err,(kappa_err/kappa)*100 
     601        Printf "Kappa was successfully calculated as = %g +/- %g (%g %%)\r",kappa,kappa_err,(kappa_err/kappa)*100 
    602602         
    603603        SVAR kapStr = root:myGlobals:Protocols:gAbsStr   
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_FlipperPanel.ipf

    r923 r1222  
    581581         
    582582        err_PsmPf = sqrt(err_PsmPf) 
    583         Printf "At t1=%g  PsmPf = %g +/- %g (%g%)\r",t1,PsmPf,err_PsmPf,err_PsmPf/PsmPf*100 
     583        Printf "At t1=%g  PsmPf = %g +/- %g (%g %%)\r",t1,PsmPf,err_PsmPf,err_PsmPf/PsmPf*100 
    584584 
    585585 
     
    648648         
    649649        err_Psm = sqrt(err_Psm) 
    650         Printf "At t1=%g  Psm = %g +/- %g (%g%)\r",t1,Psm,err_Psm,err_Psm/Psm*100 
     650        Printf "At t1=%g  Psm = %g +/- %g (%g %%)\r",t1,Psm,err_Psm,err_Psm/Psm*100 
    651651 
    652652 
     
    673673        err_Pt = sqrt(err_Pt) 
    674674         
    675         Printf "At (delta)t=%g  P_He(t) = %g +/- %g (%g%)\r",t2,Pt,err_Pt,err_Pt/Pt*100 
     675        Printf "At (delta)t=%g  P_He(t) = %g +/- %g (%g %%)\r",t2,Pt,err_Pt,err_Pt/Pt*100 
    676676 
    677677        return(Pt) 
     
    700700        err_PCell = sqrt(err_Pcell) 
    701701         
    702         Printf "At t=%g  Pcell = %g +/- %g (%g%)\r",t2,Pcell,err_Pcell,err_Pcell/PCell*100 
     702        Printf "At t=%g  Pcell = %g +/- %g (%g %%)\r",t2,Pcell,err_Pcell,err_Pcell/PCell*100 
    703703 
    704704        return(PCell) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationPanels.ipf

    r916 r1222  
    894894//       
    895895// 
    896 //                      Printf "Average muP = %g +/- %g (%g%)\r",avg_muP,err_avg_muP,err_avg_muP/avg_muP*100 
    897 //                      Printf "Average Po = %g +/- %g (%g%)\r",avg_Po,err_avg_Po,err_avg_Po/avg_Po*100 
     896//                      Printf "Average muP = %g +/- %g (%g %%)\r",avg_muP,err_avg_muP,err_avg_muP/avg_muP*100 
     897//                      Printf "Average Po = %g +/- %g (%g %%)\r",avg_Po,err_avg_Po,err_avg_Po/avg_Po*100 
    898898//                       
    899899//              E  26 APR 12 
     
    949949        err_Tmaj = sqrt(err_Tmaj) 
    950950         
    951         Printf "Tmaj = %g +/- %g (%g%)\r",Tmaj,err_Tmaj,err_Tmaj/Tmaj*100 
     951        Printf "Tmaj = %g +/- %g (%g %%)\r",Tmaj,err_Tmaj,err_Tmaj/Tmaj*100 
    952952 
    953953         
     
    975975        err_Tmin = sqrt(err_Tmin) 
    976976         
    977         Printf "Tmin = %g +/- %g (%g%)\r",Tmin,err_Tmin,err_Tmin/Tmin*100 
     977        Printf "Tmin = %g +/- %g (%g %%)\r",Tmin,err_Tmin,err_Tmin/Tmin*100 
    978978 
    979979         
     
    996996        err_Pcell = (1 - (tanh(muPo))^2) * err_muPo 
    997997         
    998         Printf "Pcell = %g +/- %g (%g%)\r",Pcell,err_Pcell,err_Pcell/PCell*100 
     998        Printf "Pcell = %g +/- %g (%g %%)\r",Pcell,err_Pcell,err_Pcell/PCell*100 
    999999 
    10001000        return(PCell) 
     
    10191019//      err_Po = sqrt(tmp) 
    10201020         
    1021         Printf "Po = %g +/- %g (%g%)\r",Po,err_Po,err_Po/Po*100 
     1021        Printf "Po = %g +/- %g (%g %%)\r",Po,err_Po,err_Po/Po*100 
    10221022        return(Po) 
    10231023End 
     
    10741074        Variable noNorm=0 
    10751075        Variable cr = TotalCR_FromRun(num,err_cr,noNorm) 
    1076         printf "CR = %g +/- %g (%g%)\r",cr,err_cr,err_cr/cr*100  
     1076        printf "CR = %g +/- %g (%g %%)\r",cr,err_cr,err_cr/cr*100        
    10771077        return(0) 
    10781078End 
     
    11081108        err_cr = cr * sqrt(err_cts^2/cts^2 + atten_err^2/attenTrans^2) 
    11091109         
    1110         printf "CR = %g +/- %g (%g%)\r",cr,err_cr,err_cr/cr*100  
     1110        printf "CR = %g +/- %g (%g %%)\r",cr,err_cr,err_cr/cr*100        
    11111111 
    11121112                 
     
    16571657                         
    16581658                         
    1659                         Printf "Flipping ratio = %g +/- %g (%g%)\r",flip,flip_err,flip_err/flip*100 
     1659                        Printf "Flipping ratio = %g +/- %g (%g %%)\r",flip,flip_err,flip_err/flip*100 
    16601660                        str = num2str(flip)+" +/- "+num2str(flip_err) 
    16611661                        SetVariable setvar3,value=_STR:str 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ProtocolAsPanel.ipf

    r1042 r1222  
    21522152                // - obsucre bug if "ask" in ABS section of protocol clears RAW folder, then Q-axes can't be set from RAW:RealsRead 
    21532153                //ClearDataFolder("RAW") 
    2154                 Printf "Kappa was successfully calculated as = %g +/- %g (%g %)\r",kappa,kappa_err,(kappa_err/kappa)*100 
     2154                Printf "Kappa was successfully calculated as = %g +/- %g (%g %%)\r",kappa,kappa_err,(kappa_err/kappa)*100 
    21552155        Endif 
    21562156         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Instrument_Resolution.ipf

    r1219 r1222  
    263263// done in a cleaner fashion (through IdentityCollimation) once NICE catches up 
    264264 
    265         String monoType = V_IdentifyMonochromatorType(folderStr) 
    266          
    267  
    268         if(cmpstr(collimationStr,"pinhole") == 0) 
    269                 if(cmpstr(monoType,"super_white_beam")==0) 
    270                         lambdaWidth = 0 
    271                 endif 
    272                 //otherwise, nothing to change   
    273         endif 
    274  
     265//      String monoType = V_IdentifyMonochromatorType(folderStr) 
     266 
     267 
     268        if(cmpstr(collimationStr,"pinhole_super_white_beam")==0) 
     269                lambdaWidth = 0 
     270        endif 
     271                 
    275272        if(cmpstr(collimationStr,"pinhole_whiteBeam") == 0) 
    276273                //              set lambdaWidth == 0 so that the gaussian resolution calculates only the geometry contribution. 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Menu.ipf

    r1203 r1222  
    5050                "Patch Detector Distance",V_PatchDet_Distance() 
    5151                "Patch XY Pixel Size",V_Patch_XYPixelSize() 
     52                "Patch Wavelength",V_Patch_Wavelength() 
     53                "Patch Monochromator Type",V_Patch_MonochromatorType() 
    5254                "-" 
    5355                "Patch Back Detector Values",V_Patch_Back_Detector() 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_PatchFiles.ipf

    r1209 r1222  
    32003200 
    32013201 
     3202Proc V_Patch_MonochromatorType(lo,hi,typeStr) 
     3203        Variable lo,hi 
     3204        String typeStr="super_white_beam" 
     3205         
     3206        V_fPatch_MonochromatorType(lo,hi,typeStr) 
     3207End 
     3208 
     3209//              err = V_writeMonochromatorType(fname,str) 
     3210Function V_fPatch_MonochromatorType(lo,hi,typeStr) 
     3211        Variable lo,hi 
     3212        String typeStr 
     3213 
     3214        Variable jj 
     3215        String fname 
     3216 
     3217                 
     3218        //loop over all files 
     3219        for(jj=lo;jj<=hi;jj+=1) 
     3220                fname = V_FindFileFromRunNumber(jj) 
     3221                if(strlen(fname) != 0) 
     3222                 
     3223                        V_writeMonochromatorType(fname,typeStr) 
     3224 
     3225                else 
     3226                        printf "run number %d not found\r",jj 
     3227                endif 
     3228        endfor 
     3229         
     3230         
     3231        return(0) 
     3232End 
     3233 
     3234Proc V_Patch_Wavelength(lo,hi,wavelength,delta) 
     3235        Variable lo,hi 
     3236        Variable wavelength=6.2,delta=0.8 
     3237         
     3238        V_fPatch_Wavelength(lo,hi,wavelength,delta) 
     3239End 
     3240 
     3241//              err = V_writeWavelength(fname,val) 
     3242Function V_fPatch_Wavelength(lo,hi,lam,delta) 
     3243        Variable lo,hi 
     3244        Variable lam,delta 
     3245 
     3246        Variable jj 
     3247        String fname 
     3248 
     3249                 
     3250        //loop over all files 
     3251        for(jj=lo;jj<=hi;jj+=1) 
     3252                fname = V_FindFileFromRunNumber(jj) 
     3253                if(strlen(fname) != 0) 
     3254                 
     3255                        V_writeWavelength(fname,lam) 
     3256                        V_writeWavelength_Spread(fname,delta) 
     3257 
     3258                else 
     3259                        printf "run number %d not found\r",jj 
     3260                endif 
     3261        endfor 
     3262         
     3263         
     3264        return(0) 
     3265End 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_TemperatureSensor.ipf

    r1146 r1222  
    3636                Label left,"Sensor Value" 
    3737                Label bottom,"Time (s)" 
     38                 
     39                STRUCT WMPopupAction pa 
     40                pa.eventCode=2 
     41                pa.popStr="RAW" 
     42                V_WorkFolderPopMenuProc(pa) 
    3843        endif 
    3944         
     
    4449Window V_SensorGraph() : Graph 
    4550        PauseUpdate; Silent 1           // building window... 
    46         Display /W=(1500,350,2300,750)/N=V_SensorGraph/K=1 
     51//      Display /W=(1500,350,2300,750)/N=V_SensorGraph/K=1 
     52//      ControlBar/L 300 
     53        Display /W=(600,50,1050,780)/N=V_SensorGraph/K=1 
     54        ControlBar/T 380 
    4755//      ShowTools/A 
    48         ControlBar/L 300 
    4956        PopupMenu popup0,pos={10.00,10.00},size={87.00,23.00},proc=V_WorkFolderPopMenuProc,title="folder" 
    5057        PopupMenu popup0,mode=1,popvalue="RAW",value= #"\"RAW;SAM;ABS;\"" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_Comparisons.ipf

    r1219 r1222  
    372372         
    373373        String collimationStr="" 
    374         String status="",guides="" 
     374        String status="",guides="",typeStr="" 
    375375        variable wb_in=0,slit=0 
    376376         
     
    379379                return("convergingPinholes") 
    380380        endif 
     381 
     382        guides = V_getNumberOfGuides(fname) 
     383        if(cmpstr(guides,"NARROW_SLITS") == 0) 
     384                slit = 1 
     385        endif 
     386         
     387// TODO: still not the correct way to identify the super white beam condition 
     388        typeStr = V_getMonochromatorType(fname) 
     389        if(cmpstr(typeStr,"super_white_beam")==0) 
     390                if(slit == 1) 
     391                        return("narrowSlit_super_white_beam") 
     392                else 
     393                        return("pinhole_super_white_beam") 
     394                endif 
     395        endif 
     396 
    381397 
    382398// TODO: as of 6/2018 with the converging pinholes IN, status is "out" 
     
    391407        endif    
    392408         
    393         guides = V_getNumberOfGuides(fname) 
    394         if(cmpstr(guides,"NARROW_SLITS") == 0) 
    395                 slit = 1 
    396         endif 
     409 
    397410         
    398411        if(wb_in == 1 && slit == 1) 
     
    428441        String typeStr="" 
    429442 
    430 // TODO: if unidentified (all are OUT), then it may be super_white_beam 
     443// TODO: if super_white_beam, this needs to be patched in the header 
    431444//       
    432         typeStr = "super_white_beam" 
     445        typeStr = V_getMonochromatorType(fname) 
     446        if(cmpstr(typeStr,"super_white_beam")==0) 
     447                return(typeStr) 
     448        endif 
    433449         
    434450         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WhiteBeamDistribution.ipf

    r1219 r1222  
    2828// 
    2929 
    30  
    3130//  White Beam: 
    3231//  mean wavelength = 5.29687 
     
    3736//  3rd moment/2nd moment = 7.93267 
    3837// 
     38Constant kWhiteBeam_Mean = 5.3 
     39//Constant kWhiteBeam_Mean = 5.7                // mean of lam^2 
     40Constant kWhiteBeam_Normalization = 19933 
     41 
     42Constant kSuperWhiteBeam_Mean = 6.2 
     43//Constant kSuperWhiteBeam_Mean = 7.9           //mean of lam^2 
     44Constant kSuperWhiteBeam_Normalization = 30955 
    3945 
    4046 
Note: See TracChangeset for help on using the changeset viewer.