text:
### A Pluto.jl notebook ###
# v0.16.1

using Markdown
using InteractiveUtils

# ╔═╡ dcb245de-bc64-4892-a542-faaf9b6d7303
# setup the Julia environment -
begin
	using ImageIO
	using FileIO
	using Images
	using Plots
	using ImageMagick
	using LinearAlgebra
	using Optim
	using PlutoUI
end

# ╔═╡ ce580d07-e462-4c11-8cd6-b314f3ea13af
PlutoUI.LocalResource("./figs/Reactor.png")

# ╔═╡ c38c856c-153d-11ec-0945-f7587b6f2699
md"""
#### Example: Steady-state concentration balances

Consider a reactor in which enzyme $E$ catalyzes the conversion of some substrate $S$ (starting material) to a product $P$ at a rate $\hat{r}_{1}$ (units: mmol/L-time). Enzyme $E$, which is not stable, degrades in the reactor at rate $r_{2}$ (units: mmol/L-time). Susbtrate $S$ is introduced into the reactor in stream 1, while enzyme $E$ is introduced in stream 2. Lastly, unreacted subrate $S$, enzyme $E$ and product $P$ leave the reactor in stream 3.

Let the concentrations of $S$ be given by $C_{1}$ (units: mmol/L), the enzyme $E$ by $C_{2}$ (units: mmol/L) and the product $P$ by $C_{3}$ (units: mmol/L). Then, the kinetic expression for reaction $\hat{r}_{1}$ is given by:

$$\hat{r}_{1} = k_{cat}E\left(\frac{C_{1}}{K+C_{1}}\right)$$

where $k_{cat}$ denotes the turnover number (catalytic rate constant with units 1/time) for the enzyme $E$ and substate $S$, and $K$ denotes the saturation constant for enzyme $E$ and substrate $S$ (units: concentration). The rate of degradation of enzyme $E$ is assumed to be first-order with rate:

$$\hat{r}_{2} = k_{d}E$$

where $k_{d}$ denotes the degradation constant for enzyme $E$ (units: 1/time).

__Estimate the composition of stream 3.__

###### Assumptions

* Reactor is at steady-state and well-mixed
* Reactor is at a constant T, P and V
* Density of stream 1, 2 and 3 is constant and equal to water at T and P.

###### Problem setup
The volume of the reactor $V$ = 30$\mu$L. Stream 1 has a volumetric flow rate $F_{1}$ = 10$\mu$L/h and Stream 2 has a volumetric flow rate $F_{2}$ = 5$\mu$L/h. The concentration(s) of susbstrate in the stream 1 is $C_{1,1}$ = 10 mmol/L, enzyme $E$ in stream 2 is $C_{2,2}$ = 2.0 mmol/L. The turnover number of enzyme $E$ is give by $k_{cat}$ = 16.2 s$^{-1}$, the saturation coefficient $K$ = 5 mmol/L and degradation constant $k_{d}$ = 0.1 h$^{-1}$.
"""

# ╔═╡ 2baefe3c-f9d1-4851-85e8-2f81d49f60c6

# ╔═╡ 61f56a22-d722-41a7-b371-06058bfd5da5
md"""

##### Steady-state concentration balance equations

Let's start with the steady-state concetration balances that we developed last time from your notes, and model the composition of the output stream (concentration of $S$, $E$ and $P$).

Concentration balances:

$$\sum_{s~=~1}^{\mathcal{S}}v_{s}D_{s}C_{k,s} + \sum_{r~=~1}^{\mathcal{R}}\sigma_{kr}\hat{r}_{r} + \sum_{j~=~1}^{\mathcal{T}}\tau_{kj}q_{j}X = 0\qquad{k=1,2,\cdots, \mathcal{M}}$$

We have three streams so $\mathcal{S}$=3, three chemical components $\mathcal{M}$=3, two _bulk phase_ reactions so $\mathcal{R}$ = 2, and no cells ($\mathcal{T}$ = 0). Thus, we have three equations of the form:

$$\sum_{s~=~1}^{3}v_{s}D_{s}C_{k,s} + \sum_{r~=~1}^{2}\sigma_{kr}\hat{r}_{r} = 0\qquad{k=1,2, 3}$$

__Hmmm.__ We can't solve this problem now.

* Issue 1: We don't have equations for $C_{1}$, $C_{2}$ and $C_{3}$. These terms appear in the kinetics, but nowhere else. What do we do?
* Issue 2: How we calculate $D_{3}$?
* Issue 3: The kinetics are non-linear. How do we handle that?
"""

# ╔═╡ cb4478c2-ca0a-40bb-bb9f-cd4e0437381e
md"""
###### Issue 1: $C_{1}$, $C_{2}$ and $C_{3}$. What can we do?

The well mixed assumption allows us to say that the concentration inside the reactor i.e., $C_{1}$, $C_{2}$ and $C_{3}$ is approximately the same as the concentration in the exit streams. Thus:

$$C_{i}\simeq C_{i3}\qquad{i=1,2,3}$$
"""

# ╔═╡ e78f1041-4259-491f-86d4-1f7d6ced4f15
md"""

###### Issue 2: How do we calculate $D_{3}$?

Let's start from the steady-state total mass balance:

$$\sum_{s=1}^{\mathcal{S}}v_{s}\dot{m}_{s} = 0$$

However, from the definition of density $\rho$ (units: mass/volume) we know that: $\dot{m}_{s} = \rho_{s}\dot{V}_{s}$
where $\dot{V}_{s}$ is another representation of the volumetric flow rate of stream $s$ (units: volume/time).
Plugging $\dot{m}_{s}$ (in terms of the density and volumetric flow rate) into the total mass balance gives:

$$\sum_{s=1}^{\mathcal{S}}v_{s}\rho_{s}\dot{V}_{s} = 0$$

However, from the problem statement we know that $\rho_{1}\simeq\rho_{2}\simeq\rho_{3}\equiv\rho$.
Thus, we can divide out the density to give:

$$\sum_{s=1}^{\mathcal{S}}v_{s}\dot{V}_{s} = 0$$

This equation is referred to as a _volume balance_ but it's just another form of the total mass balance (given the assumption of constant density). Dividing the steady-state volume balance by the reactor volume $V$ gives:

$$\sum_{s=1}^{\mathcal{S}}v_{s}D_{s} = 0$$

which we can use to estimate $D_{3}$:

$$D_{1}+D_{2} = D_{3}$$

###### Aside: How good is the constant density assumption?
In liquids, the constant density assumption is sometimes reasonable, however, for gasses the validity of this assumption needs to rigorously confirmed.

"""

# ╔═╡ f954ba83-d8a5-4ef0-b84e-e513e95dbb0f
md"""
###### Issue 3: We have a set of non-linear algebraic equations. How can we solve these?

How can we turn a currently unsolvable problem into a problem that we can solve?
"""

# ╔═╡ 777bae38-20e6-4956-a0c9-6245aae429b4
md"""
#### Turn that frown upside down: approximate methods to solve for the exit compostion
"""

# ╔═╡ 5852e1da-8b57-40a4-9f93-2c2b40dd101a
md"""

###### Method 1: The $C_{1}\gg{K}$ case

If $C_{1}\gg{K}$, then $\hat{r}_{1}$ becomes linear:

$$\hat{r}_{1}\simeq k_{cat}C_{2}$$

which means we can write the concetration balances (in matrix vector form) as:

$\begin{pmatrix}
-D_{3} & -k_{cat} & 0 \\
0 & -\left(D_{3}+k_{d}\right) & 0 \\
0 & k_{cat} & -D_{3}
\end{pmatrix}
\begin{pmatrix}
C_{1} \\
C_{2} \\
C_{3}
\end{pmatrix} = -
\begin{pmatrix}
D_{1}C_{11} \\
D_{2}C_{22} \\
0
\end{pmatrix}$

This linear system of equations is in the form: $\mathbf{A}\mathbf{x} = \mathbf{b}$. Thus, we can solve for the unknown composition vector by computing the inverse of the $\mathbf{A}$ matrix or:

$$\mathbf{x} = \mathbf{A}^{-1}\mathbf{b}$$
"""

# ╔═╡ e3fd51c5-f8c0-4c64-af7e-a0b6943a62a3
begin

	# initialize -
	parameter_dict = Dict{String,Any}()

	# Problem parameters (make sure we have the correct units!)
	F1 = 10.0 			# units: μL/hr
	F2 = 5.0 			# units: μL/hr
	V = 30.0 			# units: μL
	kd = 0.10   		# units: hr^-1
	kcat = 16.2*(3600) 	# units: hr^-1
	K = 5.0 			# units: mmol/L

	# Setup the dilution D1, D2 and D3 -
	D1 = (F1/V) 		# units: hr^-1
	D2 = (F2/V) 		# units: hr^-1
	D3 = D1 + D2 		# units: hr^-1

	# What is C11 and C12?
	C11 = 10.0 			# units: mmol/L
	C22 = 2.0 			# units: mmol/L

	# package the parameters -
	parameter_dict["F1"] = F1
	parameter_dict["F2"] = F2
	parameter_dict["V"] = V
	parameter_dict["kd"] = kd
	parameter_dict["kcat"] = kcat
	parameter_dict["K"] = K
	parameter_dict["D1"] = D1
	parameter_dict["D2"] = D2
	parameter_dict["D3"] = D3
	parameter_dict["C11"] = C11
	parameter_dict["C22"] = C22

	# return -
	nothing
end

# ╔═╡ 204fa395-1288-4dcd-90f9-16eaca2c7f07
begin

	# setup A1 -
	A1 = [-D3 -kcat 0 ; 0 -(D3+kd) 0 ; 0 kcat -D3]

	# setup bV1 -
	bV1 = [-D1*C11 ; -D2*C22 ; 0]

	# return -
	nothing
end

# ╔═╡ efacdd42-3564-4788-82a8-eec6d1dee154
# compute the output composition?
c_out_1 = inv(A1)*bV1

# ╔═╡ fc2dc16e-495a-4fd9-a9f7-859583d959d4
# check:
I = inv(A1)*A1

# ╔═╡ bf5521d9-192f-4378-9cbc-270142ab689b
A1

# ╔═╡ e58faa37-938c-4475-9a73-fd5922da721f
md"""

##### Method 2: Taylor expansion of $\hat{r}_{1}$ around some point $x^{\star}$ = ($C^{\star}_{1}$, $C^{\star}_{2}$)

The Taylor expansion of $\hat{r}_{1}$ is given by:

$$\hat{r}_{1}\simeq \hat{r}_{1}\left(x^{\star}\right)+
\left(\frac{\partial{\hat{r}_{1}}}{\partial C_{1}}\right)\Bigg\vert_{x^{\star}}\left(C_{1} - C^{\star}_{1} \right) +
\left(\frac{\partial{\hat{r}_{1}}}{\partial C_{2}}\right)\Bigg\vert_{x^{\star}}\left(C_{2} - C^{\star}_{2} \right) + H.O.T $$

where the derivative(s) are evaluated at $x^{\circ}$:

$$a = \left(\frac{\partial{\hat{r}_{1}}}{\partial C_{1}}\right)\Bigg\vert_{x^{\star}} = \frac{k_{cat}C^{\star}_{2}K}{\left(K+C^{\star}_{1}\right)^2}$$

and:

$$b = \left(\frac{\partial{\hat{r}_{1}}}{\partial C_{2}}\right)\Bigg\vert_{x^{\star}} = \frac{k_{cat}C^{\star}_{1}}{\left(K+C^{\star}_{1}\right)}$$

Substituting the Taylor expansion of $\hat{r}_{1}$ into the concentration balance and re-writing the system in matrix-vector form
gives:

$\begin{pmatrix}
-(D_{3} + a) & -b & 0 \\
0 & -\left(D_{3}+k_{d}\right) & 0 \\
a & b & -D_{3}
\end{pmatrix}
\begin{pmatrix}
C_{1} \\
C_{2} \\
C_{3}
\end{pmatrix} =
\begin{pmatrix}
-D_{1}C_{11} + \hat{r}^{\star}_{1} - aC^{\star}_{1} - bC^{\star}_{2} \\
-D_{2}C_{22} \\
-\hat{r}^{\star}_{1} + aC^{\star}_{1} + bC^{\star}_{2}
\end{pmatrix}$
"""

