PMF coding
From Jimenez Group Wiki
Contents
PMF Analysis
To Do Priority
- Allow user to find solutions ranging over many seed values instead of fpeak values (done in 1.03I)
To Do (Less Urgent)
- Allow users to run PMF on partitioned drives
PMF Evaluation Panel
Done
- In the m/z spectra graph, add more tick marks to show m/z 30 etc (done in 1.3J)
- If you select the m/z as -1 you get a very bad Igor crash (done in 1.3J)
- Change the selected species to correspond to m/z instead of 1, 2, 3 (done in 1.3J)
- Use Q/Qexpected instead of Q (I think done in 1.3H - ask Ingrid)
- Typo in the popped current t series graph - "Curret" instead of "Current" (done in 1.3J)
- In the time series residual label say Sum or original (done in 1.3J)
- The stacked factors real measurement should be purple lines (but not summed for the stacking)
- Colors in the diurnal plots should be applied to the median waves (when the factor is set to -1)
- Make sure all popped graphs have labels
- Is is possible to make the axes on the RR plot have the lower value be the min(0, wave minimum)?
- I think it would be helpful to people to have a button somewhere for "save this solution". I do this with a function in my "notUsed" ipf called pmf_makeStaticFactorWvs (and you could remove the part where it asks for a datafolder list; I built that for some synthetic data runs). It has a naming convention and saves the waves to root:StaticFactors: in a subfolder for the number of factors in the solution (e.g., w3factors).
- It would be nice if the status of the XaxisTo100 box for the factors plot was examined when remaking plots after moving the sliders.
- People have asked me before if more of the axes can have labels, like Q/Qexp for the Q plots, Mass on the total Tseries plot, and some sort of # for the Current Species Histogram.
- The total residuals plot needs to have good colors
- The total residuals plots need ability to plot several (several factor solutions)
- When more than 10 traces are on a plot, make sure the colors get looped
- List from Ingrid on 3/20/08: 1. Are mass fraction bars normalized to total measured mass instead of for total fit mass? We should add a wave for "Residual" (it could probably be black).
- List from Ingrid on 3/20/08: 4. (Probably also lower priority) It would be nice if the "factors to plot" box was enabled. Most useful plots to enable this way are residuals and bars (though bars isn't very reliable).
- When Selected Factor = -1 and Current Factor Profile displays stacked MS, the stacked MS should be weighted by average mass fraction (so could create something like ProfileWeightedFactor1 = ProfileFactor1 * var_PMFresultsMx4d[3][0][fpeakDex][pdex])
Priority
- On the diurnal plots, have checkboxes for "Display Mean" and Display Median" so that you could display one or the other or both (do this for the popped graph only)
- Double check the calculation of the residual errors - from Ingrid on 3/31/08 "Messing around with the panel, I'm wondering if there's a calculation error somewhere in the residuals. For the dataset I'm working on now, I get negative values for the Sum(abs(Resid)) / Sum(Signal)" (Ignore until Ingrid finds it again)
- List from Ingrid on 3/20/08: 2. Can we (doesn't have to be this week) make a tseries plot of % of each tseries (so stacked factors as %) including the Residual (so it addes up to 100%) (like Figure 1d in paper http://www.atmos-chem-phys.net/5/3289/2005/acp-5-3289-2005.pdf )
- List from Ingrid on 3/20/08: 8. Another longer-term thing might be to make a table of string waves where the user can name their factors, and then make bar plots with the same factors in the same color/order. Ken has done a version of that in the attached plot. This will also let us assign a name (and therefore a standard color) to factors as you look at the solutions.
PMF Scatter Panel
Done
- In function scat_plot_RzvsFPeak, line
appendToGraph/W=$FullGraphNm RcorrMx4d[V_Value][idex][][pdex] vs fpeak_map
needs to be changed to
appendToGraph/W=$FullGraphNm RcorrMx4d[V_Value-1][idex][][pdex] vs fpeak_map
- Scatter plots should be the same color as their factor label. Factor 1 profile or time series should be black (like its factor label).
- When you change the slider in the scatter panel, the R vs Fpeak plot doesn't update.
Priority
- Add ability to add new external mass spectra or time series without having to recalculate everything
- kill (currently) dependent waves pmfDFnm:RforCurrentFactor...
- kill waves pmfDFnm:RcorrMx4d_...
- kill noNaNs folders in MassSpecDF, TseriesDF
- Run pmf_calcs_RcorrMx4d()
- user-editable table of FactorNmsWvs with a column to name them as "type" and sort by this
- ability to color Tseries scatter plots and overlay by all other tseries (campaign time, sulfate, nitrate, etc.; time-of-day would also be useful)
- In a separate tab, this plot [1]
- List From Ingrid on 3/20/08
1. The user can't modify the R vs Fpeak plot in the panel (change wave colors, axes, etc.).
4. (possibly also lower priority) It would be nice to be able to compare more things (that I probably didn't tell you about before)! I'd divide them into two categories, probably each on their own tab:
- All of the factor mass spectra (or time series) in one solution vs each other (a la a Scatter Plot Matrix, which can be found under Windows/New/Scatter Plot Matrix). This can be used for assessing rotation and I think Manjula does it.
- Comparing the various types of Residual (time series or mass spectrum) the the factors (this how we see, e.g., that the residual in Pittsburgh looked like the OOA-II time series).
Data and Errors from PMF
(from meeting, Donna, Pete, Alex, Ingrid, and Allison, 4-June-08)
Q-AMS
- James' code calculates the Org data and error correctly (as of v 1.36).
- However it does not create the matrices that can then be used for PMF.
- We are using Qi's code to extract the matrices from James's code
- Action items
- Ingrid will create a stand-alone IPF for these functions and post on the web
- After that we'll contact James and see if he can make a new version of the Q-AMS code that does this.
Squirrel (ToF-AMS Unit Rez)
- Organic matrix can be dumped to memory and saved with the "Export Matrix" button (MS Tab)
- Errors are currently only calculated for the MSSDiff Matrix
- Org Errors can be calculated according to procedure in Appendix of Ingrid's paper (same as for synthetic data) which takes the MSSDiff_Err and Frag_Matrix and calculate MSSOrg_Err
- It can be calculated with Pete's code which does it a different (but equivalent) way, which WILL be documented in Pete's paper (albeit briefly)
- Action Item
- Donna will implement Ingrid's calculation for species matrix errors in Squirrel before 08 Users Meeting
- (Aside: Donna will whiten the spectra in Squirrel)
PIKA (HR-ToF-AMS high Rez)
- PIKA allows dumping the data matrix (signal for specific ions)
- Pete has PMF Helper coding that calculates the errors
- Applying error formula
- Remove non-organic ions
- Doing corrections for main "frag" interferences (29, 44)
- Add back HxO and CO based on Allison's frag, and downscale errors
- Remove "bad variables" (average SNR < 0.2, same as Paatero & Hopke)
- Scale back to ug m-3
- For the time being, people should be directed to Pete if they want the code
- Action item
- Pete will email the code to attendees
- Potential future release after Pete's paper is published