{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#
Notebook S05. Size Distribution Inversion Using Regularization
\n", "\n", " Notebook Version 2: This notebook has been updated to reflect changes made to the package DifferentialMobilityAnalyzers.jl to work with the Julia v1 series (tested with Julia 1.1.0). To read the original supplement published with the paper please switch to v1.0.0 of the package DifferentialMobilityAnalyzers.jl and/or download the virtual machine on zenodo.org which contains a complete installation that works with Julia 0.6.4 \n", "\n", "\n", "\n", "This notebook demonstrates how to invert a size distribution from a measured noisy response function. The notebook is a supplement to the manuscript
\n", "\n", "Petters, M. D. (2018) A language to simplify computation of differential mobility analyzer response functions, Aerosol Science & Technology.
\n", "\n", "### Problem Statement\n", "\n", "Let R be a measured response vector from a DMA. What is the measured true size distribution?\n", "\n", "\n", " Figure 1. Convolution of true size distribution resulting in the response vector.\n", "\n", "For situations where instrument noise is neglible, $\\epsilon_i \\approx 0$ and \n", "
$ \\rm{𝕣} = \\bf{A}\\rm{π•Ÿ}$

\n", "In this case, the number concentration is readily obtained from a simple inversion\n", "
$ \\rm{π•Ÿ} = \\bf{A^{-1}}\\rm{𝕣}$

\n", "This linear matrix inversion approach can be sufficient in some cases, However, even seemingly small noise is amplified leading to unusable estimates of $\\rm{π•Ÿ}$ (e.g., Kandlikar and Ramachandran, 1999). Some method to dampen the noise is needed. This is a achieved via regularization. Several regularization approaches are available for this task (Kandlikar and Ramachandran, 1999). Here the Twomey inverse (Twomey, 1963) together with the L-curve method (Hansen, 2000) to find the optimal regularization parameter is applied. This Notebook demonstrates implementation of this approach using synthetic data. Application to actual data is presented in Notebook S6.
\n", "\n", "Routines for regularization are contained in regularization.jl. The method reproduced below is taken from Hansen (2000). The inverse of 𝕣 is found as follows. The residual norm and size of the regularized system are defined as
\n", "
$L_1 = \\left\\lVert \\bf{A}\\rm{π•Ÿ} - \\rm{𝕣}\\right\\rVert_2$
\n", " $L_2 = \\left\\lVert \\bf{L}(\\rm{π•Ÿ} - \\rm{π•Ÿ_i})\\right\\rVert_2$
\n", "where $\\left\\lVert x \\right\\rVert_2$ denotes the 2-norm of a vector ($x$), $L_1$ and $L_2$ are the residual norm and size of the regularized system, $\\bf{A}$ is the forward matrix, $\\bf{L}$ is a weights matrix, and $π•Ÿ_i$ is the initial guess of the correct solution. The general inverted size distribution $π•Ÿ_{inv}$ is found via
\n", "
$π•Ÿ_{inv} = \\arg \\min\\{L_1^2 + \\lambda^2 L_2^2\\}$

\n", "where $\\lambda$ is the regularization parameter and $\\arg \\min$ indicates the solution from a minimization algorithm. For the special case where $\\bf{A}$ is square and $\\bf{L} = \\bf{I}$ equals the identity matrix, $π•Ÿ_{inv}$ can be obtained without the need for computationally expensive minimization\n", "
$π•Ÿ_{inv} = (\\bf{A}^\\rm{T}\\bf{A} + \\lambda^\\rm{2} \\bf{I})^\\rm{-1}(\\bf{A}^\\rm{T} \\rm{𝕣} - \\lambda^2\\bf{S}^{-1} \\rm{𝕣})$

\n", " where the initial guess is taken to be $π•Ÿ_i = \\bf{S}^{-1}𝕣$ and $\\bf{S}$ is obtained by summing the rows of $\\bf{A}$ and placing the results on the diagonal of $\\mathbf{S}$ (Talukdar and Swihart, 2010). The optimal $\\lambda_{opt}$ is found using the L-curve method. The L-curve is defined as a plot of $\\log(L_1)$ vs. $\\log(L_2)$, where $L_1$ and $L_2$ are obtained for a series of discrete $\\lambda$ values. The $\\lambda_{opt}$ is found at the corner of the L-curve, which is mathematically defined as the point where where the curvature of the L-curve is maximum. Here the corner of the L-curve is found using the iterative algorithm described in Talukdar and Swihart (2010). The curvature is calculated using Eq. (14) in Hansen (2000), which requires the first and second derivatives of $d\\ln(L_i)^2/d\\lambda$. These derivatives of $d\\ln(L_i)^2/d\\lambda$ are estimated using the Calculus.jl package and defined in regularization.jl
\n", " \n", "## Block 1. Dependencies" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n" ], "text/plain": [ "HTML{String}(\" \\n\")" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "HTML{String}(\"\")" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "HTML{String}(\"\")" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n" ], "text/plain": [ "HTML{String}(\" \\n\")" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "using Plots, Plots.PlotMeasures, Distributions, DifferentialMobilityAnalyzers, Random, LinearAlgebra, Printf\n", "plotlyjs(); " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Block 2. Setup the DMA \n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "t,p = 295.15, 1e5 # Temperature [K], Pressure [Pa]\n", "qsa,Ξ² = 1.66e-5, 1/5 # Qsample [m3 s-1], Sample-to-sheath ratio,\n", "r₁,rβ‚‚,l = 9.37e-3,1.961e-2,0.44369 # DMA geometry [m]\n", "leff = 13.0 # DMA effective diffusion length [m]\n", "m = 3 # Upper number of charges\n", "Ξ› = DMAconfig(t,p,qsa,qsa/Ξ²,r₁,rβ‚‚,l,leff,:-,m,:cylindrical) # Specify DMA with negative polarity\n", "bins,z₁,zβ‚‚ = 128, dtoz(Ξ›,1000e-9), dtoz(Ξ›,10e-9) # bins, upper, lower mobility limit\n", "Ξ΄ = setupDMA(Ξ›, z₁, zβ‚‚, bins); # Compute matrices" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Block 3. Size distribution and response function\n", "The example provided here is for an assumed size distribution. From that distribution, the response function is computed and Poisson counting noise superimposed. The inversion algorithm is then applied and the result compared to the original input distribution." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "colorbar": { "title": "" }, "hoverinfo": "text", "legendgroup": "y1", "line": { "color": "rgba(0, 0, 0, 1.000)", "dash": "solid", "shape": "linear", "width": 1 }, "mode": "lines", "name": "y1", "showlegend": true, "text": [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ], "type": "scatter", "x": [ 974.2300074422972, 974.2300074422972, 924.8777790796078, 924.8777790796078, 878.3022423233351, 878.3022423233351, 834.3436212985629, 834.3436212985629, 792.8514102462476, 792.8514102462476, 753.6837780585063, 753.6837780585063, 716.7070084047862, 716.7070084047862, 681.794976665845, 681.794976665845, 648.82866443098, 648.82866443098, 617.6957116850906, 617.6957116850906, 588.2900060897667, 588.2900060897667, 560.5113080225947, 560.5113080225947, 534.2649093510768, 534.2649093510768, 509.4613233392402, 509.4613233392402, 486.0160026565918, 486.0160026565918, 463.84908220201066, 463.84908220201066, 442.88514337263206, 442.88514337263206, 423.0529964868289, 423.0529964868289, 404.2854782859637, 404.2854782859637, 386.51926175900957, 386.51926175900957, 369.69467592147345, 369.69467592147345, 353.7555336003638, 353.7555336003638, 338.6489656991283, 338.6489656991283, 324.3252608153583, 324.3252608153583, 310.7377094413168, 310.7377094413168, 297.8424522814925, 297.8424522814925, 285.5983324671729, 285.5983324671729, 273.9667516352769, 273.9667516352769, 262.91152997113426, 262.91152997113426, 252.39877039877067, 252.39877039877067, 242.3967271453097, 242.3967271453097, 232.8756789164833, 232.8756789164833, 223.807806905989, 223.807806905989, 215.16707782978452, 215.16707782978452, 206.92913213370548, 206.92913213370548, 199.07117747422072, 199.07117747422072, 191.5718875218004, 191.5718875218004, 184.41130608732757, 184.41130608732757, 177.57075652638383, 177.57075652638383, 171.032756335473, 171.032756335473, 164.78093681907924, 164.78093681907924, 158.79996767718504, 158.79996767718504, 153.07548633943986, 153.07548633943986, 147.5940318542684, 147.5940318542684, 142.34298312837987, 142.34298312837987, 137.31050130383372, 137.31050130383372, 132.48547605544417, 132.48547605544417, 127.8574755902757, 127.8574755902757, 123.41670013272517, 123.41670013272517, 119.15393868268684, 119.15393868268684, 115.0605288400696, 115.0605288400696, 111.12831949607603, 111.12831949607603, 107.3496361997837, 107.3496361997837, 103.71724901739448, 103.71724901739448, 100.22434271077135, 100.22434271077135, 96.86448907135005, 96.86448907135005, 93.6316212550282, 93.6316212550282, 90.52000997305444, 90.52000997305444, 87.52424140315749, 87.52424140315749, 84.63919669409235, 84.63919669409235, 81.86003294537788, 81.86003294537788, 79.18216555220941, 79.18216555220941, 76.60125181333468, 76.60125181333468, 74.11317570706065, 74.11317570706065, 71.71403374750426, 71.71403374750426, 69.4001218397252, 69.4001218397252, 67.16792305847886, 67.16792305847886, 65.01409628102108, 65.01409628102108, 62.93546560969987, 62.93546560969987, 60.92901052499518, 60.92901052499518, 58.99185671423943, 58.99185671423943, 57.12126752548643, 57.12126752548643, 55.314635999912895, 55.314635999912895, 53.56947743975971, 53.56947743975971, 51.883422472162415, 51.883422472162415, 50.254210572305695, 50.254210572305695, 48.67968401218209, 48.67968401218209, 47.15778220385577, 47.15778220385577, 45.686536408547845, 45.686536408547845, 44.2640647850826, 44.2640647850826, 42.88856775328229, 42.88856775328229, 41.5583236497807, 41.5583236497807, 40.27168465546106, 40.27168465546106, 39.027072975318475, 39.027072975318475, 37.82297725301488, 37.82297725301488, 36.65794920374688, 36.65794920374688, 35.53060045028754, 35.53060045028754, 34.43959954820938, 34.43959954820938, 33.38366918734747, 33.38366918734747, 32.361583557531624, 32.361583557531624, 31.372165867507626, 31.372165867507626, 30.414286006792146, 30.414286006792146, 29.48685834095925, 29.48685834095925, 28.588839631557647, 28.588839631557647, 27.719227072498136, 27.719227072498136, 26.87705643534403, 26.87705643534403, 26.06140031648462, 26.06140031648462, 25.27136647967483, 25.27136647967483, 24.506096287889644, 24.506096287889644, 23.764763218871796, 23.764763218871796, 23.046571459147206, 23.046571459147206, 22.35075457164891, 22.35075457164891, 21.676574232429235, 21.676574232429235, 21.023319032251873, 21.023319032251873, 20.39030333914617, 20.39030333914617, 19.776866218272158, 19.776866218272158, 19.18237040569398, 19.18237040569398, 18.606201332887967, 18.606201332887967, 18.047766199023688, 18.047766199023688, 17.506493088254903, 17.506493088254903, 16.981830129437565, 16.981830129437565, 16.473244695863002, 16.473244695863002, 15.98022264275112, 15.98022264275112, 15.502267580393495, 15.502267580393495, 15.0389001809726, 15.0389001809726, 14.589657517208435, 14.589657517208435, 14.154092431101269, 14.154092431101269, 13.73177293114729, 13.73177293114729, 13.322281616505862, 13.322281616505862, 12.925215126690299, 12.925215126690299, 12.540183615442425, 12.540183615442425, 12.16681024753239, 12.16681024753239, 11.804730717301567, 11.804730717301567, 11.453592787837296, 11.453592787837296, 11.113055849734524, 11.113055849734524, 10.782790498461924, 10.782790498461924, 10.46247812940795, 10.46247812940795, 10.151810549737846 ], "xaxis": "x1", "y": [ 0.08054864120656324, 0.11991375962431002, 0.11991375962431002, 0.1764014168250416, 0.1764014168250416, 0.25644854182113835, 0.25644854182113835, 0.3684755527725724, 0.3684755527725724, 0.5233294039010472, 0.5233294039010472, 0.7347679236679115, 0.7347679236679115, 1.0199703320998168, 1.0199703320998168, 1.4000523146328483, 1.4000523146328483, 1.9005574973015593, 1.9005574973015593, 2.551891234662089, 2.551891234662089, 3.3896579782627, 3.3896579782627, 4.454860826227072, 4.454860826227072, 5.793921761005809, 5.793921761005809, 7.458483987724413, 7.458483987724413, 9.50496387434145, 9.50496387434145, 11.993829168917653, 11.993829168917653, 14.988592039560677, 14.988592039560677, 18.55451939588105, 18.55451939588105, 22.757078048086633, 22.757078048086633, 27.660147557107987, 27.660147557107987, 33.324048108879424, 33.324048108879424, 39.80344344760284, 39.80344344760284, 47.145189001672634, 47.145189001672634, 55.38620220213566, 55.38620220213566, 64.55143522836511, 64.55143522836511, 74.65202986369414, 74.65202986369414, 85.68372988420677, 85.68372988420677, 97.62561872442049, 97.62561872442049, 110.43923952298067, 110.43923952298067, 124.06814163549062, 124.06814163549062, 138.4378829772818, 138.4378829772818, 153.45650183057884, 153.45650183057884, 169.01545572037824, 169.01545572037824, 184.99100929803384, 184.99100929803384, 201.24603847547007, 201.24603847547007, 217.6322048484269, 217.6322048484269, 233.99244316100865, 233.99244316100865, 250.1636955196895, 250.1636955196895, 265.9798194806528, 265.9798194806528, 281.2745931235548, 281.2745931235548, 295.8847388020062, 295.8847388020062, 309.6528883495461, 309.6528883495461, 322.4304159617321, 322.4304159617321, 334.0800705427885, 334.0800705427885, 344.47834671492666, 344.47834671492666, 353.51754261264807, 353.51754261264807, 361.10746266626325, 361.10746266626325, 367.17673444577883, 367.17673444577883, 371.67371991276883, 371.67371991276883, 374.5670127479002, 374.5670127479002, 375.84552444030135, 375.84552444030135, 375.51817222774196, 375.51817222774196, 373.6131914895937, 373.6131914895937, 370.17710359320404, 370.17710359320404, 365.27337731568116, 365.27337731568116, 358.9808277268836, 358.9808277268836, 351.39180087116256, 351.39180087116256, 342.61019598633834, 342.61019598633834, 332.74938000467915, 332.74938000467915, 321.9300530756991, 321.9300530756991, 310.2781315068153, 310.2781315068153, 297.9227306418346, 297.9227306418346, 284.99436280240684, 284.99436280240684, 271.62352670802534, 271.62352670802534, 257.93997126472533, 257.93997126472533, 244.0730868421817, 244.0730868421817, 230.154125158767, 230.154125158767, 216.3212709203313, 216.3212709203313, 202.72894221871135, 202.72894221871135, 189.56297616755762, 189.56297616755762, 177.0633692849254, 177.0633692849254, 165.55570906184712, 165.55570906184712, 155.49102677171064, 155.49102677171064, 147.49124880035424, 147.49124880035424, 142.39367287461886, 142.39367287461886, 141.2833202800446, 141.2833202800446, 145.49758379880626, 145.49758379880626, 156.5848916519165, 156.5848916519165, 176.20011625818466, 176.20011625818466, 205.92599121191813, 205.92599121191813, 247.0227230907942, 247.0227230907942, 300.1263763235681, 300.1263763235681, 364.9372622548218, 364.9372622548218, 439.95717359263136, 439.95717359263136, 522.3425685023975, 522.3425685023975, 607.9343107845693, 607.9343107845693, 691.5009636825438, 691.5009636825438, 767.1942871726745, 767.1942871726745, 829.1699367136282, 829.1699367136282, 872.2844792661493, 872.2844792661493, 892.7534537119195, 892.7534537119195, 888.6530019438147, 888.6530019438147, 860.1721657570988, 860.1721657570988, 809.5694664871836, 809.5694664871836, 740.8447558236973, 740.8447558236973, 659.1913791307106, 659.1913791307106, 570.3314261416224, 570.3314261416224, 479.8501895311997, 479.8501895311997, 392.6338015049876, 392.6338015049876, 312.48194286208565, 312.48194286208565, 241.92547250887503, 241.92547250887503, 182.2378144014915, 182.2378144014915, 133.5978660941438, 133.5978660941438, 95.34585244098876, 95.34585244098876, 66.2721884844293, 66.2721884844293, 44.88968982615086, 44.88968982615086, 29.656168136485938, 29.656168136485938, 19.132312453292947, 19.132312453292947, 12.074797084685104, 12.074797084685104, 7.47465876238402, 7.47465876238402, 4.555818681816852, 4.555818681816852, 2.7491188929161634, 2.7491188929161634, 1.6549190306504262, 1.6549190306504262, 1.0036970428454333, 1.0036970428454333, 0.6204108801517325, 0.6204108801517325, 0.3953255801514157, 0.3953255801514157, 0.2618734376323219, 0.2618734376323219, 0.18086677781151672, 0.18086677781151672, 0.12983222696386143, 0.12983222696386143, 0.09614484916444341, 0.09614484916444341, 0.07279901891210767, 0.07279901891210767, 0.05590717205315482, 0.05590717205315482, 0.04327481195139809, 0.04327481195139809, 0.033615706146040876, 0.033615706146040876, 0.02613210912010762, 0.02613210912010762, 0.020295177971251466, 0.020295177971251466, 0.01573138961842505, 0.01573138961842505 ], "yaxis": "y1", "zmax": 0.1, "zmin": -0.1 } ], "layout": { "annotations": [], "height": 288, "margin": { "b": 20, "l": 0, "r": 0, "t": 20 }, "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "showlegend": false, "width": 432, "xaxis": { "anchor": "y1", "domain": [ 0.14028628365898704, 0.9189814814814814 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ 0.9030899869919435, 3 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 17 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "10^1", "10^2", "10^3" ], "tickvals": [ 10, 100, 1000 ], "title": "Mobility Diameter (nm)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 17 }, "type": "log", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" }, "yaxis": { "anchor": "x1", "domain": [ 0.1294109069699621, 0.9863298337707787 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ -26.766400280050608, 919.5355853815886 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 17 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "0", "200", "400", "600", "800" ], "tickvals": [ 0, 200, 400, 600, 800 ], "title": "dN/dlnD (cm⁻³)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 17 }, "type": "-", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" } } }, "image/svg+xml": [ "10251002510000200400600800Mobility Diameter (nm)dN/dlnD (cm⁻³)" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "figure(\"Nimbus Sans L\", 2, 3, 2, 8)\n", "π•Ÿ = DMALognormalDistribution([[400, 30, 1.2],[500, 110, 1.7]], Ξ΄)\n", "p = plot(π•Ÿ.Dp, π•Ÿ.S, xaxis = :log10, xticks = [10, 100, 1000], lt = :steppre, right_margin = 35px,\n", " legend = :none, ylabel = \"dN/dlnD (cm⁻³)\", xlim = (8,1000), color = :black,\n", " xlabel = \"Mobility Diameter (nm)\", fmt = :svg)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " Figure 2. Lognormal aerosol size distribution π•Ÿ, represented as dN/dlnD. This is the assumed mobility size distribution from which the response vector is computed." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The response size distribution 𝕣 is computed as
\n", "
$\\rm{𝕣} = \\bf{A}\\rm{π•Ÿ}$

\n", "where $\\bf{A}$ is the forward matrix defined in module DifferentialMobilityAnalyzer.jl. The convolution is applied to the dN/dlnD and N fields of the size distribution. The resulting 𝕣 distribution is what an ideal instrument would measure. In practice, counting uncertainty imposes noise on the response. Counting uncertainty is simulated using a Poisson process. The actual number of counts in each bin are
\n", "
$c_i = N_iQ_{CPC}t$

\n", "where $N$ is the number concentration in the bin, $Q_{CPC}$ is the flow rate of the CPC and $t$ is the integration time over the bin. The integration time is the ratio of scan time and number of bins. The noisy response function is obtained by computing the expected number of counts in a bin ($c_i$) followed by drawing a random number from a Poisson distribution with expectation value $c_i$, i.e. $c_\\epsilon = P(\\mu=c_i)$, where $\\mu$ is the mean of the Poisson distribution, and $c_\\epsilon$ are the noisy counts. The noise perturbed count distribution is then converted back to concentration and denoted as
\n", "
$\\rm{𝕣} = \\bf{A}\\rm{π•Ÿ+Ο΅}$

\n", "The noise level of the distribution depends on scan rate, CPC flow rate and number concentration of the parent size distribution." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "scrolled": true }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "colorbar": { "title": "" }, "hoverinfo": "text", "legendgroup": "𝕣 = 𝐀*π•Ÿ+Ο΅", "line": { "color": "rgba(0, 0, 204, 1.000)", "dash": "solid", "shape": "linear", "width": 1 }, "mode": "lines", "name": "𝕣 = 𝐀*π•Ÿ+Ο΅", "showlegend": true, "text": [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ], "type": "scatter", "x": [ 974.2300074422972, 974.2300074422972, 924.8777790796078, 924.8777790796078, 878.3022423233351, 878.3022423233351, 834.3436212985629, 834.3436212985629, 792.8514102462476, 792.8514102462476, 753.6837780585063, 753.6837780585063, 716.7070084047862, 716.7070084047862, 681.794976665845, 681.794976665845, 648.82866443098, 648.82866443098, 617.6957116850906, 617.6957116850906, 588.2900060897667, 588.2900060897667, 560.5113080225947, 560.5113080225947, 534.2649093510768, 534.2649093510768, 509.4613233392402, 509.4613233392402, 486.0160026565918, 486.0160026565918, 463.84908220201066, 463.84908220201066, 442.88514337263206, 442.88514337263206, 423.0529964868289, 423.0529964868289, 404.2854782859637, 404.2854782859637, 386.51926175900957, 386.51926175900957, 369.69467592147345, 369.69467592147345, 353.7555336003638, 353.7555336003638, 338.6489656991283, 338.6489656991283, 324.3252608153583, 324.3252608153583, 310.7377094413168, 310.7377094413168, 297.8424522814925, 297.8424522814925, 285.5983324671729, 285.5983324671729, 273.9667516352769, 273.9667516352769, 262.91152997113426, 262.91152997113426, 252.39877039877067, 252.39877039877067, 242.3967271453097, 242.3967271453097, 232.8756789164833, 232.8756789164833, 223.807806905989, 223.807806905989, 215.16707782978452, 215.16707782978452, 206.92913213370548, 206.92913213370548, 199.07117747422072, 199.07117747422072, 191.5718875218004, 191.5718875218004, 184.41130608732757, 184.41130608732757, 177.57075652638383, 177.57075652638383, 171.032756335473, 171.032756335473, 164.78093681907924, 164.78093681907924, 158.79996767718504, 158.79996767718504, 153.07548633943986, 153.07548633943986, 147.5940318542684, 147.5940318542684, 142.34298312837987, 142.34298312837987, 137.31050130383372, 137.31050130383372, 132.48547605544417, 132.48547605544417, 127.8574755902757, 127.8574755902757, 123.41670013272517, 123.41670013272517, 119.15393868268684, 119.15393868268684, 115.0605288400696, 115.0605288400696, 111.12831949607603, 111.12831949607603, 107.3496361997837, 107.3496361997837, 103.71724901739448, 103.71724901739448, 100.22434271077135, 100.22434271077135, 96.86448907135005, 96.86448907135005, 93.6316212550282, 93.6316212550282, 90.52000997305444, 90.52000997305444, 87.52424140315749, 87.52424140315749, 84.63919669409235, 84.63919669409235, 81.86003294537788, 81.86003294537788, 79.18216555220941, 79.18216555220941, 76.60125181333468, 76.60125181333468, 74.11317570706065, 74.11317570706065, 71.71403374750426, 71.71403374750426, 69.4001218397252, 69.4001218397252, 67.16792305847886, 67.16792305847886, 65.01409628102108, 65.01409628102108, 62.93546560969987, 62.93546560969987, 60.92901052499518, 60.92901052499518, 58.99185671423943, 58.99185671423943, 57.12126752548643, 57.12126752548643, 55.314635999912895, 55.314635999912895, 53.56947743975971, 53.56947743975971, 51.883422472162415, 51.883422472162415, 50.254210572305695, 50.254210572305695, 48.67968401218209, 48.67968401218209, 47.15778220385577, 47.15778220385577, 45.686536408547845, 45.686536408547845, 44.2640647850826, 44.2640647850826, 42.88856775328229, 42.88856775328229, 41.5583236497807, 41.5583236497807, 40.27168465546106, 40.27168465546106, 39.027072975318475, 39.027072975318475, 37.82297725301488, 37.82297725301488, 36.65794920374688, 36.65794920374688, 35.53060045028754, 35.53060045028754, 34.43959954820938, 34.43959954820938, 33.38366918734747, 33.38366918734747, 32.361583557531624, 32.361583557531624, 31.372165867507626, 31.372165867507626, 30.414286006792146, 30.414286006792146, 29.48685834095925, 29.48685834095925, 28.588839631557647, 28.588839631557647, 27.719227072498136, 27.719227072498136, 26.87705643534403, 26.87705643534403, 26.06140031648462, 26.06140031648462, 25.27136647967483, 25.27136647967483, 24.506096287889644, 24.506096287889644, 23.764763218871796, 23.764763218871796, 23.046571459147206, 23.046571459147206, 22.35075457164891, 22.35075457164891, 21.676574232429235, 21.676574232429235, 21.023319032251873, 21.023319032251873, 20.39030333914617, 20.39030333914617, 19.776866218272158, 19.776866218272158, 19.18237040569398, 19.18237040569398, 18.606201332887967, 18.606201332887967, 18.047766199023688, 18.047766199023688, 17.506493088254903, 17.506493088254903, 16.981830129437565, 16.981830129437565, 16.473244695863002, 16.473244695863002, 15.98022264275112, 15.98022264275112, 15.502267580393495, 15.502267580393495, 15.0389001809726, 15.0389001809726, 14.589657517208435, 14.589657517208435, 14.154092431101269, 14.154092431101269, 13.73177293114729, 13.73177293114729, 13.322281616505862, 13.322281616505862, 12.925215126690299, 12.925215126690299, 12.540183615442425, 12.540183615442425, 12.16681024753239, 12.16681024753239, 11.804730717301567, 11.804730717301567, 11.453592787837296, 11.453592787837296, 11.113055849734524, 11.113055849734524, 10.782790498461924, 10.782790498461924, 10.46247812940795, 10.46247812940795, 10.151810549737846 ], "xaxis": "x1", "y": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0, 0, 0, 0, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0.12805122048819528, 0.12805122048819528, 0.19207683073229292, 0.19207683073229292, 0, 0, 0.12805122048819528, 0.12805122048819528, 0.19207683073229292, 0.19207683073229292, 0.38415366146458585, 0.38415366146458585, 0.19207683073229292, 0.19207683073229292, 0.38415366146458585, 0.38415366146458585, 0.44817927170868344, 0.44817927170868344, 0.38415366146458585, 0.38415366146458585, 1.5366146458583434, 1.5366146458583434, 0.8323329331732693, 0.8323329331732693, 0.8963585434173669, 0.8963585434173669, 0.704281712685074, 0.704281712685074, 1.2805122048819528, 1.2805122048819528, 1.7927170868347337, 1.7927170868347337, 2.7531012404961985, 2.7531012404961985, 2.4969987995198077, 2.4969987995198077, 3.073229291716687, 3.073229291716687, 4.097639055622249, 4.097639055622249, 4.033613445378151, 4.033613445378151, 4.417767106842737, 4.417767106842737, 4.481792717086835, 4.481792717086835, 5.378151260504201, 5.378151260504201, 6.2745098039215685, 6.2745098039215685, 6.594637855142056, 6.594637855142056, 6.018407362945178, 6.018407362945178, 7.362945178071229, 7.362945178071229, 7.6830732292917165, 7.6830732292917165, 8.579431772709084, 8.579431772709084, 8.771508603441376, 8.771508603441376, 9.475790316126451, 9.475790316126451, 9.21968787515006, 9.21968787515006, 11.972789115646258, 11.972789115646258, 10.500200080032013, 10.500200080032013, 10.180072028811525, 10.180072028811525, 10.500200080032013, 10.500200080032013, 11.65266106442577, 11.65266106442577, 11.204481792717086, 11.204481792717086, 10.756302521008402, 10.756302521008402, 11.588635454181672, 11.588635454181672, 11.39655862344938, 11.39655862344938, 11.076430572228892, 11.076430572228892, 10.628251300520208, 10.628251300520208, 11.65266106442577, 11.65266106442577, 10.692276910764306, 10.692276910764306, 9.795918367346939, 9.795918367346939, 8.1312525010004, 8.1312525010004, 9.411764705882353, 9.411764705882353, 10.116046418567427, 10.116046418567427, 8.451380552220888, 8.451380552220888, 6.786714685874349, 6.786714685874349, 8.1312525010004, 8.1312525010004, 7.7470988395358145, 7.7470988395358145, 6.914765906362545, 6.914765906362545, 6.530612244897959, 6.530612244897959, 5.890356142456983, 5.890356142456983, 6.2745098039215685, 6.2745098039215685, 5.378151260504201, 5.378151260504201, 4.673869547819128, 4.673869547819128, 3.713485394157663, 3.713485394157663, 3.3933573429371746, 3.3933573429371746, 3.329331732693077, 3.329331732693077, 3.009203681472589, 3.009203681472589, 3.009203681472589, 3.009203681472589, 3.2012805122048817, 3.2012805122048817, 2.6890756302521006, 2.6890756302521006, 3.2012805122048817, 3.2012805122048817, 3.5854341736694675, 3.5854341736694675, 3.9055622248899557, 3.9055622248899557, 3.3933573429371746, 3.3933573429371746, 3.713485394157663, 3.713485394157663, 5.122048819527811, 5.122048819527811, 5.506202480992397, 5.506202480992397, 6.210484193677471, 6.210484193677471, 7.298919567827131, 7.298919567827131, 8.771508603441376, 8.771508603441376, 9.091636654661864, 9.091636654661864, 9.411764705882353, 9.411764705882353, 9.859943977591037, 9.859943977591037, 9.347739095638255, 9.347739095638255, 8.835534213685474, 8.835534213685474, 9.667867146858743, 9.667867146858743, 8.195278111244498, 8.195278111244498, 9.347739095638255, 9.347739095638255, 6.722689075630252, 6.722689075630252, 4.673869547819128, 4.673869547819128, 4.545818327330932, 4.545818327330932, 3.9055622248899557, 3.9055622248899557, 3.5854341736694675, 3.5854341736694675, 1.8567426970788314, 1.8567426970788314, 1.6006402561024409, 1.6006402561024409, 1.3445378151260503, 1.3445378151260503, 0.8323329331732693, 0.8323329331732693, 0.6402561024409764, 0.6402561024409764, 0.44817927170868344, 0.44817927170868344, 0.19207683073229292, 0.19207683073229292, 0.25610244097639057, 0.25610244097639057, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0, 0, 0, 0, 0.06402561024409764, 0.06402561024409764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], "yaxis": "y1", "zmax": 0.1, "zmin": -0.1 }, { "colorbar": { "title": "" }, "hoverinfo": "text", "legendgroup": "𝕣 = 𝐀*π•Ÿ", "line": { "color": "rgba(0, 0, 0, 1.000)", "dash": "dash", "shape": "linear", "width": 1 }, "mode": "lines", "name": "𝕣 = 𝐀*π•Ÿ", "showlegend": true, "text": [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ], "type": "scatter", "x": [ 974.2300074422972, 924.8777790796078, 878.3022423233351, 834.3436212985629, 792.8514102462476, 753.6837780585063, 716.7070084047862, 681.794976665845, 648.82866443098, 617.6957116850906, 588.2900060897667, 560.5113080225947, 534.2649093510768, 509.4613233392402, 486.0160026565918, 463.84908220201066, 442.88514337263206, 423.0529964868289, 404.2854782859637, 386.51926175900957, 369.69467592147345, 353.7555336003638, 338.6489656991283, 324.3252608153583, 310.7377094413168, 297.8424522814925, 285.5983324671729, 273.9667516352769, 262.91152997113426, 252.39877039877067, 242.3967271453097, 232.8756789164833, 223.807806905989, 215.16707782978452, 206.92913213370548, 199.07117747422072, 191.5718875218004, 184.41130608732757, 177.57075652638383, 171.032756335473, 164.78093681907924, 158.79996767718504, 153.07548633943986, 147.5940318542684, 142.34298312837987, 137.31050130383372, 132.48547605544417, 127.8574755902757, 123.41670013272517, 119.15393868268684, 115.0605288400696, 111.12831949607603, 107.3496361997837, 103.71724901739448, 100.22434271077135, 96.86448907135005, 93.6316212550282, 90.52000997305444, 87.52424140315749, 84.63919669409235, 81.86003294537788, 79.18216555220941, 76.60125181333468, 74.11317570706065, 71.71403374750426, 69.4001218397252, 67.16792305847886, 65.01409628102108, 62.93546560969987, 60.92901052499518, 58.99185671423943, 57.12126752548643, 55.314635999912895, 53.56947743975971, 51.883422472162415, 50.254210572305695, 48.67968401218209, 47.15778220385577, 45.686536408547845, 44.2640647850826, 42.88856775328229, 41.5583236497807, 40.27168465546106, 39.027072975318475, 37.82297725301488, 36.65794920374688, 35.53060045028754, 34.43959954820938, 33.38366918734747, 32.361583557531624, 31.372165867507626, 30.414286006792146, 29.48685834095925, 28.588839631557647, 27.719227072498136, 26.87705643534403, 26.06140031648462, 25.27136647967483, 24.506096287889644, 23.764763218871796, 23.046571459147206, 22.35075457164891, 21.676574232429235, 21.023319032251873, 20.39030333914617, 19.776866218272158, 19.18237040569398, 18.606201332887967, 18.047766199023688, 17.506493088254903, 16.981830129437565, 16.473244695863002, 15.98022264275112, 15.502267580393495, 15.0389001809726, 14.589657517208435, 14.154092431101269, 13.73177293114729, 13.322281616505862, 12.925215126690299, 12.540183615442425, 12.16681024753239, 11.804730717301567, 11.453592787837296, 11.113055849734524, 10.782790498461924, 10.46247812940795, 10.151810549737846 ], "xaxis": "x1", "y": [ 0.0012527413999111126, 0.0021684116334628194, 0.0033909246128721333, 0.005042287065092275, 0.007307147945865177, 0.010475572014691395, 0.014856095250514395, 0.02084124798894646, 0.028922620082436887, 0.03975066943711011, 0.05414157549797847, 0.0730266916541326, 0.09745017379233245, 0.12856593296356342, 0.16778171472359607, 0.21667447234026144, 0.27706393915287275, 0.35091531219081784, 0.4402842733537693, 0.5472617846684839, 0.6739779795339337, 0.8225928604017069, 0.9951966028362417, 1.1937782663473488, 1.4201048899628135, 1.675655890346584, 1.961554599644346, 2.2784941292883594, 2.6266675184240067, 3.0057049581540127, 3.4146209080248844, 3.851773836894279, 4.314841112488269, 4.800811224216333, 5.30599505113804, 5.82605729009285, 6.356068456610262, 6.8905770916528395, 7.42370098749371, 7.949235428242236, 8.460775669949248, 8.951850206066885, 9.416060816338447, 9.847225013765463, 10.239516308439757, 10.587597711157184, 10.886744104137733, 11.13294950047586, 11.32301577660181, 11.454620163740259, 11.526359588451179, 11.53777081899205, 11.489326261276958, 11.382406114816144, 11.219248407658515, 11.002879146973013, 10.737025423893847, 10.426014781209373, 10.074664486772676, 9.688164566693786, 9.271958574508508, 8.831626170674477, 8.372771764692036, 7.900923879074329, 7.421450717497601, 6.939498849519303, 6.459964073354213, 5.987506273740508, 5.526622907057468, 5.081797407420792, 4.657737279517576, 4.259709151908063, 3.893961614809327, 3.5681991455799147, 3.292032239833392, 3.077284766294631, 2.937999914096347, 2.889966606432982, 2.9496072245080103, 3.1321403573607434, 3.4490642631655484, 3.9051857184683807, 4.495612073869319, 5.203281021256478, 5.997665497557628, 6.835213733459676, 7.66184986028794, 8.417495089447526, 9.042144215491327, 9.482648523436879, 9.699118967521846, 9.66984875715802, 9.393883114704295, 8.89079134107687, 8.197722697154857, 7.364326458435586, 6.446471373675404, 5.499837066570949, 4.57435691624998, 3.710214936959253, 2.9357242693532664, 2.267039468608822, 1.709359845519136, 1.2591130967085482, 0.9065741926994622, 0.6384483768658988, 0.44008550119912787, 0.29714967355188987, 0.19670673879105507, 0.12779134099617454, 0.08156957784406493, 0.05122843225849984, 0.031711120725613995, 0.019391119093373273, 0.011747513885091595, 0.00707738177196125, 0.004260403335458027, 0.002577436389496685, 0.0015772898218784459, 0.0009828111855615606, 0.0006270057043898591, 0.0004109476907596411, 0.00027684505652996654, 0.00019122722301129018, 0.00013456693106241429, 9.513936736697594e-05, 6.610467258171659e-05, 4.41069722208792e-05 ], "yaxis": "y1", "zmax": 0.1, "zmin": -0.1 } ], "layout": { "annotations": [], "height": 288, "legend": { "bgcolor": "rgba(255, 255, 255, 1.000)", "bordercolor": "rgba(0, 0, 0, 1.000)", "font": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 14 }, "tracegroupgap": 0, "x": 1, "y": 1 }, "margin": { "b": 20, "l": 0, "r": 0, "t": 20 }, "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "showlegend": true, "width": 432, "xaxis": { "anchor": "y1", "domain": [ 0.21990740740740736, 0.9908865558471858 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ 0.9030899869919435, 3 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 17 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "10^1", "10^2", "10^3" ], "tickvals": [ 10, 100, 1000 ], "title": "Apparent +1 Mobility Diam. (nm)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 17 }, "type": "log", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" }, "yaxis": { "anchor": "x1", "domain": [ 0.1294109069699621, 0.9863298337707787 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ -0.35918367346938773, 12.331972789115646 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 17 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "0.0", "2.5", "5.0", "7.5", "10.0" ], "tickvals": [ 0, 2.5, 5, 7.5, 10 ], "title": "Concentration (cm⁻³)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 17 }, "type": "-", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" } } }, "image/svg+xml": [ "10251002510000.02.55.07.510.0𝕣 = 𝐀*π•Ÿ+ϡ𝕣 = 𝐀*π•ŸApparent +1 Mobility Diam. (nm)Concentration (cm⁻³)" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Random.seed!(703) # random number seed; fix for repeatable runs\n", "tscan = 120 # SMPS scan time [s] \n", "Qcpc = 16.66 # CPC flow rate [cmΒ³ s⁻¹]. 16.66 cmΒ³ s⁻¹ = 1 L min⁻¹\n", "t = tscan./bins # time in each bin\n", "\n", "𝕣 = Ξ΄.𝐀*π•Ÿ; # DMA response function \n", "c = 𝕣.N*Qcpc*t; # number of counts in each bin\n", "R = Float64[] # Construct a noisy response function 𝕣+Ο΅, where Ο΅ is counting uncertainty\n", "for i = c\n", " f = rand(Poisson(i),1) # draw Poisson random number with mean = counts\n", " push!(R,f[1]/(Qcpc*t)) # convert back to concentration\n", "end\n", "\n", "p = plot(𝕣.Dp, R, xaxis = :log10, xticks = [10, 100, 1000], lt = :steppre, label = \"𝕣 = 𝐀*π•Ÿ+Ο΅\", \n", " ylabel = \"Concentration (cm⁻³)\", xlim = (8,1000), color = color = RGBA(0,0,0.8,1),\n", " xlabel = \"Apparent +1 Mobility Diam. (nm)\", left_margin = 25px)\n", "p = plot!(𝕣.Dp, 𝕣.N, label = \"𝕣 = 𝐀*π•Ÿ\", color = :black, ls = :dash, fmt = :svg)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " Figure 2. Response function for system with no noise (𝕣 = Aπ•Ÿ) and system with counting uncertainty (𝕣 = Aπ•Ÿ+Ο΅) represented as measured concentration. The counting uncertainty depends on the total number concentration, the CPC flow rate and the time spent in each bin, which is determined by the scan rate. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Block 4. Inversion using regularization\n", "The matrices $\\bf{A}$ and $\\bf{S}$ are defined in the module DifferentialMobilityAnalyzer.jl. The identity matrix is $\\mathbf{I}$ = eye(n), where n is the number of bins. Calculations can be performed on either the number concentration or dN/dlnD vectors. Here calculations are performed on the number concentration vector R and the dN/dlnD and resulting π•Ÿα΅’β‚™α΅₯ is assembled manually at the end of the computation. This is to avoid unnecessary complexity of the code in regularization.jl.

\n", "setupRegularization(A,I,R,Ni) defines the system of equations in terms of the matrices A, and I, the response R and the initial guess Ni.

\n", "lcurve(λ₁,Ξ»β‚‚;n=200) computes the L₁ and Lβ‚‚ over the interval [λ₁,Ξ»β‚‚] for n=200 points. The function discretizes [λ₁,Ξ»β‚‚] in logspace and returns the array of Ξ»-values (Ξ»s) and index where the curvature is maximum (ii). The function is only used for smooth visulation of the L-curve and not needed in the actual inversion.
\n", "\n", "lcorner(λ₁,Ξ»β‚‚;n=10,r=3) computes the L₁ and Lβ‚‚ over the interval [λ₁,Ξ»β‚‚] for n=10 points calling lcurve(). The grid is recursively adapted three times to zoom into the optimal value, resulting in 30 total inversions. The optimal lambda value (Ξ»opt) is returned
\n", "\n", "(reginv(Ξ»opt, r = :NΞ»))[1] return the inverted number vector for Ξ»opt. reginv() returns a vector of inversions so the first element is extracted. For low number concentration, the inversion can return negative numbers. The clean function zeros negative values in the vector.
\n", "\n", "Finally, the regularized size distribution π•Ÿα΅’β‚™α΅₯ is reconstructed and actual vs. inverted number concentration are compared. The time required to compute lcurve and lcorner is reported. For n = 128 bins, Ξ»opt can be obtained within ~0.5s" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " 8.032454 seconds (4.28 M allocations: 2.109 GiB, 4.14% gc time)\n", " 1.515819 seconds (113.09 k allocations: 394.505 MiB, 3.58% gc time)\n", "Input number concentration 900\n", "Inverted number concentration 894\n" ] } ], "source": [ "λ₁,Ξ»β‚‚ = 1e-3, 1e1 # bounds [λ₁,Ξ»β‚‚] within which the optimal distribution lies\n", "\n", "eyeM = Matrix{Float64}(I, bins, bins)\n", "setupRegularization(Ξ΄.𝐀,eyeM,R,inv(Ξ΄.𝐒)*R) # setup the system of equations to regularize\n", "@time L1,L2,Ξ»s,ii = lcurve(λ₁,Ξ»β‚‚;n=200) # compute the L-curve for plotting only\n", "@time Ξ»opt = lcorner(λ₁,Ξ»β‚‚;n=10,r=3) # compute the optimal Ξ» using recursive algorithn\n", "N = clean((reginv(Ξ»opt, r = :NΞ»))[1]) # find the inverted size distribution \n", "π•Ÿα΅’β‚™α΅₯= SizeDistribution([],π•Ÿ.De,π•Ÿ.Dp,π•Ÿ.Ξ”lnD,N./π•Ÿ.Ξ”lnD,N,:regularized) # store as AerosolSizeDistribution\n", "\n", "@printf(\"Input number concentration %i\\n\", sum(π•Ÿ.N))\n", "@printf(\"Inverted number concentration %i\\n\", sum(π•Ÿα΅’β‚™α΅₯.N))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Block 5. Visualization" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "colorbar": { "title": "" }, "hoverinfo": "text", "legendgroup": "L-curve Ξ» ∈ [1e-03 1e+01]", "line": { "color": "rgba(0, 0, 0, 1.000)", "dash": "solid", "shape": "linear", "width": 1 }, "mode": "lines", "name": "L-curve Ξ» ∈ [1e-03 1e+01]", "showlegend": true, "text": [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ], "type": "scatter", "x": [ 0.1677433214334273, 0.17723696829539723, 0.18741151809660636, 0.1983205460249625, 0.21001761179557665, 0.22255555052790846, 0.2359857550303785, 0.250357460270511, 0.26571703764665744, 0.28210730358832753, 0.2995668444056471, 0.318129357532949, 0.33782300852589087, 0.35866980348738003, 0.38068497797917816, 0.4038764058517562, 0.42824403464371097, 0.4537793580731425, 0.4804649404125408, 0.5082740119275335, 0.5371701586764135, 0.5671071334083172, 0.5980288165844012, 0.6298693572045709, 0.6625535216999489, 0.6959972753353016, 0.7301086141711894, 0.7647886567528929, 0.7999329936581505, 0.8354332804794313, 0.8711790465782464, 0.9070596790778173, 0.9429665300878095, 0.978795086101568, 1.0144471326294735, 1.0498328449404064, 1.0848727373871299, 1.119499408961625, 1.1536590308979902, 1.1873125325258302, 1.2204364532592475, 1.2530234406760674, 1.285082386316036, 1.3166382015070315, 1.347731244887511, 1.378416421237534, 1.4087619779035778, 1.438848030766529, 1.4687648567001854, 1.498610994067779, 1.5284911971754975, 1.5585142946933126, 1.5887910056240282, 1.619431769009755, 1.6505446446424563, 1.682233341000479, 1.714595422956164, 1.747720745193398, 1.7816901477329403, 1.8165744378360418, 1.8524336685445582, 1.8893167092057848, 1.9272610887063224, 1.9662930790287438, 2.00642797628486, 2.047670529467025, 2.090015464363175, 2.133448051560357, 2.177944672969474, 2.223473350204151, 2.269994209504216, 2.3174598705636007, 2.3658157593826177, 2.4150003569493688, 2.464945405159097, 2.5155760981790873, 2.5668112910568497, 2.618563757703706, 2.670740527737916, 2.7232433265762332, 2.7759691363188406, 2.8288108871430757, 2.881658280833894, 2.93439874035282, 2.9869184724496733, 3.039103624558849, 3.0908415127541224, 3.1420218944142286, 3.1925382574529353, 3.2422890974322516, 3.2911791545246882, 3.3391205840304288, 3.3860340368836157, 3.4318496301732684, 3.4765077920071805, 3.51995996988033, 3.5621691968659714, 3.6031105152029377, 3.642771261976041, 3.6811512263528883, 3.7182626920464235, 3.754130382147552, 3.7887913260952084, 3.8222946702611225, 3.8547014544305274, 3.88608437643486, 3.916527566475396, 3.946126391445343, 3.974987307999886, 4.003227781402733, 4.030976285391552, 4.05837239645895, 4.085566993926, 4.112722574757526, 4.140013688882836, 4.167627496407541, 4.195764442048529, 4.224639033913409, 4.25448070295677, 4.285534705784148, 4.318063016848492, 4.352345136696332, 4.388678721366106, 4.427379915415147, 4.468783249045514, 4.513240940757094, 4.561121433859997, 4.6128069915095535, 4.668690184378261, 4.729169131085874, 4.794641396631207, 4.865496519276817, 4.94210722033356, 5.024819450029525, 5.113941529223281, 5.2097327517766105, 5.312391905082543, 5.422046235613486, 5.538741423030201, 5.662433124060135, 5.792980603820601, 5.930142889793313, 6.073577768546708, 6.2228438068220875, 6.377405427610128, 6.536640919430188, 6.699853113401201, 6.866282336520794, 7.035121147648086, 7.205530289886021, 7.37665525235714, 7.547642826855849, 7.717657069734672, 7.885894133925322, 8.051595515665662, 8.21405935918852, 8.372649573093907, 8.52680262663177, 8.676032005121284, 8.819930404543555, 8.958169830704001, 9.090499834768014, 9.216744162806233, 9.3367961223922, 9.45061297590983, 9.558209660777345, 9.659652114661393, 9.755050452563914, 9.844552205930393, 9.92833579479617, 10.006604365070043, 10.079580086354753, 10.147498972618452, 10.210606259398144, 10.269152347404335, 10.323389303401132, 10.373567894785005, 10.419935123925782, 10.462732221515472, 10.502193054305705, 10.53854290112522, 10.571997551416706, 10.602762682238488, 10.631033472331344, 10.656994415113598, 10.680819296066293, 10.702671303693302, 10.722703246930385, 10.741057855419953, 10.75786814238862, 10.773257812916013, 10.787341703142278, 10.800226238421308, 10.81200990059263, 10.822783696431225, 10.832631620960221, 10.841631110699678, 10.849853483098185, 10.857364359377994, 10.86422406884051 ], "xaxis": "x1", "y": [ 433.2057745693311, 429.5836632806244, 425.81092498573753, 421.8748249715879, 417.7630330527195, 413.46380172775395, 408.96614207002006, 404.25999703918586, 399.3364119908885, 394.18770214518673, 388.8076166662264, 383.191498805265, 377.336441285287, 371.2414357478113, 364.90751464289804, 358.3378834101873, 351.53804017142994, 344.5158794402758, 337.2817755797848, 329.8486409415197, 322.2319528798759, 314.44974323899146, 306.5225435722642, 298.47327939583755, 290.32710731761, 282.111190012089, 273.8544057915376, 265.5869919525637, 257.3401240934929, 249.14543706669517, 241.03449695939244, 233.0382372314507, 225.18637560701646, 217.50683122067124, 210.02516358674816, 202.76405594370877, 195.74286523740523, 188.9772593271245, 182.4789588986319, 176.25559712656434, 170.31070454677356, 164.64382020950154, 159.25072343789694, 154.1237739582941, 149.2523423734724, 144.62330845424964, 140.22160193789725, 136.03075966712115, 132.0334739717031, 128.2121099593041, 124.54917343364332, 121.02771599070387, 117.63166892902494, 114.34610247992268, 111.15741115878716, 108.05342953299154, 105.02348529964627, 102.05839827811087, 99.15043483473872, 96.2932274998377, 93.48166925283026, 90.71179127995772, 87.98063207072214, 85.28610461483665, 82.62686726933406, 80.00220264707812, 77.41190768062567, 74.85619687825027, 72.33561974425099, 69.85099241194462, 67.4033427585858, 64.99386765564132, 62.62390056684976, 60.29488744281538, 58.00836876758526, 55.765965672074216, 53.56936821521469, 51.42032421335474, 49.32062733568564, 47.272103542678835, 45.276595294111615, 43.33594326834064, 41.45196559857767, 39.626434837203405, 37.86105300566186, 36.157425181406474, 34.517032125031044, 32.94120247235507, 31.431085020386895, 29.987621634139394, 28.611521302766914, 27.303235885308982, 26.06293811225619, 24.890502449117577, 23.78548947741619, 22.74713449699396, 21.774341085635214, 20.865680347833184, 20.019396522053672, 19.23341947531947, 18.505384383046056, 17.832658571432106, 17.212375106741145, 16.641472285389444, 16.116737759637882, 15.63485568067514, 15.192455004331102, 14.78615702001126, 14.412620243688405, 14.06858104905225, 13.750888763757782, 13.456534382720676, 13.182672496002152, 12.926636448279824, 12.685947104850717, 12.458315874475714, 12.24164282505084, 12.034010828330647, 11.833676696611242, 11.63906024314281, 11.448732125569828, 11.261401232919834, 11.075902263950626, 10.891184027275694, 10.706298877884386, 10.520393594203036, 10.332701896563762, 10.142538712498018, 9.949296206682414, 9.752441513537041, 9.551516038506579, 9.346136130380115, 9.135994872402554, 8.920864695387797, 8.70060048259048, 8.475142814615877, 8.244520993763107, 8.008855491209522, 7.768359477362901, 7.523339125335215, 7.274192419478279, 7.021406254793385, 6.765551678092814, 6.507277196954502, 6.247300166012792, 5.986396349276446, 5.725387848168602, 5.465129672963382, 5.206495314535355, 4.950361737807187, 4.697594262316995, 4.449031814435116, 4.205473027319289, 3.9676636284652247, 3.7362854930021494, 3.5119476583829465, 3.2951794993505916, 3.0864261586178996, 2.886046226349364, 2.694311567391444, 2.511409115015286, 2.3374443876713396, 2.172446442899063, 2.0163739601970248, 1.8691221408562169, 1.7305301248310447, 1.6003886492869097, 1.4784477068628128, 1.364424000358541, 1.2580080313083393, 1.1588707000921261, 1.0666693328438261, 0.9810530840540614, 0.9016676926155728, 0.8281595927918276, 0.760179400251952, 0.6973848072307122, 0.6394429305432856, 0.5860321622082946, 0.5368435754401648, 0.49158193937794387, 0.44996639469081634, 0.4117308396432764, 0.37662407274270926, 0.3444097340816529, 0.3148660832060009, 0.287785647004071, 0.2629747668783503, 0.24025307044313907, 0.2194528892593245, 0.20041864071468948, 0.18300618910249294, 0.16708219824418402, 0.15252348563284215, 0.13921638602275838, 0.1270561306335325, 0.11594624664620916, 0.10579798041729307, 0.09652974679498248, 0.08806660606554162 ], "yaxis": "y1", "zmax": 0.1, "zmin": -0.1 }, { "colorbar": { "title": "" }, "hoverinfo": "text", "legendgroup": "Optimum Ξ» =2.6e-01", "line": { "color": "rgba(204, 0, 0, 0.500)", "dash": "solid", "shape": "linear", "width": 0 }, "marker": { "color": "rgba(204, 0, 0, 0.500)", "line": { "color": "rgba(0, 0, 0, 1.000)", "width": 1 }, "size": 8, "symbol": "square" }, "mode": "lines+markers", "name": "Optimum Ξ» =2.6e-01", "showlegend": true, "text": [ null, null ], "type": "scatter", "x": [ 4.318063016848492, 4.318063016848492 ], "xaxis": "x1", "y": [ 11.448732125569828, 11.448732125569828 ], "yaxis": "y1", "zmax": 0.1, "zmin": -0.1 }, { "colorbar": { "title": "" }, "hoverinfo": "text", "legendgroup": "π•Ÿ = 𝓛𝓝 (N,Dβ‚˜,Οƒ)", "line": { "color": "rgba(0, 0, 0, 1.000)", "dash": "dash", "shape": "linear", "width": 3 }, "mode": "lines", "name": "π•Ÿ = 𝓛𝓝 (N,Dβ‚˜,Οƒ)", "showlegend": true, "text": [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ], "type": "scatter", "x": [ 974.2300074422972, 924.8777790796078, 878.3022423233351, 834.3436212985629, 792.8514102462476, 753.6837780585063, 716.7070084047862, 681.794976665845, 648.82866443098, 617.6957116850906, 588.2900060897667, 560.5113080225947, 534.2649093510768, 509.4613233392402, 486.0160026565918, 463.84908220201066, 442.88514337263206, 423.0529964868289, 404.2854782859637, 386.51926175900957, 369.69467592147345, 353.7555336003638, 338.6489656991283, 324.3252608153583, 310.7377094413168, 297.8424522814925, 285.5983324671729, 273.9667516352769, 262.91152997113426, 252.39877039877067, 242.3967271453097, 232.8756789164833, 223.807806905989, 215.16707782978452, 206.92913213370548, 199.07117747422072, 191.5718875218004, 184.41130608732757, 177.57075652638383, 171.032756335473, 164.78093681907924, 158.79996767718504, 153.07548633943986, 147.5940318542684, 142.34298312837987, 137.31050130383372, 132.48547605544417, 127.8574755902757, 123.41670013272517, 119.15393868268684, 115.0605288400696, 111.12831949607603, 107.3496361997837, 103.71724901739448, 100.22434271077135, 96.86448907135005, 93.6316212550282, 90.52000997305444, 87.52424140315749, 84.63919669409235, 81.86003294537788, 79.18216555220941, 76.60125181333468, 74.11317570706065, 71.71403374750426, 69.4001218397252, 67.16792305847886, 65.01409628102108, 62.93546560969987, 60.92901052499518, 58.99185671423943, 57.12126752548643, 55.314635999912895, 53.56947743975971, 51.883422472162415, 50.254210572305695, 48.67968401218209, 47.15778220385577, 45.686536408547845, 44.2640647850826, 42.88856775328229, 41.5583236497807, 40.27168465546106, 39.027072975318475, 37.82297725301488, 36.65794920374688, 35.53060045028754, 34.43959954820938, 33.38366918734747, 32.361583557531624, 31.372165867507626, 30.414286006792146, 29.48685834095925, 28.588839631557647, 27.719227072498136, 26.87705643534403, 26.06140031648462, 25.27136647967483, 24.506096287889644, 23.764763218871796, 23.046571459147206, 22.35075457164891, 21.676574232429235, 21.023319032251873, 20.39030333914617, 19.776866218272158, 19.18237040569398, 18.606201332887967, 18.047766199023688, 17.506493088254903, 16.981830129437565, 16.473244695863002, 15.98022264275112, 15.502267580393495, 15.0389001809726, 14.589657517208435, 14.154092431101269, 13.73177293114729, 13.322281616505862, 12.925215126690299, 12.540183615442425, 12.16681024753239, 11.804730717301567, 11.453592787837296, 11.113055849734524, 10.782790498461924, 10.46247812940795, 10.151810549737846 ], "xaxis": "x2", "y": [ 0.08054864120656324, 0.11991375962431002, 0.1764014168250416, 0.25644854182113835, 0.3684755527725724, 0.5233294039010472, 0.7347679236679115, 1.0199703320998168, 1.4000523146328483, 1.9005574973015593, 2.551891234662089, 3.3896579782627, 4.454860826227072, 5.793921761005809, 7.458483987724413, 9.50496387434145, 11.993829168917653, 14.988592039560677, 18.55451939588105, 22.757078048086633, 27.660147557107987, 33.324048108879424, 39.80344344760284, 47.145189001672634, 55.38620220213566, 64.55143522836511, 74.65202986369414, 85.68372988420677, 97.62561872442049, 110.43923952298067, 124.06814163549062, 138.4378829772818, 153.45650183057884, 169.01545572037824, 184.99100929803384, 201.24603847547007, 217.6322048484269, 233.99244316100865, 250.1636955196895, 265.9798194806528, 281.2745931235548, 295.8847388020062, 309.6528883495461, 322.4304159617321, 334.0800705427885, 344.47834671492666, 353.51754261264807, 361.10746266626325, 367.17673444577883, 371.67371991276883, 374.5670127479002, 375.84552444030135, 375.51817222774196, 373.6131914895937, 370.17710359320404, 365.27337731568116, 358.9808277268836, 351.39180087116256, 342.61019598633834, 332.74938000467915, 321.9300530756991, 310.2781315068153, 297.9227306418346, 284.99436280240684, 271.62352670802534, 257.93997126472533, 244.0730868421817, 230.154125158767, 216.3212709203313, 202.72894221871135, 189.56297616755762, 177.0633692849254, 165.55570906184712, 155.49102677171064, 147.49124880035424, 142.39367287461886, 141.2833202800446, 145.49758379880626, 156.5848916519165, 176.20011625818466, 205.92599121191813, 247.0227230907942, 300.1263763235681, 364.9372622548218, 439.95717359263136, 522.3425685023975, 607.9343107845693, 691.5009636825438, 767.1942871726745, 829.1699367136282, 872.2844792661493, 892.7534537119195, 888.6530019438147, 860.1721657570988, 809.5694664871836, 740.8447558236973, 659.1913791307106, 570.3314261416224, 479.8501895311997, 392.6338015049876, 312.48194286208565, 241.92547250887503, 182.2378144014915, 133.5978660941438, 95.34585244098876, 66.2721884844293, 44.88968982615086, 29.656168136485938, 19.132312453292947, 12.074797084685104, 7.47465876238402, 4.555818681816852, 2.7491188929161634, 1.6549190306504262, 1.0036970428454333, 0.6204108801517325, 0.3953255801514157, 0.2618734376323219, 0.18086677781151672, 0.12983222696386143, 0.09614484916444341, 0.07279901891210767, 0.05590717205315482, 0.04327481195139809, 0.033615706146040876, 0.02613210912010762, 0.020295177971251466, 0.01573138961842505 ], "yaxis": "y2", "zmax": 0.1, "zmin": -0.1 }, { "colorbar": { "title": "" }, "hoverinfo": "text", "legendgroup": "Ninv=(𝐀ᡀ𝐀+λ²𝐈)⁻¹(𝐀ᡀR-λ²𝐒⁻¹R)", "line": { "color": "rgba(204, 0, 0, 1.000)", "dash": "solid", "shape": "linear", "width": 1 }, "mode": "lines", "name": "Ninv=(𝐀ᡀ𝐀+λ²𝐈)⁻¹(𝐀ᡀR-λ²𝐒⁻¹R)", "showlegend": true, "text": [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ], "type": "scatter", "x": [ 974.2300074422972, 974.2300074422972, 924.8777790796078, 924.8777790796078, 878.3022423233351, 878.3022423233351, 834.3436212985629, 834.3436212985629, 792.8514102462476, 792.8514102462476, 753.6837780585063, 753.6837780585063, 716.7070084047862, 716.7070084047862, 681.794976665845, 681.794976665845, 648.82866443098, 648.82866443098, 617.6957116850906, 617.6957116850906, 588.2900060897667, 588.2900060897667, 560.5113080225947, 560.5113080225947, 534.2649093510768, 534.2649093510768, 509.4613233392402, 509.4613233392402, 486.0160026565918, 486.0160026565918, 463.84908220201066, 463.84908220201066, 442.88514337263206, 442.88514337263206, 423.0529964868289, 423.0529964868289, 404.2854782859637, 404.2854782859637, 386.51926175900957, 386.51926175900957, 369.69467592147345, 369.69467592147345, 353.7555336003638, 353.7555336003638, 338.6489656991283, 338.6489656991283, 324.3252608153583, 324.3252608153583, 310.7377094413168, 310.7377094413168, 297.8424522814925, 297.8424522814925, 285.5983324671729, 285.5983324671729, 273.9667516352769, 273.9667516352769, 262.91152997113426, 262.91152997113426, 252.39877039877067, 252.39877039877067, 242.3967271453097, 242.3967271453097, 232.8756789164833, 232.8756789164833, 223.807806905989, 223.807806905989, 215.16707782978452, 215.16707782978452, 206.92913213370548, 206.92913213370548, 199.07117747422072, 199.07117747422072, 191.5718875218004, 191.5718875218004, 184.41130608732757, 184.41130608732757, 177.57075652638383, 177.57075652638383, 171.032756335473, 171.032756335473, 164.78093681907924, 164.78093681907924, 158.79996767718504, 158.79996767718504, 153.07548633943986, 153.07548633943986, 147.5940318542684, 147.5940318542684, 142.34298312837987, 142.34298312837987, 137.31050130383372, 137.31050130383372, 132.48547605544417, 132.48547605544417, 127.8574755902757, 127.8574755902757, 123.41670013272517, 123.41670013272517, 119.15393868268684, 119.15393868268684, 115.0605288400696, 115.0605288400696, 111.12831949607603, 111.12831949607603, 107.3496361997837, 107.3496361997837, 103.71724901739448, 103.71724901739448, 100.22434271077135, 100.22434271077135, 96.86448907135005, 96.86448907135005, 93.6316212550282, 93.6316212550282, 90.52000997305444, 90.52000997305444, 87.52424140315749, 87.52424140315749, 84.63919669409235, 84.63919669409235, 81.86003294537788, 81.86003294537788, 79.18216555220941, 79.18216555220941, 76.60125181333468, 76.60125181333468, 74.11317570706065, 74.11317570706065, 71.71403374750426, 71.71403374750426, 69.4001218397252, 69.4001218397252, 67.16792305847886, 67.16792305847886, 65.01409628102108, 65.01409628102108, 62.93546560969987, 62.93546560969987, 60.92901052499518, 60.92901052499518, 58.99185671423943, 58.99185671423943, 57.12126752548643, 57.12126752548643, 55.314635999912895, 55.314635999912895, 53.56947743975971, 53.56947743975971, 51.883422472162415, 51.883422472162415, 50.254210572305695, 50.254210572305695, 48.67968401218209, 48.67968401218209, 47.15778220385577, 47.15778220385577, 45.686536408547845, 45.686536408547845, 44.2640647850826, 44.2640647850826, 42.88856775328229, 42.88856775328229, 41.5583236497807, 41.5583236497807, 40.27168465546106, 40.27168465546106, 39.027072975318475, 39.027072975318475, 37.82297725301488, 37.82297725301488, 36.65794920374688, 36.65794920374688, 35.53060045028754, 35.53060045028754, 34.43959954820938, 34.43959954820938, 33.38366918734747, 33.38366918734747, 32.361583557531624, 32.361583557531624, 31.372165867507626, 31.372165867507626, 30.414286006792146, 30.414286006792146, 29.48685834095925, 29.48685834095925, 28.588839631557647, 28.588839631557647, 27.719227072498136, 27.719227072498136, 26.87705643534403, 26.87705643534403, 26.06140031648462, 26.06140031648462, 25.27136647967483, 25.27136647967483, 24.506096287889644, 24.506096287889644, 23.764763218871796, 23.764763218871796, 23.046571459147206, 23.046571459147206, 22.35075457164891, 22.35075457164891, 21.676574232429235, 21.676574232429235, 21.023319032251873, 21.023319032251873, 20.39030333914617, 20.39030333914617, 19.776866218272158, 19.776866218272158, 19.18237040569398, 19.18237040569398, 18.606201332887967, 18.606201332887967, 18.047766199023688, 18.047766199023688, 17.506493088254903, 17.506493088254903, 16.981830129437565, 16.981830129437565, 16.473244695863002, 16.473244695863002, 15.98022264275112, 15.98022264275112, 15.502267580393495, 15.502267580393495, 15.0389001809726, 15.0389001809726, 14.589657517208435, 14.589657517208435, 14.154092431101269, 14.154092431101269, 13.73177293114729, 13.73177293114729, 13.322281616505862, 13.322281616505862, 12.925215126690299, 12.925215126690299, 12.540183615442425, 12.540183615442425, 12.16681024753239, 12.16681024753239, 11.804730717301567, 11.804730717301567, 11.453592787837296, 11.453592787837296, 11.113055849734524, 11.113055849734524, 10.782790498461924, 10.782790498461924, 10.46247812940795, 10.46247812940795, 10.151810549737846 ], "xaxis": "x2", "y": [ 0, 0, 0, 0.5379705559084277, 0.5379705559084277, 0.691519442856929, 0.691519442856929, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7.69937526023044, 7.69937526023044, 6.466638788733069, 6.466638788733069, 7.053276614294032, 7.053276614294032, 4.849909223420159, 4.849909223420159, 0, 0, 4.592876792444802, 4.592876792444802, 12.162660311241174, 12.162660311241174, 21.741031782720736, 21.741031782720736, 11.806251810925605, 11.806251810925605, 18.365553534132754, 18.365553534132754, 19.60622036918694, 19.60622036918694, 22.083611410018577, 22.083611410018577, 58.456529130604835, 58.456529130604835, 36.27351901675572, 36.27351901675572, 35.842782630110314, 35.842782630110314, 25.31243158533469, 25.31243158533469, 46.152399735195054, 46.152399735195054, 67.56936223296329, 67.56936223296329, 104.05482315377928, 104.05482315377928, 94.94318582898624, 94.94318582898624, 110.94614857939625, 110.94614857939625, 144.10987695686637, 144.10987695686637, 141.25096317402517, 141.25096317402517, 153.02495209900377, 153.02495209900377, 150.32615665012588, 150.32615665012588, 182.3633660926063, 182.3633660926063, 216.58249644974927, 216.58249644974927, 229.44444660577628, 229.44444660577628, 200.18301485422677, 200.18301485422677, 233.8242891732914, 233.8242891732914, 246.1708226268486, 246.1708226268486, 274.7216303385966, 274.7216303385966, 277.9425740197179, 277.9425740197179, 303.10216951627166, 303.10216951627166, 298.28254372886033, 298.28254372886033, 402.98297826929473, 402.98297826929473, 341.74818184472974, 341.74818184472974, 314.65326200298637, 314.65326200298637, 305.4831127188674, 305.4831127188674, 376.15298279134174, 376.15298279134174, 374.3983581815095, 374.3983581815095, 348.0420831882988, 348.0420831882988, 366.3722310740187, 366.3722310740187, 368.6140581323728, 368.6140581323728, 365.6293189389288, 365.6293189389288, 350.4399176192675, 350.4399176192675, 395.88256663382754, 395.88256663382754, 357.47983368921064, 357.47983368921064, 320.11544206214717, 320.11544206214717, 246.02022509788793, 246.02022509788793, 321.3627866452509, 321.3627866452509, 379.6369162056374, 379.6369162056374, 313.3787690140298, 313.3787690140298, 217.4836564693999, 217.4836564693999, 284.648066228939, 284.648066228939, 296.4749118222762, 296.4749118222762, 276.2376118158954, 276.2376118158954, 249.58601219633678, 249.58601219633678, 226.8082922676851, 226.8082922676851, 268.517955161255, 268.517955161255, 235.13086528884446, 235.13086528884446, 199.39808584354037, 199.39808584354037, 141.69221872029271, 141.69221872029271, 131.81299089738124, 131.81299089738124, 144.8668275699866, 144.8668275699866, 140.64602570849368, 140.64602570849368, 146.83099155542277, 146.83099155542277, 161.6842711550955, 161.6842711550955, 138.58477761200012, 138.58477761200012, 179.92058120452188, 179.92058120452188, 213.05648203413102, 213.05648203413102, 242.01401931331736, 242.01401931331736, 208.44115799998593, 208.44115799998593, 233.9818213304722, 233.9818213304722, 346.798117348257, 346.798117348257, 395.89784924552174, 395.89784924552174, 465.5437796475504, 465.5437796475504, 566.7136553091349, 566.7136553091349, 709.7143995201793, 709.7143995201793, 761.4160254301812, 761.4160254301812, 804.643907620788, 804.643907620788, 856.9866332363318, 856.9866332363318, 830.6652264542591, 830.6652264542591, 812.0725914580308, 812.0725914580308, 925.3400296770511, 925.3400296770511, 818.773750665867, 818.773750665867, 957.5587695659226, 957.5587695659226, 695.4794985861307, 695.4794985861307, 480.33219280945303, 480.33219280945303, 478.31265635655734, 478.31265635655734, 432.5037760401789, 432.5037760401789, 419.20250862107457, 419.20250862107457, 216.1485764417432, 216.1485764417432, 188.1637261180495, 188.1637261180495, 163.21626741233223, 163.21626741233223, 103.34835161489383, 103.34835161489383, 83.47775336663344, 83.47775336663344, 59.80597315653944, 59.80597315653944, 23.56389917091273, 23.56389917091273, 37.275648648864504, 37.275648648864504, 7.0748608593628814, 7.0748608593628814, 8.669471120716775, 8.669471120716775, 0, 0, 0, 0, 12.784354730202708, 12.784354730202708, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.2310963100109254e-05, 2.2310963100109254e-05, 1.697980251387138e-05, 1.697980251387138e-05, 0, 0, 0, 0 ], "yaxis": "y2", "zmax": 0.1, "zmin": -0.1 }, { "colorbar": { "title": "" }, "hoverinfo": "text", "legendgroup": "𝕣 = 𝐀*π•Ÿ+Ο΅", "line": { "color": "rgba(0, 0, 204, 1.000)", "dash": "solid", "shape": "linear", "width": 1 }, "mode": "lines", "name": "𝕣 = 𝐀*π•Ÿ+Ο΅", "showlegend": true, "text": [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ], "type": "scatter", "x": [ 974.2300074422972, 974.2300074422972, 924.8777790796078, 924.8777790796078, 878.3022423233351, 878.3022423233351, 834.3436212985629, 834.3436212985629, 792.8514102462476, 792.8514102462476, 753.6837780585063, 753.6837780585063, 716.7070084047862, 716.7070084047862, 681.794976665845, 681.794976665845, 648.82866443098, 648.82866443098, 617.6957116850906, 617.6957116850906, 588.2900060897667, 588.2900060897667, 560.5113080225947, 560.5113080225947, 534.2649093510768, 534.2649093510768, 509.4613233392402, 509.4613233392402, 486.0160026565918, 486.0160026565918, 463.84908220201066, 463.84908220201066, 442.88514337263206, 442.88514337263206, 423.0529964868289, 423.0529964868289, 404.2854782859637, 404.2854782859637, 386.51926175900957, 386.51926175900957, 369.69467592147345, 369.69467592147345, 353.7555336003638, 353.7555336003638, 338.6489656991283, 338.6489656991283, 324.3252608153583, 324.3252608153583, 310.7377094413168, 310.7377094413168, 297.8424522814925, 297.8424522814925, 285.5983324671729, 285.5983324671729, 273.9667516352769, 273.9667516352769, 262.91152997113426, 262.91152997113426, 252.39877039877067, 252.39877039877067, 242.3967271453097, 242.3967271453097, 232.8756789164833, 232.8756789164833, 223.807806905989, 223.807806905989, 215.16707782978452, 215.16707782978452, 206.92913213370548, 206.92913213370548, 199.07117747422072, 199.07117747422072, 191.5718875218004, 191.5718875218004, 184.41130608732757, 184.41130608732757, 177.57075652638383, 177.57075652638383, 171.032756335473, 171.032756335473, 164.78093681907924, 164.78093681907924, 158.79996767718504, 158.79996767718504, 153.07548633943986, 153.07548633943986, 147.5940318542684, 147.5940318542684, 142.34298312837987, 142.34298312837987, 137.31050130383372, 137.31050130383372, 132.48547605544417, 132.48547605544417, 127.8574755902757, 127.8574755902757, 123.41670013272517, 123.41670013272517, 119.15393868268684, 119.15393868268684, 115.0605288400696, 115.0605288400696, 111.12831949607603, 111.12831949607603, 107.3496361997837, 107.3496361997837, 103.71724901739448, 103.71724901739448, 100.22434271077135, 100.22434271077135, 96.86448907135005, 96.86448907135005, 93.6316212550282, 93.6316212550282, 90.52000997305444, 90.52000997305444, 87.52424140315749, 87.52424140315749, 84.63919669409235, 84.63919669409235, 81.86003294537788, 81.86003294537788, 79.18216555220941, 79.18216555220941, 76.60125181333468, 76.60125181333468, 74.11317570706065, 74.11317570706065, 71.71403374750426, 71.71403374750426, 69.4001218397252, 69.4001218397252, 67.16792305847886, 67.16792305847886, 65.01409628102108, 65.01409628102108, 62.93546560969987, 62.93546560969987, 60.92901052499518, 60.92901052499518, 58.99185671423943, 58.99185671423943, 57.12126752548643, 57.12126752548643, 55.314635999912895, 55.314635999912895, 53.56947743975971, 53.56947743975971, 51.883422472162415, 51.883422472162415, 50.254210572305695, 50.254210572305695, 48.67968401218209, 48.67968401218209, 47.15778220385577, 47.15778220385577, 45.686536408547845, 45.686536408547845, 44.2640647850826, 44.2640647850826, 42.88856775328229, 42.88856775328229, 41.5583236497807, 41.5583236497807, 40.27168465546106, 40.27168465546106, 39.027072975318475, 39.027072975318475, 37.82297725301488, 37.82297725301488, 36.65794920374688, 36.65794920374688, 35.53060045028754, 35.53060045028754, 34.43959954820938, 34.43959954820938, 33.38366918734747, 33.38366918734747, 32.361583557531624, 32.361583557531624, 31.372165867507626, 31.372165867507626, 30.414286006792146, 30.414286006792146, 29.48685834095925, 29.48685834095925, 28.588839631557647, 28.588839631557647, 27.719227072498136, 27.719227072498136, 26.87705643534403, 26.87705643534403, 26.06140031648462, 26.06140031648462, 25.27136647967483, 25.27136647967483, 24.506096287889644, 24.506096287889644, 23.764763218871796, 23.764763218871796, 23.046571459147206, 23.046571459147206, 22.35075457164891, 22.35075457164891, 21.676574232429235, 21.676574232429235, 21.023319032251873, 21.023319032251873, 20.39030333914617, 20.39030333914617, 19.776866218272158, 19.776866218272158, 19.18237040569398, 19.18237040569398, 18.606201332887967, 18.606201332887967, 18.047766199023688, 18.047766199023688, 17.506493088254903, 17.506493088254903, 16.981830129437565, 16.981830129437565, 16.473244695863002, 16.473244695863002, 15.98022264275112, 15.98022264275112, 15.502267580393495, 15.502267580393495, 15.0389001809726, 15.0389001809726, 14.589657517208435, 14.589657517208435, 14.154092431101269, 14.154092431101269, 13.73177293114729, 13.73177293114729, 13.322281616505862, 13.322281616505862, 12.925215126690299, 12.925215126690299, 12.540183615442425, 12.540183615442425, 12.16681024753239, 12.16681024753239, 11.804730717301567, 11.804730717301567, 11.453592787837296, 11.453592787837296, 11.113055849734524, 11.113055849734524, 10.782790498461924, 10.782790498461924, 10.46247812940795, 10.46247812940795, 10.151810549737846 ], "xaxis": "x3", "y": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0, 0, 0, 0, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0.12805122048819528, 0.12805122048819528, 0.19207683073229292, 0.19207683073229292, 0, 0, 0.12805122048819528, 0.12805122048819528, 0.19207683073229292, 0.19207683073229292, 0.38415366146458585, 0.38415366146458585, 0.19207683073229292, 0.19207683073229292, 0.38415366146458585, 0.38415366146458585, 0.44817927170868344, 0.44817927170868344, 0.38415366146458585, 0.38415366146458585, 1.5366146458583434, 1.5366146458583434, 0.8323329331732693, 0.8323329331732693, 0.8963585434173669, 0.8963585434173669, 0.704281712685074, 0.704281712685074, 1.2805122048819528, 1.2805122048819528, 1.7927170868347337, 1.7927170868347337, 2.7531012404961985, 2.7531012404961985, 2.4969987995198077, 2.4969987995198077, 3.073229291716687, 3.073229291716687, 4.097639055622249, 4.097639055622249, 4.033613445378151, 4.033613445378151, 4.417767106842737, 4.417767106842737, 4.481792717086835, 4.481792717086835, 5.378151260504201, 5.378151260504201, 6.2745098039215685, 6.2745098039215685, 6.594637855142056, 6.594637855142056, 6.018407362945178, 6.018407362945178, 7.362945178071229, 7.362945178071229, 7.6830732292917165, 7.6830732292917165, 8.579431772709084, 8.579431772709084, 8.771508603441376, 8.771508603441376, 9.475790316126451, 9.475790316126451, 9.21968787515006, 9.21968787515006, 11.972789115646258, 11.972789115646258, 10.500200080032013, 10.500200080032013, 10.180072028811525, 10.180072028811525, 10.500200080032013, 10.500200080032013, 11.65266106442577, 11.65266106442577, 11.204481792717086, 11.204481792717086, 10.756302521008402, 10.756302521008402, 11.588635454181672, 11.588635454181672, 11.39655862344938, 11.39655862344938, 11.076430572228892, 11.076430572228892, 10.628251300520208, 10.628251300520208, 11.65266106442577, 11.65266106442577, 10.692276910764306, 10.692276910764306, 9.795918367346939, 9.795918367346939, 8.1312525010004, 8.1312525010004, 9.411764705882353, 9.411764705882353, 10.116046418567427, 10.116046418567427, 8.451380552220888, 8.451380552220888, 6.786714685874349, 6.786714685874349, 8.1312525010004, 8.1312525010004, 7.7470988395358145, 7.7470988395358145, 6.914765906362545, 6.914765906362545, 6.530612244897959, 6.530612244897959, 5.890356142456983, 5.890356142456983, 6.2745098039215685, 6.2745098039215685, 5.378151260504201, 5.378151260504201, 4.673869547819128, 4.673869547819128, 3.713485394157663, 3.713485394157663, 3.3933573429371746, 3.3933573429371746, 3.329331732693077, 3.329331732693077, 3.009203681472589, 3.009203681472589, 3.009203681472589, 3.009203681472589, 3.2012805122048817, 3.2012805122048817, 2.6890756302521006, 2.6890756302521006, 3.2012805122048817, 3.2012805122048817, 3.5854341736694675, 3.5854341736694675, 3.9055622248899557, 3.9055622248899557, 3.3933573429371746, 3.3933573429371746, 3.713485394157663, 3.713485394157663, 5.122048819527811, 5.122048819527811, 5.506202480992397, 5.506202480992397, 6.210484193677471, 6.210484193677471, 7.298919567827131, 7.298919567827131, 8.771508603441376, 8.771508603441376, 9.091636654661864, 9.091636654661864, 9.411764705882353, 9.411764705882353, 9.859943977591037, 9.859943977591037, 9.347739095638255, 9.347739095638255, 8.835534213685474, 8.835534213685474, 9.667867146858743, 9.667867146858743, 8.195278111244498, 8.195278111244498, 9.347739095638255, 9.347739095638255, 6.722689075630252, 6.722689075630252, 4.673869547819128, 4.673869547819128, 4.545818327330932, 4.545818327330932, 3.9055622248899557, 3.9055622248899557, 3.5854341736694675, 3.5854341736694675, 1.8567426970788314, 1.8567426970788314, 1.6006402561024409, 1.6006402561024409, 1.3445378151260503, 1.3445378151260503, 0.8323329331732693, 0.8323329331732693, 0.6402561024409764, 0.6402561024409764, 0.44817927170868344, 0.44817927170868344, 0.19207683073229292, 0.19207683073229292, 0.25610244097639057, 0.25610244097639057, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0.06402561024409764, 0, 0, 0, 0, 0.06402561024409764, 0.06402561024409764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], "yaxis": "y3", "zmax": 0.1, "zmin": -0.1 } ], "layout": { "annotations": [], "height": 648, "legend": { "bgcolor": "rgba(255, 255, 255, 1.000)", "bordercolor": "rgba(0, 0, 0, 1.000)", "font": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 17 }, "tracegroupgap": 0, "x": 1, "y": 0.5 }, "margin": { "b": 20, "l": 0, "r": 0, "t": 20 }, "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "showlegend": true, "width": 864, "xaxis1": { "anchor": "y1", "domain": [ 0.15174897119341565, 1 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ -0.829695366183963, 1.0903393184021328 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "10^-0.5", "10^0.0", "10^0.5", "10^1.0" ], "tickvals": [ 0.31622776601683794, 1, 3.162277660168379, 10 ], "title": "𝐀*(π•Ÿ-𝕣)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "type": "log", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" }, "xaxis2": { "anchor": "y2", "domain": [ 0.15174897119341565, 0.49099794238683125 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ 0.9030899869919435, 3 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "10^1", "10^2", "10^3" ], "tickvals": [ 10, 100, 1000 ], "title": "Mobility Diameter (nm)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "type": "log", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" }, "xaxis3": { "anchor": "y3", "domain": [ 0.6607510288065843, 1 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ 0.9030899869919435, 3 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "10^1", "10^2", "10^3" ], "tickvals": [ 10, 100, 1000 ], "title": "Apparent +1 Mobility Diam. (nm)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "type": "log", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" }, "yaxis1": { "anchor": "x1", "domain": [ 0.6016317790523097, 0.9768518518518519 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ -1.1659452296123267, 2.7474507263944536 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "10^-1", "10^0", "10^1", "10^2" ], "tickvals": [ 0.1, 1, 10, 100 ], "title": "𝐈*(π•Ÿ-π•Ÿα΅’)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "type": "log", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" }, "yaxis2": { "anchor": "x2", "domain": [ 0.06608934685633423, 0.44130941965587633 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ -28.726763086977677, 986.2855326529003 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "0", "200", "400", "600", "800" ], "tickvals": [ 0, 200, 400, 600, 800 ], "title": "dN/dlnD (cm⁻³)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "type": "-", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" }, "yaxis3": { "anchor": "x3", "domain": [ 0.06608934685633423, 0.44130941965587633 ], "gridcolor": "rgba(0, 0, 0, 0.100)", "gridwidth": 0.5, "linecolor": "rgba(0, 0, 0, 1.000)", "mirror": false, "range": [ -0.35918367346938773, 12.331972789115646 ], "showgrid": true, "showline": true, "showticklabels": true, "tickangle": 0, "tickcolor": "rgb(0, 0, 0)", "tickfont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "tickmode": "array", "ticks": "inside", "ticktext": [ "0.0", "2.5", "5.0", "7.5", "10.0" ], "tickvals": [ 0, 2.5, 5, 7.5, 10 ], "title": "Concentration (cm⁻³)", "titlefont": { "color": "rgba(0, 0, 0, 1.000)", "family": "Nimbus Sans L", "size": 20 }, "type": "-", "visible": true, "zeroline": false, "zerolinecolor": "rgba(0, 0, 0, 1.000)" } } }, "image/svg+xml": [ "23456789123456789100.1251251025100251025100251000020040060080010251002510000.02.55.07.510.0L-curve Ξ» ∈ [1e-03 1e+01]Optimum Ξ» =2.6e-01π•Ÿ = 𝓛𝓝 (N,Dβ‚˜,Οƒ)N​inv​=(𝐀ᡀ𝐀+λ²𝐈)⁻¹(𝐀ᡀR-λ²𝐒⁻¹R)𝕣 = 𝐀*π•Ÿ+ϡ𝐀*(π•Ÿ-𝕣)Mobility Diameter (nm)Apparent +1 Mobility Diam. (nm)𝐈*(π•Ÿ-π•Ÿα΅’)dN/dlnD (cm⁻³)Concentration (cm⁻³)" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "figure(\"Nimbus Sans L\", 2, 6, 4.5, 10)\n", "\n", "p1 = plot(L1, L2, xaxis = :log10, yaxis = :log10, xlabel = \"𝐀*(π•Ÿ-𝕣)\", ylabel = \"𝐈*(π•Ÿ-π•Ÿα΅’)\", color = :black, \n", " label = \"L-curve\"*(@sprintf(\" Ξ» ∈ [%.0e %.0e]\", λ₁,Ξ»β‚‚)), bottom_margin = 50px)\n", "\n", "p1 = plot!([L1[ii], L1[ii]], [L2[ii], L2[ii]], marker = :square, color = RGBA(0.8,0,0,0.5), \n", " label = \"Optimum Ξ» =\"*(@sprintf(\"%.1e\", Ξ»opt)),lw = 0, ms = 4)\n", "\n", "p2 = plot(π•Ÿ.Dp, π•Ÿ.S, xaxis = :log10, xticks = [10, 100, 1000],left_margin = 65px, ylabel = \"dN/dlnD (cm⁻³)\", \n", " label = \"π•Ÿ = 𝓛𝓝 (N,Dβ‚˜,Οƒ)\", xlabel = \"Mobility Diameter (nm)\", xlim = (8,1000), ls = :dash, \n", " lw = 3, color = :black)\n", "\n", "p2 = plot!(π•Ÿα΅’β‚™α΅₯.Dp, π•Ÿα΅’β‚™α΅₯.S, color = RGBA(0.8,0,0,1), lt = :steppre, \n", " label = \"Ninv=(𝐀ᡀ𝐀+λ²𝐈)⁻¹(𝐀ᡀR-λ²𝐒⁻¹R)\", xlim = (8,1000))\n", "\n", "p3 = plot(𝕣.Dp, R, xaxis = :log10, xticks = [10, 100, 1000], lt = :steppre,\n", " label = \"𝕣 = 𝐀*π•Ÿ+Ο΅\", ylabel = \"Concentration (cm⁻³)\", xlim = (8,1000),\n", " color = RGBA(0,0,0.8,1), xlabel = \"Apparent +1 Mobility Diam. (nm)\", left_margin = 65px)\n", "\n", "plot(p1,p2,p3, layout = (l = @layout [a; b c]), right_margin = 0px, legend=:right, \n", " top_margin = 15px, fmt = :svg)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " Figure 3. Top: L-curve of $L_1$ vs. $L_2$ as defined in Block 4. The L-curve is computed from the interval [λ₁,Ξ»β‚‚] using the lcurve() function. The optimum $\\lambda_{opt}$ is determined from the interative algorithm lcorner(). Bottom left: dashed line is the input size distribution (as in Figure 1). Red line is the regularized inverse of the noisy response function shown in the bottom right (as in Figure 2). " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Summary and Conclusions\n", "Figure 3 shows that the algorithm is able to correctly invert noisy data. This notebook can be used to test the algorithm over a wide range of conditions, including DMA flow ratios, input aerosol size distribution, scan rates, and bin density. Semi-systematic testing with this notebook can be used to convince oneself that the method is robust. The optimum regularization parameter $\\lambda_{opt}$ (and thus solution) can be found within ~0.5-1s for a 128 bin grid (depending on computer speed and number of processes running). " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## References\n", "\n", "Hansen, P. C. (2000) The L-Curve and its Use in the Numerical Treatment of Inverse Problems, in Computational Inverse Problems in Electrocardiology, ed. P. Johnston, Advances in Computational Bioengineering, 119-142, WIT Press.
\n", "\n", "Kandlikar, M., & Ramachandran, G. (1999) Inverse methods for analysing aerosol spectrometer measurements: A critical review. Journal of Aerosol Science, 30(4), 413-437, DOI: 10.1016/S0021-8502(98)00066-4.
\n", "\n", "Reineking, A. & J. PorstendΓΆrfer (1986) Measurements of Particle Loss Functions in a Differential Mobility Analyzer (TSI, Model 3071) for Different Flow Rates, Aerosol Science and Technology, 5:4, 483-486, DOI: 10.1080/02786828608959112.
\n", "\n", "Talukdar, Suddha S. & Mark T. Swihart (2010) An Improved Data Inversion Program for Obtaining Aerosol Size Distributions from Scanning Differential Mobility Analyzer Data, Aerosol Science and Technology, 37:2, 145-161, DOI: 10.1080/02786820300952.
\n", "\n", "Twomey, S. (1963) On the numerical solution of Fredholm integral equations of the first kind by inversion of the linear system produced by quadrature, Journal of the ACM, 19(1963), 97–101, DOI:0.1145/321150.321157.
" ] } ], "metadata": { "kernelspec": { "display_name": "Julia 1.1.0", "language": "julia", "name": "julia-1.1" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.1.0" } }, "nbformat": 4, "nbformat_minor": 2 }