# ╔═╡ eecc36b0-366f-469b-8743-f9f96a5f6e6c
# select a point to linearize around -
x = (0.001,0.5)

# ╔═╡ 543959b5-2646-4fa8-9b76-27d24adaa7ac
begin

	# compute r1star
	r1 = kcat*(x[2])*(x[1]/(K+x[1]))

	# compute a and b -
	a = (kcat*x[2]*K)/((K+x[1])^2)

	# compute b -
	b = (kcat*x[1])/(K+x[1])

	# Setup A2 -
	A2 = [-(D3+a) -b 0 ; 0 -(D3+kd) 0 ; a b -D3]

	# setup bV2 -
	bV2 = [-D1*C11+r1-a*x[1]-b*x[2] ; -D2*C22 ; -r1+a*x[1]+b*x[2]]

	# return -
	nothing
end

# ╔═╡ 453cc1b5-ab5a-4ed0-b126-9123601aaaa9
# compute the exit composition -
c_out_2 = inv(A2)*bV2

# ╔═╡ 60acab50-aa82-4622-ba02-db02282a2ed0
md"""

##### Method 3: Optimization approach: Nelder-Mead Method

The last approach (and the method most commonly used in practice) is to recast the problem of estimating the unknown exit composition as an _optimization problem_. In this case, we iteratively make a solution guess, test how good this guess is by computing the squared error using an _objective function_, and then use this error to inform our next guess of the solution. How the error is used to generate a new guess depends upon the _optimization algorithm_ (of which there is a huge number).

In this case, let's use the $\texttt{Optim}$ package of Julia which encodes many optimization algorithm, and particularly the [Nelder-Mead](https://en.wikipedia.org/wiki/Nelder–Mead_method) algorithm which is a common direct (derivative free) approach for solving unconstrained optimization problems.

"""

# ╔═╡ 45c480f6-2b41-4075-b764-d1f6a71fc0f9
begin

	"""
		compute_soln_error(soln_array::Array{Float64,1}, parameters::Dict{String,Any}) -> Array{Float64,1}
	"""
	function compute_soln_error(soln_array::Array{Float64,1}, parameters::Dict{String,Any})::Array{Float64,1}

		try

			# Get parameters from the Dict -
			F1 = parameters["F1"]
			F2 = parameters["F2"]
			V = parameters["V"]
			kd = parameters["kd"]
			kcat = parameters["kcat"]
			K = parameters["K"]
			D1 = parameters["D1"]
			D2 = parameters["D2"]
			D3 = parameters["D3"]
			C11 = parameters["C11"]
			C22 = parameters["C22"]

 			# Alias the soln -
			C1 = soln_array[1]
			C2 = soln_array[2]
			C3 = soln_array[3]

 			# compute r1 and r2 -
			r1 = kcat*C2*(C1/(K+C1))
			r2 = kd*C2

 			# setup A matrix and bV -
			AM = [-D3 0 0; 0 -D3 0; 0 0 -D3]
			bV = [D1*C11-r1; D2*C22-r2; r1]

 			# compute the error -
			error_array = AM*soln_array + bV

			# return -
			return error_array
		catch error
			rethrow()
		end
	end

	# return -
	nothing
end

# ╔═╡ cd7176c0-a8be-4982-b31d-2674fe20e84c
# compue the soln error -
soln_error_1 = compute_soln_error(c_out_1, parameter_dict)

# ╔═╡ 3fc4c269-2a2c-445e-8786-4b56fa60b80f
# compue the soln error -
soln_error = compute_soln_error(c_out_2, parameter_dict)

# ╔═╡ 5687b01f-2ace-4a80-9b3c-9e881f89eaf3
begin

	function objective_function(state_array, parameters)::Float64

		# compute the soln error -
		soln_error_array = compute_soln_error(state_array, parameters)

		# return -
		return transpose(soln_error_array)*soln_error_array
	end

	# return -
	nothing
end

# ╔═╡ 73a5e9c2-58c9-428c-8f03-17561d7630f6
begin
	# using optim -

	# Use the answer from Method 2 as a starting point
	xinitial = [0.01, 0.1, 1.0]

	# setup the objective function -
	OF(p) = objective_function(p,parameter_dict)

    # call the optimizer -
    opt_result = optimize(OF,xinitial,NelderMead())
end

# ╔═╡ f5022387-72e1-4262-94ad-3bffd4010ae2
nm_soln = Optim.minimizer(opt_result)

# ╔═╡ 075683a3-3c19-4edd-9a21-a93f1d31e9bf
nm_error_check = compute_soln_error(nm_soln, parameter_dict)

# ╔═╡ 1e3fa40e-19f2-4c97-8353-1705a266ee5e
html"""<style>
main {
    max-width: 1200px;
  	width: 80%;
	margin: auto;
	font-family: "Roboto, monospace";
}

a {
	color: blue;
	text-decoration: none;
}

.H1 {
    padding: 0px 30px;
}
</style>
"""

# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"

