CFDC Toolbox
The CFDC Toolbox is a bundle of programs that I have developed in Matlab for processing and analyzing CFDC data. The tools generally work hand in hand and can be used to due such tasks as analyze IN activity at a different MCA channel setting, reprocess conditions using some function of the wall temperatures, average the sampled IN data, remove background counts and much more. As I myself am a user, the toolbox is under constant scrutiny and updates are made on a regular basis as requested or as I see fit. The code in this toolbox is not infallible and I do not guarantee its performance. That being said, I have used this toolbox to process data from a campaign and to process data collected in the laboratory. If you have any questions, comments or suggestions concerning the performance of this toolbox, please send them to me.
Description of the Functions Available
There are currently 10 functions in the CFDC toolbox. These are:
avgCin: For averaging IN concentrations over a defined period of time. This function is typically used for field data, where IN concentrations may be sparse.cfdcError: Provides an estimate of the uncertainty conditions across the chamber in the steady state region. This function calculates the conditions across the chamber width based on an array of inner and outer wall temperatures, total and sheath flow rates, and the chamber pressure. The program then randomly perturbs these known conditions a fixed number of times using the measurement uncertainties. An estimate of the uncertainty is then produced based on these random perturbations (a Monte Carlo method).CFDFlow: Calculates the steady state conditions across the lamina based on average wall temperatures, pressure and flow rates. These calculations are based on the work of Rogers (1988).esati: Calculates the saturation vapor pressure with respect to ice at a certain temperature. There are several available parameterizations that can be specified in the function call.esatw: Similar toesati, but calculates the saturation vapor pressure with respect to water.fitIN: Fits the data in order to remove background counts. In this function, the 1 Hz background data is analyzed from filter period to filter period. A linear fit is calculated from one period to the next along with prediction bounds for the fit. The sample data in between the two filter periods is then adjusted using the upper prediction bound of the fit. This function is most useful for the analysis of field data where measurements of IN may be sparse and on the order of the background signal.plotcfdc: Plots the data produced byprocessCFDCData. Can be used externally or can be called throughprocessCFDCData.plotCIN: Plots data from the functionavgCIN. This is probably most useful for field data as this plots IN concentrations on one axis and pressure on another.plotfrac: Will plot fractions of the total aerosol population nucleating at specific times. The total aerosol population is determined by the CN concentration recorded by the CFDC DAQ. If the CN concentration is not present in theprocessCFDCDataoutput structure, then this function will produce a warning and set concentrations at all times to 1 cm-3.procCFDCData: An awkwardly named function that is the root of all other functions in this toolbox. This function will perform a variety of tasks, but the main objective is to get the data produced by the CFDC DAQ into Matlab for analysis. The function takes the ascii output from the CFDC and produces a single structure containing all of the data. This structure can then be used by other functions in the toolbox for further processing and analysis.
All of these files are bundled into a single zip file that you can find here. In order to make these functions available for use:
- Download and extract the zip file to your working directory.
- Open Matlab.
- Go to File->Set Path....
- In the Set Path box, click Add Folder.
- Add the location the folder that you just extracted (CFDC) to the path.
- If you wish to have access to these functions everytime that you open Matlab, then click Save in the bottom right hand of the box.
- Close the box.
Examples
Below are a list of examples that I have created involving the use of these different tools.
- Using the CFDC Matlab routines to process field data: This is the routine that I used to process the data for the CLEX field campaign. The file,
process_data.m, was contained in a top-level directory in which the CFDC DAQ output directories were located. The file loops through all of the data, running the various routines over the ascii files in the sub-directories to trim the high IN counts, remove the background and average the data. - Calculating uncertainty for conditions in the CFDC: An example of how to calculate uncertainty for a given set of wall temperatures, flow rates and pressure and the resulting graphical output.