diff --git a/.vscode/settings.json b/.vscode/settings.json index e62fcd2..691a8f6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,3 @@ { - "C_Cpp.errorSquiggles": "Disabled", - "julia.environmentPath": "/Users/baptiste/Documents/nano-optics/CoupledDipole.jl" + "C_Cpp.errorSquiggles": "Disabled" } \ No newline at end of file diff --git a/Project.toml b/Project.toml index 6c253d5..3a6caf8 100644 --- a/Project.toml +++ b/Project.toml @@ -4,10 +4,13 @@ authors = ["baptiste"] version = "0.1.0" [deps] +Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45" +CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" +QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" diff --git a/dev/book/dimer_linear.jl b/dev/book/dimer_linear.jl index 27813b3..b8f5734 100644 --- a/dev/book/dimer_linear.jl +++ b/dev/book/dimer_linear.jl @@ -10,13 +10,6 @@ using FastGaussQuadrature using DataFrames using VegaLite -## materials -wavelength = collect(450:2:850.0) -media = Dict([("Au", epsilon_Au), ("medium", x -> 1.33)]) -mat = Material(wavelength, media) - -## reference geometry -cl0 = cluster_single(20, 20, 40) # dimer_model <- function(d, orientation = c("head-to-tail", "side-by-side"), @@ -36,75 +29,130 @@ cl0 = cluster_single(20, 20, 40) # } # } -UnitQuaternion(0, 0, 1, 0) # rotation π/2 about y -UnitQuaternion(√2/2, √2/2, 0, 0) -rotation_angle(UnitQuaternion(√2/2, √2/2, 0, 0)) -rotation_axis(UnitQuaternion(√2/2, √2/2, 0, 0)) -RotZYZ(π/2,0,0) -RotMatrix(UnitQuaternion(√2/2, √2/2, 0, 0)) - -RotY(π/2) - - -function model(; d=80, orientation="head-to-tail") +# UnitQuaternion(0, 0, 1, 0) # rotation π/2 about y +# UnitQuaternion(√2/2, √2/2, 0, 0) +# rotation_angle(UnitQuaternion(√2/2, √2/2, 0, 0)) +# rotation_axis(UnitQuaternion(√2/2, √2/2, 0, 0)) +# RotZYZ(π/2,0,0) +# RotMatrix(UnitQuaternion(√2/2, √2/2, 0, 0)) + +# RotY(π/2) + +# initial version, but now prefer low level cluster +# function model(; d=80, orientation="head-to-tail") +# if orientation == "head-to-tail" +# # dimer axis along y, particle axis along y +# cl = cluster_dimer(d, 20., 40, 20, 0) +# ## incidence: along z (no rotation) +# Incidence = [RotZ(0.)] +# res = spectrum_dispersion(cl, mat, Incidence) +# d = dispersion_df(res, mat.wavelengths) +# return(filter(:polarisation => ==("p"), d)) +# elseif orientation == "side-by-side" +# # dimer axis along y, particle axis along z +# cl = cluster_dimer(d, 20., 20, 40, 0) +# ## incidence: along x so rotate z around y axis by π/2 +# Incidence = [RotY(π/2)] +# res = spectrum_dispersion(cl, mat, Incidence) +# d = dispersion_df(res, mat.wavelengths) +# return(filter(:polarisation => ==("s"), d)) +# end + +# error("unknown orientation given") +# end + +function model(; d=100, orientation="head-to-tail") if orientation == "head-to-tail" - # dimer axis along y, particle axis along y - cl = cluster_dimer(d, 20., 40, 20, 0) - ## incidence: along z (no rotation) - Incidence = [RotZ(0.)] - res = spectrum_dispersion(cl, mat, Incidence) - d = dispersion_df(res, mat.wavelengths) - return(filter(:polarisation => ==("p"), d)) + # dimer axis along y + positions = [SVector(0.0, y, 0.0) for y in (-d / 2.0, d / 2.0)] elseif orientation == "side-by-side" - # dimer axis along y, particle axis along z - cl = cluster_dimer(d, 20., 20, 40, 0) - ## incidence: along x so rotate z around y axis by π/2 - Incidence = [RotY(π/2)] - res = spectrum_dispersion(cl, mat, Incidence) - d = dispersion_df(res, mat.wavelengths) - return(filter(:polarisation => ==("s"), d)) + # dimer axis along x + positions = [SVector(x, 0.0, 0.0) for x in (-d / 2.0, d / 2.0)] end - - error("unknown orientation given") -end + sizes = [SVector(20.0, 50.0, 20.0), SVector(20.0, 50.0, 20.0)] + rotations = repeat([UnitQuaternion(1.0, 0.0, 0.0, 0.0)], 2) + materials = repeat(["Au"], 2) + cl = Cluster(positions, rotations, sizes, materials, "particle") + + Incidence = [RotZ(0.0)] ## incidence: along z (no rotation) + res = spectrum_dispersion(cl, mat, Incidence) + d = dispersion_df(res, mat.wavelengths) +end -wavelength = collect(400:2:800.0) +## materials +wavelength = collect(450:2:850.0) media = Dict([("Au", epsilon_Au), ("medium", x -> 1.33)]) mat = Material(wavelength, media) -# cl = cluster_dimer(80, 20., 40, 20, 0) -# Incidence = [RotZ(0.),RotZ(π/2.),RotZ(0.),RotZ(π/2.),RotZ(0.)] -# res = spectrum_dispersion(cl, mat, Incidence) -# d = dispersion_df(res, mat.wavelengths) -# print(d) -params = expand_grid(d=range(80, 200, step=20), orientation=("head-to-tail", "side-by-side")) +params = expand_grid(d=range(100, 500, step=50), orientation=("head-to-tail", "side-by-side")) all = pmap_df(params, p -> model(; p...)) -s = spectrum_dispersion(cl0, mat, [RotZ(0.)]) -single = dispersion_df(s, mat.wavelengths) - +## reference geometry +wavelength = collect(450:2:850.0) +media = Dict([("Au", epsilon_Au), ("medium", x -> 1.33)]) +mat = Material(wavelength, media) -s = spectrum_oa(cl0, mat) -single = oa_df(s, mat.wavelengths) +cl0 = cluster_single(20.0, 50.0, 20.0) +# cl0 = cluster_single(50.0, 20.0, 20.0) +# s = spectrum_dispersion(cl0, mat, [UnitQuaternion(RotZ(0.0))]) +s = spectrum_dispersion(cl0, mat, [SVector(0.0, 0.0, 0.0)]) +single = dispersion_df(s, mat.wavelengths) -xy = data(single) * mapping(:wavelength, :value, color=:type, row=:crosstype,col=:type) +xy = data(single) * mapping(:wavelength, :value, row=:crosstype, col=:polarisation) layer = visual(Lines) draw(layer * xy, facet=(; linkyaxes=:none)) +# d = [insertcols(all, :cluster => "dimer"), +# insertcols(single, :cluster => "single", :d => missing, :orientation => missing)] +# @vlplot(data = d, +# width = 400, +# height = 300, +# mark = {:line}, +# row = "crosstype", +# resolve = {scale = {y = "independent"}}, +# encoding = {x = "wavelength:q", y = "value:q", color = "d:n", strokeDash = "cluster:n"} +# ) using AlgebraOfGraphics, CairoMakie # set_aog_theme!() -xy = data(all) * mapping(:wavelength, :value, color=:d => nonnumeric, col=:orientation, row=:crosstype, linestyle=:crosstype => nonnumeric) +xy = data(filter(:polarisation => ==("p"), all)) * mapping(:wavelength, :value, color=:d => nonnumeric, col=:orientation, row=:crosstype) layer = visual(Lines) draw(layer * xy, facet=(; linkyaxes=:none)) + + + + +# s = spectrum_oa(cl0, mat) +# single = oa_df(s, mat.wavelengths) + + +# xy = data(single) * mapping(:wavelength, :value, color=:type, row=:crosstype,col=:type) +# layer = visual(Lines) +# draw(layer * xy, facet=(; linkyaxes=:none)) + +using Arrow +Arrow.write("test.arrow", single) +Arrow.write("testc.arrow", single, compress=:lz4) + + +y = Arrow.Table("test.arrow") |> DataFrame +x = Arrow.Table("testr.arrow") |> DataFrame +eltype.(eachcol(x)) + +# using CSV + +# CSV.write("test.csv", single) + + + diff --git a/dev/debug.R b/dev/debug.R new file mode 100644 index 0000000..0403837 --- /dev/null +++ b/dev/debug.R @@ -0,0 +1,65 @@ +library(cda) +# library(rgl) +library(ggplot2) +library(dielectric) +library(cubs) +library(tidyr) +library(dplyr) +library(purrr) +library(progress) + + +wavelength = c(400, 500) +gold = epsAu(wavelength) + +cl = structure(list(positions = structure(c(-50, 0, 0, 50, 0, 00), dim = c(3,2)), + sizes = structure(c(50, 20, 20, 50, 20, 20), dim = c(3,2)), + angles = structure(c(0, 0, 0, 0, 0, 0), dim = c(3,2))), + class = "cluster") + +cl0 = structure(list(positions = structure(c(0, 0, 0), dim = c(3,1)), + sizes = structure(c(50, 20, 20), dim = c(3,1)), + angles = structure(c(0, 0, 0), dim = c(3,1))), + class = "cluster") + +cl0 +cl$positions + + +ii = 1; + +lambda = gold$wavelength[ii] +n_medium = 1.33 +kn = n_medium * 2*pi / lambda + +# gold[ii,] +# -1.6496568840720354 + 5.7717630808981655im + +# alpha_kuwata(500, -10+1im, 1.33^2, SVector(30, 30, 50)) +# 3-element SVector{3, ComplexF64} with indices SOneTo(3): +# 77076.04648078185 + 26235.664281642246im +# 77076.04648078185 + 26235.664281642246im +# -98187.15974124733 + 205835.30299929058im +# V <- 4 * pi/3 * 30*30*50 +# chi <- cda:::depolarisation(30,30,50) +# cda:::alpha_kuwata(500, -10+1i, V, 30, chi[1], 1.33) +# cda:::alpha_kuwata(500, -10+1i, V, 50, chi[3], 1.33) + +Alpha = cda::alpha_ellipsoid(sizes = cl0$sizes, material = gold[ii,], medium = n_medium) + +# Alpha = alpha_spheroids(λ, ε, n_medium^2, cl.sizes) +# 2-element Vector{SVector{3, ComplexF64}}: +# [10898.262981422746 + 18516.11377073886im, -903.6988080340118 + 24897.841185369187im, 10898.262981422744 + 18516.113770738863im] +# [10898.262981422746 + 18516.11377073886im, -903.6988080340118 + 24897.841185369187im, 10898.262981422744 + 18516.113770738863im] + +# alpha_kuwata(400, ε, 1.33^2, SVector(20, 20, 50)) +# 3-element SVector{3, ComplexF64} with indices SOneTo(3): +# 12403.616901231882 + 13704.077043611223im +# 12403.616901231882 + 13704.077043611223im +# -6869.361725855006 + 22867.056384367785im + +ParticleRotations = cl.rotations +AlphaBlocks = map((R, A) -> R' * diagm(A) * R, ParticleRotations, Alpha) + + + diff --git a/dev/read.R b/dev/read.R new file mode 100644 index 0000000..1c9c145 --- /dev/null +++ b/dev/read.R @@ -0,0 +1,14 @@ +# install.packages("arrow") + +library(arrow) + +a <- arrow::read_feather('test.arrow') +str(a) + +b <- arrow::read_feather('testc.arrow') +str(b) + +c <- arrow::read_csv_arrow('test.csv') +str(c) + +arrow::write_feather(a, 'testr.arrow', compression='lz4') diff --git a/dev/test.arrow b/dev/test.arrow new file mode 100644 index 0000000..3739f55 Binary files /dev/null and b/dev/test.arrow differ diff --git a/dev/test.csv b/dev/test.csv new file mode 100644 index 0000000..38145e8 --- /dev/null +++ b/dev/test.csv @@ -0,0 +1,1207 @@ +wavelength,value,type,crosstype +400.0,3820.8776523495635,average,extinction +402.0,3806.991835868431,average,extinction +404.0,3792.80966900515,average,extinction +406.0,3778.3636651167885,average,extinction +408.0,3763.690402223291,average,extinction +410.0,3748.830347881011,average,extinction +412.0,3733.827691925967,average,extinction +414.0,3718.7301861627516,average,extinction +416.0,3703.588989720573,average,extinction +418.0,3688.458518631345,average,extinction +420.0,3673.396298180439,average,extinction +422.0,3658.462816705044,average,extinction +424.0,3643.721379728833,average,extinction +426.0,3629.2379635835305,average,extinction +428.0,3615.081067936197,average,extinction +430.0,3601.3215668756197,average,extinction +432.0,3588.0325583752897,average,extinction +434.0,3575.289212011295,average,extinction +436.0,3563.168614742352,average,extinction +438.0,3551.7496143319017,average,extinction +440.0,3541.1126595874953,average,extinction +442.0,3531.339635992285,average,extinction +444.0,3522.513694490178,average,extinction +446.0,3514.719070142882,average,extinction +448.0,3508.040886085505,average,extinction +450.0,3502.564936646494,average,extinction +452.0,3498.3774416437072,average,extinction +454.0,3495.564761693397,average,extinction +456.0,3494.213061841838,average,extinction +458.0,3494.407907917555,average,extinction +460.0,3496.233776673464,average,extinction +462.0,3499.773457017016,average,extinction +464.0,3505.107315400048,average,extinction +466.0,3512.312393771428,average,extinction +468.0,3521.461303438957,average,extinction +470.0,3532.6208728613615,average,extinction +472.0,3545.8505020124935,average,extinction +474.0,3561.200170881319,average,extinction +476.0,3578.708045440011,average,extinction +478.0,3598.397621835199,average,extinction +480.0,3620.2743497817864,average,extinction +482.0,3644.321680743603,average,extinction +484.0,3670.4964975684416,average,extinction +486.0,3698.723902496344,average,extinction +488.0,3728.891373179878,average,extinction +490.0,3760.8423453758523,average,extinction +492.0,3794.3693504000726,average,extinction +494.0,3829.206929146655,average,extinction +496.0,3865.0246651744515,average,extinction +498.0,3901.4208272136643,average,extinction +500.0,3937.9172820874096,average,extinction +502.0,3973.956521148489,average,extinction +504.0,4008.901815963427,average,extinction +506.0,4042.0416494339966,average,extinction +508.0,4072.599611851365,average,extinction +510.0,4099.750852983374,average,extinction +512.0,4122.6458847726335,average,extinction +514.0,4140.441990111275,average,extinction +516.0,4152.341698516068,average,extinction +518.0,4157.636779776697,average,extinction +520.0,4155.755092646789,average,extinction +522.0,4146.306591062981,average,extinction +524.0,4129.124069860118,average,extinction +526.0,4104.294061342832,average,extinction +528.0,4072.173840293454,average,extinction +530.0,4033.3917863485963,average,extinction +532.0,3988.830238308497,average,extinction +534.0,3939.5921376804517,average,extinction +536.0,3886.9547870235047,average,extinction +538.0,3832.315547398473,average,extinction +540.0,3777.1350002069685,average,extinction +542.0,3722.8829289198547,average,extinction +544.0,3670.9915611435094,average,extinction +546.0,3622.819118170039,average,extinction +548.0,3579.625166814484,average,extinction +550.0,3542.557841949385,average,extinction +552.0,3512.651901514866,average,extinction +554.0,3490.8358734045887,average,extinction +556.0,3477.946245014462,average,extinction +558.0,3474.746658077579,average,extinction +560.0,3481.9503026832012,average,extinction +562.0,3500.2440544395163,average,extinction +564.0,3530.313284267236,average,extinction +566.0,3572.8666317885018,average,extinction +568.0,3628.6603339283056,average,extinction +570.0,3698.521920900168,average,extinction +572.0,3783.373223691784,average,extinction +574.0,3884.252676133567,average,extinction +576.0,4002.336834589577,average,extinction +578.0,4138.960866570456,average,extinction +580.0,4295.637452329466,average,extinction +582.0,4474.073061532421,average,extinction +584.0,4676.179851383303,average,extinction +586.0,4904.080400327256,average,extinction +588.0,5160.101033657963,average,extinction +590.0,5446.747481465192,average,extinction +592.0,5766.653893489929,average,extinction +594.0,6122.492706843752,average,extinction +596.0,6516.8285216152635,average,extinction +598.0,6951.894262739318,average,extinction +600.0,7429.263333228288,average,extinction +602.0,7949.389046530387,average,extinction +604.0,8510.985838715516,average,extinction +606.0,9110.24130089039,average,extinction +608.0,9739.881927219103,average,extinction +610.0,10388.177331098299,average,extinction +612.0,11038.061878200368,average,extinction +614.0,11666.669102435222,average,extinction +616.0,12245.6745607417,average,extinction +618.0,12742.852104365355,average,extinction +620.0,13125.072375327507,average,extinction +622.0,13362.55754322945,average,extinction +624.0,13433.63294672575,average,extinction +626.0,13328.743224224101,average,extinction +628.0,13052.46142103153,average,extinction +630.0,12622.773469011769,average,extinction +632.0,12067.856094526967,average,extinction +634.0,11421.395730848453,average,extinction +636.0,10717.804670826208,average,extinction +638.0,9988.420712622576,average,extinction +640.0,9259.196432714642,average,extinction +642.0,8549.833967251636,average,extinction +644.0,7873.997452432416,average,extinction +646.0,7240.152345534789,average,extinction +648.0,6652.651632333374,average,extinction +650.0,6112.815593312337,average,extinction +652.0,5619.870760339356,average,extinction +654.0,5171.6992526530985,average,extinction +656.0,4765.400276605294,average,extinction +658.0,4397.689678335309,average,extinction +660.0,4065.170962245978,average,extinction +662.0,3764.509934596291,average,extinction +664.0,3492.5401538119295,average,extinction +666.0,3246.3204920875505,average,extinction +668.0,3023.160687794464,average,extinction +670.0,2820.6262959872984,average,extinction +672.0,2636.5309927748576,average,extinction +674.0,2468.9216389134517,average,extinction +676.0,2316.059681487491,average,extinction +678.0,2176.401195913457,average,extinction +680.0,2048.5769963474027,average,extinction +682.0,1931.3736553302554,average,extinction +684.0,1823.7158867053017,average,extinction +686.0,1724.6504967902729,average,extinction +688.0,1633.3319530137483,average,extinction +690.0,1549.009525717711,average,extinction +692.0,1471.0159062424013,average,extinction +694.0,1398.7571782286016,average,extinction +696.0,1331.7040095272812,average,extinction +698.0,1269.3839326967927,average,extinction +700.0,1211.3745885227897,average,extinction +702.0,1157.297816551073,average,extinction +704.0,1106.814487526336,average,extinction +706.0,1059.619983798434,average,extinction +708.0,1015.4402445537149,average,extinction +710.0,974.028302799565,average,extinction +712.0,935.1612502068517,average,extinction +714.0,898.6375741423868,average,extinction +716.0,864.274818515681,average,extinction +718.0,831.9075264738836,average,extinction +720.0,801.3854285785781,average,extinction +722.0,772.5718449688602,average,extinction +724.0,745.3422742381559,average,extinction +726.0,719.5831454055818,average,extinction +728.0,695.1907125182381,average,extinction +730.0,672.0700741439877,average,extinction +732.0,650.1343023630283,average,extinction +734.0,629.3036678921277,average,extinction +736.0,609.5049497225951,average,extinction +738.0,590.6708191606092,average,extinction +740.0,572.7392894601512,average,extinction +742.0,555.6532233634556,average,extinction +744.0,539.359891836402,average,extinction +746.0,523.8105781281319,average,extinction +748.0,508.9602220136582,average,extinction +750.0,494.7670997109884,average,extinction +752.0,481.1925355139132,average,extinction +754.0,468.20064165943927,average,extinction +756.0,455.7580833649423,average,extinction +758.0,443.83386633275194,average,extinction +760.0,432.3991443364726,average,extinction +762.0,421.4270447799758,average,extinction +764.0,410.89251036212573,average,extinction +766.0,400.77215519241975,average,extinction +768.0,391.04413388886934,average,extinction +770.0,381.68802235295027,average,extinction +772.0,372.68470906029484,average,extinction +774.0,364.0162958324859,average,extinction +776.0,355.66600716703806,average,extinction +778.0,347.6181073013093,average,extinction +780.0,339.85782427331964,average,extinction +782.0,332.37128031965045,average,extinction +784.0,325.14542801905765,average,extinction +786.0,318.1679916511369,average,extinction +788.0,311.4274132933451,average,extinction +790.0,304.91280322767875,average,extinction +792.0,298.61389427102193,average,extinction +794.0,292.52099968132006,average,extinction +796.0,286.6249743256968,average,extinction +798.0,280.9171788270622,average,extinction +800.0,275.389446432915,average,extinction +400.0,3343.153733977972,average,absorption +402.0,3336.2163972558624,average,absorption +404.0,3329.013269144774,average,absorption +406.0,3321.5721965773573,average,absorption +408.0,3313.9238481124858,average,absorption +410.0,3306.1016281756188,average,absorption +412.0,3298.1415990189066,average,absorption +414.0,3290.0824087814367,average,absorption +416.0,3281.965223730578,average,absorption +418.0,3273.8336626334753,average,absorption +420.0,3265.733731221753,average,absorption +422.0,3257.7137548432784,average,absorption +424.0,3249.824307608569,average,absorption +426.0,3242.118136599748,average,absorption +428.0,3234.650079979858,average,absorption +430.0,3227.476978083814,average,absorption +432.0,3220.6575767559484,average,absorption +434.0,3214.252422292207,average,absorption +436.0,3208.3237473208374,average,absorption +438.0,3202.9353467901637,average,absorption +440.0,3198.152442905077,average,absorption +442.0,3194.041537346946,average,absorption +444.0,3190.670248407787,average,absorption +446.0,3188.1071297520803,average,absorption +448.0,3186.421466371541,average,absorption +450.0,3185.6830419007574,average,absorption +452.0,3185.961869794397,average,absorption +454.0,3187.3278789071483,average,absorption +456.0,3189.8505417415563,average,absorption +458.0,3193.5984310128842,average,absorption +460.0,3198.6386872036173,average,absorption +462.0,3205.0363764309814,average,absorption +464.0,3212.85371423284,average,absorption +466.0,3222.1491268213113,average,absorption +468.0,3232.976117033184,average,absorption +470.0,3245.381897760291,average,absorption +472.0,3259.4057513040616,average,absorption +474.0,3275.0770692321285,average,absorption +476.0,3292.413024468197,average,absorption +478.0,3311.415826309295,average,absorption +480.0,3332.069510937706,average,absorption +482.0,3354.336226267789,average,absorption +484.0,3378.151982586967,average,absorption +486.0,3403.421861869235,average,absorption +488.0,3430.0147118128866,average,absorption +490.0,3457.757398931932,average,absorption +492.0,3486.428761884461,average,absorption +494.0,3515.7534947180116,average,absorption +496.0,3545.396301632946,average,absorption +498.0,3574.9567993848095,average,absorption +500.0,3603.9657953352958,average,absorption +502.0,3631.88372660039,average,absorption +504.0,3658.1021880771573,average,absorption +506.0,3681.9495732096702,average,absorption +508.0,3702.7018595556133,average,absorption +510.0,3719.5994425663976,average,absorption +512.0,3731.870606907567,average,absorption +514.0,3738.761690140054,average,absorption +516.0,3739.5732352293917,average,absorption +518.0,3733.7004934668416,average,absorption +520.0,3720.675639718046,average,absorption +522.0,3700.2081727886743,average,absorption +524.0,3672.219410534694,average,absorption +526.0,3636.8669593092745,average,absorption +528.0,3594.555674551287,average,absorption +530.0,3545.9329337902136,average,absorption +532.0,3491.8678498642394,average,absorption +534.0,3433.4160498190813,average,absorption +536.0,3371.773449756911,average,absorption +538.0,3308.2237151981644,average,absorption +540.0,3244.08458774802,average,absorption +542.0,3180.6579454261073,average,absorption +544.0,3119.1874897109687,average,absorption +546.0,3060.826581968561,average,absorption +548.0,3006.617285900067,average,absorption +550.0,2957.4803684203857,average,absorption +552.0,2914.2150348551527,average,absorption +554.0,2877.5065879276995,average,absorption +556.0,2847.939979889114,average,absorption +558.0,2826.017295378447,average,absorption +560.0,2812.1774602363575,average,absorption +562.0,2806.8168239732,average,absorption +564.0,2810.3096353022806,average,absorption +566.0,2823.027769247036,average,absorption +568.0,2845.3593408488855,average,absorption +570.0,2877.726040997098,average,absorption +572.0,2920.5991511205734,average,absorption +574.0,2974.5142365000997,average,absorption +576.0,3040.0844833700903,average,absorption +578.0,3118.0125291304525,average,absorption +580.0,3209.1004270117905,average,absorption +582.0,3314.257065834605,average,absorption +584.0,3434.5018995657115,average,absorption +586.0,3570.9631841362007,average,absorption +588.0,3724.8680106405027,average,absorption +590.0,3897.5201944868495,average,absorption +592.0,4090.260460266923,average,absorption +594.0,4304.401311037223,average,absorption +596.0,4541.126530846959,average,absorption +598.0,4801.342669892156,average,absorption +600.0,5085.4676934142835,average,absorption +602.0,5393.141456077785,average,absorption +604.0,5722.845976398577,average,absorption +606.0,6071.434072478723,average,absorption +608.0,6433.587387892554,average,absorption +610.0,6801.263787031843,average,absorption +612.0,7163.250855618539,average,absorption +614.0,7505.008706226713,average,absorption +616.0,7809.036168414656,average,absorption +618.0,8055.983851432552,average,absorption +620.0,8226.611700330855,average,absorption +622.0,8304.424520261276,average,absorption +624.0,8278.477631821617,average,absorption +626.0,8145.590782519898,average,absorption +628.0,7911.2361627244245,average,absorption +630.0,7588.747689712587,average,absorption +632.0,7197.07866459364,average,absorption +634.0,6757.809326863562,average,absorption +636.0,6292.240673743358,average,absorption +638.0,5819.200104247393,average,absorption +640.0,5353.810308336801,average,absorption +642.0,4907.14253890847,average,absorption +644.0,4486.496948761713,average,absorption +646.0,4096.022179163262,average,absorption +648.0,3737.4437697858452,average,absorption +650.0,3410.755291759507,average,absorption +652.0,3114.8003944852785,average,absorption +654.0,2847.7249590672623,average,absorption +656.0,2607.3071785579446,average,absorption +658.0,2391.1858602905913,average,absorption +660.0,2197.0100496152622,average,absorption +662.0,2022.531048842087,average,absorption +664.0,1865.6540572796173,average,absorption +666.0,1724.4625930776917,average,absorption +668.0,1597.2252902254968,average,absorption +670.0,1482.3918162596494,average,absorption +672.0,1378.5825114629658,average,absorption +674.0,1284.5747983719918,average,absorption +676.0,1199.2883205526,average,absorption +678.0,1121.7700227279543,average,absorption +680.0,1051.1798836152384,average,absorption +682.0,986.7776844069958,average,absorption +684.0,927.9109856579995,average,absorption +686.0,874.0043549265567,average,absorption +688.0,824.5498100360635,average,absorption +690.0,779.0983998584026,average,absorption +692.0,737.2528236173623,average,absorption +694.0,698.6609825427856,average,absorption +696.0,663.0103587822315,average,absorption +698.0,630.0231222239728,average,absorption +700.0,599.4518740192542,average,absorption +702.0,571.075944684892,average,absorption +704.0,544.6981738554837,average,absorption +706.0,520.1421075392113,average,absorption +708.0,497.24955684903284,average,absorption +710.0,475.8784695152215,average,absorption +712.0,455.9010720091356,average,absorption +714.0,437.2022458474827,average,absorption +716.0,419.67810665547745,average,absorption +718.0,403.23475891397055,average,absorption +720.0,387.7872030717361,average,absorption +722.0,373.2583749403328,average,absorption +724.0,359.57830007147834,average,absorption +726.0,346.68334820617775,average,absorption +728.0,334.5155749348604,average,absorption +730.0,323.0221394661013,average,absorption +732.0,312.1547889096734,average,absorption +734.0,301.86940077362567,average,absorption +736.0,292.1255764859116,average,absorption +738.0,282.88627970529086,average,absorption +740.0,274.11751400664497,average,absorption +742.0,265.78803523195137,average,absorption +744.0,257.8690944064542,average,absorption +746.0,250.3342076442838,average,absorption +748.0,243.1589499209339,average,absorption +750.0,236.32076998177897,average,absorption +752.0,229.79882399509947,average,absorption +754.0,223.57382585215532,average,absorption +756.0,217.62791227220072,average,absorption +758.0,211.94452109226438,average,absorption +760.0,206.50828131475947,average,absorption +762.0,201.3049136543921,average,absorption +764.0,196.3211404728742,average,absorption +766.0,191.5446041184469,average,absorption +768.0,186.96379279970645,average,absorption +770.0,182.5679732218223,average,absorption +772.0,178.34712929975404,average,absorption +774.0,174.2919063391336,average,absorption +776.0,170.3935601423875,average,absorption +778.0,166.64391055664672,average,absorption +780.0,163.03529903201866,average,absorption +782.0,159.5605498047468,average,absorption +784.0,156.2129343604536,average,absorption +786.0,152.9861388686517,average,absorption +788.0,149.87423431163893,average,absorption +790.0,146.87164905924385,average,absorption +792.0,143.97314366606713,average,absorption +794.0,141.173787690301,average,absorption +796.0,138.46893835316519,average,absorption +798.0,135.8542208758323,average,absorption +800.0,133.3255103466082,average,absorption +400.0,477.72391837159216,average,scattering +402.0,470.7754386125678,average,scattering +404.0,463.79639986037694,average,scattering +406.0,456.79146853943035,average,scattering +408.0,449.7665541108051,average,scattering +410.0,442.7287197053926,average,scattering +412.0,435.6860929070609,average,scattering +414.0,428.6477773813143,average,scattering +416.0,421.6237659899951,average,scattering +418.0,414.6248559978701,average,scattering +420.0,407.66256695868634,average,scattering +422.0,400.7490618617663,average,scattering +424.0,393.8970721202655,average,scattering +426.0,387.11982698378205,average,scattering +428.0,380.43098795633966,average,scattering +430.0,373.84458879180625,average,scattering +432.0,367.37498161934167,average,scattering +434.0,361.03678971908835,average,scattering +436.0,354.8448674215148,average,scattering +438.0,348.81426754173776,average,scattering +440.0,342.9602166824178,average,scattering +442.0,337.29809864533905,average,scattering +444.0,331.84344608239064,average,scattering +446.0,326.6119403908021,average,scattering +448.0,321.6194197139636,average,scattering +450.0,316.8818947457363,average,scattering +452.0,312.4155718493111,average,scattering +454.0,308.2368827862486,average,scattering +456.0,304.3625201002822,average,scattering +458.0,300.8094769046705,average,scattering +460.0,297.5950894698466,average,scattering +462.0,294.73708058603563,average,scattering +464.0,292.25360116720753,average,scattering +466.0,290.1632669501179,average,scattering +468.0,288.48518640577197,average,scattering +470.0,287.2389751010709,average,scattering +472.0,286.4447507084316,average,scattering +474.0,286.1231016491905,average,scattering +476.0,286.2950209718144,average,scattering +478.0,286.98179552590454,average,scattering +480.0,288.2048388440806,average,scattering +482.0,289.985454475815,average,scattering +484.0,292.3445149814746,average,scattering +486.0,295.3020406271089,average,scattering +488.0,298.8766613669912,average,scattering +490.0,303.0849464439197,average,scattering +492.0,307.94058851561124,average,scattering +494.0,313.4534344286442,average,scattering +496.0,319.6283635415052,average,scattering +498.0,326.4640278288544,average,scattering +500.0,333.9514867521135,average,scattering +502.0,342.0727945481,average,scattering +504.0,350.7996278862694,average,scattering +506.0,360.09207622432683,average,scattering +508.0,369.8977522957519,average,scattering +510.0,380.15141041697717,average,scattering +512.0,390.77527786506744,average,scattering +514.0,401.68029997122215,average,scattering +516.0,412.7684632866772,average,scattering +518.0,423.9362863098571,average,scattering +520.0,435.07945292874246,average,scattering +522.0,446.0984182743071,average,scattering +524.0,456.90465932542327,average,scattering +526.0,467.4271020335588,average,scattering +528.0,477.6181657421666,average,scattering +530.0,487.4588525583821,average,scattering +532.0,496.96238844425716,average,scattering +534.0,506.17608786137026,average,scattering +536.0,515.1813372665937,average,scattering +538.0,524.0918322003089,average,scattering +540.0,533.050412458948,average,scattering +542.0,542.2249834937468,average,scattering +544.0,551.8040714325408,average,scattering +546.0,561.9925362014778,average,scattering +548.0,573.0078809144181,average,scattering +550.0,585.0774735289996,average,scattering +552.0,598.4368666597132,average,scattering +554.0,613.3292854768887,average,scattering +556.0,630.006265125348,average,scattering +558.0,648.7293626991323,average,scattering +560.0,669.7728424468439,average,scattering +562.0,693.4272304663169,average,scattering +564.0,720.0036489649566,average,scattering +566.0,749.8388625414657,average,scattering +568.0,783.3009930794199,average,scattering +570.0,820.7958799030706,average,scattering +572.0,862.7740725712106,average,scattering +574.0,909.7384396334663,average,scattering +576.0,962.2523512194863,average,scattering +578.0,1020.9483374400038,average,scattering +580.0,1086.5370253176773,average,scattering +582.0,1159.8159956978157,average,scattering +584.0,1241.6779518175908,average,scattering +586.0,1333.1172161910551,average,scattering +588.0,1435.2330230174616,average,scattering +590.0,1549.2272869783428,average,scattering +592.0,1676.3934332230046,average,scattering +594.0,1818.0913958065285,average,scattering +596.0,1975.7019907683048,average,scattering +598.0,2150.5515928471636,average,scattering +600.0,2343.7956398140027,average,scattering +602.0,2556.2475904526036,average,scattering +604.0,2788.1398623169407,average,scattering +606.0,3038.8072284116683,average,scattering +608.0,3306.2945393265513,average,scattering +610.0,3586.913544066453,average,scattering +612.0,3874.811022581829,average,scattering +614.0,4161.660396208508,average,scattering +616.0,4436.638392327049,average,scattering +618.0,4686.868252932805,average,scattering +620.0,4898.460674996652,average,scattering +622.0,5058.133022968176,average,scattering +624.0,5155.155314904134,average,scattering +626.0,5183.152441704205,average,scattering +628.0,5141.225258307104,average,scattering +630.0,5034.025779299182,average,scattering +632.0,4870.77742993333,average,scattering +634.0,4663.586403984895,average,scattering +636.0,4425.563997082851,average,scattering +638.0,4169.220608375179,average,scattering +640.0,3905.3861243778438,average,scattering +642.0,3642.6914283431656,average,scattering +644.0,3387.5005036707043,average,scattering +646.0,3144.1301663715267,average,scattering +648.0,2915.207862547528,average,scattering +650.0,2702.0603015528322,average,scattering +652.0,2505.0703658540783,average,scattering +654.0,2323.974293585837,average,scattering +656.0,2158.09309804735,average,scattering +658.0,2006.5038180447175,average,scattering +660.0,1868.1609126307155,average,scattering +662.0,1741.9788857542044,average,scattering +664.0,1626.8860965323126,average,scattering +666.0,1521.8578990098592,average,scattering +668.0,1425.9353975689683,average,scattering +670.0,1338.2344797276496,average,scattering +672.0,1257.9484813118916,average,scattering +674.0,1184.3468405414603,average,scattering +676.0,1116.771360934891,average,scattering +678.0,1054.631173185502,average,scattering +680.0,997.3971127321649,average,scattering +682.0,944.5959709232599,average,scattering +684.0,895.8049010473025,average,scattering +686.0,850.6461418637164,average,scattering +688.0,808.7821429776849,average,scattering +690.0,769.9111258593085,average,scattering +692.0,733.7630826250389,average,scattering +694.0,700.0961956858164,average,scattering +696.0,668.6936507450503,average,scattering +698.0,639.3608104728202,average,scattering +700.0,611.922714503536,average,scattering +702.0,586.2218718661812,average,scattering +704.0,562.1163136708526,average,scattering +706.0,539.4778762592231,average,scattering +708.0,518.1906877046822,average,scattering +710.0,498.14983328434363,average,scattering +712.0,479.26017819771636,average,scattering +714.0,461.43532829490437,average,scattering +716.0,444.59671186020364,average,scattering +718.0,428.6727675599131,average,scattering +720.0,413.5982255068423,average,scattering +722.0,399.3134700285276,average,scattering +724.0,385.76397416667777,average,scattering +726.0,372.89979719940413,average,scattering +728.0,360.6751375833781,average,scattering +730.0,349.0479346778865,average,scattering +732.0,337.9795134533548,average,scattering +734.0,327.4342671185021,average,scattering +736.0,317.37937323668365,average,scattering +738.0,307.7845394553184,average,scattering +740.0,298.6217754535064,average,scattering +742.0,289.86518813150406,average,scattering +744.0,281.49079742994786,average,scattering +746.0,273.47637048384826,average,scattering +748.0,265.80127209272433,average,scattering +750.0,258.44632972920954,average,scattering +752.0,251.39371151881377,average,scattering +754.0,244.62681580728392,average,scattering +756.0,238.13017109274165,average,scattering +758.0,231.88934524048764,average,scattering +760.0,225.89086302171327,average,scattering +762.0,220.12213112558385,average,scattering +764.0,214.5713698892515,average,scattering +766.0,209.22755107397293,average,scattering +768.0,204.0803410891629,average,scattering +770.0,199.1200491311279,average,scattering +772.0,194.3375797605408,average,scattering +774.0,189.72438949335242,average,scattering +776.0,185.2724470246506,average,scattering +778.0,180.97419674466263,average,scattering +780.0,176.82252524130092,average,scattering +782.0,172.81073051490375,average,scattering +784.0,168.93249365860413,average,scattering +786.0,165.1818527824852,average,scattering +788.0,161.55317898170625,average,scattering +790.0,158.04115416843484,average,scattering +792.0,154.6407506049548,average,scattering +794.0,151.34721199101912,average,scattering +796.0,148.1560359725316,average,scattering +798.0,145.06295795122992,average,scattering +800.0,142.0639360863068,average,scattering +400.0,-9.947598300641403e-14,dichroism,extinction +402.0,1.758593271006248e-13,dichroism,extinction +404.0,1.9539925233402755e-14,dichroism,extinction +406.0,1.2434497875801753e-14,dichroism,extinction +408.0,2.1316282072803006e-14,dichroism,extinction +410.0,7.283063041541027e-14,dichroism,extinction +412.0,-3.375077994860476e-14,dichroism,extinction +414.0,-8.881784197001252e-15,dichroism,extinction +416.0,1.0302869668521453e-13,dichroism,extinction +418.0,-8.348877145181177e-14,dichroism,extinction +420.0,5.861977570020827e-14,dichroism,extinction +422.0,1.0125233984581428e-13,dichroism,extinction +424.0,3.907985046680551e-14,dichroism,extinction +426.0,1.1013412404281553e-13,dichroism,extinction +428.0,7.105427357601002e-14,dichroism,extinction +430.0,-3.552713678800501e-14,dichroism,extinction +432.0,-2.3092638912203256e-14,dichroism,extinction +434.0,1.7763568394002505e-14,dichroism,extinction +436.0,1.687538997430238e-13,dichroism,extinction +438.0,2.3092638912203256e-14,dichroism,extinction +440.0,7.105427357601002e-15,dichroism,extinction +442.0,6.039613253960852e-14,dichroism,extinction +444.0,6.927791673660977e-14,dichroism,extinction +446.0,-2.842170943040401e-14,dichroism,extinction +448.0,3.375077994860476e-14,dichroism,extinction +450.0,2.398081733190338e-13,dichroism,extinction +452.0,-5.684341886080802e-14,dichroism,extinction +454.0,7.105427357601002e-14,dichroism,extinction +456.0,1.1191048088221578e-13,dichroism,extinction +458.0,-1.1191048088221578e-13,dichroism,extinction +460.0,9.237055564881302e-14,dichroism,extinction +462.0,-1.1901590823981678e-13,dichroism,extinction +464.0,3.730349362740526e-14,dichroism,extinction +466.0,3.375077994860476e-14,dichroism,extinction +468.0,3.197442310920451e-14,dichroism,extinction +470.0,1.1546319456101628e-13,dichroism,extinction +472.0,3.019806626980426e-14,dichroism,extinction +474.0,-5.861977570020827e-14,dichroism,extinction +476.0,-2.842170943040401e-14,dichroism,extinction +478.0,3.197442310920451e-14,dichroism,extinction +480.0,-3.552713678800501e-14,dichroism,extinction +482.0,-3.019806626980426e-14,dichroism,extinction +484.0,1.0658141036401503e-14,dichroism,extinction +486.0,7.460698725481052e-14,dichroism,extinction +488.0,-2.504663143554353e-13,dichroism,extinction +490.0,1.7763568394002505e-15,dichroism,extinction +492.0,1.7408297026122455e-13,dichroism,extinction +494.0,6.039613253960852e-14,dichroism,extinction +496.0,-1.580957587066223e-13,dichroism,extinction +498.0,1.900701818158268e-13,dichroism,extinction +500.0,4.085620730620576e-14,dichroism,extinction +502.0,-4.618527782440651e-14,dichroism,extinction +504.0,-7.460698725481052e-14,dichroism,extinction +506.0,-2.540190280342358e-13,dichroism,extinction +508.0,2.842170943040401e-14,dichroism,extinction +510.0,3.019806626980426e-14,dichroism,extinction +512.0,7.105427357601002e-15,dichroism,extinction +514.0,-7.105427357601002e-15,dichroism,extinction +516.0,3.375077994860476e-14,dichroism,extinction +518.0,4.085620730620576e-14,dichroism,extinction +520.0,3.552713678800501e-14,dichroism,extinction +522.0,-7.638334409421077e-14,dichroism,extinction +524.0,-1.5987211554602254e-14,dichroism,extinction +526.0,1.5987211554602254e-14,dichroism,extinction +528.0,-5.1514348342607263e-14,dichroism,extinction +530.0,8.881784197001252e-15,dichroism,extinction +532.0,-7.993605777301127e-14,dichroism,extinction +534.0,1.0302869668521453e-13,dichroism,extinction +536.0,5.329070518200751e-15,dichroism,extinction +538.0,5.1514348342607263e-14,dichroism,extinction +540.0,-1.4210854715202004e-14,dichroism,extinction +542.0,1.9184653865522705e-13,dichroism,extinction +544.0,-2.6645352591003757e-14,dichroism,extinction +546.0,4.973799150320701e-14,dichroism,extinction +548.0,1.0658141036401503e-14,dichroism,extinction +550.0,4.618527782440651e-14,dichroism,extinction +552.0,4.796163466380676e-14,dichroism,extinction +554.0,4.973799150320701e-14,dichroism,extinction +556.0,-1.0125233984581428e-13,dichroism,extinction +558.0,-7.460698725481052e-14,dichroism,extinction +560.0,-1.3500311979441904e-13,dichroism,extinction +562.0,7.460698725481052e-14,dichroism,extinction +564.0,-1.1191048088221578e-13,dichroism,extinction +566.0,5.595524044110789e-14,dichroism,extinction +568.0,6.217248937900877e-15,dichroism,extinction +570.0,1.4299672557172016e-13,dichroism,extinction +572.0,-5.950795411990839e-14,dichroism,extinction +574.0,1.7763568394002505e-14,dichroism,extinction +576.0,-8.526512829121202e-14,dichroism,extinction +578.0,-1.3233858453531866e-13,dichroism,extinction +580.0,-6.039613253960852e-14,dichroism,extinction +582.0,4.440892098500626e-15,dichroism,extinction +584.0,-2.6645352591003757e-14,dichroism,extinction +586.0,-9.947598300641403e-14,dichroism,extinction +588.0,-2.318145675417327e-13,dichroism,extinction +590.0,-3.375077994860476e-13,dichroism,extinction +592.0,1.2256862191861728e-13,dichroism,extinction +594.0,1.3500311979441904e-13,dichroism,extinction +596.0,-1.7763568394002505e-15,dichroism,extinction +598.0,2.362554596402333e-13,dichroism,extinction +600.0,3.3217872896784684e-13,dichroism,extinction +602.0,9.769962616701378e-14,dichroism,extinction +604.0,9.947598300641403e-14,dichroism,extinction +606.0,-2.2382096176443156e-13,dichroism,extinction +608.0,1.474376176702208e-13,dichroism,extinction +610.0,1.5276668818842154e-13,dichroism,extinction +612.0,-5.382361223382759e-13,dichroism,extinction +614.0,-7.283063041541027e-14,dichroism,extinction +616.0,-1.4210854715202004e-13,dichroism,extinction +618.0,-4.3165471197426086e-13,dichroism,extinction +620.0,-8.881784197001252e-14,dichroism,extinction +622.0,2.7000623958883807e-13,dichroism,extinction +624.0,-3.055333763768431e-13,dichroism,extinction +626.0,1.0480505352461478e-13,dichroism,extinction +628.0,-3.730349362740526e-14,dichroism,extinction +630.0,-2.7355895326763857e-13,dichroism,extinction +632.0,-1.794120407794253e-13,dichroism,extinction +634.0,1.2079226507921703e-13,dichroism,extinction +636.0,2.2026824808563106e-13,dichroism,extinction +638.0,-1.0658141036401503e-14,dichroism,extinction +640.0,-3.623767952376511e-13,dichroism,extinction +642.0,-1.7408297026122455e-13,dichroism,extinction +644.0,-1.3145040611561853e-13,dichroism,extinction +646.0,-7.283063041541027e-14,dichroism,extinction +648.0,1.0835776720341528e-13,dichroism,extinction +650.0,9.947598300641403e-14,dichroism,extinction +652.0,2.5757174171303632e-14,dichroism,extinction +654.0,1.6786572132332367e-13,dichroism,extinction +656.0,-1.2434497875801753e-14,dichroism,extinction +658.0,-4.3520742565306136e-14,dichroism,extinction +660.0,-3.0730973321624333e-13,dichroism,extinction +662.0,2.6645352591003757e-14,dichroism,extinction +664.0,-1.474376176702208e-13,dichroism,extinction +666.0,1.3677947663381929e-13,dichroism,extinction +668.0,9.015010959956271e-14,dichroism,extinction +670.0,2.1094237467877974e-13,dichroism,extinction +672.0,-4.707345624410664e-14,dichroism,extinction +674.0,4.440892098500626e-14,dichroism,extinction +676.0,-1.1723955140041653e-13,dichroism,extinction +678.0,-4.707345624410664e-14,dichroism,extinction +680.0,-1.5498713423767185e-13,dichroism,extinction +682.0,-6.838973831690964e-14,dichroism,extinction +684.0,1.0658141036401503e-14,dichroism,extinction +686.0,-1.2878587085651816e-14,dichroism,extinction +688.0,5.0182080713057076e-14,dichroism,extinction +690.0,-2.9753977059954195e-14,dichroism,extinction +692.0,2.5757174171303632e-14,dichroism,extinction +694.0,-6.905587213168474e-14,dichroism,extinction +696.0,-1.4876988529977098e-14,dichroism,extinction +698.0,2.6645352591003757e-15,dichroism,extinction +700.0,-5.6621374255882984e-14,dichroism,extinction +702.0,-1.9539925233402755e-14,dichroism,extinction +704.0,-9.769962616701378e-15,dichroism,extinction +706.0,-7.327471962526033e-15,dichroism,extinction +708.0,-3.8413716652030416e-14,dichroism,extinction +710.0,3.019806626980426e-14,dichroism,extinction +712.0,1.9761969838327786e-14,dichroism,extinction +714.0,-2.020605904817785e-14,dichroism,extinction +716.0,-1.5765166949677223e-14,dichroism,extinction +718.0,9.769962616701378e-15,dichroism,extinction +720.0,9.547918011776346e-15,dichroism,extinction +722.0,-6.661338147750939e-15,dichroism,extinction +724.0,6.439293542825908e-15,dichroism,extinction +726.0,-3.3084646133829665e-14,dichroism,extinction +728.0,3.708144902248023e-14,dichroism,extinction +730.0,-2.5646151868841116e-14,dichroism,extinction +732.0,-7.438494264988549e-15,dichroism,extinction +734.0,2.6423307986078726e-14,dichroism,extinction +736.0,-4.440892098500626e-16,dichroism,extinction +738.0,-4.218847493575595e-15,dichroism,extinction +740.0,-2.1316282072803006e-14,dichroism,extinction +742.0,-1.2545520178264269e-14,dichroism,extinction +744.0,-1.0547118733938987e-14,dichroism,extinction +746.0,1.7208456881689926e-14,dichroism,extinction +748.0,1.4876988529977098e-14,dichroism,extinction +750.0,1.1324274851176597e-14,dichroism,extinction +752.0,-8.992806499463768e-15,dichroism,extinction +754.0,4.3298697960381105e-15,dichroism,extinction +756.0,4.884981308350689e-15,dichroism,extinction +758.0,5.773159728050814e-15,dichroism,extinction +760.0,-1.2212453270876722e-14,dichroism,extinction +762.0,-5.329070518200751e-15,dichroism,extinction +764.0,-1.509903313490213e-14,dichroism,extinction +766.0,5.662137425588298e-15,dichroism,extinction +768.0,-1.9206858326015208e-14,dichroism,extinction +770.0,1.1435297153639112e-14,dichroism,extinction +772.0,1.1102230246251565e-14,dichroism,extinction +774.0,-1.1879386363489175e-14,dichroism,extinction +776.0,-9.2148511043888e-15,dichroism,extinction +778.0,1.6653345369377348e-14,dichroism,extinction +780.0,8.881784197001252e-15,dichroism,extinction +782.0,1.0658141036401503e-14,dichroism,extinction +784.0,-4.9960036108132044e-15,dichroism,extinction +786.0,-4.385380947269368e-15,dichroism,extinction +788.0,-7.438494264988549e-15,dichroism,extinction +790.0,-7.105427357601002e-15,dichroism,extinction +792.0,1.7208456881689926e-14,dichroism,extinction +794.0,7.66053886991358e-15,dichroism,extinction +796.0,3.3306690738754696e-15,dichroism,extinction +798.0,-3.3306690738754696e-15,dichroism,extinction +800.0,-2.0761170560490427e-14,dichroism,extinction +400.0,-5.684341886080802e-14,dichroism,absorption +402.0,-1.5987211554602254e-14,dichroism,absorption +404.0,7.283063041541027e-14,dichroism,absorption +406.0,9.947598300641403e-14,dichroism,absorption +408.0,3.197442310920451e-14,dichroism,absorption +410.0,-3.197442310920451e-14,dichroism,absorption +412.0,-1.7763568394002505e-15,dichroism,absorption +414.0,-1.7763568394002505e-15,dichroism,absorption +416.0,-3.019806626980426e-14,dichroism,absorption +418.0,-7.815970093361102e-14,dichroism,absorption +420.0,6.572520305780927e-14,dichroism,absorption +422.0,8.881784197001252e-15,dichroism,absorption +424.0,-2.842170943040401e-14,dichroism,absorption +426.0,8.704148513061227e-14,dichroism,absorption +428.0,1.0658141036401503e-13,dichroism,absorption +430.0,4.263256414560601e-14,dichroism,absorption +432.0,1.580957587066223e-13,dichroism,absorption +434.0,-1.2789769243681803e-13,dichroism,absorption +436.0,-8.348877145181177e-14,dichroism,absorption +438.0,1.4210854715202004e-14,dichroism,absorption +440.0,3.907985046680551e-14,dichroism,absorption +442.0,1.0125233984581428e-13,dichroism,absorption +444.0,2.1316282072803006e-14,dichroism,absorption +446.0,-7.105427357601002e-14,dichroism,absorption +448.0,-4.973799150320701e-14,dichroism,absorption +450.0,5.861977570020827e-14,dichroism,absorption +452.0,-4.440892098500626e-14,dichroism,absorption +454.0,-7.460698725481052e-14,dichroism,absorption +456.0,9.947598300641403e-14,dichroism,absorption +458.0,-5.861977570020827e-14,dichroism,absorption +460.0,-3.907985046680551e-14,dichroism,absorption +462.0,-1.758593271006248e-13,dichroism,absorption +464.0,2.3092638912203256e-14,dichroism,absorption +466.0,-5.1514348342607263e-14,dichroism,absorption +468.0,2.3092638912203256e-14,dichroism,absorption +470.0,4.796163466380676e-14,dichroism,absorption +472.0,-1.0658141036401503e-14,dichroism,absorption +474.0,-4.085620730620576e-14,dichroism,absorption +476.0,-6.750155989720952e-14,dichroism,absorption +478.0,-7.460698725481052e-14,dichroism,absorption +480.0,-1.0658141036401503e-14,dichroism,absorption +482.0,-7.638334409421077e-14,dichroism,absorption +484.0,-1.1013412404281553e-13,dichroism,absorption +486.0,3.375077994860476e-14,dichroism,absorption +488.0,-1.5987211554602254e-14,dichroism,absorption +490.0,-1.2434497875801753e-14,dichroism,absorption +492.0,1.5987211554602254e-13,dichroism,absorption +494.0,2.4868995751603507e-14,dichroism,absorption +496.0,1.5987211554602254e-14,dichroism,absorption +498.0,1.2434497875801753e-13,dichroism,absorption +500.0,-7.638334409421077e-14,dichroism,absorption +502.0,6.572520305780927e-14,dichroism,absorption +504.0,1.9539925233402755e-14,dichroism,absorption +506.0,-2.3447910280083306e-13,dichroism,absorption +508.0,1.9539925233402755e-14,dichroism,absorption +510.0,1.1546319456101628e-13,dichroism,absorption +512.0,1.2967404927621828e-13,dichroism,absorption +514.0,8.881784197001252e-15,dichroism,absorption +516.0,-7.993605777301127e-14,dichroism,absorption +518.0,-9.414691248821327e-14,dichroism,absorption +520.0,2.042810365310288e-13,dichroism,absorption +522.0,1.3500311979441904e-13,dichroism,absorption +524.0,-1.8118839761882555e-13,dichroism,absorption +526.0,1.2789769243681803e-13,dichroism,absorption +528.0,2.4868995751603507e-14,dichroism,absorption +530.0,1.2434497875801753e-14,dichroism,absorption +532.0,-5.1514348342607263e-14,dichroism,absorption +534.0,1.1901590823981678e-13,dichroism,absorption +536.0,-9.947598300641403e-14,dichroism,absorption +538.0,-5.1514348342607263e-14,dichroism,absorption +540.0,-1.0480505352461478e-13,dichroism,absorption +542.0,-4.618527782440651e-14,dichroism,absorption +544.0,-1.0125233984581428e-13,dichroism,absorption +546.0,-4.440892098500626e-14,dichroism,absorption +548.0,1.545430450278218e-13,dichroism,absorption +550.0,-1.438849039914203e-13,dichroism,absorption +552.0,-2.3092638912203256e-14,dichroism,absorption +554.0,2.930988785010413e-14,dichroism,absorption +556.0,-1.0658141036401503e-13,dichroism,absorption +558.0,6.838973831690964e-14,dichroism,absorption +560.0,-1.7053025658242404e-13,dichroism,absorption +562.0,7.815970093361102e-14,dichroism,absorption +564.0,-6.039613253960852e-14,dichroism,absorption +566.0,-3.9968028886505635e-14,dichroism,absorption +568.0,-8.260059303211165e-14,dichroism,absorption +570.0,-1.127986593019159e-13,dichroism,absorption +572.0,-8.348877145181177e-14,dichroism,absorption +574.0,-4.3520742565306136e-14,dichroism,absorption +576.0,1.0302869668521453e-13,dichroism,absorption +578.0,-3.552713678800501e-15,dichroism,absorption +580.0,-2.6645352591003757e-14,dichroism,absorption +582.0,-1.1901590823981678e-13,dichroism,absorption +584.0,3.375077994860476e-14,dichroism,absorption +586.0,-9.592326932761353e-14,dichroism,absorption +588.0,-3.730349362740526e-14,dichroism,absorption +590.0,5.773159728050814e-14,dichroism,absorption +592.0,-8.171241461241152e-14,dichroism,absorption +594.0,1.8740564655672642e-13,dichroism,absorption +596.0,4.440892098500626e-15,dichroism,absorption +598.0,1.936228954946273e-13,dichroism,absorption +600.0,-9.325873406851315e-14,dichroism,absorption +602.0,2.930988785010413e-14,dichroism,absorption +604.0,-1.6786572132332367e-13,dichroism,absorption +606.0,5.5067062021407764e-14,dichroism,absorption +608.0,-1.971756091734278e-13,dichroism,absorption +610.0,2.2026824808563106e-13,dichroism,absorption +612.0,-7.283063041541027e-14,dichroism,absorption +614.0,9.769962616701378e-14,dichroism,absorption +616.0,1.2079226507921703e-13,dichroism,absorption +618.0,-2.7711166694643907e-13,dichroism,absorption +620.0,1.0658141036401503e-13,dichroism,absorption +622.0,-1.438849039914203e-13,dichroism,absorption +624.0,2.2026824808563106e-13,dichroism,absorption +626.0,-2.291500322826323e-13,dichroism,absorption +628.0,-3.5349501104064984e-13,dichroism,absorption +630.0,-2.6290081223123707e-13,dichroism,absorption +632.0,-3.7836400679225335e-13,dichroism,absorption +634.0,8.704148513061227e-14,dichroism,absorption +636.0,-7.283063041541027e-14,dichroism,absorption +638.0,5.062616992290714e-14,dichroism,absorption +640.0,-1.9628743075372768e-13,dichroism,absorption +642.0,-4.3876013933186186e-13,dichroism,absorption +644.0,8.881784197001252e-14,dichroism,absorption +646.0,5.950795411990839e-14,dichroism,absorption +648.0,4.3520742565306136e-14,dichroism,absorption +650.0,-9.903189379656396e-14,dichroism,absorption +652.0,1.5853984791647235e-13,dichroism,absorption +654.0,-3.597122599785507e-14,dichroism,absorption +656.0,-2.842170943040401e-14,dichroism,absorption +658.0,2.3092638912203256e-14,dichroism,absorption +660.0,2.4424906541753444e-14,dichroism,absorption +662.0,1.7541523789077473e-13,dichroism,absorption +664.0,2.3092638912203256e-14,dichroism,absorption +666.0,-5.1958437552457326e-14,dichroism,absorption +668.0,5.084821452783217e-14,dichroism,absorption +670.0,6.59472476627343e-14,dichroism,absorption +672.0,-6.461498003318411e-14,dichroism,absorption +674.0,-3.3306690738754696e-15,dichroism,absorption +676.0,-7.016609515630989e-14,dichroism,absorption +678.0,-1.021405182655144e-14,dichroism,absorption +680.0,-2.2426505097428162e-14,dichroism,absorption +682.0,-6.639133687258436e-14,dichroism,absorption +684.0,-1.3322676295501878e-15,dichroism,absorption +686.0,5.306866057708248e-14,dichroism,absorption +688.0,-4.1744385725905886e-14,dichroism,absorption +690.0,-7.66053886991358e-15,dichroism,absorption +692.0,-5.0737192225369654e-14,dichroism,absorption +694.0,1.554312234475219e-14,dichroism,absorption +696.0,-1.6764367671839864e-14,dichroism,absorption +698.0,-2.1316282072803006e-14,dichroism,absorption +700.0,-1.5654144647214707e-14,dichroism,absorption +702.0,1.9095836023552692e-14,dichroism,absorption +704.0,1.4099832412739488e-14,dichroism,absorption +706.0,7.105427357601002e-15,dichroism,absorption +708.0,6.994405055138486e-15,dichroism,absorption +710.0,1.5210055437364645e-14,dichroism,absorption +712.0,1.0103029524088925e-14,dichroism,absorption +714.0,-5.773159728050814e-15,dichroism,absorption +716.0,1.4099832412739488e-14,dichroism,absorption +718.0,1.0325074129013956e-14,dichroism,absorption +720.0,4.551914400963142e-15,dichroism,absorption +722.0,-1.3211653993039363e-14,dichroism,absorption +724.0,1.4099832412739488e-14,dichroism,absorption +726.0,-4.6074255521944e-15,dichroism,absorption +728.0,6.38378239159465e-15,dichroism,absorption +730.0,-7.494005416219807e-15,dichroism,absorption +732.0,5.828670879282072e-15,dichroism,absorption +734.0,1.5376588891058418e-14,dichroism,absorption +736.0,-1.0436096431476471e-14,dichroism,absorption +738.0,-6.050715484207103e-15,dichroism,absorption +740.0,3.6637359812630166e-15,dichroism,absorption +742.0,-1.609823385706477e-15,dichroism,absorption +744.0,5.10702591327572e-15,dichroism,absorption +746.0,5.828670879282072e-15,dichroism,absorption +748.0,-6.106226635438361e-16,dichroism,absorption +750.0,8.382183835919932e-15,dichroism,absorption +752.0,3.3306690738754696e-15,dichroism,absorption +754.0,8.604228440844963e-15,dichroism,absorption +756.0,-7.382983113757291e-15,dichroism,absorption +758.0,-4.9404924595819466e-15,dichroism,absorption +760.0,7.271960811294775e-15,dichroism,absorption +762.0,8.604228440844963e-15,dichroism,absorption +764.0,-1.071365218763276e-14,dichroism,absorption +766.0,3.4416913763379853e-15,dichroism,absorption +768.0,-1.3711254354120683e-14,dichroism,absorption +770.0,-1.6653345369377348e-16,dichroism,absorption +772.0,5.051514762044462e-15,dichroism,absorption +774.0,5.495603971894525e-15,dichroism,absorption +776.0,3.0531133177191805e-15,dichroism,absorption +778.0,-6.2727600891321345e-15,dichroism,absorption +780.0,1.3211653993039363e-14,dichroism,absorption +782.0,3.969047313034935e-15,dichroism,absorption +784.0,1.27675647831893e-15,dichroism,absorption +786.0,1.6653345369377348e-16,dichroism,absorption +788.0,-1.0380585280245214e-14,dichroism,absorption +790.0,4.163336342344337e-16,dichroism,absorption +792.0,6.5780714209040525e-15,dichroism,absorption +794.0,2.3869795029440866e-15,dichroism,absorption +796.0,1.8041124150158794e-15,dichroism,absorption +798.0,-2.0539125955565396e-15,dichroism,absorption +800.0,-1.6153745008296028e-14,dichroism,absorption +400.0,-2.3314683517128287e-14,dichroism,scattering +402.0,2.842170943040401e-14,dichroism,scattering +404.0,2.4424906541753444e-15,dichroism,scattering +406.0,8.881784197001252e-15,dichroism,scattering +408.0,-2.4202861936828413e-14,dichroism,scattering +410.0,8.881784197001252e-16,dichroism,scattering +412.0,9.325873406851315e-15,dichroism,scattering +414.0,-1.3766765505351941e-14,dichroism,scattering +416.0,1.4210854715202004e-14,dichroism,scattering +418.0,1.0880185641326534e-14,dichroism,scattering +420.0,-8.659739592076221e-15,dichroism,scattering +422.0,-6.439293542825908e-15,dichroism,scattering +424.0,9.103828801926284e-15,dichroism,scattering +426.0,5.995204332975845e-15,dichroism,scattering +428.0,-1.6209256159527285e-14,dichroism,scattering +430.0,3.774758283725532e-15,dichroism,scattering +432.0,3.552713678800501e-15,dichroism,scattering +434.0,-1.3322676295501878e-15,dichroism,scattering +436.0,-1.0436096431476471e-14,dichroism,scattering +438.0,1.0658141036401503e-14,dichroism,scattering +440.0,-4.440892098500626e-15,dichroism,scattering +442.0,9.992007221626409e-15,dichroism,scattering +444.0,7.549516567451064e-15,dichroism,scattering +446.0,-6.217248937900877e-15,dichroism,scattering +448.0,-2.5091040356528538e-14,dichroism,scattering +450.0,-8.659739592076221e-15,dichroism,scattering +452.0,6.661338147750939e-16,dichroism,scattering +454.0,8.215650382226158e-15,dichroism,scattering +456.0,1.687538997430238e-14,dichroism,scattering +458.0,2.6645352591003757e-15,dichroism,scattering +460.0,1.3100631690576847e-14,dichroism,scattering +462.0,1.1324274851176597e-14,dichroism,scattering +464.0,-7.327471962526033e-15,dichroism,scattering +466.0,-1.84297022087776e-14,dichroism,scattering +468.0,-6.661338147750939e-15,dichroism,scattering +470.0,-4.440892098500626e-15,dichroism,scattering +472.0,-2.220446049250313e-16,dichroism,scattering +474.0,-6.217248937900877e-15,dichroism,scattering +476.0,-1.3322676295501878e-15,dichroism,scattering +478.0,-5.551115123125783e-15,dichroism,scattering +480.0,4.6629367034256575e-15,dichroism,scattering +482.0,3.3306690738754696e-15,dichroism,scattering +484.0,6.661338147750939e-16,dichroism,scattering +486.0,-3.1086244689504383e-15,dichroism,scattering +488.0,2.886579864025407e-15,dichroism,scattering +490.0,-5.329070518200751e-15,dichroism,scattering +492.0,-7.993605777301127e-15,dichroism,scattering +494.0,1.2212453270876722e-14,dichroism,scattering +496.0,-7.105427357601002e-15,dichroism,scattering +498.0,1.6209256159527285e-14,dichroism,scattering +500.0,-5.995204332975845e-15,dichroism,scattering +502.0,-3.552713678800501e-15,dichroism,scattering +504.0,1.9984014443252818e-15,dichroism,scattering +506.0,3.774758283725532e-15,dichroism,scattering +508.0,-2.220446049250313e-16,dichroism,scattering +510.0,5.10702591327572e-15,dichroism,scattering +512.0,-6.661338147750939e-16,dichroism,scattering +514.0,-3.68594044175552e-14,dichroism,scattering +516.0,2.375877272697835e-14,dichroism,scattering +518.0,1.1546319456101628e-14,dichroism,scattering +520.0,-2.7755575615628914e-14,dichroism,scattering +522.0,2.6645352591003757e-15,dichroism,scattering +524.0,7.993605777301127e-15,dichroism,scattering +526.0,-9.992007221626409e-15,dichroism,scattering +528.0,-6.439293542825908e-15,dichroism,scattering +530.0,1.5987211554602254e-14,dichroism,scattering +532.0,3.9968028886505635e-15,dichroism,scattering +534.0,3.9968028886505635e-15,dichroism,scattering +536.0,1.4654943925052066e-14,dichroism,scattering +538.0,-2.6867397195928788e-14,dichroism,scattering +540.0,1.7763568394002505e-15,dichroism,scattering +542.0,-5.329070518200751e-15,dichroism,scattering +544.0,6.8833827526759706e-15,dichroism,scattering +546.0,-2.731148640577885e-14,dichroism,scattering +548.0,1.0436096431476471e-14,dichroism,scattering +550.0,1.887379141862766e-14,dichroism,scattering +552.0,2.4424906541753444e-15,dichroism,scattering +554.0,-1.3322676295501878e-15,dichroism,scattering +556.0,-4.596323321948148e-14,dichroism,scattering +558.0,-1.2878587085651816e-14,dichroism,scattering +560.0,1.8207657603852567e-14,dichroism,scattering +562.0,8.881784197001252e-15,dichroism,scattering +564.0,-1.687538997430238e-14,dichroism,scattering +566.0,1.509903313490213e-14,dichroism,scattering +568.0,-5.617728504603292e-14,dichroism,scattering +570.0,2.020605904817785e-14,dichroism,scattering +572.0,-6.328271240363392e-14,dichroism,scattering +574.0,1.0880185641326534e-14,dichroism,scattering +576.0,-6.639133687258436e-14,dichroism,scattering +578.0,-2.842170943040401e-14,dichroism,scattering +580.0,-7.283063041541027e-14,dichroism,scattering +582.0,2.3092638912203256e-14,dichroism,scattering +584.0,2.7755575615628914e-14,dichroism,scattering +586.0,1.9539925233402755e-14,dichroism,scattering +588.0,-1.865174681370263e-14,dichroism,scattering +590.0,1.7763568394002505e-14,dichroism,scattering +592.0,-4.8405723873656825e-14,dichroism,scattering +594.0,-1.7763568394002505e-15,dichroism,scattering +596.0,1.0080825063596421e-13,dichroism,scattering +598.0,-4.3520742565306136e-14,dichroism,scattering +600.0,1.3766765505351941e-14,dichroism,scattering +602.0,-2.0472512574087887e-13,dichroism,scattering +604.0,1.021405182655144e-14,dichroism,scattering +606.0,1.687538997430238e-14,dichroism,scattering +608.0,-1.7763568394002505e-15,dichroism,scattering +610.0,-2.3092638912203256e-14,dichroism,scattering +612.0,-2.5224267119483557e-13,dichroism,scattering +614.0,-1.234568003383174e-13,dichroism,scattering +616.0,-1.758593271006248e-13,dichroism,scattering +618.0,-4.263256414560601e-14,dichroism,scattering +620.0,1.5987211554602254e-13,dichroism,scattering +622.0,4.440892098500626e-14,dichroism,scattering +624.0,1.305622276959184e-13,dichroism,scattering +626.0,-6.838973831690964e-14,dichroism,scattering +628.0,-5.062616992290714e-14,dichroism,scattering +630.0,3.907985046680551e-13,dichroism,scattering +632.0,-5.240252676230739e-14,dichroism,scattering +634.0,-3.9968028886505635e-14,dichroism,scattering +636.0,2.682298827494378e-13,dichroism,scattering +638.0,-2.1760371282653068e-13,dichroism,scattering +640.0,-5.950795411990839e-14,dichroism,scattering +642.0,1.163513729807164e-13,dichroism,scattering +644.0,1.949551631241775e-13,dichroism,scattering +646.0,2.5757174171303632e-14,dichroism,scattering +648.0,-4.6629367034256575e-14,dichroism,scattering +650.0,2.886579864025407e-14,dichroism,scattering +652.0,-2.886579864025407e-14,dichroism,scattering +654.0,-4.218847493575595e-14,dichroism,scattering +656.0,-8.08242361927114e-14,dichroism,scattering +658.0,1.1102230246251565e-14,dichroism,scattering +660.0,-9.325873406851315e-14,dichroism,scattering +662.0,5.906386491005833e-14,dichroism,scattering +664.0,7.638334409421077e-14,dichroism,scattering +666.0,-6.772360450213455e-14,dichroism,scattering +668.0,7.283063041541027e-14,dichroism,scattering +670.0,2.6645352591003757e-15,dichroism,scattering +672.0,6.195044477408373e-14,dichroism,scattering +674.0,7.416289804496046e-14,dichroism,scattering +676.0,-1.5765166949677223e-14,dichroism,scattering +678.0,-5.995204332975845e-14,dichroism,scattering +680.0,1.3766765505351941e-14,dichroism,scattering +682.0,5.773159728050814e-15,dichroism,scattering +684.0,6.23945339839338e-14,dichroism,scattering +686.0,-2.353672812205332e-14,dichroism,scattering +688.0,-6.750155989720952e-14,dichroism,scattering +690.0,4.007905118896815e-14,dichroism,scattering +692.0,-6.328271240363392e-15,dichroism,scattering +694.0,2.298161660974074e-14,dichroism,scattering +696.0,1.432187701766452e-14,dichroism,scattering +698.0,1.6431300764452317e-14,dichroism,scattering +700.0,-6.772360450213455e-15,dichroism,scattering +702.0,-5.88418203051333e-15,dichroism,scattering +704.0,1.9984014443252818e-15,dichroism,scattering +706.0,-1.7208456881689926e-14,dichroism,scattering +708.0,4.440892098500626e-16,dichroism,scattering +710.0,-1.7763568394002505e-14,dichroism,scattering +712.0,-2.220446049250313e-15,dichroism,scattering +714.0,-1.0769163338864018e-14,dichroism,scattering +716.0,-1.0658141036401503e-14,dichroism,scattering +718.0,4.6629367034256575e-15,dichroism,scattering +720.0,1.1102230246251565e-14,dichroism,scattering +722.0,-1.6764367671839864e-14,dichroism,scattering +724.0,-6.439293542825908e-15,dichroism,scattering +726.0,-4.3298697960381105e-15,dichroism,scattering +728.0,2.5202062658991053e-14,dichroism,scattering +730.0,1.1657341758564144e-15,dichroism,scattering +732.0,-4.884981308350689e-15,dichroism,scattering +734.0,1.2045919817182948e-14,dichroism,scattering +736.0,-1.1324274851176597e-14,dichroism,scattering +738.0,1.3378187446733136e-14,dichroism,scattering +740.0,5.773159728050814e-15,dichroism,scattering +742.0,-1.459943277382081e-14,dichroism,scattering +744.0,2.6645352591003757e-15,dichroism,scattering +746.0,-6.827871601444713e-15,dichroism,scattering +748.0,3.1086244689504383e-15,dichroism,scattering +750.0,-1.5709655798445965e-14,dichroism,scattering +752.0,8.715250743307479e-15,dichroism,scattering +754.0,-8.271161533457416e-15,dichroism,scattering +756.0,-1.176836406102666e-14,dichroism,scattering +758.0,-2.7755575615628914e-16,dichroism,scattering +760.0,-1.1657341758564144e-14,dichroism,scattering +762.0,-3.6637359812630166e-15,dichroism,scattering +764.0,-6.994405055138486e-15,dichroism,scattering +766.0,6.217248937900877e-15,dichroism,scattering +768.0,-1.4210854715202004e-14,dichroism,scattering +770.0,6.106226635438361e-15,dichroism,scattering +772.0,1.099120794378905e-14,dichroism,scattering +774.0,4.440892098500626e-16,dichroism,scattering +776.0,3.0531133177191805e-15,dichroism,scattering +778.0,-1.4432899320127035e-15,dichroism,scattering +780.0,-2.4980018054066022e-15,dichroism,scattering +782.0,2.220446049250313e-15,dichroism,scattering +784.0,3.3306690738754696e-16,dichroism,scattering +786.0,8.493206138382448e-15,dichroism,scattering +788.0,-8.43769498715119e-15,dichroism,scattering +790.0,-2.248201624865942e-15,dichroism,scattering +792.0,9.159339953157541e-16,dichroism,scattering +794.0,-2.498001805406602e-16,dichroism,scattering +796.0,2.0816681711721685e-15,dichroism,scattering +798.0,-1.1102230246251565e-15,dichroism,scattering +800.0,-1.609823385706477e-15,dichroism,scattering diff --git a/dev/test_lowlevel.jl b/dev/test_lowlevel.jl index b32ba03..5d6256f 100644 --- a/dev/test_lowlevel.jl +++ b/dev/test_lowlevel.jl @@ -1,5 +1,5 @@ # include("../src/CoupledDipole.jl") -push!(LOAD_PATH, expanduser( "~/Documents/nano-optics/CoupledDipole.jl/")) +push!(LOAD_PATH, expanduser("~/Documents/nano-optics/CoupledDipole.jl/")) using Revise using CoupledDipole @@ -8,7 +8,6 @@ using StaticArrays using FastGaussQuadrature using DataFrames using VegaLite -using Gadfly ## variables @@ -18,15 +17,22 @@ N_lam = 2 N_sca = 2 wavelength = [400, 500] -medium = Dict([("Au", CoupledDipole.epsilon_Au), ("medium", x -> 1.33)]) +medium = Dict([("Au", epsilon_Au), ("medium", x -> 1.33)]) mat = Material(wavelength, medium) -cl = cluster_dimer(100, 20, 20, 40, π/4) + +positions = [SVector(x, 0.0, 0.0) for x in (-100.0, 100.0)] +sizes = [SVector(20.0, 50.0, 20.0), SVector(20.0, 50.0, 20.0)] +rotations = repeat([UnitQuaternion(1.0, 0.0, 0.0, 0.0)], 2) +materials = repeat(["Au"], 2) +cl = Cluster(positions, rotations, sizes, materials, "particle") + +# cl = cluster_dimer(100, 20, 20, 40, π / 4) ## polarizability -ii=1; +ii = 1; λ = mat.wavelengths[ii] n_medium = medium["medium"](λ) @@ -34,34 +40,40 @@ kn = n_medium * 2π / λ ε = medium["Au"](λ) + +alpha_kuwata(λ, ε, n_medium^2, SVector(20, 20, 50)) + +map(s -> alpha_kuwata(λ, ε, n_medium^2, s), cl.sizes) + Alpha = alpha_spheroids(λ, ε, n_medium^2, cl.sizes) + ParticleRotations = cl.rotations AlphaBlocks = map((R, A) -> R' * diagm(A) * R, ParticleRotations, Alpha) ## propagator -F = Matrix{Complex{Float64}}(I, 3*N_dip, 3*N_dip) -propagator_freespace_labframe!(F,kn,cl.positions,AlphaBlocks) +F = Matrix{Complex{Float64}}(I, 3 * N_dip, 3 * N_dip) +propagator_freespace_labframe!(F, kn, cl.positions, AlphaBlocks) ## incidence Ejones = [SVector{2}(1.0, 0.0), SVector{2}(0.0, 1.0)] -Incidence = [SVector(0,0,0),SVector(0,π/2,0)] +Incidence = [SVector(0, 0, 0), SVector(0, π / 2, 0)] IncidenceRotations = map(euler_active, Incidence) -euler_active(0,π/2,0) +euler_active(0, π / 2, 0) Evec1 = SVector(Ejones[1][1], Ejones[1][2], 0) # 3-vector Evec2 = SVector(Ejones[2][1], Ejones[2][2], 0) # 3-vector IncidenceRotations[2] * Evec1 -Ein = Array{Complex{Float64}}(undef, (3*N_dip, 2N_inc)) +Ein = Array{Complex{Float64}}(undef, (3 * N_dip, 2N_inc)) incident_field!(Ein, Ejones, kn, cl.positions, IncidenceRotations) E = similar(Ein) -E = F\Ein +E = F \ Ein P = similar(Ein) polarisation!(P, E, AlphaBlocks) diff --git a/dev/test_profiling_dimer.jl b/dev/test_profiling_dimer.jl index d28bf42..63638b1 100644 --- a/dev/test_profiling_dimer.jl +++ b/dev/test_profiling_dimer.jl @@ -1,5 +1,5 @@ # include("../src/CoupledDipole.jl") -push!(LOAD_PATH, expanduser( "~/Documents/nano-optics/CoupledDipole.jl/")) +push!(LOAD_PATH, expanduser("~/Documents/nano-optics/CoupledDipole.jl/")) using Revise using CoupledDipole @@ -15,11 +15,11 @@ media = Dict([("Au", epsilon_Au), ("medium", x -> 1.33)]) mat = Material(wavelength, media) ## dimer geometry -cl1 = cluster_dimer(80, 20, 20, 40, π/4) +cl1 = cluster_dimer(80, 20, 20, 40, π / 4) cl2 = cluster_single(20, 20, 40) ## incidence: along z, along x, along y -Incidence = [SVector(0,0,0),SVector(0,π/2,0),SVector(π/2,π/2,0)] +Incidence = [SVector(0, 0, 0), SVector(0, π / 2, 0), SVector(π / 2, π / 2, 0)] @time spectrum_dispersion(cl1, mat, Incidence) @time spectrum_oa(cl1, mat) @@ -31,43 +31,20 @@ using Profile disp1 = spectrum_dispersion(cl1, mat, Incidence) disp2 = spectrum_dispersion(cl2, mat, Incidence) -function dispersion_df(x, wavelength) - - e = insertcols!( - DataFrame(x.extinction, :auto), - :wavelength => wavelength, - :crosstype => "extinction" - ) - a = insertcols!( - DataFrame(x.absorption, :auto), - :wavelength => wavelength, - :crosstype => "absorption" - ) - - s = insertcols!( - DataFrame(x.scattering, :auto), - :wavelength => wavelength, - :crosstype => "scattering" - ) - - stack([e;a;s], Not([:wavelength,:crosstype])) - -end - d1 = dispersion_df(disp1, mat.wavelength) d2 = dispersion_df(disp2, mat.wavelength) -d = [insertcols!(d1, :cluster => "dimer"); - insertcols!(d2, :cluster => "single")] +d = [insertcols!(d1, :cluster => "dimer") + insertcols!(d2, :cluster => "single")] - @vlplot(data=d, - width= 400, - height = 300, - mark = {:line}, - row = "crosstype", - resolve={scale={y="independent"}}, - encoding = {x = "wavelength:q", y = "value:q", color = "variable:n", strokeDash="cluster:n"} - ) +@vlplot(data = d, + width = 400, + height = 300, + mark = {:line}, + row = "crosstype", + resolve = {scale = {y = "independent"}}, + encoding = {x = "wavelength:q", y = "value:q", color = "variable:n", strokeDash = "cluster:n"} +) @@ -94,15 +71,15 @@ oa2 = spectrum_oa(cl2, mat) d3 = oa_df(oa1, mat.wavelength) d4 = oa_df(oa2, mat.wavelength) -d5 = [insertcols!(d3, :cluster => "dimer"); - insertcols!(d4, :cluster => "single")] +d5 = [insertcols!(d3, :cluster => "dimer") + insertcols!(d4, :cluster => "single")] # filter(row -> row[:type] == "average" , d5) d5 |> @vlplot( - width= 400, - height = 300, - mark = {:line}, - row = "type", - resolve={scale={y="independent"}}, - encoding = {x = "wavelength:q", y = "value:q", color = "variable:n", strokeDash="cluster:n"} - ) + width = 400, + height = 300, + mark = {:line}, + row = "type", + resolve = {scale = {y = "independent"}}, + encoding = {x = "wavelength:q", y = "value:q", color = "variable:n", strokeDash = "cluster:n"} +) diff --git a/dev/testc.arrow b/dev/testc.arrow new file mode 100644 index 0000000..390623d Binary files /dev/null and b/dev/testc.arrow differ diff --git a/dev/testing_messy.jl b/dev/testing_messy.jl index 69b9bd3..e99b031 100644 --- a/dev/testing_messy.jl +++ b/dev/testing_messy.jl @@ -1,5 +1,5 @@ # include("../src/CoupledDipole.jl") -push!(LOAD_PATH, expanduser( "~/Documents/nano-optics/CoupledDipole.jl/")) +push!(LOAD_PATH, expanduser("~/Documents/nano-optics/CoupledDipole.jl/")) using Revise using CoupledDipole @@ -16,13 +16,13 @@ end function polarisability(λ, α_∞, α_k, λ_k, µ_k) - α = α_∞ - for kk = 1:length(α_k) + α = α_∞ + for kk = eachindex(α_k) α += lorentzian(λ, α_k[kk], λ_k[kk], µ_k[kk]) end - + ε₀ = 8.8541878128e-12 - α / (4π * ε₀) + α / (4π * ε₀) end @@ -64,19 +64,19 @@ using Profile N_dip = 5 N_inc = 36 F = Matrix{Complex{Float64}}(I, 3N_dip, 3N_dip) -Ein = Array{Complex{Float64}}(undef, (3*N_dip, 2N_inc)) +Ein = Array{Complex{Float64}}(undef, (3 * N_dip, 2N_inc)) E = similar(Ein) -E = F\Ein +E = F \ Ein N_dip = 5 Ni = 36 -R = [@SVector randn(3) for ii=1:N_dip] -Angles = [@SVector randn(3) for ii=1:N_dip] +R = [@SVector randn(3) for ii = 1:N_dip] +Angles = [@SVector randn(3) for ii = 1:N_dip] kn = 0.2 -Alpha = [@SVector randn(Complex{Float64},3) for ii=1:N_dip] +Alpha = [@SVector randn(Complex{Float64}, 3) for ii = 1:N_dip] -AlphaBlocks = [@SMatrix randn(Complex{Float64},3,3) for ii=1:N_dip] +AlphaBlocks = [@SMatrix randn(Complex{Float64}, 3, 3) for ii = 1:N_dip] # function alpha_blocks!(AlphaBlocks::Vector{SMatrix{3,3}}, # Alpha::Vector{SVector{3}}, @@ -87,16 +87,16 @@ AlphaBlocks = [@SMatrix randn(Complex{Float64},3,3) for ii=1:N_dip] -A = Matrix{Complex{Float64}}(I, 3*N_dip, 3*N_dip) -propagator_freespace_labframe!(A,kn,R,AlphaBlocks) +A = Matrix{Complex{Float64}}(I, 3 * N_dip, 3 * N_dip) +propagator_freespace_labframe!(A, kn, R, AlphaBlocks) # Evec = SVector{3, Complex{Float64}}([0.1; 0.1; 0.0]) Ejones = [SVector{2}(1.0, 0.0), SVector{2}(0.0, 1.0)] -Incidence = [@SVector randn(Float64,3) for ii=1:Ni] +Incidence = [@SVector randn(Float64, 3) for ii = 1:Ni] IncidenceRotations = map(CoupledDipole.euler_active, Incidence) -Ein = Array{Complex{Float64}}(undef, (3*N_dip, 2Ni)) +Ein = Array{Complex{Float64}}(undef, (3 * N_dip, 2Ni)) incident_field!(Ein, Ejones, kn, R, IncidenceRotations) E = similar(Ein) P = similar(Ein) @@ -131,7 +131,7 @@ medium = Dict([("Au", CoupledDipole.epsilon_Au), ("medium", x -> 1.33)]) mat = Material(wavelength, medium) -cl = cluster_dimer(100, 20, 20, 40, π/4) +cl = cluster_dimer(100, 20, 20, 40, π / 4) # cl = cluster_single(20, 20, 40) # # Alpha = alpha_spheroids(500, -10+1im, 1.33^2, cl.sizes) @@ -139,7 +139,7 @@ cl = cluster_dimer(100, 20, 20, 40, π/4) # AlphaBlocks = [@SMatrix zeros(Complex{Real},3,3) for ii=1:N_dip] # # Ni=2 -Incidence = [SVector(0,0,0),SVector(0,π/2,0)] +Incidence = [SVector(0, 0, 0), SVector(0, π / 2, 0)] typeof(cl) @@ -155,22 +155,22 @@ testdisp = spectrum_dispersion(cl, mat, Incidence) a = DataFrame(testdisp.scattering, :auto) b = DataFrame(testdisp.extinction - testdisp.absorption, :auto) # c = DataFrame(testdisp.extinction, :auto) -a[!,:wavelength] = mat.wavelength -b[!,:wavelength] = mat.wavelength +a[!, :wavelength] = mat.wavelength +b[!, :wavelength] = mat.wavelength # c[!,:wavelength] = mat.wavelength da = stack(a, Not(:wavelength)) db = stack(b, Not(:wavelength)) # dc = stack(c, Not(:wavelength)) @vlplot( -width= 400, -height = 300, - tooltip={field="value", type="quantitative"}) + -@vlplot(data=da, #csca - mark = {:line, strokeDash=(5,5)}, + width = 400, + height = 300, + tooltip = {field = "value", type = "quantitative"}) + +@vlplot(data = da, #csca + mark = {:line, strokeDash = (5, 5)}, encoding = {x = "wavelength:q", y = "value:q", color = "variable:n"} ) + -@vlplot(data=db, #cext - cabs +@vlplot(data = db, #cext - cabs mark = :line, encoding = {x = "wavelength:q", y = "value:q", color = "variable:n"} ) @@ -197,37 +197,38 @@ height = 300, d |> @vlplot( mark = :line, encoding = {x = "wavelength:q", y = "value", color = "variable:n"}, - tooltip={field="value", typ="quantitative"}, - width= 400, - height = 300, + tooltip = {field = "value", typ = "quantitative"}, + width = 400, + height = 300, ) -alpha = quadrature_lgwt( 5, 0, 2*π ) +alpha = quadrature_lgwt(5, 0, 2 * π) -beta = quadrature_lgwt( 4, 0, 1 ) -a=2.0;b=1.0 -nodes = hcat([SVector{3}(a,acos(2*b - 1),0.0) for b in beta.nodes, a in alpha.nodes]...) +beta = quadrature_lgwt(4, 0, 1) +a = 2.0; +b = 1.0; +nodes = hcat([SVector{3}(a, acos(2 * b - 1), 0.0) for b in beta.nodes, a in alpha.nodes]...) -weights = SVector([a*b for a in alpha.weights, b in beta.weights]...) +weights = SVector([a * b for a in alpha.weights, b in beta.weights]...) quad_inc = cubature_sphere(3, "gl") -cl = cluster_dimer(80, 20, 20, 40, pi/4) +cl = cluster_dimer(80, 20, 20, 40, pi / 4) testoa = spectrum_oa(cl, mat, "gl", 100) @profile spectrum_oa(cl, mat, "gl", 100) -clref = cluster_single(20,20,40,0,0,0) +clref = cluster_single(20, 20, 40, 0, 0, 0) # clref = cluster_single(20,20,40,0,π/2,0) ref = spectrum_oa(clref, mat, "gl", 300) -a = DataFrame(dimer = testoa.average.extinction, single = ref.average.extinction) +a = DataFrame(dimer=testoa.average.extinction, single=ref.average.extinction) # a = DataFrame(dimer = testoa.dichroism.extinction, single = ref.dichroism.extinction) -a[!,:wavelength] = mat.wavelength +a[!, :wavelength] = mat.wavelength d = stack(a, Not(:wavelength)) # plot(d, x=:wavelength, y=:value, colour=:variable, Geom.line) @@ -235,8 +236,8 @@ d = stack(a, Not(:wavelength)) d |> @vlplot( mark = :line, encoding = {x = "wavelength:q", y = "value", color = "variable:n"}, - tooltip={field="value", typ="quantitative"}, - width= 400, - height = 300, - autosize = "fit", + tooltip = {field = "value", typ = "quantitative"}, + width = 400, + height = 300, + autosize = "fit", ) diff --git a/dev/testr.arrow b/dev/testr.arrow new file mode 100644 index 0000000..099fcee Binary files /dev/null and b/dev/testr.arrow differ diff --git a/src/Clusters.jl b/src/Clusters.jl index 927a1dc..2b501c1 100644 --- a/src/Clusters.jl +++ b/src/Clusters.jl @@ -45,11 +45,11 @@ cluster_single(1.0,2.0,3.0) ``` """ -function cluster_single(a, b, c, α = 0.0, β = 0.0, γ = 0.0, material = "Au", type="particle") +function cluster_single(a, b, c, α=0.0, β=0.0, γ=0.0, material="Au", type="particle") sizes = [SVector(a, b, c)] positions = [SVector(0.0, 0.0, 0.0)] # input parameters are Euler angles - rotations = [UnitQuaternion(RotZYZ(α,β,γ))] + rotations = [UnitQuaternion(RotZYZ([α, β, γ]))] Cluster(positions, rotations, sizes, [material], type) end @@ -71,15 +71,15 @@ cluster_dimer(80, 10, 10, 20) ``` """ -function cluster_dimer(d, a, b, c, ϕ = 0.0, α_1 = 0.0, α_2 = 0.0, material = "Au", type="particle") - sizes = [SVector(a, b, c) for _ ∈ 1:2] # identical particles - positions = [SVector(zero(eltype(d)), y, zero(eltype(d))) for y in (-d/2, d/2)] - q1 = UnitQuaternion(cos(α_1/2), sin(α_1/2), zero(eltype(α_1)), zero(eltype(α_1))) # rotation α_1 about x - q2 = UnitQuaternion(cos(α_2/2), sin(α_2/2), zero(eltype(α_1)), zero(eltype(α_1))) # rotation α_2 about x - q3 = UnitQuaternion(cos(ϕ/2), zero(eltype(α_1)), sin(ϕ/2), zero(eltype(α_1))) # rotation ϕ about y +function cluster_dimer(d, a, b, c, ϕ=0.0, α_1=0.0, α_2=0.0, material="Au", type="particle") + sizes = [SVector(a, b, c) for _ ∈ 1:2] # identical particles + positions = [SVector(zero(eltype(d)), y, zero(eltype(d))) for y in (-d / 2, d / 2)] + q1 = UnitQuaternion(cos(α_1 / 2), sin(α_1 / 2), zero(eltype(α_1)), zero(eltype(α_1))) # rotation α_1 about x + q2 = UnitQuaternion(cos(α_2 / 2), sin(α_2 / 2), zero(eltype(α_1)), zero(eltype(α_1))) # rotation α_2 about x + q3 = UnitQuaternion(cos(ϕ / 2), zero(eltype(α_1)), sin(ϕ / 2), zero(eltype(α_1))) # rotation ϕ about y # rotate particle 1 by q1 only (stays in yz plane) # rotate particle 2 by q2, then q3 but in original frame so order swapped - rotations = [q1, q3*q2] + rotations = [q1, q3 * q2] Cluster(positions, rotations, sizes, [material for _ ∈ 1:2], type) end @@ -107,29 +107,29 @@ cluster_helix(4, 20, 20, 30, 50, 300) ``` """ -function cluster_helix(N, a, b, c, R, Λ, δ, δ_0 = 0, handedness="left", - material = "Au", type="particle") +function cluster_helix(N, a, b, c, R, Λ, δ, δ_0=0, handedness="left", + material="Au", type="particle") - sizes = [SVector(a, b, c) for _ ∈ 1:N] # identical particles + sizes = [SVector(a, b, c) for _ ∈ 1:N] # identical particles s = handedness == "left" ? -1 : +1 ϕ = collect(1:N) * δ .+ δ_0 x = R * cos.(ϕ) y = R * sin.(ϕ) - z = s * ϕ * Λ/(2π) - z .-= s*maximum(s * z)/2 # if <0, add, else remove + z = s * ϕ * Λ / (2π) + z .-= s * maximum(s * z) / 2 # if <0, add, else remove # euler angles calculation - x′ = - y - y′ = x - z′ = s * Λ / (2π) + x′ = -y + y′ = x + z′ = s * Λ / (2π) n = @. sqrt(x′^2 + y′^2 + z′^2) - φ = atan.(y′, x′) - θ = acos.(z′ ./ n) + φ = atan.(y′, x′) + θ = acos.(z′ ./ n) ψ = 0.0 # don't care for axisymmetric particles - positions = SVector.(x,y,z) + positions = SVector.(x, y, z) # rotations = UnitQuaternion.(RotZYZ.(φ, θ, ψ)) rotations = UnitQuaternion.(inv.(RotZYZ.(φ, θ, ψ))) @@ -156,12 +156,12 @@ cluster_line(3, 500, 20, 20, 30, 0, 0, 0) ``` """ -function cluster_line(N, Λ, a, b, c, α = 0.0, β = 0.0, γ = 0.0, material = "Au", type="particle") +function cluster_line(N, Λ, a, b, c, α=0.0, β=0.0, γ=0.0, material="Au", type="particle") sizes = [SVector(a, b, c) for ii in 1:N] # identical particles - rotations = [UnitQuaternion(RotZYZ(α,β,γ)) for _ ∈ 1:N] # identical particles + rotations = [UnitQuaternion(RotZYZ([α, β, γ])) for _ ∈ 1:N] # identical particles - positions = SVector.(-(N-1)*Λ/2:Λ:(N-1)*Λ/2, zero(eltype(Λ)), zero(eltype(Λ))) + positions = SVector.(-(N - 1)*Λ/2:Λ:(N-1)*Λ/2, zero(eltype(Λ)), zero(eltype(Λ))) Cluster(positions, rotations, sizes, [material for _ ∈ 1:N], type) end @@ -186,43 +186,43 @@ cluster_array(4, 500, 20, 20, 30, 0, 0, 0) ``` """ -function cluster_array(N, Λ, a, b, c, α = 0.0, β = 0.0, γ = 0.0, material = "Au", type="particle") +function cluster_array(N, Λ, a, b, c, α=0.0, β=0.0, γ=0.0, material="Au", type="particle") N′ = floor(sqrt(N)) N = N′^2 # actual number, may have fewer than original N particles - sizes = [SVector(a, b, c) for _ ∈ 1:N] # identical particles - rotations = [UnitQuaternion(RotZYZ(α,β,γ)) for _ ∈ 1:N] # identical particles + sizes = [SVector(a, b, c) for _ ∈ 1:N] # identical particles + rotations = [UnitQuaternion(RotZYZ([α, β, γ])) for _ ∈ 1:N] # identical particles - x = -(N′-1)*Λ/2:Λ:(N′-1)*Λ/2 + x = -(N′ - 1)*Λ/2:Λ:(N′-1)*Λ/2 positions = SVector.(Iterators.product(x, x, zero(eltype(x))))[:] Cluster(positions, rotations, sizes, [material for _ ∈ 1:N], type) end -function sample_fibonacci(N) +function sample_fibonacci(N) - N = ifelse(mod(N,2) == 0, N+1, N) + N = ifelse(mod(N, 2) == 0, N + 1, N) j = 0:N-1 - β = @. acos(1 - (2*j+1)/N) - ϕ = (1+√5)/2 - α = @. (2π*j / ϕ) % 2π + β = @. acos(1 - (2 * j + 1) / N) + ϕ = (1 + √5) / 2 + α = @. (2π * j / ϕ) % 2π - positions = @. SVector(cos(α)*sin(β), sin(α)*sin(β), cos(β)) + positions = @. SVector(cos(α) * sin(β), sin(α) * sin(β), cos(β)) return positions end -function cluster_shell(N, a, b, c, R; orientation = "radial", material = "Rhodamine", type="point") +function cluster_shell(N, a, b, c, R; orientation="radial", material="Rhodamine", type="point") - sizes = [SVector(a, b, c) for _ ∈ 1:N] # identical particles + sizes = [SVector(a, b, c) for _ ∈ 1:N] # identical particles positions = R .* sample_fibonacci(N) if orientation == "radial" - rotations = map(x -> SVector(atan(x[2], x[1]), acos(x[3]/R), 0), positions) + rotations = map(x -> SVector(atan(x[2], x[1]), acos(x[3] / R), 0), positions) elseif orientation == "flat" @@ -232,12 +232,12 @@ function cluster_shell(N, a, b, c, R; orientation = "radial", material = "Rhoda # sample a random linear combination of the two as our flat-random direction φ = map(x -> atan(x[2], x[1]), positions) - θ = map(x -> acos(x[3]/R), positions) + θ = map(x -> acos(x[3] / R), positions) τ_1 = map(φ -> SVector(-sin(φ), cos(φ), 0), φ) - τ_2 = map((φ,θ) -> SVector(cos(θ)*cos(φ), cos(θ)*sin(φ), -sin(θ)), φ, θ) - τ = map((τ_1,τ_2) -> rand(1) .* τ_1 .+ rand(1) .* τ_2, τ_1, τ_2) + τ_2 = map((φ, θ) -> SVector(cos(θ) * cos(φ), cos(θ) * sin(φ), -sin(θ)), φ, θ) + τ = map((τ_1, τ_2) -> rand(1) .* τ_1 .+ rand(1) .* τ_2, τ_1, τ_2) rotations = map(τ -> SVector(atan(τ[2], τ[1]), - acos(τ[3]/sqrt(sum(τ.^2))), 0), τ) + acos(τ[3] / sqrt(sum(τ .^ 2))), 0), τ) else @info "No orientation means random orientation" @@ -245,7 +245,7 @@ function cluster_shell(N, a, b, c, R; orientation = "radial", material = "Rhoda end - quaternions = [UnitQuaternion(RotZYZ(r[1],r[2],r[3])) for r in rotations] + quaternions = [UnitQuaternion(RotZYZ([r[1], r[2], r[3]])) for r in rotations] Cluster(positions, inv.(quaternions), sizes, [material for _ ∈ 1:N], type) diff --git a/src/CoupledDipole.jl b/src/CoupledDipole.jl index 8417fb8..6b519ce 100644 --- a/src/CoupledDipole.jl +++ b/src/CoupledDipole.jl @@ -6,8 +6,9 @@ using LinearAlgebra using StaticArrays using Rotations using FastGaussQuadrature: gausslegendre -using DataFrames +using QuadGK # for ellipsoids, should use GL as well to reduce deps using Makie +using DataFrames include("Clusters.jl") @@ -58,7 +59,7 @@ export visualise_makie export visualise_threejs export expand_grid export pmap_df - +export depolarisation_ellipsoid ## core functions @@ -213,8 +214,8 @@ function iterate_field!( F, kn, AlphaBlocks; - tol = 1e-4, - maxiter = 1000, + tol=1e-4, + maxiter=1000 ) error = Inf @@ -229,7 +230,7 @@ function iterate_field!( while (error > tol) && (niter < maxiter) - Etmp = (I-F) * Etmp + Etmp = (I - F) * Etmp E = E + Etmp # add new order contribution polarisation!(P, E, AlphaBlocks) extinction!(σ_ext, kn, P, Ein) diff --git a/src/HighLevel.jl b/src/HighLevel.jl index cce9368..4e00a44 100644 --- a/src/HighLevel.jl +++ b/src/HighLevel.jl @@ -17,8 +17,8 @@ function spectrum_dispersion( cl::Cluster, mat::Material, Incidence; - N_sca::Int = 36, - method = "direct", + N_sca::Int=36, + method="direct" ) # what is the type of arrays to initialise? @@ -54,8 +54,8 @@ function spectrum_dispersion( # store all rotation matrices # ParticleRotations = map(euler_passive, cl.angles) ParticleRotations = map(RotMatrix, cl.rotations) # now (active) Rotation objects - # IncidenceRotations = map(euler_active, Incidence) # old Euler, no longer needed - IncidenceRotations = map(RotMatrix, Incidence) # now given as quaternions + IncidenceRotations = map(euler_active, Incidence) # old Euler, no longer needed + #IncidenceRotations = map(RotMatrix, Incidence) # now given as quaternions ScatteringVectors = map(euler_unitvector, quad_sca.nodes) # NOTE: we only need the third column to rotate kz, should specialise @@ -83,7 +83,7 @@ function spectrum_dispersion( cl.materials, cl.sizes, ) - + elseif cl.type == "particle" Alpha = map( @@ -166,14 +166,14 @@ Orientation-averaged far-field cross-sections for multiple wavelengths function spectrum_oa( cl::Cluster, mat::Material; - cubature = "gl", - N_inc = 36, - N_sca = 36, - method = "direct", + cubature="gl", + N_inc=36, + N_sca=36, + method="direct" ) - quad_inc = cubature_sphere(N_inc, cubature) - quad_sca = cubature_sphere(N_sca, cubature) + quad_inc = cubature_sphere(N_inc, cubature) + quad_sca = cubature_sphere(N_sca, cubature) # setting up constants @@ -211,7 +211,7 @@ function spectrum_oa( # ParticleRotations = map(euler_passive, cl.angles) # old version ParticleRotations = map(RotMatrix, cl.rotations) # now (active) Rotation objects # IncidenceRotations = map(euler_active, quad_inc.nodes) # old version, replaced by RotZYZ - IncidenceRotations = map(RotZYZ, quad_inc.nodes) + IncidenceRotations = map(RotZYZ, quad_inc.nodes) ScatteringVectors = map(euler_unitvector, quad_sca.nodes) # average both polarisations, so divide by two @@ -319,12 +319,12 @@ function spectrum_oa( # dsca = dext - dabs ( - average = CrossSections( + average=CrossSections( 1 / N_dip * cext, 1 / N_dip * cabs, 1 / N_dip * csca, ), - dichroism = CrossSections( + dichroism=CrossSections( 1 / N_dip * dext, 1 / N_dip * dabs, 1 / N_dip * dsca, diff --git a/src/Materials.jl b/src/Materials.jl index 8c3b031..8e068f5 100644 --- a/src/Materials.jl +++ b/src/Materials.jl @@ -1,7 +1,6 @@ ## material functions - """ Material(wavelength, media) @@ -10,7 +9,7 @@ Wavelength-dependent optical properties. """ struct Material{T} wavelengths::Vector{T} - media::Dict{String, Function} + media::Dict{String,Function} end @@ -61,11 +60,11 @@ function epsilon_Au(λ) ε_∞ * (1 - 1 / (λ_p^2 * ((1 / λ)^2 + 1im / (μ_p * λ)))) + A1 / λ1 * ( - exp( 1im * φ) / (1 / λ1 - 1 / λ - 1im / μ_p1) + + exp(1im * φ) / (1 / λ1 - 1 / λ - 1im / μ_p1) + exp(-1im * φ) / (1 / λ1 + 1 / λ + 1im / μ_p1) ) + A2 / λ2 * ( - exp( 1im * φ) / (1 / λ2 - 1 / λ - 1im / μ_p2) + + exp(1im * φ) / (1 / λ2 - 1 / λ - 1im / μ_p2) + exp(-1im * φ) / (1 / λ2 + 1 / λ + 1im / μ_p2) ) end @@ -88,7 +87,7 @@ julia> round(lorentzian(632.8)*1e39, digits=5) ``` """ -function lorentzian(λ, α_k = 5.76e-38, λ_k = 526.0, µ_k = 1.0e4) +function lorentzian(λ, α_k=5.76e-38, λ_k=526.0, µ_k=1.0e4) -α_k * λ_k / µ_k * (1.0 - 1.0 / (1.0 - (λ_k / λ)^2 - 1im * (λ_k^2 / (µ_k * λ)))) end @@ -113,13 +112,13 @@ julia> round(alpha_bare(632.8), digits=5) ``` """ -function alpha_bare(λ, α_∞ = 9.6e-39, α_k = 5.76e-38, λ_k = 526.0, µ_k = 1.0e4) +function alpha_bare(λ, α_∞=9.6e-39, α_k=5.76e-38, λ_k=526.0, µ_k=1.0e4) ε₀ = 8.8541878128e-12 nm3 = 1e27 - α = α_∞ - for kk = 1:length(α_k) + α = α_∞ + for kk = eachindex(α_k) α += lorentzian(λ, α_k[kk], λ_k[kk], µ_k[kk]) end prefact = nm3 / (4π * ε₀) @@ -144,7 +143,7 @@ julia> round(alpha_embed(alpha_bare(632.8)), digits=5) ``` """ -function alpha_embed(α, medium = 1.33) +function alpha_embed(α, medium=1.33) ε_m = medium^2 L = (ε_m + 2) / 3 1 / ε_m * L^2 * α @@ -165,17 +164,16 @@ end """ - depolarisation_spheroid(a, b, c) + depolarisation_spheroid(a, c) Depolarisation factor of a spheroid - `a`: semi-axis along x and y -- `b`: semi-axis along x and y (unused) - `c`: semi-axis along z # Examples ```jldoctest -julia> round.(depolarisation_spheroid(1, 1, 1.5), digits=5) +julia> round.(depolarisation_spheroid(1, 1.5), digits=5) 3-element SVector{3, Float64} with indices SOneTo(3): 0.38351 0.38351 @@ -183,7 +181,7 @@ julia> round.(depolarisation_spheroid(1, 1, 1.5), digits=5) ``` """ -function depolarisation_spheroid(a, b, c) +function depolarisation_spheroid(a, c) if (c == a)# sphere Lz = 1 / 3 end @@ -203,6 +201,45 @@ function depolarisation_spheroid(a, b, c) return (SVector(Lx, Lx, Lz)) end +""" + depolarisation_ellipsoid(a, b, c) + +Depolarisation factor of an ellipsoid +- `a`: semi-axis along x +- `b`: semi-axis along y +- `c`: semi-axis along z + +# Examples + +```jldoctest +julia> round.(depolarisation_ellipsoid(1, 1, 1.5), digits=5) +3-element SVector{3, Float64} with indices SOneTo(3): + 0.38351 + 0.38351 + 0.23298 +``` + +""" +function depolarisation_ellipsoid(a, b, c) + if (c ≈ a) & (b ≈ a) # sphere + Lx = 1 / 3.0 + Ly = Lx + Lz = Lx + elseif (a ≈ b) # spheroid along z + Lx, Ly, Lz = depolarisation_spheroid(a, c) + elseif (b ≈ c) # spheroid along x + Lz, Ly, Lx = depolarisation_spheroid(b, a) # swap z and x + elseif (a ≈ c) # spheroid along y + Lx, Lz, Ly = depolarisation_spheroid(a, b) # swap z and y + else # general case (no closed form) + V = a * b * c + Lx = QuadGK.quadgk(q -> 1.0 / ((1.0 + q) * sqrt((q + 1.0) * (q + (b / a)^2) * (q + (c / a)^2))), 0.0, Inf)[1] * V / 2.0 / a^3 + Ly = QuadGK.quadgk(q -> 1.0 / ((1.0 + q) * sqrt((q + 1.0) * (q + (a / b)^2) * (q + (c / b)^2))), 0.0, Inf)[1] * V / 2.0 / b^3 + Lz = QuadGK.quadgk(q -> 1.0 / ((1.0 + q) * sqrt((q + 1.0) * (q + (a / c)^2) * (q + (b / c)^2))), 0.0, Inf)[1] * V / 2.0 / c^3 + end + + return (SVector(Lx, Ly, Lz)) +end """ alpha_kuwata(λ, ε, ε_m, Size) @@ -216,7 +253,7 @@ Principal polarisability components of a spheroidal particle # Examples ``` -julia> alpha_kuwata(500, -10+1im, SVector(30, 30, 50), 1.33^2) +julia> alpha_kuwata(500, -10+1im, 1.33^2, SVector(30, 30, 50)) 3-element SVector{3, ComplexF64} with indices SOneTo(3): 77076.04648078184 + 26235.664281642235im 77076.04648078184 + 26235.664281642235im @@ -226,15 +263,15 @@ julia> alpha_kuwata(500, -10+1im, SVector(30, 30, 50), 1.33^2) """ function alpha_kuwata(λ, ε, ε_m, Size) - V = 4π / 3 * prod(Size) - x = @. 2π/λ * Size + V = 4π / 3 * prod(Size) + x = @. 2π / λ * Size χ = depolarisation_spheroid(Size...) A = @. -0.4865 * χ - 1.046 * χ^2 + 0.8481 * χ^3 B = @. 0.01909 * χ + 0.19999 * χ^2 + 0.6077 * χ^3 denom = @. (χ + ε_m / (ε - ε_m)) + A * ε_m * x^2 + B * ε_m^2 * x^4 - - 1im / 3 * 4 * π^2 * ε_m^(3 / 2) * V / λ^3 + 1im / 3 * 4 * π^2 * ε_m^(3 / 2) * V / λ^3 return ((V / (4π)) ./ denom) end diff --git a/test.arrow b/test.arrow new file mode 100644 index 0000000..a6ecef9 Binary files /dev/null and b/test.arrow differ diff --git a/test/test_depolarisation.jl b/test/test_depolarisation.jl new file mode 100644 index 0000000..9ccc4b0 --- /dev/null +++ b/test/test_depolarisation.jl @@ -0,0 +1,37 @@ +push!(LOAD_PATH, expanduser("~/Documents/nano-optics/CoupledDipole.jl/")) +using Revise +using CoupledDipole + +# depolarisation <- function (x1, x2 = x1, x3 = x2) +# { +# ## scaled version to help integration +# V = x1*x2*x3 + +# integrand <- function(q, r, s) { +# 1/((1 + q) * sqrt((q + 1) * (q + r^2) * (q + s^2))) +# } + +# I1 <- integrate(integrand, r=x2/x1, s=x3/x1, lower = 0, upper = Inf) +# I2 <- integrate(integrand, r=x1/x2, s=x3/x2, lower = 0, upper = Inf) +# I3 <- integrate(integrand, r=x1/x3, s=x2/x3, lower = 0, upper = Inf) + +# V/2 * c(I1$value / x1^3, +# I2$value / x2^3, +# I3$value / x3^3) +# } + + +function integrand(q, r, s) + 1.0 / ((1.0 + q) * sqrt((q + 1.0) * (q + r^2) * (q + s^2))) +end + +using QuadGK +a = quadgk(q -> integrand(q, 0.1, 0.1), 0.0, Inf) + +depolarisation_ellipsoid(40.01, 40.0, 40.02) + + +depolarisation_ellipsoid(20.01, 20.0, 50.02) +depolarisation_ellipsoid(20.0, 20.01, 50.0) +depolarisation_ellipsoid(50.01, 20.0, 20.0) +depolarisation_ellipsoid(20.01, 50.0, 20.0) diff --git a/testc.arrow b/testc.arrow new file mode 100644 index 0000000..74bda1c Binary files /dev/null and b/testc.arrow differ