[compat]
FileIO = "~1.11.1"
ImageIO = "~0.5.8"
ImageMagick = "~1.2.1"
Images = "~0.24.1"
Optim = "~1.4.1"
Plots = "~1.21.3"
PlutoUI = "~0.7.12"
"""

# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised

[[AbstractFFTs]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "485ee0867925449198280d4af84bdb46a2a404d0"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "1.0.1"

[[Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "84918055d15b3114ede17ac6a7182f68870c16f7"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "3.3.1"

[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"

[[ArrayInterface]]
deps = ["IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"]
git-tree-sha1 = "d84c956c4c0548b4caf0e4e96cf5b6494b5b1529"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "3.1.32"

[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[AxisAlgorithms]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"]
git-tree-sha1 = "a4d07a1c313392a77042855df46c5f534076fab9"
uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950"
version = "1.0.0"

[[AxisArrays]]
deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"]
git-tree-sha1 = "d127d5e4d86c7680b20c35d40b503c74b9a39b5e"
uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
version = "0.4.4"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.8+0"

[[CEnum]]
git-tree-sha1 = "215a9aa4a1f23fbd05b92769fdd62559488d70e9"
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
version = "0.4.1"

[[Cairo_jll]]
deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "f2202b55d816427cd385a9a4f3ffb226bee80f99"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
version = "1.16.1+0"

[[CatIndices]]
deps = ["CustomUnitRanges", "OffsetArrays"]
git-tree-sha1 = "a0f80a09780eed9b1d106a1bf62041c2efc995bc"
uuid = "aafaddc9-749c-510e-ac4f-586e18779b91"
version = "0.2.2"

[[ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "4ce9393e871aca86cc457d9f66976c3da6902ea7"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.4.0"

[[ColorSchemes]]
deps = ["ColorTypes", "Colors", "FixedPointNumbers", "Random"]
git-tree-sha1 = "9995eb3977fbf67b86d0a0a0508e83017ded03f2"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.14.0"

[[ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
git-tree-sha1 = "024fe24d83e4a5bf5fc80501a314ce0d1aa35597"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.11.0"

[[ColorVectorSpace]]
deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"]
git-tree-sha1 = "a66a8e024807c4b3d186eb1cab2aff3505271f8e"
uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4"
version = "0.9.6"

[[Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.8"

[[CommonSubexpressions]]
deps = ["MacroTools", "Test"]
git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7"
uuid = "bbf7d656-a473-5ed7-a52c-81e309532950"
version = "0.3.0"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "4866e381721b30fac8dda4c8cb1d9db45c8d2994"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.37.0"

[[CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"

[[ComputationalResources]]
git-tree-sha1 = "52cb3ec90e8a8bea0e62e275ba577ad0f74821f7"
uuid = "ed09eef8-17a6-5b46-8889-db040fac31e3"
version = "0.3.2"

[[Contour]]
deps = ["StaticArrays"]
git-tree-sha1 = "9f02045d934dc030edad45944ea80dbd1f0ebea7"
uuid = "d38c429a-6771-53c6-b99e-75d170b6e991"
version = "0.5.7"

[[CoordinateTransformations]]
deps = ["LinearAlgebra", "StaticArrays"]
git-tree-sha1 = "6d1c23e740a586955645500bbec662476204a52c"
uuid = "150eb455-5306-5404-9cee-2592286d6298"
version = "0.6.1"

[[CustomUnitRanges]]
git-tree-sha1 = "1a3f97f907e6dd8983b744d2642651bb162a3f7a"
uuid = "dc8bdbbb-1ca9-579f-8c36-e416f6a65cce"
version = "1.0.2"

[[DataAPI]]
git-tree-sha1 = "bec2532f8adb82005476c141ec23e921fc20971b"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.8.0"

[[DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "7d9d316f04214f7efdbb6398d545446e246eff02"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.10"

[[DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[DiffResults]]
deps = ["StaticArrays"]
git-tree-sha1 = "c18e98cba888c6c25d1c3b048e4b3380ca956805"
uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
version = "1.0.3"

[[DiffRules]]
deps = ["NaNMath", "Random", "SpecialFunctions"]
git-tree-sha1 = "3ed8fa7178a10d1cd0f1ca524f249ba6937490c0"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "1.3.0"

[[Distances]]
deps = ["LinearAlgebra", "Statistics", "StatsAPI"]
git-tree-sha1 = "9f46deb4d4ee4494ffb5a40a27a2aced67bdd838"
uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
version = "0.10.4"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "a32185f5428d3986f47c2ab78b1f216d5e6cc96f"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.5"

[[Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[[EarCut_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d"
uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5"
version = "2.2.3+0"

[[EllipsisNotation]]
deps = ["ArrayInterface"]
git-tree-sha1 = "8041575f021cba5a099a456b4163c9a08b566a02"
uuid = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
version = "1.1.0"

[[Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b3bfd02e98aedfa5cf885665493c5598c350cd2f"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.2.10+0"

[[FFMPEG]]
deps = ["FFMPEG_jll"]
git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8"
uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
version = "0.4.1"

[[FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "d8a578692e3077ac998b50c0217dfd67f21d1e5f"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.0+0"

[[FFTViews]]
deps = ["CustomUnitRanges", "FFTW"]
git-tree-sha1 = "70a0cfd9b1c86b0209e38fbfe6d8231fd606eeaf"
uuid = "4f61f5a4-77b1-5117-aa51-3ab5ef4ef0cd"
version = "0.3.1"

[[FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
git-tree-sha1 = "463cb335fa22c4ebacfd1faba5fde14edb80d96c"
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
version = "1.4.5"

[[FFTW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "3676abafff7e4ff07bbd2c42b3d8201f31653dcc"
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
version = "3.3.9+8"

[[FileIO]]
deps = ["Pkg", "Requires", "UUIDs"]
git-tree-sha1 = "3c041d2ac0a52a12a27af2782b34900d9c3ee68c"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.11.1"

[[FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "caf289224e622f518c9dbfe832cdafa17d7c80a6"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.12.4"

[[FiniteDiff]]
deps = ["ArrayInterface", "LinearAlgebra", "Requires", "SparseArrays", "StaticArrays"]
git-tree-sha1 = "8b3c09b56acaf3c0e581c66638b85c8650ee9dca"
uuid = "6a86dc24-6348-571c-b903-95158fe2bd41"
version = "2.8.1"

[[FixedPointNumbers]]
deps = ["Statistics"]
git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc"
uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.8.4"

[[Fontconfig_jll]]
deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03"
uuid = "a3f928ae-7b40-5064-980b-68af3947d34b"
version = "2.13.93+0"

[[Formatting]]
deps = ["Printf"]
git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8"
uuid = "59287772-0a20-5a39-b81b-1366585eb4c0"
version = "0.4.2"

[[ForwardDiff]]
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "NaNMath", "Printf", "Random", "SpecialFunctions", "StaticArrays"]
git-tree-sha1 = "b5e930ac60b613ef3406da6d4f42c35d8dc51419"
uuid = "f6369f11-7733-5829-9624-2563aa707210"
version = "0.10.19"

[[FreeType2_jll]]
deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9"
uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7"
version = "2.10.4+0"

[[FriBidi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91"
uuid = "559328eb-81f9-559d-9380-de523a88c83c"
version = "1.0.10+0"

[[GLFW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"]
git-tree-sha1 = "dba1e8614e98949abfa60480b13653813d8f0157"
uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89"
version = "3.3.5+0"

[[GR]]
deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "Serialization", "Sockets", "Test", "UUIDs"]
git-tree-sha1 = "182da592436e287758ded5be6e32c406de3a2e47"
uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
version = "0.58.1"

[[GR_jll]]
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "ef49a187604f865f4708c90e3f431890724e9012"
uuid = "d2c73de3-f751-5644-a686-071e5b155ba9"
version = "0.59.0+0"

[[GeometryBasics]]
deps = ["EarCut_jll", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"]
git-tree-sha1 = "58bcdf5ebc057b085e58d95c138725628dd7453c"
uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
version = "0.4.1"

[[Gettext_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"]
git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046"
uuid = "78b55507-aeef-58d4-861c-77aaff3498b1"
version = "0.21.0+0"

[[Glib_jll]]
deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "7bf67e9a481712b3dbe9cb3dac852dc4b1162e02"
uuid = "7746bdde-850d-59dc-9ae8-88ece973131d"
version = "2.68.3+0"

[[Graphics]]
deps = ["Colors", "LinearAlgebra", "NaNMath"]
git-tree-sha1 = "2c1cf4df419938ece72de17f368a021ee162762e"
uuid = "a2bd30eb-e257-5431-a919-1863eab51364"
version = "1.1.0"

[[Graphite2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011"
uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472"
version = "1.3.14+0"

[[Grisu]]
git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2"
uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe"
version = "1.0.2"

[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
git-tree-sha1 = "60ed5f1643927479f845b0135bb369b031b541fa"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.9.14"

[[HarfBuzz_jll]]
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"]
git-tree-sha1 = "8a954fed8ac097d5be04921d595f741115c1b2ad"
uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566"
version = "2.8.1+0"

[[HypertextLiteral]]
git-tree-sha1 = "72053798e1be56026b81d4e2682dbe58922e5ec9"
uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2"
version = "0.9.0"

[[IOCapture]]
deps = ["Logging", "Random"]
git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a"
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
version = "0.2.2"

[[IdentityRanges]]
deps = ["OffsetArrays"]
git-tree-sha1 = "be8fcd695c4da16a1d6d0cd213cb88090a150e3b"
uuid = "bbac6d45-d8f3-5730-bfe4-7a449cd117ca"
version = "0.3.1"

[[IfElse]]
git-tree-sha1 = "28e837ff3e7a6c3cdb252ce49fb412c8eb3caeef"
uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
version = "0.1.0"

[[ImageAxes]]
deps = ["AxisArrays", "ImageCore", "Reexport", "SimpleTraits"]
git-tree-sha1 = "794ad1d922c432082bc1aaa9fa8ffbd1fe74e621"
uuid = "2803e5a7-5153-5ecf-9a86-9b4c37f5f5ac"
version = "0.6.9"

[[ImageContrastAdjustment]]
deps = ["ColorVectorSpace", "ImageCore", "ImageTransformations", "Parameters"]
git-tree-sha1 = "2e6084db6cccab11fe0bc3e4130bd3d117092ed9"
uuid = "f332f351-ec65-5f6a-b3d1-319c6670881a"
version = "0.3.7"

[[ImageCore]]
deps = ["AbstractFFTs", "Colors", "FixedPointNumbers", "Graphics", "MappedArrays", "MosaicViews", "OffsetArrays", "PaddedViews", "Reexport"]
git-tree-sha1 = "db645f20b59f060d8cfae696bc9538d13fd86416"
uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534"
version = "0.8.22"

[[ImageDistances]]
deps = ["ColorVectorSpace", "Distances", "ImageCore", "ImageMorphology", "LinearAlgebra", "Statistics"]
git-tree-sha1 = "6378c34a3c3a216235210d19b9f495ecfff2f85f"
uuid = "51556ac3-7006-55f5-8cb3-34580c88182d"
version = "0.2.13"

[[ImageFiltering]]
deps = ["CatIndices", "ColorVectorSpace", "ComputationalResources", "DataStructures", "FFTViews", "FFTW", "ImageCore", "LinearAlgebra", "OffsetArrays", "Requires", "SparseArrays", "StaticArrays", "Statistics", "TiledIteration"]
git-tree-sha1 = "bf96839133212d3eff4a1c3a80c57abc7cfbf0ce"
uuid = "6a3955dd-da59-5b1f-98d4-e7296123deb5"
version = "0.6.21"

[[ImageIO]]
deps = ["FileIO", "Netpbm", "OpenEXR", "PNGFiles", "TiffImages", "UUIDs"]
git-tree-sha1 = "13c826abd23931d909e4c5538643d9691f62a617"
uuid = "82e4d734-157c-48bb-816b-45c225c6df19"
version = "0.5.8"

[[ImageMagick]]
deps = ["FileIO", "ImageCore", "ImageMagick_jll", "InteractiveUtils", "Libdl", "Pkg", "Random"]
git-tree-sha1 = "5bc1cb62e0c5f1005868358db0692c994c3a13c6"
uuid = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
version = "1.2.1"

[[ImageMagick_jll]]
deps = ["JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "1c0a2295cca535fabaf2029062912591e9b61987"
uuid = "c73af94c-d91f-53ed-93a7-00f77d67a9d7"
version = "6.9.10-12+3"

[[ImageMetadata]]
deps = ["AxisArrays", "ColorVectorSpace", "ImageAxes", "ImageCore", "IndirectArrays"]
git-tree-sha1 = "ae76038347dc4edcdb06b541595268fca65b6a42"
uuid = "bc367c6b-8a6b-528e-b4bd-a4b897500b49"
version = "0.9.5"

[[ImageMorphology]]
deps = ["ColorVectorSpace", "ImageCore", "LinearAlgebra", "TiledIteration"]
git-tree-sha1 = "68e7cbcd7dfaa3c2f74b0a8ab3066f5de8f2b71d"
uuid = "787d08f9-d448-5407-9aad-5290dd7ab264"
version = "0.2.11"

[[ImageQualityIndexes]]
deps = ["ColorVectorSpace", "ImageCore", "ImageDistances", "ImageFiltering", "OffsetArrays", "Statistics"]
git-tree-sha1 = "1198f85fa2481a3bb94bf937495ba1916f12b533"
uuid = "2996bd0c-7a13-11e9-2da2-2f5ce47296a9"
version = "0.2.2"

[[ImageShow]]
deps = ["Base64", "FileIO", "ImageCore", "OffsetArrays", "Requires", "StackViews"]
git-tree-sha1 = "832abfd709fa436a562db47fd8e81377f72b01f9"
uuid = "4e3cecfd-b093-5904-9786-8bbb286a6a31"
version = "0.3.1"

[[ImageTransformations]]
deps = ["AxisAlgorithms", "ColorVectorSpace", "CoordinateTransformations", "IdentityRanges", "ImageCore", "Interpolations", "OffsetArrays", "Rotations", "StaticArrays"]
git-tree-sha1 = "e4cc551e4295a5c96545bb3083058c24b78d4cf0"
uuid = "02fcd773-0e25-5acc-982a-7f6622650795"
version = "0.8.13"

[[Images]]
deps = ["AxisArrays", "Base64", "ColorVectorSpace", "FileIO", "Graphics", "ImageAxes", "ImageContrastAdjustment", "ImageCore", "ImageDistances", "ImageFiltering", "ImageIO", "ImageMagick", "ImageMetadata", "ImageMorphology", "ImageQualityIndexes", "ImageShow", "ImageTransformations", "IndirectArrays", "OffsetArrays", "Random", "Reexport", "SparseArrays", "StaticArrays", "Statistics", "StatsBase", "TiledIteration"]
git-tree-sha1 = "8b714d5e11c91a0d945717430ec20f9251af4bd2"
uuid = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
version = "0.24.1"

[[Imath_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "87f7662e03a649cffa2e05bf19c303e168732d3e"
uuid = "905a6f67-0a94-5f89-b386-d35d92009cd1"
version = "3.1.2+0"

[[IndirectArrays]]
git-tree-sha1 = "c2a145a145dc03a7620af1444e0264ef907bd44f"
uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959"
version = "0.5.1"

[[Inflate]]
git-tree-sha1 = "f5fc07d4e706b84f72d54eedcc1c13d92fb0871c"
uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9"
version = "0.1.2"

[[IniFile]]
deps = ["Test"]
git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8"
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
version = "0.5.0"

[[IntelOpenMP_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c"
uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0"
version = "2018.0.3+2"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[Interpolations]]
deps = ["AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"]
git-tree-sha1 = "61aa005707ea2cebf47c8d780da8dc9bc4e0c512"
uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
version = "0.13.4"

[[IntervalSets]]
deps = ["Dates", "EllipsisNotation", "Statistics"]
git-tree-sha1 = "3cc368af3f110a767ac786560045dceddfc16758"
uuid = "8197267c-284f-5f27-9208-e0e47529a953"
version = "0.5.3"

[[IrrationalConstants]]
git-tree-sha1 = "f76424439413893a832026ca355fe273e93bce94"
uuid = "92d709cd-6900-40b7-9082-c6be49f344b6"
version = "0.1.0"

[[IterTools]]
git-tree-sha1 = "05110a2ab1fc5f932622ffea2a003221f4782c18"
uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
version = "1.3.0"

[[IteratorInterfaceExtensions]]
git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "1.0.0"

[[JLLWrappers]]
deps = ["Preferences"]
git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.3.0"

[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "8076680b162ada2a031f707ac7b4953e30667a37"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.2"

[[JpegTurbo_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "d735490ac75c5cb9f1b00d8b5509c11984dc6943"
uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8"
version = "2.1.0+0"

[[LAME_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c"
uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d"
version = "3.100.1+0"

[[LZO_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6"
uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac"
version = "2.10.1+0"

[[LaTeXStrings]]
git-tree-sha1 = "c7f1c695e06c01b95a67f0cd1d34994f3e7db104"
uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
version = "1.2.1"

[[Latexify]]
deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "Printf", "Requires"]
git-tree-sha1 = "a4b12a1bd2ebade87891ab7e36fdbce582301a92"
uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
version = "0.15.6"

[[LazyArtifacts]]
deps = ["Artifacts", "Pkg"]
uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3"

[[LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"

[[LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"

[[LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[Libffi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "761a393aeccd6aa92ec3515e428c26bf99575b3b"
uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490"
version = "3.2.2+0"

[[Libgcrypt_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"]
git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae"
uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4"
version = "1.8.7+0"

[[Libglvnd_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"]
git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf"
uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29"
version = "1.3.0+3"

[[Libgpg_error_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9"
uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8"
version = "1.42.0+0"

[[Libiconv_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.16.1+1"

[[Libmount_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73"
uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9"
version = "2.35.0+0"

[[Libtiff_jll]]
deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"]
git-tree-sha1 = "340e257aada13f95f98ee352d316c3bed37c8ab9"
uuid = "89763e89-9b03-5906-acba-b20f662cd828"
version = "4.3.0+0"

[[Libuuid_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066"
uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700"
version = "2.36.0+0"

[[LineSearches]]
deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"]
git-tree-sha1 = "f27132e551e959b3667d8c93eae90973225032dd"
uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255"
version = "7.1.1"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[LogExpFunctions]]
deps = ["ChainRulesCore", "DocStringExtensions", "IrrationalConstants", "LinearAlgebra"]
git-tree-sha1 = "34dc30f868e368f8a17b728a1238f3fcda43931a"
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
version = "0.3.3"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[MKL_jll]]
deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"]
git-tree-sha1 = "5455aef09b40e5020e1520f551fa3135040d4ed0"
uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7"
version = "2021.1.1+2"

[[MacroTools]]
deps = ["Markdown", "Random"]
git-tree-sha1 = "5a5bc6bf062f0f95e62d0fe0a2d99699fed82dd9"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.8"

[[MappedArrays]]
git-tree-sha1 = "e8b359ef06ec72e8c030463fe02efe5527ee5142"
uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900"
version = "0.4.1"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MbedTLS]]
deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"]
git-tree-sha1 = "1c38e51c3d08ef2278062ebceade0e46cefc96fe"
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
version = "1.0.3"

[[MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"

[[Measures]]
git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f"
uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
version = "0.3.1"

[[Missings]]
deps = ["DataAPI"]
git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "1.0.2"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[MosaicViews]]
deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"]
git-tree-sha1 = "b34e3bc3ca7c94914418637cb10cc4d1d80d877d"
uuid = "e94cdb99-869f-56ef-bcf0-1ae2bcbe0389"
version = "0.3.3"

[[MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"

[[NLSolversBase]]
deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"]
git-tree-sha1 = "144bab5b1443545bc4e791536c9f1eacb4eed06a"
uuid = "d41bc354-129a-5804-8e4c-c37616107c6c"
version = "7.8.1"

[[NaNMath]]
git-tree-sha1 = "bfe47e760d60b82b66b61d2d44128b62e3a369fb"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "0.3.5"

[[Netpbm]]
deps = ["ColorVectorSpace", "FileIO", "ImageCore"]
git-tree-sha1 = "09589171688f0039f13ebe0fdcc7288f50228b52"
uuid = "f09324ee-3d7c-5217-9330-fc30815ba969"
version = "1.0.1"

[[NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"

[[OffsetArrays]]
deps = ["Adapt"]
git-tree-sha1 = "c870a0d713b51e4b49be6432eff0e26a4325afee"
uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
version = "1.10.6"

[[Ogg_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "7937eda4681660b4d6aeeecc2f7e1c81c8ee4e2f"
uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051"
version = "1.3.5+0"

[[OpenEXR]]
deps = ["Colors", "FileIO", "OpenEXR_jll"]
git-tree-sha1 = "327f53360fdb54df7ecd01e96ef1983536d1e633"
uuid = "52e1d378-f018-4a11-a4be-720524705ac7"
version = "0.3.2"

[[OpenEXR_jll]]
deps = ["Artifacts", "Imath_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "923319661e9a22712f24596ce81c54fc0366f304"
uuid = "18a262bb-aa17-5467-a713-aee519bc75cb"
version = "3.1.1+0"

[[OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "15003dcb7d8db3c6c857fda14891a539a8f2705a"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "1.1.10+0"

[[OpenSpecFun_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1"
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.5+0"

[[Optim]]
deps = ["Compat", "FillArrays", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"]
git-tree-sha1 = "7863df65dbb2a0fa8f85fcaf0a41167640d2ebed"
uuid = "429524aa-4258-5aef-a3af-852621145aeb"
version = "1.4.1"

[[Opus_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720"
uuid = "91d4177d-7536-5919-b921-800302f37372"
version = "1.3.2+0"

[[OrderedCollections]]
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.4.1"

[[PCRE_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488"
uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc"
version = "8.44.0+0"

[[PNGFiles]]
deps = ["Base64", "CEnum", "ImageCore", "IndirectArrays", "OffsetArrays", "libpng_jll"]
git-tree-sha1 = "e14c485f6beee0c7a8dcf6128bf70b85f1fe201e"
uuid = "f57f5aa1-a3ce-4bc8-8ab9-96f992907883"
version = "0.3.9"

[[PaddedViews]]
deps = ["OffsetArrays"]
git-tree-sha1 = "646eed6f6a5d8df6708f15ea7e02a7a2c4fe4800"
uuid = "5432bcbf-9aad-5242-b902-cca2824c8663"
version = "0.5.10"

[[Parameters]]
deps = ["OrderedCollections", "UnPack"]
git-tree-sha1 = "2276ac65f1e236e0a6ea70baff3f62ad4c625345"
uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a"
version = "0.12.2"

[[Parsers]]
deps = ["Dates"]
git-tree-sha1 = "438d35d2d95ae2c5e8780b330592b6de8494e779"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.0.3"

[[Pixman_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29"
uuid = "30392449-352a-5448-841d-b1acce4e97dc"
version = "0.40.1+0"

[[Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[PkgVersion]]
deps = ["Pkg"]
git-tree-sha1 = "a7a7e1a88853564e551e4eba8650f8c38df79b37"
uuid = "eebad327-c553-4316-9ea0-9fa01ccd7688"
version = "0.1.1"

[[PlotThemes]]
deps = ["PlotUtils", "Requires", "Statistics"]
git-tree-sha1 = "a3a964ce9dc7898193536002a6dd892b1b5a6f1d"
uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a"
version = "2.0.1"

[[PlotUtils]]
deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"]
git-tree-sha1 = "9ff1c70190c1c30aebca35dc489f7411b256cd23"
uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043"
version = "1.0.13"

[[Plots]]
deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs"]
git-tree-sha1 = "2dbafeadadcf7dadff20cd60046bba416b4912be"
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
version = "1.21.3"

[[PlutoUI]]
deps = ["Base64", "Dates", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"]
git-tree-sha1 = "f35ae11e070dbf123d5a6f54cbda45818d765ad2"
uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
version = "0.7.12"

[[PositiveFactorizations]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "17275485f373e6673f7e7f97051f703ed5b15b20"
uuid = "85a6dd25-e78a-55b7-8502-1745935b8125"
version = "0.2.4"

[[Preferences]]
deps = ["TOML"]
git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.2.2"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[ProgressMeter]]
deps = ["Distributed", "Printf"]
git-tree-sha1 = "afadeba63d90ff223a6a48d2009434ecee2ec9e8"
uuid = "92933f4c-e287-5a05-a399-4b506db050ca"
version = "1.7.1"

[[Qt5Base_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
git-tree-sha1 = "ad368663a5e20dbb8d6dc2fddeefe4dae0781ae8"
uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1"
version = "5.15.3+0"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[RangeArrays]]
git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5"
uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d"
version = "0.3.2"

[[Ratios]]
deps = ["Requires"]
git-tree-sha1 = "7dff99fbc740e2f8228c6878e2aad6d7c2678098"
uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439"
version = "0.4.1"

[[RecipesBase]]
git-tree-sha1 = "44a75aa7a527910ee3d1751d1f0e4148698add9e"
uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
version = "1.1.2"

[[RecipesPipeline]]
deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"]
git-tree-sha1 = "d4491becdc53580c6dadb0f6249f90caae888554"
uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c"
version = "0.4.0"

[[Reexport]]
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "1.2.2"

[[Requires]]
deps = ["UUIDs"]
git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "1.1.3"

[[Rotations]]
deps = ["LinearAlgebra", "StaticArrays", "Statistics"]
git-tree-sha1 = "2ed8d8a16d703f900168822d83699b8c3c1a5cd8"
uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc"
version = "1.0.2"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Scratch]]
deps = ["Dates"]
git-tree-sha1 = "0b4b7f1393cff97c33891da2a0bf69c6ed241fda"
uuid = "6c6a2e73-6563-6170-7368-637461726353"
version = "1.1.0"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Showoff]]
deps = ["Dates", "Grisu"]
git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de"
uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f"
version = "1.0.3"

[[SimpleTraits]]
deps = ["InteractiveUtils", "MacroTools"]
git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231"
uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d"
version = "0.9.4"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "1.0.1"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[SpecialFunctions]]
deps = ["ChainRulesCore", "LogExpFunctions", "OpenSpecFun_jll"]
git-tree-sha1 = "a322a9493e49c5f3a10b50df3aedaf1cdb3244b7"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "1.6.1"

[[StackViews]]
deps = ["OffsetArrays"]
git-tree-sha1 = "46e589465204cd0c08b4bd97385e4fa79a0c770c"
uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15"
version = "0.1.1"

[[Static]]
deps = ["IfElse"]
git-tree-sha1 = "a8f30abc7c64a39d389680b74e749cf33f872a70"
uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
version = "0.3.3"

[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "3240808c6d463ac46f1c1cd7638375cd22abbccb"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.2.12"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[StatsAPI]]
git-tree-sha1 = "1958272568dc176a1d881acb797beb909c785510"
uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
version = "1.0.0"

[[StatsBase]]
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
git-tree-sha1 = "8cbbc098554648c84f79a463c9ff0fd277144b6c"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.33.10"

[[StructArrays]]
deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"]
git-tree-sha1 = "f41020e84127781af49fc12b7e92becd7f5dd0ba"
uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
version = "0.6.2"

[[TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[[TableTraits]]
deps = ["IteratorInterfaceExtensions"]
git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39"
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
version = "1.0.1"

[[Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"]
git-tree-sha1 = "1162ce4a6c4b7e31e0e6b14486a6986951c73be9"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "1.5.2"

[[Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"

[[TensorCore]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6"
uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50"
version = "0.1.1"

[[Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[TiffImages]]
deps = ["ColorTypes", "DocStringExtensions", "FileIO", "FixedPointNumbers", "IndirectArrays", "Inflate", "OffsetArrays", "OrderedCollections", "PkgVersion", "ProgressMeter"]
git-tree-sha1 = "632a8d4dbbad6627a4d2d21b1c6ebcaeebb1e1ed"
uuid = "731e570b-9d59-4bfa-96dc-6df516fadf69"
version = "0.4.2"

[[TiledIteration]]
deps = ["OffsetArrays"]
git-tree-sha1 = "52c5f816857bfb3291c7d25420b1f4aca0a74d18"
uuid = "06e1c1a7-607b-532d-9fad-de7d9aa2abac"
version = "0.3.0"

[[URIs]]
git-tree-sha1 = "97bbe755a53fe859669cd907f2d96aee8d2c1355"
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
version = "1.3.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[UnPack]]
git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b"
uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
version = "1.0.2"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[Wayland_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"]
git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23"
uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89"
version = "1.19.0+0"

[[Wayland_protocols_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll"]
git-tree-sha1 = "2839f1c1296940218e35df0bbb220f2a79686670"
uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91"
version = "1.18.0+4"

[[WoodburyMatrices]]
deps = ["LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "59e2ad8fd1591ea019a5259bd012d7aee15f995c"
uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6"
version = "0.5.3"

[[XML2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "1acf5bdf07aa0907e0a37d3718bb88d4b687b74a"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.9.12+0"

[[XSLT_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"]
git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a"
uuid = "aed1982a-8fda-507f-9586-7b0439959a61"
version = "1.1.34+0"

[[Xorg_libX11_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"]
git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527"
uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc"
version = "1.6.9+4"

[[Xorg_libXau_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e"
uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec"
version = "1.0.9+4"

[[Xorg_libXcursor_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"]
git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd"
uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724"
version = "1.2.0+4"

[[Xorg_libXdmcp_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4"
uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05"
version = "1.1.3+4"

[[Xorg_libXext_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3"
uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3"
version = "1.3.4+4"

[[Xorg_libXfixes_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4"
uuid = "d091e8ba-531a-589c-9de9-94069b037ed8"
version = "5.0.3+4"

[[Xorg_libXi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"]
git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246"
uuid = "a51aa0fd-4e3c-5386-b890-e753decda492"
version = "1.7.10+4"

[[Xorg_libXinerama_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"]
git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123"
uuid = "d1454406-59df-5ea1-beac-c340f2130bc3"
version = "1.1.4+4"

[[Xorg_libXrandr_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"]
git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631"
uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484"
version = "1.5.2+4"

[[Xorg_libXrender_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96"
uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa"
version = "0.9.10+4"

[[Xorg_libpthread_stubs_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb"
uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74"
version = "0.1.0+3"

[[Xorg_libxcb_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"]
git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6"
uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b"
version = "1.13.0+3"

[[Xorg_libxkbfile_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2"
uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a"
version = "1.1.0+4"

[[Xorg_xcb_util_image_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"]
git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97"
uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b"
version = "0.4.0+1"

[[Xorg_xcb_util_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"]
git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1"
uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5"
version = "0.4.0+1"

[[Xorg_xcb_util_keysyms_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"]
git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00"
uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7"
version = "0.4.0+1"

[[Xorg_xcb_util_renderutil_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"]
git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e"
uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e"
version = "0.3.9+1"

[[Xorg_xcb_util_wm_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"]
git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67"
uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361"
version = "0.4.1+1"

[[Xorg_xkbcomp_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"]
git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b"
uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4"
version = "1.4.2+4"

[[Xorg_xkeyboard_config_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"]
git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d"
uuid = "33bec58e-1273-512f-9401-5d533626f822"
version = "2.27.0+4"

[[Xorg_xtrans_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845"
uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10"
version = "1.4.0+3"

[[Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"

[[Zstd_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "cc4bf3fdde8b7e3e9fa0351bdeedba1cf3b7f6e6"
uuid = "3161d3a3-bdf6-5164-811a-617609db77b4"
version = "1.5.0+0"

[[libass_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47"
uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0"
version = "0.15.1+0"

[[libfdk_aac_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55"
uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280"
version = "2.0.2+0"

[[libpng_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c"
uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f"
version = "1.6.38+0"

[[libvorbis_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"]
git-tree-sha1 = "c45f4e40e7aafe9d086379e5578947ec8b95a8fb"
uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a"
version = "1.3.7+0"

[[nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"

[[p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"

[[x264_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2"
uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a"
version = "2021.5.5+0"

[[x265_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9"
uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76"
version = "3.5.0+0"

[[xkbcommon_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"]
git-tree-sha1 = "ece2350174195bb31de1a63bea3a41ae1aa593b6"
uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd"
version = "0.9.1+5"
"""

