Changeset 1209


Ignore:
Timestamp:
Sep 18, 2019 1:23:23 PM (3 years ago)
Author:
srkline
Message:

Changes: SANS
Added attenuator calibration tables for 3A on NGB30mSANS (measured sept 2019 by John Barker)

VSANS:
Added utilities (untested) for "Super White Beam" mode

Added more links for the help file - to be added soon.

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
1 added
15 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/VSANS/V_SWB_BroadPeak.ipf

    r1203 r1209  
    129129        inten = V_IntegrBroadPeakSWB_mid(w,loLim,upLim,x) 
    130130 
     131 
     132         
    131133// why do I need this? Is this because this is defined as the mean of the distribution 
    132134//  and is needed to normalize the integral? verify this on paper.       
     
    136138        inten /= 30955          // "middle"  of peaks 
    137139 
     140        inten -= w[6] 
     141 
    138142// additional normalization??? 
    139143        inten /= 1.05           //  
     144         
     145//      inten /= 2                      // need this factor to match low q of white beam??? 
     146 
     147        inten += w[6] 
     148         
    140149        Return (inten) 
    141150         
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/VSANS/V_WB_GaussSpheres.ipf

    r1098 r1209  
    133133        inten /= 19933          // "middle"  of peaks 
    134134 
     135        inten -= w[5] 
    135136// additional normalization??? 
    136137        inten /= 1.05           //  
    137138         
     139        inten += w[5] 
    138140        Return(inten) 
    139141End 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf

    r1192 r1209  
    14411441// 
    14421442// new calibration done June 2007, John Barker 
     1443// new calibration for 3A only -- September 2019, John Barker 
    14431444// 
    14441445Proc MakeNG3AttenTable() 
     
    14761477        //each wave has 10 elements, the transmission of att# at the wavelengths  
    14771478        //lambda = 4,5,6,7,8,10,12,14,17,20 (4 A and 20 A are extrapolated values) 
    1478         Make/O/N=(num) root:myGlobals:Attenuators:ng3lambda={4,5,6,7,8,10,12,14,17,20} 
     1479        Make/O/N=(num) root:myGlobals:Attenuators:ng3lambda={3,4,5,6,7,8,10,12,14,17,20} 
    14791480         
    14801481        // new calibration done June 2007, John Barker 
    1481         root:myGlobals:Attenuators:ng3att0 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } 
    1482         root:myGlobals:Attenuators:ng3att1 = {0.444784,0.419,0.3935,0.3682,0.3492,0.3132,0.2936,0.2767,0.2477,0.22404} 
    1483         root:myGlobals:Attenuators:ng3att2 = {0.207506,0.1848,0.1629,0.1447,0.1292,0.1056,0.09263,0.08171,0.06656,0.0546552} 
    1484         root:myGlobals:Attenuators:ng3att3 = {0.092412,0.07746,0.06422,0.05379,0.04512,0.03321,0.02707,0.02237,0.01643,0.0121969} 
    1485         root:myGlobals:Attenuators:ng3att4 = {0.0417722,0.03302,0.02567,0.02036,0.01604,0.01067,0.00812,0.006316,0.00419,0.00282411} 
    1486         root:myGlobals:Attenuators:ng3att5 = {0.0187129,0.01397,0.01017,0.007591,0.005668,0.003377,0.002423,0.001771,0.001064,0.000651257} 
    1487         root:myGlobals:Attenuators:ng3att6 = {0.00851048,0.005984,0.004104,0.002888,0.002029,0.001098,0.0007419,0.0005141,0.000272833,0.000150624} 
    1488         root:myGlobals:Attenuators:ng3att7 = {0.00170757,0.001084,0.0006469,0.0004142,0.0002607,0.0001201,7.664e-05,4.06624e-05,1.77379e-05,7.30624e-06} 
    1489         root:myGlobals:Attenuators:ng3att8 = {0.000320057,0.0001918,0.0001025,6.085e-05,3.681e-05,1.835e-05,6.74002e-06,3.25288e-06,1.15321e-06,3.98173e-07} 
    1490         root:myGlobals:Attenuators:ng3att9 = {6.27682e-05,3.69e-05,1.908e-05,1.196e-05,8.738e-06,6.996e-06,6.2901e-07,2.60221e-07,7.49748e-08,2.08029e-08} 
    1491         root:myGlobals:Attenuators:ng3att10 = {1.40323e-05,8.51e-06,5.161e-06,4.4e-06,4.273e-06,1.88799e-07,5.87021e-08,2.08169e-08,4.8744e-09,1.08687e-09} 
     1482        // new calibration for 3A only -- September 2019, John Barker 
     1483        root:myGlobals:Attenuators:ng3att0 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } 
     1484        root:myGlobals:Attenuators:ng3att1 = {0.49769,0.444784,0.419,0.3935,0.3682,0.3492,0.3132,0.2936,0.2767,0.2477,0.22404} 
     1485        root:myGlobals:Attenuators:ng3att2 = {0.25729,0.207506,0.1848,0.1629,0.1447,0.1292,0.1056,0.09263,0.08171,0.06656,0.0546552} 
     1486        root:myGlobals:Attenuators:ng3att3 = {0.12823,0.092412,0.07746,0.06422,0.05379,0.04512,0.03321,0.02707,0.02237,0.01643,0.0121969} 
     1487        root:myGlobals:Attenuators:ng3att4 = {0.064491,0.0417722,0.03302,0.02567,0.02036,0.01604,0.01067,0.00812,0.006316,0.00419,0.00282411} 
     1488        root:myGlobals:Attenuators:ng3att5 = {0.032216,0.0187129,0.01397,0.01017,0.007591,0.005668,0.003377,0.002423,0.001771,0.001064,0.000651257} 
     1489        root:myGlobals:Attenuators:ng3att6 = {0.016244,0.00851048,0.005984,0.004104,0.002888,0.002029,0.001098,0.0007419,0.0005141,0.000272833,0.000150624} 
     1490        root:myGlobals:Attenuators:ng3att7 = {0.0041106,0.00170757,0.001084,0.0006469,0.0004142,0.0002607,0.0001201,7.664e-05,4.06624e-05,1.77379e-05,7.30624e-06} 
     1491        root:myGlobals:Attenuators:ng3att8 = {0.001029,0.000320057,0.0001918,0.0001025,6.085e-05,3.681e-05,1.835e-05,6.74002e-06,3.25288e-06,1.15321e-06,3.98173e-07} 
     1492        root:myGlobals:Attenuators:ng3att9 = {0.00026462,6.27682e-05,3.69e-05,1.908e-05,1.196e-05,8.738e-06,6.996e-06,6.2901e-07,2.60221e-07,7.49748e-08,2.08029e-08} 
     1493        root:myGlobals:Attenuators:ng3att10 = {0.00015214,1.40323e-05,8.51e-06,5.161e-06,4.4e-06,4.273e-06,1.88799e-07,5.87021e-08,2.08169e-08,4.8744e-09,1.08687e-09} 
    14921494   
    14931495  // percent errors as measured, May 2007 values 
     1496        // new calibration for 3A only -- September 2019, John Barker 
    14941497  // zero error for zero attenuators, appropriate average values put in for unknown values 
    1495         root:myGlobals:Attenuators:ng3att0_err = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 
    1496         root:myGlobals:Attenuators:ng3att1_err = {0.15,0.142,0.154,0.183,0.221,0.328,0.136,0.13,0.163,0.15} 
    1497         root:myGlobals:Attenuators:ng3att2_err = {0.25,0.257,0.285,0.223,0.271,0.405,0.212,0.223,0.227,0.25} 
    1498         root:myGlobals:Attenuators:ng3att3_err = {0.3,0.295,0.329,0.263,0.323,0.495,0.307,0.28,0.277,0.3} 
    1499         root:myGlobals:Attenuators:ng3att4_err = {0.35,0.331,0.374,0.303,0.379,0.598,0.367,0.322,0.33,0.35} 
    1500         root:myGlobals:Attenuators:ng3att5_err = {0.4,0.365,0.418,0.355,0.454,0.745,0.411,0.367,0.485,0.4} 
    1501         root:myGlobals:Attenuators:ng3att6_err = {0.45,0.406,0.473,0.385,0.498,0.838,0.454,0.49,0.5,0.5} 
    1502         root:myGlobals:Attenuators:ng3att7_err = {0.6,0.554,0.692,0.425,0.562,0.991,0.715,0.8,0.8,0.8} 
    1503         root:myGlobals:Attenuators:ng3att8_err = {0.7,0.705,0.927,0.503,0.691,1.27,1,1,1,1} 
    1504         root:myGlobals:Attenuators:ng3att9_err = {1,0.862,1.172,0.799,1.104,1.891,1.5,1.5,1.5,1.5} 
    1505         root:myGlobals:Attenuators:ng3att10_err = {1.5,1.054,1.435,1.354,1.742,2,2,2,2,2} 
     1498        root:myGlobals:Attenuators:ng3att0_err = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 
     1499        root:myGlobals:Attenuators:ng3att1_err = {0.655,0.15,0.142,0.154,0.183,0.221,0.328,0.136,0.13,0.163,0.15} 
     1500        root:myGlobals:Attenuators:ng3att2_err = {1.0725,0.25,0.257,0.285,0.223,0.271,0.405,0.212,0.223,0.227,0.25} 
     1501        root:myGlobals:Attenuators:ng3att3_err = {1.6862,0.3,0.295,0.329,0.263,0.323,0.495,0.307,0.28,0.277,0.3} 
     1502        root:myGlobals:Attenuators:ng3att4_err = {1.86,0.35,0.331,0.374,0.303,0.379,0.598,0.367,0.322,0.33,0.35} 
     1503        root:myGlobals:Attenuators:ng3att5_err = {1.9755,0.4,0.365,0.418,0.355,0.454,0.745,0.411,0.367,0.485,0.4} 
     1504        root:myGlobals:Attenuators:ng3att6_err = {2.0725,0.45,0.406,0.473,0.385,0.498,0.838,0.454,0.49,0.5,0.5} 
     1505        root:myGlobals:Attenuators:ng3att7_err = {4.0576,0.6,0.554,0.692,0.425,0.562,0.991,0.715,0.8,0.8,0.8} 
     1506        root:myGlobals:Attenuators:ng3att8_err = {8.1442,0.7,0.705,0.927,0.503,0.691,1.27,1,1,1,1} 
     1507        root:myGlobals:Attenuators:ng3att9_err = {10.361,1,0.862,1.172,0.799,1.104,1.891,1.5,1.5,1.5,1.5} 
     1508        root:myGlobals:Attenuators:ng3att10_err = {10.53,1.5,1.054,1.435,1.354,1.742,2,2,2,2,2} 
    15061509   
    15071510   
     
    17281731        endif 
    17291732         
    1730         if( (lambda < 4) || (lambda > 20 ) ) 
    1731                 Abort "Wavelength out of calibration range (4,20). You must manually enter the absolute parameters" 
     1733        if( (lambda < 3) || (lambda > 20 ) ) 
     1734                Abort "Wavelength out of calibration range (3,20). You must manually enter the absolute parameters" 
    17321735        Endif 
    17331736         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Tile_2D.ipf

    r945 r1209  
    706706                        if(GraspASCII) 
    707707                                fullPath=pathStr+newFileName+".GSP" 
     708//                              fullPath=pathStr+fileWave[ii]+".GSP"            //NOT COMPATIBLE WITH GRASP!!! SEP2019 
    708709                                Fast2dExport_OldStyle("RAW",fullpath,0) 
    709710                        endif 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VSANS_Includes.ipf

    r1203 r1209  
    127127#include "V_SWB_BroadPeak" 
    128128#include "V_WB_GaussSpheres" 
     129#include "V_SWB_GaussSpheres" 
    129130#include "V_WB_Beaucage" 
    130131 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Combine_1D.ipf

    r1148 r1209  
    6464 
    6565                Button button3,pos={544.00,5},size={30.00,20.00},title="?" 
    66                 Button button3,help={"help file for combining 1D data"} 
     66                Button button3,proc=V_ShowCombine1DHelp,help={"help file for combining 1D data"} 
    6767 
    6868                CheckBox check0,pos={18.00,36.00},size={57.00,16.00},proc=V_Plot1D_LogCheckProc,title="Log Axes" 
     
    129129End 
    130130 
     131 
     132Function V_ShowCombine1DHelp(ctrlName) : ButtonControl 
     133        String ctrlName 
     134        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation[Combine 1D Files]" 
     135        if(V_flag !=0) 
     136                DoAlert 0,"The VSANS Data Reduction Tutorial Help file could not be found" 
     137        endif 
     138        return(0) 
     139End 
    131140 
    132141// function that is a simple dependency, and updates the trimmed waves 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_EventModeProcessing.ipf

    r1203 r1209  
    22#pragma IgorVersion=6.22 
    33 
     4 
     5///////////// 
     6//VSANS Event File Format 
     7// (Phil Chabot) 
     8////////////// 
     9// 
     10// The event file shall be of binary format, with data encoded in little endian format. 
     11// The file shall have a header section and a data section 
     12// 
     13//Header -- The header will contain the following:  
     14//File byte offset              Size (bytes)            Value                           Description 
     15//              0                                                       5                               'VSANS'                         magic number 
     16//              5                                                       2                               0xMajorMinor            Revision number = 0x00 
     17//              7                                                       2                               n bytes                         Offset to data in bytes 
     18//              9                                                       10                              IEEE1588 - UTC  time origin for timestamp, IEEE1588 UTC 
     19//              19                                                      1                               'F'/'M'/'R'                     detector carriage group 
     20//              20                                                      2                               HV (V)                          HV Reading in Volt 
     21//              22                                                      4                               clk (Hz)                                timestamp clock frequency in Hz 
     22//              26                                                      N                               tubeID                          disabled tubes # ; 1 byte/tube if any 
     23 
     24//Data 
     25//  
     26//File byte offset              Size (bytes)            Value                           Description 
     27//              0                                                       1                               tubeID                          tube index - 0-191 
     28//              1                                                       1                               pixel                                   pixel value [0:127] 
     29//              2                                                       6                               timestamp                       timestamp in resolution unit 
     30//              8                                                       1                               tubeID                          
 
     31//              
                                                     â€Š                             â€Š                                             â€Š 
     32 
     33// 
     34// Time of origin for timestamp should be in UTC. Any disabled detector tubes can be reported in the header section.  
     35// If timestamp n is superior to timestamp n+1, then timestamp n is corrupted. To be discussed.  
     36// 
     37// There is no event mode data for the High Resolution (back) detector 
     38// 
     39// each carriage (M, F) is in a single event file. Tubes are numbered 0->(4*48)-1 == 0->191 and once 
     40// the event data is decoded, the histogram can be split into the 4 panels. 
     41// 
     42// Based on the numbering 0-191: 
     43// group 1 = R (0,47)                   MatrixOp out = ReverseRows(in) 
     44// group 2 = T (48,95)          output = slices_T[q][p][r] 
     45// group 3 = B (96,143)                 output = slices_B[XBINS-q-1][YBINS-p-1][r]              (reverses rows and columns) 
     46// group 4 = L (144,191)        MatrixOp out = ReverseCols(in) 
     47// 
     48// the transformation flips the panel to the view as if the detector was viewed from the sample position 
     49// (this is the standard view for SANS and VSANS) 
     50// 
     51//////////////////// 
    452 
    553 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_EventMode_Utils.ipf

    r1203 r1209  
    12861286        String ctrlName 
    12871287 
    1288         DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Tutorial[Reduce Event Files]" 
     1288        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation[Reducing Event Data]" 
    12891289        if(V_flag !=0) 
    12901290                DoAlert 0,"The VSANS Data Reduction Tutorial Help file could not be found" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MaskUtils.ipf

    r1203 r1209  
    18571857                        // click code here 
    18581858                         
    1859                         DoAlert 0,"The help file for this panel has not been written yet." 
    1860                                  
     1859                        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation[Show Mask for Averaging]" 
     1860                        if(V_flag !=0) 
     1861                                DoAlert 0,"The VSANS Data Reduction Tutorial Help file could not be found" 
     1862                        endif    
     1863                                                 
    18611864                        break 
    18621865                case -1: // control being killed 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MultipleReduce.ipf

    r1100 r1209  
    197197        String ctrlName 
    198198 
    199         DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Tutorial[Reduce Multiple Files]" 
     199        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation[Reduce Multiple Files]" 
    200200        if(V_flag !=0) 
    201201                DoAlert 0,"The VSANS Data Reduction Tutorial Help file could not be found" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_PatchFiles.ipf

    r1203 r1209  
    14811481Function V_ShowPatchHelp(ctrlName) : ButtonControl 
    14821482        String ctrlName 
    1483 //      DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Tutorial[Patch File Headers]" 
    1484 //      if(V_flag !=0) 
     1483        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation[Patch File Headers]" 
     1484        if(V_flag !=0) 
    14851485                DoAlert 0,"The VSANS Data Reduction Tutorial Help file could not be found" 
    1486 //      endif 
     1486        endif 
    14871487        return(0) 
    14881488End 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf

    r1192 r1209  
    13081308Function V_ShowProtoHelp(ctrlName) : ButtonControl 
    13091309        String ctrlName 
    1310         DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Tutorial[VSANS Reduction Protocol]" 
     1310        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation[VSANS Reduction Protocol]" 
    13111311        if(V_flag !=0) 
    1312                 DoAlert 0,"The VSANS Data Reduction Tutorial Help file could not be found" 
     1312                DoAlert 0,"The VSANS Data Reduction Help file could not be found" 
    13131313        endif 
    13141314End 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_RealTimeUpdate.ipf

    r1133 r1209  
    180180Proc V_RT_HelpButtonProc(ctrlName) : ButtonControl 
    181181        String ctrlName 
    182         DoAlert 0,"the help file has not been written yet :-(" 
    183 //      DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Tutorial[VSANS Real Time Data Display]" 
     182        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation[VSANS RealTime Display]" 
     183        if(V_flag !=0) 
     184                DoAlert 0,"The VSANS Data Reduction Tutorial Help file could not be found" 
     185        endif    
    184186End 
    185187 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Transmission.ipf

    r1105 r1209  
    592592                case 2: // mouse up 
    593593                        // click code here 
    594                          
    595                         DoAlert 0,"Transmission Help not written yet" 
     594                        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation[VSANS Transmission]" 
     595                        if(V_flag !=0) 
     596                                DoAlert 0,"Transmission Help not written yet" 
     597                        endif 
    596598                         
    597599                        break 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WhiteBeamDistribution.ipf

    r1203 r1209  
    1414// 
    1515// 
    16 // gives an average wavelength of 5.302 A 
    17 // median ~ 5.97 A 
    18 // 
    1916// 
    2017// of the three choices, using the fit to the "top" of the distribution gives the best-looking 
     
    3027// 
    3128 
     29//  White Beam: 
     30//  mean wavelength = 5.29687 
     31//  sqrt(mean wavelength^2) = 5.40513 
     32// 
     33//  Super White Beam: 
     34//  mean wavelength = 6.2033 
     35//  sqrt(mean wavelength^2) = 6.56277 
    3236 
    3337 
     
    7175End 
    7276 
     77 
    7378Function V_WhiteBeamDist_mid(lam) 
    7479        Variable lam 
     
    138143 
    139144 
     145// assumes that the counts and wavelength data for white and superWhite both are loaded and named: 
     146// 
     147// white_wavelength, counts_white 
     148// super_white_wavelength, counts_super_white 
     149// 
     150// 
     151Proc V_WB_Stats() 
     152 
     153        duplicate/O counts_white cts_W, intg_W 
     154        duplicate/O counts_super_white cts_SW intg_SW 
     155 
     156        Print "White Beam:" 
     157        intg_W = cts_W*white_wavelength 
     158        printf "mean wavelength = %g\r",sum(intg_W)/sum(cts_W) 
     159        intg_W = cts_W*white_wavelength^2 
     160        printf "sqrt(mean wavelength^2) = %g\r",sqrt( sum(intg_W)/sum(cts_W) ) 
     161 
     162        Print 
     163        Print "Super White Beam:" 
     164        intg_SW = cts_SW*super_white_wavelength 
     165        printf "mean wavelength = %g\r",sum(intg_SW)/sum(cts_SW) 
     166        intg_SW = cts_SW*super_white_wavelength^2 
     167        printf "sqrt(mean wavelength^2) = %g\r",sqrt( sum(intg_SW)/sum(cts_SW) ) 
     168                 
     169End 
     170 
    140171// 
    141172// 
Note: See TracChangeset for help on using the changeset viewer.