OFR Calculator v 1.4H Donna Sueper Jimenez Group, CU Boulder, April 1, 2014 1.

Slides:



Advertisements
Similar presentations
Sensitivity Analysis A systematic way of asking “what-if” scenario questions in order to understand what outcomes could possibly occur that would effect.
Advertisements

Introduction to Formatting VistaPHw Charts Brought to you by: The Vista Partnership February 2007.
AESuniversity Ad hoc Reporting. Ad hoc Reports What are ad hoc reports? Why would you use ad hoc reports? Creating an ad hoc report from a query Building.
Activity Set 3.2 PREP PPTX Visual Algebra for Teachers.
Slides 2c: Using Spreadsheets for Modeling - Excel Concepts (Updated 1/19/2005) There are several reasons for the popularity of spreadsheets: –Data are.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Excel Charts – Basic Skills Creating Charts in Excel.
WebDFS Budget Amendment and Personnel Processing.
Chapter 8 and 9 Review: Logical Functions and Control Structures Introduction to MATLAB 7 Engineering 161.
ASENT_MTTR.PPT Maintainability Predictions Last revised 8/11/2005.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
1 An Introduction to IBM SPSS PSY450 Experimental Psychology Dr. Dwight Hennessy.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Introduction to Spreadsheets Presented by Frank H. Osborne, Ph. D. © 2005 Bio 2900 Computer Applications in Biology.
Squirrel Tutorial Post – Pre-Process Steps Airbeam correction PToF DVa, DC markers Fragmentation checks Donna Sueper Aerodyne, University of Colorado,
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Advanced Tables Lesson 9. Objectives Creating a Custom Table When a table template doesn’t suit your needs, you can create a custom table in Design view.
Technology Basics Creating Worksheet Formulas. 2 Understand Formulas Equations used to calculate values in cells are called formulas. Formulas consist.
Financial Information System Running Reports in FIS.
Lecture Roger Sutton CO357 Computing for Business and Accounting 13: Automation and Control (Macros and Form controls ) 1.
Frequency Distributions, Histograms, and Related Topics.
1 iSee Player Tutorial Using the Forest Biomass Accumulation Model as an Example ( Tutorial Developed by: (
by Chris Brown under Prof. Susan Rodger Duke University June 2012
Database Applications – Microsoft Access Lesson 9 Designing Special Queries Updated 4/11.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries.
Chapter 10: Working with Large Data Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Pairwise Alignment, Part I Constructing the Values and Directions Tables from 2 related DNA (or Protein) Sequences.
CTS130 Spreadsheet Lesson 3 Using Editing and Formatting Tools.
PMS /134/182 HEX 0886B6 PMS /39/80 HEX 5E2750 PMS /168/180 HEX 00A8B4 PMS /190/40 HEX 66CC33 By Adrian Gardener Date 9 July 2012.
© The McGraw-Hill Companies, 2006 Chapter 4 Implementing methods.
IC 3 BASICS, Internet and Computing Core Certification Key Applications Lesson 10 Creating and Formatting an Excel Worksheet.
Excel Spreadsheet basics. Excel Sheets and Books  Spreadsheet: tool to analyze, chart and manage data for personal, business and financial use Worksheet:
1 Performing Spreadsheet What-If Analysis Applications of Spreadsheets.
Designing Interface Components. Components Navigation components - the user uses these components to give instructions. Input – Components that are used.
GUI development with Matlab: GUI Front Panel Components 1 GUI front panel components In this section, we will look at -GUI front panel components -Programming.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Processing Lab 3 – Header issues and trace editing Bryce Hutchinson Objectives: Fixing elevation issues Define an LMO function Pick first breaks Kill traces.
Squirrel Tutorial Pre – Pre-Process Steps Modify Single Ion (SI) M/z Calibration Fitting Baseline Fitting Donna Sueper ToF AMS Training, Aerodyne, Nov/Dec.
Page 1 Non-Payroll Cost Transfer Enhancements Last update January 24, 2008 What are the some of the new enhancements of the Non-Payroll Cost Transfer?
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
30/10/ Iteration Loops Do While (condition is true) … Loop.
Getting Started with TI-Interactive. TI-Interactive TI-Interactive can be used to create a variety of graphs. Scatter Plots, Line Plots, Histograms, Modified.
FIX Eye FIX Eye Getting started: The guide EPAM Systems B2BITS.
BMTRY 789 Lecture 11: Debugging Readings – Chapter 10 (3 rd Ed) from “The Little SAS Book” Lab Problems – None Homework Due – None Final Project Presentations.
Creating the basic line chart Line charts are most useful for representing change over time. Time is plotted on the horizontal axis, and the quantity of.
Fall 2003Sylnovie Merchant, Ph.D. ACCESS Tutorial Note: The purpose of this tutorial is to provide an introduction to some of the functions of ACCESS in.
Squirrel Tutorial Pre – Pre-Process Steps Modify Single Ion (SI) M/z Calibration Fitting Baseline Fitting Donna Sueper Aerodyne, University of Colorado,
Excel 2007 Part (3) Dr. Susan Al Naqshbandi
Summer SAS Workshop Lecture 3. Summer SAS Workshop Website
Chapter 3 Automating Your Work. It is frustrating when you have to type the same passage of text repeatedly. For example your name and address. Word includes.
Overview Excel is a spreadsheet, a grid made from columns and rows. It is a software program that can make number manipulation easy and somewhat painless.
Office of Housing Choice Voucher Program Voucher Management System – VMS Version Released October 2011.
Sensitivity Analysis A systematic way of asking “what-if” scenario questions in order to understand what outcomes could possibly occur that would effect.
PestPac Software. Leads The Leads Module allows you to track all of your pending sales for your company from the first contact to the close. By the end.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
Extracting Information from an Excel List The purpose of creating a database, or list in Excel, is to be able to manipulate the data elements in ways that.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Progress and Outcome Measures - Part 3 Progress and Outcome Measures Part 3, Slide 1Copyright © 2004, Jim Schwab, University of Texas at Austin.
1 Week # 4 Introduction to PDM PDM is a workbench environment that lets programmers and system operators navigate the three levels of the AS/400’s object-based.
Data Analysis GUI Documentation guide. Terminology GUI – Graphical User Interface Log-File – File containing data of interest which is generated by user’s.
Info Read SEGY Wavelet estimation New Project Correlate near offset far offset Display Well Tie Elog Strata Geoview Hampson-Russell References Create New.
1 Berger Jean-Baptiste
Resource Review Excel formula basics Demonstrate how to enter manual formulas Examine some of the available functions and their usage Discuss the.
Emdeon Office Batch Management Services This document provides detailed information on Batch Import Services and other Batch features.
Excel Tutorial 8 Developing an Excel Application
Chapter 9: Value-Returning Functions
Microsoft Excel.
TRAINING OF FOCAL POINTS ON THE CountrySTAT/FENIX SYSTEM
Creating and Modifying Queries
Presentation transcript:

OFR Calculator v 1.4H Donna Sueper Jimenez Group, CU Boulder, April 1,

2 The main output of the OFR panel are, in general two plots: the relative and absolute oxidation enhancement as a function of oxidation age/OH enhancement. Introduction These sample plots show the individual measurements and averages obtained by grouping the data into equally numbered points in the x dimension. These graphs can be modified to show the individual measurements colored by a third trace, and to show averages sorted into day and night groupings. The no-Oxidant data is averaged separately, to one value. The analysis steps can be broken down into 3 main steps: (1) Ensure a good comparison of ambient data and reactor data by adjusting Ox enhanced data based on a comparison of data taken through reactors with no oxidative forcing and ambient data. (2) Calculate the absolute and relative enhancements for the chosen oxidant. (y-axis) (3) Plot the data and generate averages. (x axis)

Code consists of 2 ipfs: OFR_Tools_v1.* which IS NOT intended to be edited by users OFR_Field_v1.* which IS intended to be edited by users and one possibly additional ipf : OFR_Extras_v1.*. The ‘extras’ pf consists of functions which may or may not be in your current experiment. Simply comment out the functions within the extras ipf until you can compile your experiment. From the main OFR menu in Igor, select “Make OFR Panel” and this panel will appear: Anything italicized in the panel does not work yet. 3

Step 0. Review parameters Pressing the Step 0 gold button enlarges the panel to include the display of several ‘popable’ tables. Pressing the right-side gray “Hide OFR settings” hides these tables. All entries in the table are saved as you type them in. All tables must have the same number of points within the waves shown in each table. The OFRReactorTable consists of two waves: root:OFR:ReactorID root:OFR:ReactorVolume The user should enter a name for each reactor and it’s volume in liters. The reactor name should be Igor-friendly (does not begin with a number, etc). Reactor names will be used in subsequent tables to identify oxidant and flow states. Below is a sample of a filled in OFRReactorTable: Step 0. Review parameters: OFRReactorTable 4

Step 0. Review parameters: OFRParameterTable The OFRParameterTable consists of three waves: root:OFR:AmbParametersDescription root:OFR:AmbParametersUnits root:OFR:AmbParametersValue The purpose of this table is to have one place for all the values needed for exposure calculations; entries can be numerical constants or the full path of time-dependent waves (all waves must be the same size/index as your time wave for AMS data). See the OFROxTable for further information. The names and units of some parameters, specifically the ones given by default must not be changed, (i.e. Reactor_Key, AmbPres, AmbTemp) but the values should be changed (the defaults are only entered for guidance). Below is a sample of a filled in OFRparameterTable: An important parameter is Reactor_Key. The wave for this parameter must contain integers; the value of 0 indicates an ambient measurement; 1 measurement through the reactor identified in the first row of the previous reactorID table, etc. Users can use the syntax such as key = valve[p] == 3 ? key[p] : 2 to generate this wave. This reactor_key wave may also have nans. 5

Step 0. Review parameters: OFRReactorFlowTable The OFRReactorFlowTable consists of these waves: root:OFR:ReactorFlowID root:OFR:ReactorFlowDescription root:OFR:ReactorFlowValue root:OFR:ReactorFlowStartRun root:OFR:ReactorFlowStopRun The purpose of this table is to have one place to document changing flow rates. Below is a sample of a filled in OFRReactorFlowTable : Entries in the first column must match reactor names as is given in the OFRReactorTable. The wave ReactorFlowDescription is for user’s edification only; entries in this wave are not used in calculations. 6

Step 0. Review parameters: OFROxTable The OFROxTable consists of these waves: root:OFR:OxName root:OFR:OxDescription root:OFR:OxReactorID root:OFR:OxKeyWaveList root:OFR:OxRunStart root:OFR:OxRunStop root:OFR:OxMeasPostReactor The purpose of this table is to have one place to document changing oxidation conditions. Below is a sample of a filled in OFRReactorFlowTable :  Entries for the OxName must be Igor-friendly.  Entries in the third column must match reactor names as is given in the OFRReactorTable.  Entries in the OxKeyWaveList must use names set by the user in the OFRParameterTable.  The wave OxDescription is for user’s edification only; entries in this wave are not used in calculations. 7

Step 1. Validate settings This step checks and validates user entries. It checks: for the existence and consistent length of the time series and run series waves all waves indicated by non numeric entries in the OFRParameterTable It updates/ fill in the drop down menu above the step 3 gold button with all (unique) oxidant scheme names (i.e. hardOH, softOH, O3, NO3, etc) It generates important key waves: root:OFR:AmbKey consisting of 0s and 1s, when the measurement is ambient, bypassing all reactors and chemical, physical manipulation of the signal before it reaches the detector root:OFR:Mask_Ox*_Reac* where Ox* is a string for each Oxidant name and Reac* is a string for each reactor. There will be (# reactors ) x (# unique oxidant names) such waves. In the example given here, these are root:OFR:Mask_HardOH_PAM, root:OFR:Mask_softOH_PAM. It also sets the dimension labels of each row of the wave root:OFR:AmbParametersValue to the value given in root:OFR:AmbParametersDescription. If a user changes any values within the any of the settings tables, the user needs to redo Step 1. 8

Step 1: Validate settings: OFR_ReactorFlow_timeGraph The purpose of the graphs optionally displayed in step 1 are to validate by visual inspection the sequence of OFR settings. If no error messages pop up, two plots are available. OFR_ReactorFlow_TimeGraph, or ‘Flow tseries’ This time series plot has (number of Reactors)-many y axes. One trace per reactor indicates the flow values as entered by the user in the OFRReactorFlowTable. For runs not indicated in the table the code performs a linear interpolation in time. Another trace per reactor indicates when the system was measuring through the reactor as indicated in the Reactor_key wave. 9

If no error messages pop up, two plots are available. OFR_OxLights_TimeGraph, or ‘Ox tseries’ This time series plot has (number of Oxidant schemes)-many vertical axes. One trace per oxidant scheme indicates when we were using this oxidant scheme as defined in the OFROxTable. Another trace per oxidant scheme indicates when the system was measuring through the reactor but in the “No Oxidant or NoOx” state; there is one such wave per reactor. This key wave is useful for when we want to compare the true ambient signal to the signal (“adjust to ambient”) when we measure through the reactor but do not add any oxidative influences to the sample. Step 1: Validate settings:OFR_OxLights_TimeGraph 10

Step 2. Generate adjusted to ambient OFR wave Before pressing the gold “2. Adjust OFR..” button the user needs to input several parameters: 2i. Result waves folder location A string containing the full path of a new or existing Igor data folder where all resulting waves will be located. 2ii. Wave to analyze A string containing the full path of a wave containing the OFR-enhanced time series wave. This wave is typically generated from squirrel or Pika. Users are encouraged to use or rename this wave to contain few (10ish )characters. In the example that follows this wave will be named HROrg_PAM; the entry in the panel looks like “root: HROrg_PAM”. 2iii. Optional wave containing only ambient measurements If this parameter is left blank, the code will look to the values in the wave indicated in 2ii and the ambient key wave root:OFR:ambKey to identify the true ambient measurements. The code will then extract these ambient measurements and create a wave containing only these measurements and fill in the name of this wave for future use. If this parameter is blank, then it assumes that wave entered in 2ii contains ambient measurements. Users may want to supply their own ambient wave if they want to remove data spikes that may be in the original data or for any other reason. The code will automatically average the ambient wave entered in 2iii over the root:OFR:ambKey periods. The first task that is done in the step 2 gold button calculation is the generation of the average ambient wave. 11

12 Step 2. Generate adjusted to ambient OFR wave The gold “2. Adjust OFR..” button performs the following calculations, mostly in the function named OFR_Adjust2Ambient : Generates several waves with suffixes as listed in the initial comments of the tools ipf. Users are encourage to become familiar with these suffixes.  The wave *AmbAvg contains averages of ambient data; there is one value per contiguous ambient measurement.  The wave *AmbAvg Int contains interpolated values of *AmbAvg. Linear interpolation is performed with the x wave being the time series wave.  The wave *NoOxR contains ratios of OFR at no oxidant to Ambient  The wave *NoOxD contains differences of OFR at no oxidant to Ambient  The wave *NoOxRInt contains interpolated values of *NoOxR  The wave *NoOxDInt contains interpolated values of *NoOxR  The wave *AAD contains the Ox enhanced wave adjusted to ambient via difference  The wave *AAR contains the Ox enhanced wave adjusted to ambient via ratio By default the *AAR wave is input the parameter for step 3. Users must use their own judgment for cases when the ratio values vary too much due to low overall signal. Note that the calculations are independent of an oxidant scheme. However, data is calculated at each oxidant scheme and interpolated across each scheme. This may result in step functions when switching between reactors, for example.

13 Step 2. A2A* graph The graph A2A_* is automatically generated and illustrates the calculated waves. For each oxidant scheme and each reactor, there will be plotted on the lower right axis the mask waves indicating the no-oxidant time periods. The graph below does not show typical conditions.

14 Step 3. Calculate Ox-enhanced ratio, difference to ambient It is at this point in the analysis that an oxidant needs to be selected in the popup menu “Consider this oxidant”. The gold “3. Calc ratio,..” button performs calculations, mostly in the function named OFR_calc_ratioDiffToAmbient. The code generates several waves with suffixes as listed in the initial comments of the tools ipf.  The wave *Rat contains ratios of adjusted to ambient OFR to ambient  The wave *Dif contains differences of adjusted to ambient OFR to ambient  The wave *RatI contains interpolated values of *Rat  The wave DifI contains interpolated values of *Dif By default the *RatI and *DifI wave name is put into the parameter for step 4. As in the case of calculations done in step 2, data is calculated at for each reactor and each oxidant scheme.

15 Step 3. RatDif* graph The graph RatDif_* is automatically generated and illustrates the calculated waves. Again, these waves are specific to an oxidation scheme, such as hardOH. But this is only to “nan out” regions not in the oxidant scheme. The window name will contain as much of the name of the original wave to analyze (with suffixes) as is possible.

16 Step 4. Calculate, plot quantiles of *Rat and *Dif waves The main function that is called when this gold button is pressed is called OFR_CalcPlotQuantiles. Within this function the function OFR_Calc is called; within this function the photochemical age in days and exposure waves are calculated. Within OFR_Calc two functions within the field ipf are called for each oxidant method: OFR_CalcPrep_XXX where XXX is the oxidant method such as hardOH OFR_CalcOx_XXX where XXX is the oxidant method such as hardOH OFR_CalcPrep_XXX requires two parameters and returns a wave of wave references Hence, the function declaration can looks like Function/wave OFR_CalcPrep_HardOH(num, Air_molec_cm3) variable num wave Air_molec_cm3 The main purpose of this function is to check the existence and length of waves needed for the oxidation calculation. This ‘prep’ function is only called once, at the beginning of OFR_Calc to prepare for all calculations to come. It does no ‘real’ work. Within the OFR_Calc function the wave returned from OFR_CalcPrep_XXX is called ThisOxWaves and is used within the OFR_CalcOx_XXX function.

17 Step 4. Calculate, plot quantiles of *Rat and *Dif waves OFR_CalcOx_XXX requires several parameters; two of which, the Photochemical Age and the Oxidant Exposure waves will be filled in within this function. As an example, below is the function declaration for hardOH: Function OFR_CalcOx_hardOH(ThisOxWaves, OxMask, OxKeyWaveList, reactor_resTime, flow, O3BackOfReactorWave, AmbO3Wave_molcm3, ExpResultWave, AgeResultWave) wave/wave ThisOxWaves wave OxMask, reactor_resTime, flow, O3BackOfReactorWave, AmbO3Wave_molcm3, ExpResultWave, AgeResultWave string OxKeyWaveList For each row in the Oxidant table the function OFR_CalcOx_XXX is called. This helps ensures that only the runs within each condition are analyzed separately. It is the user’s responsibility that the calculations within each OFR_CalcOx_XXX function are correct. Next, the code uses the user-settable parameters of # of quantiles, optional day/night separation and optional f(z) color scheme choice to calculate averages and the plots such as in slide 2. The data is actually plotted twice, once one bottom axis, a second on the top axis. This is to ensure that the plotted values are valid if the user modifies the top or bottom axis range. Recall that the no-oxidant data is averaged into it’s own separate bin. The final graph will have (num of quantiles + 1) many averages displayed.

18 So what do I do? The user is responsible for: Entering all necessary information into the OFR tables. Create/modify/append the function OFR_CalcPrep_XXX and OFR_CalcOx_XXX where XXX is each oxidant listed in the oxidant drop down menu. In all cases, users should follow the examples given herein and within the code to do the modifications. How can I ensure that the data doesn’t perform an average over a time period where the there were interruptions? If for example the system stopped and restarted in an ambient state but you don’t want to average over the entire (single) ambient period, simply change your ambient key wave to include nans. For example change the value at the restarted run to be nan. The code looks for contiguous measurements when it does it’s averaging.