# ╔═╡ Cell order:
# ╠═dcb245de-bc64-4892-a542-faaf9b6d7303
# ╟─ce580d07-e462-4c11-8cd6-b314f3ea13af
# ╟─c38c856c-153d-11ec-0945-f7587b6f2699
# ╠═2baefe3c-f9d1-4851-85e8-2f81d49f60c6
# ╟─61f56a22-d722-41a7-b371-06058bfd5da5
# ╟─cb4478c2-ca0a-40bb-bb9f-cd4e0437381e
# ╟─e78f1041-4259-491f-86d4-1f7d6ced4f15
# ╟─f954ba83-d8a5-4ef0-b84e-e513e95dbb0f
# ╟─777bae38-20e6-4956-a0c9-6245aae429b4
# ╟─5852e1da-8b57-40a4-9f93-2c2b40dd101a
# ╠═e3fd51c5-f8c0-4c64-af7e-a0b6943a62a3
# ╠═204fa395-1288-4dcd-90f9-16eaca2c7f07
# ╠═efacdd42-3564-4788-82a8-eec6d1dee154
# ╠═fc2dc16e-495a-4fd9-a9f7-859583d959d4
# ╠═bf5521d9-192f-4378-9cbc-270142ab689b
# ╠═cd7176c0-a8be-4982-b31d-2674fe20e84c
# ╟─e58faa37-938c-4475-9a73-fd5922da721f
# ╠═eecc36b0-366f-469b-8743-f9f96a5f6e6c
# ╠═543959b5-2646-4fa8-9b76-27d24adaa7ac
# ╠═453cc1b5-ab5a-4ed0-b126-9123601aaaa9
# ╠═3fc4c269-2a2c-445e-8786-4b56fa60b80f
# ╟─60acab50-aa82-4622-ba02-db02282a2ed0
# ╠═73a5e9c2-58c9-428c-8f03-17561d7630f6
# ╠═f5022387-72e1-4262-94ad-3bffd4010ae2
# ╠═075683a3-3c19-4edd-9a21-a93f1d31e9bf
# ╠═5687b01f-2ace-4a80-9b3c-9e881f89eaf3
# ╠═45c480f6-2b41-4075-b764-d1f6a71fc0f9
# ╟─1e3fa40e-19f2-4c97-8353-1705a266ee5e
# ╟─00000000-0000-0000-0000-000000000001
# ╟─00000000-0000-0000-0000-000000000002


