- Timestamp:
- Jul 20, 2011 9:40:32 AM (12 years ago)
- 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
r817 r824 105 105 // the cell must already be defined 106 106 String condStr, cellStr 107 Prompt condStr,"Condition, <12 characters "107 Prompt condStr,"Condition, <12 characters, NO UNDERSCORES" 108 108 Prompt cellStr,"Cell",popup,D_CellNameList() 109 109 DoPrompt "Add new condition",condStr, cellStr … … 116 116 Print "Condition String trimmed to ",condStr 117 117 endif 118 119 condStr = ReplaceString("_", condStr, "", 0, inf) 118 120 119 121 String popStr -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationPanels.ipf
r817 r824 1 1 #pragma rtGlobals=1 // Use modern global access method. 2 2 3 4 // Polarized Beam Reduction Procedures 5 // 6 // 3 7 // input panels to set and calculate polarization parameters necessary for the 4 8 // matrix corrections to the cross sections 5 9 // 6 // -1- Fundamental Cell Parameters -- these are constants, generally not editable. 7 // -2- Decay Parameters -- these are fitted values based on transmission mearurements 8 // -3- 9 10 11 // 12 // -- need a general way to be sure to NOT re-initialize the values if the panel is closed/reopened 13 // 14 // 15 // TODO: 16 // Need a way to output the results - like in a report format 17 // cell (panel 1) 18 // static params 19 // fit gamma params 20 // graph 21 // 22 // and also a separate report (panel 2) 23 // flipper/sm @ conditions 24 // --- the report could be as simple as a screen snapshot of the panel? 25 26 27 // He cell parameters. Most of these are pre-defined, so that they are supplied as a 10 // -1- Fundamental Cell Parameters -- these are constants, generally not editable. (this file) 11 // -2- Decay Parameters -- these are fitted values based on transmission mearurements (this file) 12 // -3- Flipper Panel is in its own procedure (FlipperPanel.ipf) 13 // -4- PolCor_Panel is in PolarizationCorrection.ipf 14 15 // 16 // Driven by 4 panels to get the necessary information from the users 17 // -1- Fundamental cell parameters: root:Packages:NIST:Polarization:Cells 18 // - default cell parameters are loaded. More cell definitions can be added as more cells are used 19 // - changes are saved per experiment 20 // - important parameters are held in global key=value strings gCell_<name> 21 // - cell names and parameters are used by the 2nd panel for calculation of the Decay constant 22 // 23 // -2- Decay Constant Panel 24 // - decay constant determined for each cell. 25 // - popping the cell name makes 2 waves, Decay_<cellname> and DecayCalc_<cellname> 26 // - Decay_ is the wave presented in the table. Specified transmission run numbers are entered 27 // and "Calc Sel Row" does the calculation of mu and Pcell (for all rows, actually) 28 // - DimLabels are used for the arrays to make the column identity more readable than simply an index 29 // - time=0 is taken from the first file 30 // - Calculations are based on the count rate of the file, corrected for monitor and attenuation 31 // - alerts are posted for files in any row that are not at the same attenuation or SDD 32 // - if "include" column is == 1, that row will be included in the fit of the decay data 33 // - excluded points are plotted in red 34 // - results of the fit are printed on the panel, and written to the wave note of the Decay_ wave 35 // (not DecayCalc_) for use in the next panel 36 // - manual entry of all of the parameters in the wave note is allowed. 37 // 38 // 39 // -3- Flipper Panel (not in this procedure - in Pol_FlipperPanel.ipf) 40 // - calculates the flipper and supermirror efficiencies for a given cell AND "condition" 41 // - start by entering a condition name and choosing a cell 42 // - Waves Cond_<condition>_<cell> and CondCalc_<condition>_<cell> are created 43 // - DimLabels are used for the arrays to make the column identity more readable than simply an index 44 // - enter transmission run numbers as specified in the table 45 // - Do Average will calculate the Psm and PsmPfl values (and errors) and average if more than 46 // one row of data is present (and included) 47 // - results are printed on the panel, and written to the wave note of Cond_<condition>_<cell> 48 // - results are used in the calculation of the polarization matrix 49 // 50 // 51 // -4- PolCor_Panel (not in this procedure - in Pol_PolarizationCorrection.ipf) 52 // - gets all of the parameters from the user to do the polariztion correction, then the "normal" SANS reduction 53 // - 5 files can be added together for each of the different spin states (more than this??) 54 // - global strings in root:Packages:NIST:Polarization:gStr_PolCor_<tab>_<flip>_<position> hold the run number 55 // - polarization condition is set with the popup 56 // - the same fields/pops are duplicated (hidden) for the SAM/EMP/BGD tabs as needed 57 // - on loading of the data, the 2-letter spin state is tagged onto the loaded waves (all of them) 58 // - displayed data is simply re-pointed to the desired data 59 // - on loading, the raw files are added together as ususal, normalized to monitor counts. Then each contribution 60 // of the file to the polarization matrix is added (scaling each by mon/1e8) 61 // - loaded data and PolMatrix are stored in the ususal SAM, EMP, BGD folders. 62 // - Polarization correction is done with one click (one per tab). "_pc" tags are added to the resulting names, 63 // and copies of all of the associated waves are again copied (wasteful), but makes switching display very easy 64 // - Once all of the polariztion correction is done, then the UU_pc (etc.) data can be reduced as usual (4 passes) 65 // - protocol is built as ususal, from this panel only (since the SAM, EMP, and BGD need to be switched, rather than loaded 66 // - protocols can be saved/recalled. 67 // - reduction will always ask for a protocol rather than using what's on the panel. 68 // - closing the panel will save the state (except the protocol). NOT initializing when re-opening will restore the 69 // state of the entered runs and the popups of conditions. 70 // 71 // 72 // 73 // 74 75 76 77 78 // 79 // Panel -1- 80 // 81 // Fundamental He cell parameters. Most of these are pre-defined, so that they are supplied as a 28 82 // static table, only edited as parameters are refined. 29 83 // … … 89 143 90 144 // parse strings to fill in waves 91 145 // 92 146 // 93 147 Function Make_HeCell_ParamWaves()
Note: See TracChangeset
for help on using the changeset viewer.