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/Reduction/VSANS
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • 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.