text:
############################################################################################
# Functions to write/read the output of figXrun() where X ∈ {2, 3, 4, 5, 6, 7} as .csv files
############################################################################################

# using CSV: write, read

#######
# WRITE
#######

function savepsi(figname, p::Params, psi)
    path_str = filesstorage_settings(figname)
    CSV.write(join([path_str,"/presets.csv"]), DataFrame(type2dict(p)))
    psi_data = DataFrame(psi = psi)
    CSV.write(join([path_str,"/psi.csv"]), psi_data; delim = '\t')
    return path_str
end

function savespectrum(figname, p::Params, sp1, sp2)
    path_str = filesstorage_settings(figname)
    CSV.write(join([path_str,"/presets.csv"]), DataFrame(type2dict(p)))
    CSV.write(join([path_str,"/spectrum.csv"]),  DataFrame(sp1, :auto))
    psi_data = DataFrame(EZ = sp2)
    CSV.write(join([path_str,"/EZ.csv"]), psi_data; delim = '\t')
    return path_str
end

function savespectrum(figname, p::Params, sp::Quantica.Spectrum)
    path_str = filesstorage_settings(figname)
    CSV.write(join([path_str,"/presets.csv"]), DataFrame(type2dict(p)))
    psi_data = DataFrame(psi = sp.states[:,1])
    CSV.write(join([path_str,"/psi.csv"]), psi_data; delim = '\t')
    return path_str
end

function savespectrumvsphase(figname, p::Params, phi, ea, eb, ec, ed)
    path_str = filesstorage_settings(figname)
    CSV.write(join([path_str,"/presets.csv"]), DataFrame(type2dict(p)))
    phi_data = DataFrame(phi = collect(phi))
    CSV.write(join([path_str,"/phi.csv"]), phi_data; delim = '\t')
    CSV.write(join([path_str,"/cpra.csv"]),  DataFrame(ea, :auto))
    CSV.write(join([path_str,"/cprb.csv"]),  DataFrame(eb, :auto))
    CSV.write(join([path_str,"/cprc.csv"]),  DataFrame(ec, :auto))
    CSV.write(join([path_str,"/cprd.csv"]),  DataFrame(ed, :auto))
    return path_str
end

function savephasediagram(figname, p::Params, boundarySA, boundarySZ, μ)
    path_str = filesstorage_settings(figname)
    CSV.write(join([path_str,"/presets.csv"]), DataFrame(type2dict(p)))
    CSV.write(join([path_str,"/boundarySA.csv"]),  DataFrame(x = boundarySA); delim = '\t')
    CSV.write(join([path_str,"/boundarySZ.csv"]),  DataFrame(x = boundarySZ); delim = '\t')
    CSV.write(join([path_str,"/mu.csv"]),  DataFrame(y = μ); delim = '\t')
    # psi_data = DataFrame(EZ = sp2)
    # CSV.write(join([path_str,"/EZ.csv"]), psi_data; delim = '\t')
    return path_str
end

""" check and/or create folder structure"""
function filesstorage_settings(figname)
    time_str = string(now())
    isdir("data") ? nothing : mkdir("data")
    isdir("data/$(figname)") ? nothing : mkdir("data/$(figname)")
    path_str = join([pwd(), "/data/$(figname)/", time_str])
    mkdir(path_str)
    return path_str
end
#fig2

floattostring(vec::Array{Float64,1}) = [floattostring(vec[i]) for i in 1:length(vec)]
floattostring(i::Float64) = "$(Int(i))"
function writecsv(vec, p, name, taglist)
    karray = collect(Iterators.flatten(
    [collect(Iterators.flatten([append!([],vec[1][1])
        for i in 1:size(vec[1][2],1)])) for j in 1:size(vec,1)]))
    ϵs = real(collect(Iterators.flatten(
        [collect(Iterators.flatten([append!([], vec[j][2][i,:])
            for i in 1:size(vec[j][2], 1)])) for j in 1:size(vec,1)])))
    psi = collect(Iterators.flatten(
        [floattostring([ceil(i/size((vec[1][2]),2))
            for i in 1:length(vec[1][2])]) for j in 1:size(vec,1)]))
    tag = [taglist[Int(ceil(i/length(vec[1][2])))]
        for i in 1:size(vec,1) * length(vec[1][2])]
    datafig = DataFrame(tag = tag, karray = karray, ϵs = ϵs, psi = psi)
    savecsv(name, p, datafig)
