Ignore:
Timestamp:
May 20, 2016 4:28:56 PM (7 years ago)
Author:
srkline
Message:

changes to a few analysis models to make these Igor 7-ready

adding mask editing utilities

many changes to event mode for easier processing of split lists

updated event mode help file

+ lots more!

File:
1 edited

Legend:

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

    r995 r999  
    7575 
    7676        endfor 
    77          
     77 
     78         
     79// writes out "perfect" detector calibration constants for all 8 tube banks 
     80        V_WritePerfectSpatialCalib(filename) 
     81// writes out "perfect" dead time constants for all 8 tube banks + back detector 
     82        V_WritePerfectDeadTime(filename) 
    7883         
    7984//? other detector geometry - lateral separation? 
     
    106111 
    107112 
    108 // writes out "perfect" detector calibration constants for all 8 tube banks 
    109 Function V_WritePerfectCalibration() 
    110  
     113// writes out "perfect" detector calibration constants for all 8 tube banks + back detector 
     114Function V_WritePerfectSpatialCalib(filename) 
     115        String filename 
     116         
     117//      String fileName = V_DoSaveFileDialog("pick the file to write to") 
     118         
    111119        Make/O/D/N=(3,48) tmpCalib 
    112120        // for the "tall" L/R banks 
     
    115123        tmpCalib[2][] = 0 
    116124         
    117         V_writeDetTube_spatialCalib("","FR",tmpCalib) 
    118         V_writeDetTube_spatialCalib("","FL",tmpCalib) 
    119         V_writeDetTube_spatialCalib("","MR",tmpCalib) 
    120         V_writeDetTube_spatialCalib("","ML",tmpCalib) 
     125        V_writeDetTube_spatialCalib(filename,"FR",tmpCalib) 
     126        V_writeDetTube_spatialCalib(filename,"FL",tmpCalib) 
     127        V_writeDetTube_spatialCalib(filename,"MR",tmpCalib) 
     128        V_writeDetTube_spatialCalib(filename,"ML",tmpCalib) 
    121129 
    122130        // for the "short" T/B banks 
     
    125133        tmpCalib[2][] = 0 
    126134         
    127         V_writeDetTube_spatialCalib("","FT",tmpCalib) 
    128         V_writeDetTube_spatialCalib("","FB",tmpCalib) 
    129         V_writeDetTube_spatialCalib("","MT",tmpCalib) 
    130         V_writeDetTube_spatialCalib("","MB",tmpCalib) 
     135        V_writeDetTube_spatialCalib(filename,"FT",tmpCalib) 
     136        V_writeDetTube_spatialCalib(filename,"FB",tmpCalib) 
     137        V_writeDetTube_spatialCalib(filename,"MT",tmpCalib) 
     138        V_writeDetTube_spatialCalib(filename,"MB",tmpCalib) 
    131139         
    132140        KillWaves tmpCalib 
     141         
     142        // and for the back detector "B" 
     143        Make/O/D/N=3 tmpCalib 
     144        tmpCalib[0] = 1 
     145        tmpCalib[1] = 1 
     146        tmpcalib[2] = 10000 
     147        V_writeDet_cal_x(filename,"B",tmpCalib) 
     148        V_writeDet_cal_y(filename,"B",tmpCalib) 
     149 
     150        KillWaves tmpCalib 
     151 
    133152        return(0) 
    134153end 
     
    138157//V_writeDetector_deadtime(fname,detStr,inW) 
    139158//V_writeDetector_deadtime_B(fname,detStr,val) 
     159// simulated count rate per tube can be Å 10^8, so I need dt >> 10^-15 to completely cancel this out 
     160// (partly due to fake I(q), fake count time in file...) 
     161 
     162// writes out "perfect" dead time constants for all 8 tube banks + back detector 
     163Function V_WritePerfectDeadTime(filename) 
     164        String filename 
     165                 
     166        Make/O/D/N=(48) tmpDT 
     167        tmpDT = 1e-18 
     168        V_writeDetector_deadtime(filename,"FT",tmpDT) 
     169        V_writeDetector_deadtime(filename,"FB",tmpDT) 
     170        V_writeDetector_deadtime(filename,"FL",tmpDT) 
     171        V_writeDetector_deadtime(filename,"FR",tmpDT) 
     172        V_writeDetector_deadtime(filename,"MT",tmpDT) 
     173        V_writeDetector_deadtime(filename,"MB",tmpDT) 
     174        V_writeDetector_deadtime(filename,"ML",tmpDT) 
     175        V_writeDetector_deadtime(filename,"MR",tmpDT) 
     176 
     177 
     178        // and for the back detector "B", a single value, not a wave 
     179        V_writeDetector_deadtime_B(filename,"B",1e-20) 
     180 
     181        KillWaves tmpDT 
     182 
     183        return(0) 
     184end 
    140185 
    141186 
Note: See TracChangeset for help on using the changeset viewer.