end

function savecsv(figname, presetsarray::AbstractArray, data::DataFrame)
    path_str = filesstorage_settings(figname)
    for i in 1:length(presetsarray)
        CSV.write(join([path_str,"/presets","$(i)",".csv"]),
            DataFrame(type2dict(presetsarray[i])))
    end
    CSV.write(join([path_str,"/$(figname).csv"]), data; delim = '\t')
    println(join([path_str,"/$(figname).csv"]))
end

#######
# READ
#######
function readfig4data(datapath::String, angle = 0*pi/180)
    presets = CSV.read(joinpath(datapath,"presets.csv"), DataFrame,  delim = '\t')
    println(presets)
    data = CSV.read(joinpath(datapath,"psi.csv"), DataFrame, delim='\t')
    return  map(x->parse(ComplexF32,x), data.psi)
end

function readfig4psi(datapath::String)
    data = CSV.read(joinpath(datapath,"psi.csv"), DataFrame, delim='\t')
    return  data.psi
end

function readspectrum(datapath::String)
    y = CSV.read(join([datapath,"/spectrum.csv"]), DataFrame)
    x = CSV.read(join([datapath,"/EZ.csv"]), DataFrame)
    return x, y
end

function readcpr(datapath::String)
    phi = CSV.read(join([datapath,"/phi.csv"]), DataFrame)
    cpra = CSV.read(join([datapath,"/cpra.csv"]), DataFrame)
    cprb = CSV.read(join([datapath,"/cprb.csv"]), DataFrame)
    cprc = CSV.read(join([datapath,"/cprc.csv"]), DataFrame)
    cprd = CSV.read(join([datapath,"/cprd.csv"]), DataFrame)
    return phi, cpra, cprb, cprc, cprd
end

ext: jl


text:
module SimpleDifferentialOperators

# Pkg Dependencies
using LinearAlgebra, SparseArrays, Parameters, BandedMatrices, BlockBandedMatrices, LazyArrays

# Includes
include("types.jl")
include("operators.jl")
include("extensionoperators.jl")
include("jointoperators.jl")
include("affine.jl")
include("utilities/extrapolatetoboundary.jl")
include("utilities/findnearestindex.jl")

# Exports
# Boundary Conditions
export BoundaryCondition,
       HomogeneousBoundaryCondition,
       NonhomogeneousBoundaryCondition,
       Reflecting,
       Mixed,
       Absorbing,
       NonhomogeneousAbsorbing

# Differential Types
export DiscretizationMethod,
        ForwardFirstDifference,
        BackwardFirstDifference,
        CentralSecondDifference,
        JumpProcess

# Functions
export DifferentialOperator,
        ExtensionDifferentialOperator,
        L₁₋bc,
        L₁₊bc,
        L₂bc,
        Lₙbc,
        interiornodes,
        L₁₊,
        L₁₋,
        L₂,
        Lₙ,
        jointoperator_bc,
        extrapolatetoboundary,
        findnearestindex,
        L₀affine,
        L₁₋affine,
        L₁₊affine,
        L₂affine,
        Laffine

end # module


text:
config = MOI.Test.Config()
optimize_bridged!(mock) = MOIU.mock_optimize!(mock, [1.0, 0.0],
    (MOI.VectorAffineFunction{Float64}, MOI.Nonnegatives) => [[1.0]],
    (MOI.VectorAffineFunction{Float64}, MOI.Zeros) => [[1.0]])
optimize_cached!(mock) = MOIU.mock_optimize!(mock, [0.0, 1.0],
    (MOI.VectorAffineFunction{Float64}, MOI.Nonnegatives) => [[1.0]],
    (MOI.VectorAffineFunction{Float64}, MOI.Zeros) => [[1.0]])
for mock in [bridged_mock(optimize_bridged!), cached_mock(optimize_cached!)]
    Tests.sos_term_fixed_test(mock, config)
    Tests.sdsos_term_fixed_test(mock, config)
    Tests.dsos_term_fixed_test(mock, config)
end

max_stars_repo_name: blegat/SumOfSquares

max_issues_repo_name: blegat/SumOfSquares

max_forks_repo_name: blegat/SumOfSquares


text:
###############################################################################
#
# Update clumping factor
#
###############################################################################
"""
    clumping_factor!(
                can::Canopy4RT{FT},
                angles::SolarAngles{FT}
    ) where {FT<:AbstractFloat}

Calculate the clumping factor, given
- `can` [`Canopy4RT`](@ref) type struct
- `angles` [`SolarAngles`](@ref) type struct
"""
function clumping_factor!(
            can::Canopy4RT{FT},
            angles::SolarAngles{FT}
) where {FT<:AbstractFloat}
    @unpack clump_a, clump_b = can;
    @unpack sza = angles;

    if clump_b > 0
        can.Ω = clump_a + clump_b * (1 - cosd(sza));
    end

    return nothing
end

###############################################################################
#
# Update canopy geometry
#
###############################################################################
"""
    canopy_geometry!(
                can::Canopy4RT{FT},
                angles::SolarAngles{FT},
                can_opt::CanopyOpticals{FT},
                rt_con::RTCache{FT}
    ) where {FT<:AbstractFloat}

Computes canopy optical properties (extinction coefficients for direct and
    diffuse light) based on the SAIL model. Most important input parameters are
    leaf inclination and azimuth distribution functions and sun-sensor
    geometry. Canopy clumping Ω is implemented as in Pinty et al (2015), given
- `can` [`Canopy4RT`](@ref) type struct
- `angles` [`SolarAngles`](@ref) type struct
- `can_opt` [`CanopyOpticals`](@ref) type struct
- `rt_con` [`RTCache`](@ref) type cache
"""
function canopy_geometry!(
            can::Canopy4RT{FT},
            angles::SolarAngles{FT},
            can_opt::CanopyOpticals{FT},
            rt_con::RTCache{FT}
) where {FT<:AbstractFloat}
    # 1. update clumping factor from zenith angle
    clumping_factor!(can, angles);

    # 2. update solor angle dependent variables
    @unpack sza, vza, raa = angles;
    cos_vza = cosd(vza);
    tan_vza = tand(vza);
    cos_raa = cosd(raa);
    sin_vza = sind(vza);
    cos_sza = cosd(sza);
    sin_sza = sind(sza);
    tan_sza = tand(sza);
    cts_cto = cos_sza * cos_vza;
    dso     = sqrt( tan_sza^2 + tan_vza^2 - 2*tan_sza*tan_vza*cos_raa );
    psi_vol = abs( raa - 360*round(raa/360) );

    # 3. unpack canopy parameters
    @unpack dx, hot, LAI, lazitab, lidf, litab, nLayer, xl, Ω = can;

    # 4. update the RTCache
    can.cos_philo .= cosd.(lazitab .- raa);
    @unpack cos_philo, cos_ttli, cos_ttlo, sin_ttli = can;

    # 5. calculate geometric factors associated with extinction and scattering
    can_opt.ks  = 0;
    can_opt.ko  = 0;
    can_opt.bf  = 0;
    can_opt.sob = 0;
    can_opt.sof = 0;
    @inbounds for i=1:length(litab)
        _lit = litab[i];
        _lid = lidf[i];
        _ctl = cos_ttli[i];

        # interception parameters and ref/trans multipliers
        volscatt!(can.vol_scatt, sza, vza, psi_vol, _lit);
        chi_s, chi_o, frho, ftau = can.vol_scatt;

        # Extinction coefficients
        ksli = abs(chi_s / cos_sza);
        koli = abs(chi_o / cos_vza);

        # Area scattering coefficient fractions
        if ftau < 0
            sobli = abs(ftau) * FT(pi) / cts_cto;
            sofli = abs(frho) * FT(pi) / cts_cto;
        else
            sobli = frho * FT(pi) / cts_cto;
            sofli = ftau * FT(pi) / cts_cto;
        end

        # add up the values in each layer
        can_opt.ks  += ksli   * _lid;
        can_opt.ko  += koli   * _lid;
        can_opt.bf  += _ctl^2 * _lid;
        can_opt.sob += sobli  * _lid;
        can_opt.sof += sofli  * _lid;
    end

    # 6. geometric factors to be used later with rho and tau
    @unpack bf, ko, ks = can_opt;
    can_opt.sdb = (ks + bf) / 2;
    can_opt.sdf = (ks - bf) / 2;
    can_opt.dob = (ko + bf) / 2;
    can_opt.dof = (ko - bf) / 2;
    can_opt.ddb = (1  + bf) / 2;
    can_opt.ddf = (1  - bf) / 2;

    # 7. eq 19 in vdT 2009 page 305 modified by Joris
    cg_con = rt_con.cg_con;
    cg_con._Cs .= cos_ttli .* cos_sza; # [nli]
    cg_con._Ss .= sin_ttli .* sin_sza; # [nli]
    cg_con._Co .= cos_ttli .* cos_vza; # [nli]
    cg_con._So .= sin_ttli .* sin_vza; # [nli]
    @unpack _Co, _Cs, _So, _Ss, _1s = cg_con;
    # cg_con._cds .= _Cs * _1s .+ _Ss * cos_ttlo' ; # [nli, nlazi]
    # cg_con._cdo .= _Co * _1s .+ _So * cos_philo'; # [nli, nlazi]
    mul!(cg_con._cds, _Cs, _1s       );
    mul!(cg_con._2d , _Ss, cos_ttlo' );
    cg_con._cds .+= cg_con._2d;
    mul!(cg_con._cdo, _Co, _1s       );
    mul!(cg_con._2d , _So, cos_philo');
    cg_con._cdo .+= cg_con._2d;
    @unpack _cdo, _cds = cg_con;

    # 8. update fs and fo
    # This is basically equivalent to Kb in Bonan, eq. 14.21
    # TOD reduce allocations
    can_opt.fs      .= _cds ./ cos_sza;
    can_opt.fo      .= _cdo ./ cos_vza;
    can_opt.absfs   .= abs.( can_opt.fs );
    can_opt.absfo   .= abs.( can_opt.fo );
    can_opt.cosΘ_l  .= cos_ttli .* _1s;
    can_opt.cos2Θ_l .= can_opt.cosΘ_l .^ 2;
    can_opt.fsfo    .= can_opt.fs .* can_opt.fo;
    can_opt.absfsfo .= abs.( can_opt.fsfo );

    # 9. probabilities Ps, Po, Pso
    _fac_s = (1 - exp(-ks*Ω*LAI*dx)) / (ks*Ω*LAI*dx);
    _fac_o = (1 - exp(-ko*Ω*LAI*dx)) / (ko*Ω*LAI*dx);
    can_opt.Ps  .= exp.(xl.*ks.*Ω.*LAI) .* _fac_s;
    can_opt.Po  .= exp.(xl.*ko.*Ω.*LAI) .* _fac_o;
    @inline f(x) = psofunction(ko, ks, Ω, LAI, hot, dso, x);

    # TODO minimize the allocations here
    # length(xl) * 7 allocations here!
    @inbounds for j=1:length(xl)
        can_opt.Pso[j] = quadgk(f, xl[j]-dx, xl[j], rtol=1e-2)[1] / dx;
    end

    # takes care of rounding error
    # can_opt.Pso[can_opt.Pso.>can_opt.Po] =
    # minimum([can_opt.Po[can_opt.Pso.>can_opt.Po]
    #          can_opt.Ps[can_opt.Pso.>can_opt.Po]],dims=2)
    # can_opt.Pso[can_opt.Pso.>can_opt.Ps] =
    # minimum([can_opt.Po[can_opt.Pso.>can_opt.Ps]
    #          can_opt.Ps[can_opt.Pso.>can_opt.Ps]],dims=2)

    return nothing
end

max_stars_repo_name: bbuman/Land

max_issues_repo_name: bbuman/Land

max_forks_repo_name: bbuman/Land


text:
module SketchyCGAL
export sketchy_cgal
include("sketchy_cgal.jl")
end


text:
# Following work by @jiahao, we compute character widths using a combination of
#   * character category
#   * UAX 11: East Asian Width
#   * a few exceptions as needed
# Adapted from http://nbviewer.ipython.org/gist/jiahao/07e8b08bf6d8671e9734
#
# We used to also use data from GNU Unifont, but that has proven unreliable
# and unlikely to match widths assumed by terminals.
#
# Requires Julia (obviously) and FontForge.

#############################################################################
CharWidths = Dict{Int,Int}()

#############################################################################
# Use ../libutf8proc for category codes, rather than the one in Julia,
# to minimize bootstrapping complexity when a new version of Unicode comes out.
catcode(c) = ccall((:utf8proc_category,"../libutf8proc"), Cint, (Int32,), c)

# utf8proc category constants (must match h)
const UTF8PROC_CATEGORY_CN = 0
const UTF8PROC_CATEGORY_LU = 1
const UTF8PROC_CATEGORY_LL = 2
const UTF8PROC_CATEGORY_LT = 3
const UTF8PROC_CATEGORY_LM = 4
const UTF8PROC_CATEGORY_LO = 5
const UTF8PROC_CATEGORY_MN = 6
const UTF8PROC_CATEGORY_MC = 7
const UTF8PROC_CATEGORY_ME = 8
const UTF8PROC_CATEGORY_ND = 9
const UTF8PROC_CATEGORY_NL = 10
const UTF8PROC_CATEGORY_NO = 11
const UTF8PROC_CATEGORY_PC = 12
const UTF8PROC_CATEGORY_PD = 13
const UTF8PROC_CATEGORY_PS = 14
const UTF8PROC_CATEGORY_PE = 15
const UTF8PROC_CATEGORY_PI = 16
const UTF8PROC_CATEGORY_PF = 17
const UTF8PROC_CATEGORY_PO = 18
const UTF8PROC_CATEGORY_SM = 19
const UTF8PROC_CATEGORY_SC = 20
const UTF8PROC_CATEGORY_SK = 21
const UTF8PROC_CATEGORY_SO = 22
const UTF8PROC_CATEGORY_ZS = 23
const UTF8PROC_CATEGORY_ZL = 24
const UTF8PROC_CATEGORY_ZP = 25
const UTF8PROC_CATEGORY_CC = 26
const UTF8PROC_CATEGORY_CF = 27
const UTF8PROC_CATEGORY_CS = 28
const UTF8PROC_CATEGORY_CO = 29

#############################################################################
# Use a default width of 1 for all character categories that are
# letter/symbol/number-like, as well as for unassigned/private-use chars.
# This can be overridden by UAX 11
# below, but provides a useful nonzero fallback for new codepoints when
# a new Unicode version has been released but Unifont hasn't been updated yet.

zerowidth = Set{Int}() # categories that may contain zero-width chars
push!(zerowidth, UTF8PROC_CATEGORY_MN)
push!(zerowidth, UTF8PROC_CATEGORY_MC)
push!(zerowidth, UTF8PROC_CATEGORY_ME)
# push!(zerowidth, UTF8PROC_CATEGORY_SK)  # see issue #167
push!(zerowidth, UTF8PROC_CATEGORY_ZL)
push!(zerowidth, UTF8PROC_CATEGORY_ZP)
push!(zerowidth, UTF8PROC_CATEGORY_CC)
push!(zerowidth, UTF8PROC_CATEGORY_CF)
push!(zerowidth, UTF8PROC_CATEGORY_CS)
for c in 0x0000:0x110000
    if catcode(c) ∉ zerowidth
        CharWidths[c] = 1
    end
end

#############################################################################
# Widths from UAX #11: East Asian Width
#   .. these take precedence for all codepoints
#      listed explicitly as wide/full/narrow/half-width

for line in readlines(open("EastAsianWidth.txt"))
    #Strip comments
    (isempty(line) || line[1] == '#') && continue
    precomment = split(line, '#')[1]
    #Parse code point range and width code
    tokens = split(precomment, ';')
    length(tokens) >= 2 || continue
    charrange = tokens[1]
    width = strip(tokens[2])
    #Parse code point range into Julia UnitRange
    rangetokens = split(charrange, "..")
    charstart = parse(UInt32, "0x"*rangetokens[1])
    charend = parse(UInt32, "0x"*rangetokens[length(rangetokens)>1 ? 2 : 1])

    #Assign widths
    for c in charstart:charend
        if width=="W" || width=="F" # wide or full
            CharWidths[c]=2
        elseif width=="Na"|| width=="H"
            CharWidths[c]=1
        end
    end
end

#############################################################################
# A few exceptions to the above cases, found by manual comparison
# to other wcwidth functions and similar checks.

for c in keys(CharWidths)
    cat = catcode(c)

    # make sure format control character (category Cf) have width 0
    # (some of these, like U+0601, can have a width in some cases
    #  but normally act like prepended combining marks.  U+fff9 etc
    #  are also odd, but have zero width in typical terminal contexts)
    if cat==UTF8PROC_CATEGORY_CF
        CharWidths[c]=0
    end

    # Unifont has nonzero width for a number of non-spacing combining
    # characters, e.g. (in 7.0.06): f84,17b4,17b5,180b,180d,2d7f, and
    # the variation selectors
    if cat==UTF8PROC_CATEGORY_MN
        CharWidths[c]=0
    end

    # We also assign width of one to unassigned and private-use
    # codepoints (Unifont includes ConScript Unicode Registry PUA fonts,
    # but since these are nonstandard it seems questionable to use Unifont metrics;
    # if they are printed as the replacement character U+FFFD they will have width 1).
    if cat==UTF8PROC_CATEGORY_CO || cat==UTF8PROC_CATEGORY_CN
        CharWidths[c]=1
    end

    # for some reason, Unifont has width-2 glyphs for ASCII control chars
    if cat==UTF8PROC_CATEGORY_CC
        CharWidths[c]=0
    end
end

#Soft hyphen is typically printed as a hyphen (-) in terminals.
CharWidths[0x00ad]=1

#By definition, should have zero width (on the same line)
#0x002028 '
' category: Zl name: LINE SEPARATOR/
#0x002029 '
' category: Zp name: PARAGRAPH SEPARATOR/
CharWidths[0x2028]=0
CharWidths[0x2029]=0

#############################################################################
# Output (to a file or pipe) for processing by data_generator.rb,
# encoded as a sequence of intervals.

firstc = 0x000000
lastv = 0
uhex(c) = uppercase(string(c,base=16,pad=4))
for c in 0x0000:0x110000
    global firstc, lastv
    v = get(CharWidths, c, 0)
    if v != lastv || c == 0x110000
        v < 4 || error("invalid charwidth $v for $c")
        if firstc+1 < c
            println(uhex(firstc), "..", uhex(c-1), "; ", lastv)
        else
            println(uhex(firstc), "; ", lastv)
        end
        firstc = c
        lastv = v
    end
end

max_stars_repo_name: iotaledger/zephyr-client-sdk

max_issues_repo_name: Robbbert/messui

max_forks_repo_name: Robbbert/messui


text:
import Literate

println("Start generating tests for Literate.jl examples")

EXAMPLEDIR = joinpath(@__DIR__, "..", "examples")
GENERATEDDIR = joinpath(@__DIR__, "examples")
mkpath(GENERATEDDIR)
for example in readdir(EXAMPLEDIR)
    if endswith(example, ".jl")
        input = abspath(joinpath(EXAMPLEDIR, example))
        script = Literate.script(input, GENERATEDDIR)
    end
end

println("Finished generating tests for Literate.jl examples")


text:
using Fleck
using SafeTestsets
using Test

@testset "Fleck.jl" begin
    include("test_prefixsearch.jl")
    include("test_direct.jl")
    include("test_vas.jl")
    #include("test_vas_integrate.jl")
end


text:
using Test, MPI
using LinearAlgebra

using CLIMA
using CLIMA.MPIStateArrays

MPI.Initialized() || MPI.Init()

const mpicomm = MPI.COMM_WORLD

@static if haspkg("CuArrays")
  using CuArrays
  # make sure that broadcasting is not being done by scalar indexing into CuArrays
  CuArrays.allowscalar(false)
  ArrayType = CuArray
else
  ArrayType = Array
end

mpisize = MPI.Comm_size(mpicomm)

@testset "MPIStateArray reductions" begin

  localsize = (4, 6, 8)

  A = Array{Float32}(reshape(1:prod(localsize), localsize))
  globalA = vcat([A for _ in 1:mpisize]...)

  QA = MPIStateArray{Float32}(mpicomm, ArrayType, localsize...)
  QA .= A

  @test norm(QA, 1)   ≈ norm(globalA, 1)
  @test norm(QA)      ≈ norm(globalA)
  @test norm(QA, Inf) ≈ norm(globalA, Inf)

  @test norm(QA; dims=(1,3))      ≈ mapslices(norm, globalA; dims=(1,3))
  @test norm(QA, 1; dims=(1,3))   ≈ mapslices(S -> norm(S, 1), globalA, dims=(1,3))
  @test norm(QA, Inf; dims=(1,3)) ≈ mapslices(S -> norm(S, Inf), globalA, dims=(1,3))

  B = Array{Float32}(reshape(reverse(1:prod(localsize)), localsize))
  globalB = vcat([B for _ in 1:mpisize]...)

  QB = similar(QA)
  QB .= B

  @test isapprox(euclidean_distance(QA, QB), norm(globalA .- globalB))
  @test isapprox(dot(QA, QB), dot(globalA, globalB))
end

max_stars_repo_name: akshaysridhar/CLIMA

max_issues_repo_name: akshaysridhar/CLIMA

max_forks_repo_name: akshaysridhar/CLIMA


text:
include("./fig3.jl")
include("./fig4.jl")
include("./fig51.jl")
include("./fig52.jl")
include("./fig6.jl")

max_stars_repo_name: batenkov-team/iai-code

max_issues_repo_name: batenkov-team/iai-code

max_forks_repo_name: batenkov-team/iai-code


text:
using Documenter, BlockArrays

# Build documentation.
# ====================

makedocs(
    modules = [BlockArrays],
    format = :html,
    sitename = "BlockArrays.jl",
    doctest = false,
    strict = VERSION.major == 1 && sizeof(Int) == 8, # only strict mode on 1.0 and Int64
    pages = Any[
        "Home" => "index.md",
        "Manual" => [
            "man/abstractblockarrayinterface.md",
            "man/blockarrays.md",
            "man/pseudoblockarrays.md",
        ],
        "API" => [
            "lib/public.md",
            "lib/internals.md"
        ]
    ]
)

# Deploy built documentation from Travis.
# =======================================

deploydocs(
    repo = "github.com/JuliaArrays/BlockArrays.jl.git",
    target = "build",
    julia = "nightly", # deploy from release bot
    deps = nothing,
    make = nothing
)


text:
# load file
fluxi_1_f = open("testdata/cmfa_01.fluxi")
fluxi_1_s = readstring(fluxi_1_f)
fluxi1 = MetabolicFluxAnalysis.parseFluxi( fluxi_1_s )

fluxi_target_semus = reduce( (x,y)->[x;y] , map( x->x.sass , fluxi1.measurements["Data_Exp_01"] ) )
emudecomp_1 = MetabolicFluxAnalysis.compute_emu_decomp( fluxi1.net , fluxi_target_semus )
emu_graph_1 = MetabolicFluxAnalysis.create_emu_graph(emudecomp_1)

fluxi_ast_1 = MetabolicFluxAnalysis.create_ast_from_emu_graph( emu_graph_1 )

target_smrs = MetabolicFluxAnalysis.construct_all_mass_ratios_for_measurement(fluxi1,"Data_Exp_01")

julia_fw_sim_safe = MetabolicFluxAnalysis.ast_to_juliacode_01(fluxi1.net,fluxi_ast_1,target_smrs;fast_lu=false)
julia_fw_sim_fast = MetabolicFluxAnalysis.ast_to_juliacode_01(fluxi1.net,fluxi_ast_1,target_smrs;fast_lu=true)

jfw_safe = eval( parse( julia_fw_sim_safe.code ) )
jfw_fast = eval( parse( julia_fw_sim_fast.code ) )

mds_safe =  MetabolicFluxAnalysis.construct_mds(fluxi1.substrate_configs["SC_Conf_C1"],julia_fw_sim_safe.semu_mass_ratios)
mds_fast =  MetabolicFluxAnalysis.construct_mds(fluxi1.substrate_configs["SC_Conf_C1"],julia_fw_sim_fast.semu_mass_ratios)

print("\nInput Config:\n")
for zi=1:length(mds_safe)
    print("$(julia_fw_sim_safe.semu_mass_ratios[zi]) --> $(mds_safe[zi]) : $(mds_fast[zi]) \n")
end

## Create flux polyhedron:
constraints_config_01 = ["Constraints_FixedRatios","Constraints_BiomassRatios","Constraints_Measurements_01","Constraints_IrreversibilityPublication"]
constraints_01 = reduce( (x,y)->[x;y] , map( x -> fluxi1.linear_constraints[x] , constraints_config_01 ) )
fp1 = MetabolicFluxAnalysis.get_flux_polyhedron( fluxi1.net , constraints_01 , max_val=2000 )

# parametrize the flux polytope
rfd_parametrization = MetabolicFluxAnalysis.get_rounded_fulldimensional_parametrization( fp1 ; remove_red_constr=1)

@assert MetabolicFluxAnalysis.isinside( rfd_parametrization.p_opt , rfd_parametrization.cheby_p_opt[:,:] )
@test MetabolicFluxAnalysis.isinside( rfd_parametrization.p_opt , rfd_parametrization.cheby_p_opt[:,:] )
print("Flux Polytop has dimension $(size(rfd_parametrization.p_opt.G,2))")

xx = MetabolicFluxAnalysis.sample_unif_hr( rfd_parametrization.p_opt , rfd_parametrization.cheby_p_opt , 5000 , 1000 );
xx_flux = MetabolicFluxAnalysis.eval_opt2raw(rfd_parametrization,xx)

results_safe = zeros(length(julia_fw_sim_safe.target_mass_ratios),5000)
results_fast = zeros(length(julia_fw_sim_fast.target_mass_ratios),5000)

println("\nBenchmark")
tic()
for zi=1:size(xx_flux,2)
    results_safe[:,zi] = jfw_safe(mds_safe,xx_flux[:,zi])
end
toc()
tic()
for zi=1:size(xx_flux,2)
    results_fast[:,zi] = jfw_fast(mds_fast,xx_flux[:,zi])
end
toc()

[ results_safe[:,1] results_fast[:,1] ]

maximum( abs.( results_safe[:]-results_fast[:] ) )

##
MetabolicFluxAnalysis.parametrization_wiechert_exchange( fluxi1.net , constraints_01 , 2000. ; sx_param="log" )


text:
# This dictionary maps easy to remember names to Youtube video IDs
# after adding an ID here, you can use the {{youtube <shortname>}}
# syntax in your markdown files to embed the video into the page!
videos = Dict(
              "course-intro" => "vxjRWtWoD_w",
              "installation" => "OOjKEgbt8AI",
              "array-intro"  => "CwDI-YOjWhc",
              "cute-one"     => "foN1_hAGfNg",
              "images-intro" => "DGojI9xcCfg",
              "convolution"  => "8rrHTtUzyZA",
              "ted-talk"     => "qGW0GT1rCvs",
              "image-seam"   => "rpB6zQNsbQU",
              "array-views"  => "gTGJ80HayK0",
              "image-seam-reminiscing" => "IQxN1Q8W6bI",
              "james-image-seam" => "ALcohd1q3dk",
              "conv-gpus"    => "aa3JkX_cj_I",
              "conv-real-world" => "e6WnzfvnFlY",
              "types"        => "yU8P_cHPn8Q",
              "dispatch"     => "DXtbaSP_LFI",
              "ides"         => "PgeLMzw_-Ww",
              "structure"    => "ConoBmjlivs",
              "macros-intro" => "e6LGMeoQhfs",
              "understanding-data" => "KrQV6mZ8hvI",
              "introspection" => "IuOXXQR7dAo",
              "covid-data" => "m1dmT-31Qwc",
              "dataframes" => "Pt8Iz4Udg2E",
              "functions-are-objects" => "_O-HBDZMLrM",
              "covid-live" => "Yx055xdSkx0",
              "computational-illustrated" => "6bBFkBCzwh4",
              "matrix-graphs" => "zxHVpNnFt1U",
              "verbs-nouns" => "LvoLXE0U5og",
              "grant-epidemic" => "ErO_Hy01X98",
              "r0"           => "VNo5WrKZ8Yc",
              "self-doc"     => "MQoE69CbfHo",
              "paramtypes"   => "2WVFvRfocjI",
              "raytracing1"  => "MkkZb5V6HqM",
              "byop"         => "dczkYlOM2sg",
              "what-is-array" => "gUZVpMUY4qY",
              "raytracing2" => "JwyQezsQkkw",
              "resistors"   => "UKG-xk2F3Ak",
              "hier-thinking" => "rJyJZ_fMy9Q",
              "pde-schemes" => "f7g1LTfNmnA",
              "multigrid" => "rRCGNvMdLEY",
)

max_stars_repo_name: mathijsvdv/ComputationalThinking

max_issues_repo_name: mathijsvdv/ComputationalThinking

max_forks_repo_name: mathijsvdv/ComputationalThinking


text:
module QuDiffEq

using Yao
using YaoBlocks
using DiffEqBase
using BitBasis
using LinearAlgebra
using ForwardDiff

include("QuDiffProblem.jl")
include("QuDiffAlgs.jl")
include("TaylorTrunc.jl")
include("QuDiffHHL.jl")
include("HHL.jl")
include("PhaseEstimation.jl")
include("QFT.jl")
include("QuLDE.jl")
include("QuNLDE.jl")
end # module


text:
path = joinpath(@__DIR__, "resources", "TestPkg")

if VERSION >= v"1.5"
    Pkg.develop(; path=path)
else
    Pkg.develop(PackageSpec(; path=path))
end

# Check to see if we get any warnings when using AWS.jl inside of another package.
out = @capture_out begin
    err = @capture_err begin
        @eval using TestPkg
    end

    @test isempty(err)
end

@test isempty(out)


text:
using GellMannMatrices
using LinearAlgebra
using SparseArrays
using Test

@testset "GellMannMatrices.jl" begin
    # d=2
    @test (@inferred gellmann(1)) == []
    @test (@inferred gellmann(SparseMatrixCSC{ComplexF64, Int}, 1)) == []
    @test (@inferred gellmann(1; skip_identity=false)) == [ones(1,1)]

    # Pauli matrices (d=2)
    σᵢ = [[0 1; 1 0], [0 -1im; 1im 0], [1 0; 0 -1]]
    @test (@inferred gellmann(2)) ≈ σᵢ
    @test (@inferred gellmann(SparseMatrixCSC{ComplexF64, Int}, 2)) ≈ σᵢ
    @test (@inferred gellmann(2; skip_identity=false)) ≈ [σᵢ..., [1 0; 0 1]]

    # Gell-Mann matrices (d=3)
    Λᵢ = [[0 1 0; 1 0 0; 0 0 0], [0 -1im 0; 1im 0 0; 0 0 0], [1 0 0; 0 -1 0; 0 0 0],
          [0 0 1; 0 0 0; 1 0 0], [0 0 -1im; 0 0 0; 1im 0 0], [0 0 0; 0 0 1; 0 1 0],
          [0 0 0; 0 0 -1im; 0 1im 0], [1 0 0; 0 1 0; 0 0 -2]/√3]
    @test (@inferred gellmann(3)) ≈ Λᵢ
    @test (@inferred gellmann(SparseMatrixCSC{ComplexF64, Int}, 3)) ≈ Λᵢ
    @test (@inferred gellmann(3; skip_identity=false)) ≈ [Λᵢ..., [1 0 0; 0 1 0; 0 0 1]]

    # hermicity, tracelessness, & orthogonality
    for d in 1:3
        ms = gellmann(d, skip_identity=false, norm_identity=true)
        for (i,mᵢ) in enumerate(ms)
            @test mᵢ ≈ mᵢ'
            if i ≠ d*d
                @test norm(tr(mᵢ)) < 1e-12
            end
            for (j,mⱼ) in enumerate(ms)
                if i == j
                    @test abs(tr(mᵢ'*mᵢ)) ≈ 2 # Frobenius matrix norm
                else
                    @test abs(tr(mᵢ'*mⱼ)) < 1e-12
                end
            end
        end
    end

    # errors
    @test_throws DomainError gellmann(0)
    @test_throws DomainError gellmann(Matrix{Float64}, 3)
    @test_throws DomainError GellMannMatrices.diag_gellmann(Matrix{ComplexF64}, 3, 2)
    @test_throws DomainError GellMannMatrices.offdiag_gellmann(Matrix{ComplexF64}, 3, 3, 3)
end


text:
package java.nio.file;

import java.io.IOException;

public final class Files {
    private static byte{L} sink;

    public static Path createTempDirectory(String path, Object[] attrs) throws IOException {
	if (path == "foo") {
	    return null;
	} else {
	    return null;
	}
    }

    public static Path createFile(Path path, Object[] attrs) throws IOException {
	return path;
    }

    public static Path write(Path path, byte[] bytes, Object[] options) throws IOException {
	for (int i = 0; i < bytes.length; i++) {
	    sink = bytes[i];
	}
	return path;
    }

    public static byte[] readAllBytes(Path path) throws IOException {
	byte[] bytes = new byte[1];
	bytes[0] = sink;
	return bytes;
    }
}

max_stars_repo_name: HarvardPL/cryptoerase

max_issues_repo_name: HarvardPL/cryptoerase

max_forks_repo_name: HarvardPL/cryptoerase