diff --git a/docs/src/scans.md b/docs/src/scans.md index e71f081b..0b7d6ff2 100644 --- a/docs/src/scans.md +++ b/docs/src/scans.md @@ -8,7 +8,7 @@ import PyPlot: plt a = 125e-6 flength = 3 -gas = :HeJ +gas = :He λ0 = 800e-9 τfwhm = 10e-15 λlims = (100e-9, 4e-6) diff --git a/examples/simple_interface/scan.jl b/examples/simple_interface/scan.jl index e5731962..e5a49aa6 100644 --- a/examples/simple_interface/scan.jl +++ b/examples/simple_interface/scan.jl @@ -4,7 +4,7 @@ import PyPlot: plt # Fixed parameters: a = 125e-6 flength = 3 -gas = :HeJ +gas = :He λ0 = 800e-9 τfwhm = 10e-15 diff --git a/src/Interface.jl b/src/Interface.jl index 1dc825a4..9247dff8 100644 --- a/src/Interface.jl +++ b/src/Interface.jl @@ -364,8 +364,6 @@ function prop_capillary_args(radius, flength, gas, pressure; plasma = isnothing(plasma) ? !envelope : plasma thg = isnothing(thg) ? !envelope : thg - gas = (gas == :He) ? :HeJ : gas - grid = makegrid(flength, λ0, λlims, trange, envelope, thg, δt) mode_s = makemode_s(modes, flength, radius, gas, pressure, model, loss, pol) check_orth(mode_s) diff --git a/src/PhysData.jl b/src/PhysData.jl index 87b04167..56620e29 100644 --- a/src/PhysData.jl +++ b/src/PhysData.jl @@ -45,9 +45,10 @@ const amg = atm/(k_B*273.15) "Atomic mass unit" const m_u = ustrip(CODATA2014.m_u) -const gas = (:Air, :He, :HeJ, :Ne, :Ar, :Kr, :Xe, :N2, :H2, :O2, :CH4, :SF6, :N2O, :D2) +const gas = (:Air, :He, :HeJ, :HeB, :Ne, :Ar, :Kr, :Xe, :N2, :H2, :O2, :CH4, :SF6, :N2O, :D2) const gas_str = Dict( :He => "He", + :HeB => "He", :HeJ => "He", :Ar => "Ar", :Ne => "Neon", @@ -142,13 +143,13 @@ calculated from Sellmeier expansions. """ function sellmeier_gas(material::Symbol) dens = dens_1bar_0degC[material] - if material == :He + if material == :HeB B1 = 4977.77e-8 C1 = 28.54e-6 B2 = 1856.94e-8 C2 = 7.76e-3 return γ_Börzsönyi(B1/dens, C1, B2/dens, C2) - elseif material == :HeJ + elseif material == :He || material == :HeJ B1 = 2.16463842e-05 C1 = -6.80769781e-04 B2 = 2.10561127e-07 @@ -570,7 +571,7 @@ References: function γ3_gas(material::Symbol; source=nothing) # TODO: More Bishop/Shelton; Wahlstrand updated values. if source === nothing - if material in (:He, :HeJ, :Ne, :Ar, :Kr, :Xe, :N2) + if material in (:He, :HeB, :HeJ, :Ne, :Ar, :Kr, :Xe, :N2) source = :Lehmeier elseif material in (:H2, :CH4, :SF6, :D2) source = :Shelton @@ -585,7 +586,7 @@ function γ3_gas(material::Symbol; source=nothing) if source == :Lehmeier dens = dens_1atm_0degC[material] # Table 1 in [3] - if material in (:He, :HeJ) + if material in (:He, :HeB, :HeJ) fac = 1 elseif material == :Ne fac = 1.8 @@ -708,7 +709,7 @@ Return the first ionisation potential of the `material` in a specific unit (defa Possible units are `:SI`, `:atomic` and `:eV`. """ function ionisation_potential(material; unit=:SI) - if material in (:He, :HeJ) + if material in (:He, :HeB, :HeJ) Ip = 0.9036 elseif material == :Ne Ip = 0.7925 @@ -764,7 +765,7 @@ function quantum_numbers(material) return 4, 1, 1 elseif material == :Xe return 5, 1, 1 - elseif material in (:He, :HeJ) + elseif material in (:He, :HeB, :HeJ) return 1, 0, 1 elseif material == :O2 return 2, 0, 0.53 # https://doi.org/10.1016/S0030-4018(99)00113-3 diff --git a/src/Scans.jl b/src/Scans.jl index 3a3fec1e..9ae2855d 100644 --- a/src/Scans.jl +++ b/src/Scans.jl @@ -171,7 +171,7 @@ Make an appropriate file name for an `HDF5Output` or `prop_capillary` output for ``` scan = Scan("scan_example"; energy=collect(range(5e-6, 200e-6; length=64))) runscan(scan) do scanidx, energyi - prop_capillary(125e-6, 3, :HeJ, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energyi + prop_capillary(125e-6, 3, :He, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energyi filepath=makefilename(scan, scanidx)) end ``` @@ -251,7 +251,7 @@ The exact subset and order of scan points which is run depends on `scan.exec`, s ``` scan = Scan("scan_example"; energy=collect(range(5e-6, 200e-6; length=64))) runscan(scan) do scanidx, energyi - prop_capillary(125e-6, 3, :HeJ, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energyi) + prop_capillary(125e-6, 3, :He, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energyi) end ``` """ diff --git a/test/test_capillary.jl b/test/test_capillary.jl index d8c668a3..2da4d190 100644 --- a/test/test_capillary.jl +++ b/test/test_capillary.jl @@ -11,10 +11,10 @@ import Luna.PhysData: wlfreq λ = 800e-9 ω = wlfreq(λ) a = 125e-6 - m = Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced) + m = Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced) @test isapprox(Capillary.losslength(m, ω), 7.0593180702769, rtol=1e-5) @test isapprox(Capillary.dB_per_m(m, ω), 0.6152074146252722, rtol=1e-5) - @test Capillary.dB_per_m(m, ω) ≈ 8*Capillary.dB_per_m(Capillary.MarcatiliMode(2a, :He, 1.0, model=:reduced), ω) + @test Capillary.dB_per_m(m, ω) ≈ 8*Capillary.dB_per_m(Capillary.MarcatiliMode(2a, :HeB, 1.0, model=:reduced), ω) end @testset "normalisation" begin @@ -55,17 +55,17 @@ end @testset "n = $n" for n = 1:6 @testset "m = $m" for m = 1:6 # With the exception of HE65 specifically, all of these also pass with rtol=1e-20 - mode = Capillary.MarcatiliMode(a, :He, 1.0, n=n, m=m) + mode = Capillary.MarcatiliMode(a, :HeB, 1.0, n=n, m=m) Ni, Nerr = N(mode) @test isapprox(Modes.N(mode), Ni, atol=Nerr, rtol=1e-7) aeff, aefferr = Aeff(mode) @test isapprox(Modes.Aeff(mode), aeff, rtol=1e-7, atol=aefferr) end end - m = Capillary.MarcatiliMode(a, :He, 1.0, n=0, kind=:TE) + m = Capillary.MarcatiliMode(a, :HeB, 1.0, n=0, kind=:TE) @test Modes.N(m) ≈ N(m)[1] @test Modes.Aeff(m) ≈ Aeff(m)[1] - m = Capillary.MarcatiliMode(a, :He, 1.0, n=0, kind=:TM) + m = Capillary.MarcatiliMode(a, :HeB, 1.0, n=0, kind=:TM) @test Modes.N(m) ≈ N(m)[1] @test Modes.Aeff(m) ≈ Aeff(m)[1] @@ -75,7 +75,7 @@ end afun = let a0=a0, aL=aL, L=L afun(z) = a0 + (aL-a0)*z/L end - m = Capillary.MarcatiliMode(afun, :He, 1, loss=false, model=:full) + m = Capillary.MarcatiliMode(afun, :HeB, 1, loss=false, model=:full) @test Modes.N(m) ≈ N(m)[1] @test Modes.N(m, z=L/2) ≈ N(m, z=L/2)[1] @test Modes.N(m, z=L) ≈ N(m, z=L)[1] @@ -87,22 +87,22 @@ end @testset "β, α" begin a = 125e-6 - m = Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced) + m = Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced) λ = 1e-9 .* collect(range(70, stop=7300, length=128)) ω = wlfreq.(λ) @test all(isfinite.(Capillary.β.(m, ω))) @test all(isreal.(Capillary.β.(m, ω))) - @test all(isreal.(Capillary.β.(Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced), ω))) - @test all(isreal.(Capillary.β.(Capillary.MarcatiliMode(a, :He, 10.0, model=:reduced), ω))) - @test all(isreal.(Capillary.β.(Capillary.MarcatiliMode(a, :He, 50.0, model=:reduced), ω))) + @test all(isreal.(Capillary.β.(Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced), ω))) + @test all(isreal.(Capillary.β.(Capillary.MarcatiliMode(a, :HeB, 10.0, model=:reduced), ω))) + @test all(isreal.(Capillary.β.(Capillary.MarcatiliMode(a, :HeB, 50.0, model=:reduced), ω))) @test all(isfinite.(Capillary.α.(m, ω))) @test all(isreal.(Capillary.α.(m, ω))) end @testset "ZDW/Aeff" begin - @test abs(1e9*Capillary.zdw(Capillary.MarcatiliMode(125e-6, :He, 0.4, model=:reduced)) - 379) < 1 - @test abs(1e9*Capillary.zdw(Capillary.MarcatiliMode(75e-6, :He, 5.9, model=:reduced)) - 562) < 1 - @test Capillary.Aeff(Capillary.MarcatiliMode(75e-6, :He, 1.0, model=:reduced)) ≈ 8.42157534886545e-09 + @test abs(1e9*Capillary.zdw(Capillary.MarcatiliMode(125e-6, :HeB, 0.4, model=:reduced)) - 379) < 1 + @test abs(1e9*Capillary.zdw(Capillary.MarcatiliMode(75e-6, :HeB, 5.9, model=:reduced)) - 562) < 1 + @test Capillary.Aeff(Capillary.MarcatiliMode(75e-6, :HeB, 1.0, model=:reduced)) ≈ 8.42157534886545e-09 end @@ -143,12 +143,12 @@ end @test isapprox(Capillary.dispersion(m, 5, ω), 2.64991510536236e-73, rtol=5e-5) @test isapprox(Capillary.zdw(m), 7.225347947615157e-07, rtol=2e-8) @test isapprox(Capillary.α(m, ω), 0.0290115706883820, rtol=1e-14) - @test Capillary.Aeff(Capillary.MarcatiliMode(75e-6, :He, 1.0)) ≈ 8.42157534886545e-09 + @test Capillary.Aeff(Capillary.MarcatiliMode(75e-6, :HeB, 1.0)) ≈ 8.42157534886545e-09 end @testset "to_space" begin - ms = (Capillary.MarcatiliMode(125e-6, :He, 1.0), - Capillary.MarcatiliMode(125e-6, :He, 1.0, m=2, ϕ=π/2)) + ms = (Capillary.MarcatiliMode(125e-6, :HeB, 1.0), + Capillary.MarcatiliMode(125e-6, :HeB, 1.0, m=2, ϕ=π/2)) components = :xy xs = (10e-6, π/7) ts = Modes.ToSpace(ms, components=components) diff --git a/test/test_ionisation.jl b/test/test_ionisation.jl index e0ca9f6c..1b93b1b5 100644 --- a/test/test_ionisation.jl +++ b/test/test_ionisation.jl @@ -4,7 +4,7 @@ import NumericalIntegration: integrate, SimpsonEven @test Ionisation.ionrate_ADK(:He, 1e10) ≈ 1.2416371415312408e-18 @test Ionisation.ionrate_ADK(:He, 2e10) ≈ 1.0772390893742478 -@test Ionisation.ionrate_ADK(:HeJ, 2e10) ≈ 1.0772390893742478 +@test Ionisation.ionrate_ADK(:HeB, 2e10) ≈ 1.0772390893742478 @test Ionisation.ionrate_ADK(:Ar , 7e9) ≈ 2.4422306306649472e-08 @test Ionisation.ionrate_ADK(:Ar , 8e9) ≈ 4.494711488416766e-05 diff --git a/test/test_modes.jl b/test/test_modes.jl index d3468e90..c4ce9af4 100644 --- a/test/test_modes.jl +++ b/test/test_modes.jl @@ -10,15 +10,15 @@ import Luna.PhysData: wlfreq @testset "delegation" begin - m = Modes.delegated(Capillary.MarcatiliMode(75e-6, :He, 5.9)) + m = Modes.delegated(Capillary.MarcatiliMode(75e-6, :HeB, 5.9)) @test Modes.Aeff(m) ≈ 8.42157534886545e-09 @test abs(1e9*Modes.zdw(m) - 562) < 1 n(m, ω; z=0) = real(Modes.neff(m, ω; z=z)) - m2 = Modes.delegated(Capillary.MarcatiliMode(75e-6, :He, 1.0), neff=n) + m2 = Modes.delegated(Capillary.MarcatiliMode(75e-6, :HeB, 1.0), neff=n) @test Modes.α(m2, 2e15) == 0 @test Modes.α(m2, wlfreq(800e-9)) == 0 - cm = Capillary.MarcatiliMode(75e-6, :He, 5.9) + cm = Capillary.MarcatiliMode(75e-6, :HeB, 5.9) dm = Modes.delegated(cm) @test Modes.Aeff(dm) ≈ 8.42157534886545e-09 @@ -49,7 +49,7 @@ end @testset "overlap" begin a = 100e-6 -m = Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced) +m = Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced) r = collect(range(0, a, length=2^16)) unm = sf_bessel_zero_Jnu(0, 1) Er = besselj.(0, unm*r/a) # spatial profile of the HE11 mode - overlap should be perfect @@ -63,7 +63,7 @@ Er = besselj.(0, unm*r/a) # spatial profile of HE12 - overlap should be 0 fac = collect(range(0.3, stop=0.9, length=128)) ηn = zero(fac) r = collect(range(0, 4a, length=2^16)) -m = Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced, m=1) +m = Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced, m=1) for i in eachindex(fac) w0 = fac[i]*a Er = Maths.gauss.(r, w0/sqrt(2)) @@ -78,7 +78,7 @@ w0 = fac*a Er = Maths.gauss.(r, w0/sqrt(2)) s = 0 for mi = 1:10 - m = Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced, m=mi) + m = Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced, m=mi) η = Modes.overlap(m, r, Er, dim=1)[1] s += abs2(η[1]) end @@ -122,8 +122,8 @@ energy1 = ert(Etr1) energy2 = ert(Etr2) @test ert(Etr) ≈ energy1 + energy2 -m1 = Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced, m=1) -m2 = Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced, m=2) +m1 = Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced, m=1) +m2 = Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced, m=2) Eωm1 = Modes.overlap(m1, q.r, Eωr; dim=2, norm=false) Eωm2 = Modes.overlap(m2, q.r, Eωr; dim=2, norm=false) @@ -189,8 +189,8 @@ energy1 = ert(Etr1) energy2 = ert(Etr2) @test ert(Etr) ≈ energy1 + energy2 -modes = (Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced, m=1), - Capillary.MarcatiliMode(a, :He, 1.0, model=:reduced, m=2)) +modes = (Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced, m=1), + Capillary.MarcatiliMode(a, :HeB, 1.0, model=:reduced, m=2)) newgrid = Grid.RealGrid(1, 800e-9, (160e-9, 3000e-9), 1e-12) Eωm = Modes.overlap(modes, newgrid, grid, q.r, Eωr) @@ -375,7 +375,7 @@ end # testset "makemodes" @testset "spatial field and fluence" begin a = 100e-6 flength = 0.1 - gas = :He + gas = :HeB pressure = 1 λ0 = 800e-9 τfwhm = 30e-15 diff --git a/test/test_physdata.jl b/test/test_physdata.jl index 153e37f1..85308958 100644 --- a/test/test_physdata.jl +++ b/test/test_physdata.jl @@ -3,12 +3,12 @@ import Luna: PhysData @testset "All" begin @testset "Exceptions" begin - @test_throws DomainError PhysData.ref_index(:Hello, 800e-9) + @test_throws DomainError PhysData.ref_index(:HeBllo, 800e-9) end @testset "refractive indices" begin - @test PhysData.ref_index(:He, 800e-9) ≈ 1.000031950041203 - @test PhysData.ref_index(:He, 800e-9, 10) ≈ 1.0003180633169397 + @test PhysData.ref_index(:HeB, 800e-9) ≈ 1.000031950041203 + @test PhysData.ref_index(:HeB, 800e-9, 10) ≈ 1.0003180633169397 @test PhysData.ref_index(:SiO2, 800e-9, lookup=false) ≈ 1.4533172548587419 @test PhysData.ref_index(:SiO2, 400e-9, lookup=false) ≈ 1.4701161185594052 @test PhysData.ref_index(:SiO2, PhysData.eV_to_m(6)) ≈ 1.543 @@ -20,13 +20,13 @@ end @testset "Function equivalence" begin @test PhysData.ref_index_fun(:SiO2)(800e-9) == PhysData.ref_index(:SiO2, 800e-9) - @test PhysData.ref_index_fun(:He)(800e-9) == PhysData.ref_index(:He, 800e-9) + @test PhysData.ref_index_fun(:HeB)(800e-9) == PhysData.ref_index(:HeB, 800e-9) end @testset "Dispersion" begin @test PhysData.dispersion(2, :SiO2, 800e-9, lookup=false) ≈ 3.61619983e-26 - @test isapprox(PhysData.dispersion(2, :He, 800e-9), 9.373942337550116e-31, rtol=1e-5) - @test isapprox(PhysData.dispersion(2, :He, 800e-9, 10), 9.33043805928079e-30, rtol=1e-5) + @test isapprox(PhysData.dispersion(2, :HeB, 800e-9), 9.373942337550116e-31, rtol=1e-5) + @test isapprox(PhysData.dispersion(2, :HeB, 800e-9, 10), 9.33043805928079e-30, rtol=1e-5) end @testset "glasses" begin @@ -48,12 +48,12 @@ end end @testset "Nonlinear coefficients" begin - @test_broken PhysData.χ3(:He, 1) ≈ 1.2617371645226101e-27 + @test_broken PhysData.χ3(:HeB, 1) ≈ 1.2617371645226101e-27 @test PhysData.χ3(:Ar, 1) ≈ 2.964158749949189e-26 - @test_broken PhysData.n2(:He, 1) ≈ 3.5647819877255427e-25 - @test PhysData.n2(:He, 2) ≈ 7.125642138007481e-25 - @test_broken PhysData.n2.(:He, [1, 2]) ≈ [3.5647819877255427e-25, 7.125642138007481e-25] - @test_broken PhysData.n2.([:He, :Ne], 1) ≈ [3.5647819877255427e-25, 6.416061508801999e-25] + @test_broken PhysData.n2(:HeB, 1) ≈ 3.5647819877255427e-25 + @test PhysData.n2(:HeB, 2) ≈ 7.125642138007481e-25 + @test_broken PhysData.n2.(:HeB, [1, 2]) ≈ [3.5647819877255427e-25, 7.125642138007481e-25] + @test_broken PhysData.n2.([:HeB, :Ne], 1) ≈ [3.5647819877255427e-25, 6.416061508801999e-25] for gas in PhysData.gas[2:end] # Don't have γ3 for Air @test isreal(PhysData.n2(gas, 1)) end @@ -67,11 +67,11 @@ end @test isapprox(PhysData.density(:Ar, 2.0, 294.0), 4.933761614600933e25, rtol=4e-13) @test isapprox(PhysData.density(:Ar, 40.0, 294.0), 1.0101579129300146e27, rtol=2e-11) @test isapprox(PhysData.density(:Ar, 400.0, 294.0), 9.270757850984163e27, rtol=3e-10) - @test_broken isapprox(PhysData.density(:He, 0.002, 294.0), 4.927180563885407e22, rtol=7e-16) - @test_broken isapprox(PhysData.density(:He, 0.02, 294.0), 4.927137517453137e23, rtol=2e-16) - @test_broken isapprox(PhysData.density(:He, 2.0, 294.0), 4.9224080868066745e25, rtol=2e-13) - @test_broken isapprox(PhysData.density(:He, 40.0, 294.0), 9.66755645602771e26, rtol=6e-16) - @test_broken isapprox(PhysData.density(:He, 400.0, 294.0), 8.309132317978155e27, rtol=1e-13) + @test_broken isapprox(PhysData.density(:HeB, 0.002, 294.0), 4.927180563885407e22, rtol=7e-16) + @test_broken isapprox(PhysData.density(:HeB, 0.02, 294.0), 4.927137517453137e23, rtol=2e-16) + @test_broken isapprox(PhysData.density(:HeB, 2.0, 294.0), 4.9224080868066745e25, rtol=2e-13) + @test_broken isapprox(PhysData.density(:HeB, 40.0, 294.0), 9.66755645602771e26, rtol=6e-16) + @test_broken isapprox(PhysData.density(:HeB, 400.0, 294.0), 8.309132317978155e27, rtol=1e-13) @test isapprox(PhysData.density(:Xe, 0.002, 294.0), 4.927238737907382e22, rtol=7e-16) @test isapprox(PhysData.density(:Xe, 0.02, 294.0), 4.92771934762324e23, rtol=2e-16) @test isapprox(PhysData.density(:Xe, 2.0, 294.0), 4.981603290885485e25, rtol=9e-16) @@ -89,9 +89,9 @@ end @test isapprox(PhysData.density(:H2, 40.0, 294.0), 9.624525613497868e26, rtol=6e-16) @test isapprox(PhysData.density(:H2, 400.0, 294.0), 7.840662987579036e27, rtol=6e-16) # temperature range - @test_broken isapprox(PhysData.density(:He, 10.0, 10.0), 9.218927214187151e27, rtol=6e-16) - @test_broken isapprox(PhysData.density(:He, 10.0, 100.0), 7.142310177179197e26, rtol=6e-16) - @test_broken isapprox(PhysData.density(:He, 10.0, 1000.0), 7.234660811823096e25, rtol=6e-13) + @test_broken isapprox(PhysData.density(:HeB, 10.0, 10.0), 9.218927214187151e27, rtol=6e-16) + @test_broken isapprox(PhysData.density(:HeB, 10.0, 100.0), 7.142310177179197e26, rtol=6e-16) + @test_broken isapprox(PhysData.density(:HeB, 10.0, 1000.0), 7.234660811823096e25, rtol=6e-13) @test isapprox(PhysData.density(:Xe, 10.0, 170.0), 1.336261228046876e28, rtol=6e-16) @test isapprox(PhysData.density(:Xe, 10.0, 700.0), 1.0361035050644844e26, rtol=6e-13) @test isapprox(PhysData.density(:N2, 10.0, 100.0), 1.4849593021049305e28, rtol=6e-7) diff --git a/test/test_processing.jl b/test/test_processing.jl index 7ba3472a..23cfb2b0 100644 --- a/test/test_processing.jl +++ b/test/test_processing.jl @@ -223,7 +223,7 @@ end @testset "scanproc" begin a = 125e-6 flength = 0.1 - gas = :HeJ + gas = :He λ0 = 800e-9 τfwhm = 10e-15 diff --git a/test/test_scans.jl b/test/test_scans.jl index 202967c7..b427aa63 100644 --- a/test/test_scans.jl +++ b/test/test_scans.jl @@ -151,7 +151,7 @@ if ~Sys.iswindows() scan = Scan("scantest_queue_multiproc", Scans.QueueExec(); energy=energies) idcs_run = Int[] runscan(scan) do scanidx, energy - prop_capillary(125e-6, 3, :HeJ, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, + prop_capillary(125e-6, 3, :He, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, trange=400e-15, λlims=(200e-9, 4e-6)) push!(idcs_run, scanidx) end @@ -181,7 +181,7 @@ end scan = Scan(scanname, Scans.QueueExec(); energy=energies) idcs_run = Int[] runscan(scan) do scanidx, energy - prop_capillary(125e-6, 3, :HeJ, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, + prop_capillary(125e-6, 3, :He, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, trange=400e-15, λlims=(200e-9, 4e-6)) if scanidx == 16 error("This exception is expected as part of the test suite") @@ -215,7 +215,7 @@ end td = joinpath(tempdir(), tempname()) runscan(scan) do scanidx, energy println("running on $(myid())") - prop_capillary(125e-6, 3, :HeJ, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, + prop_capillary(125e-6, 3, :He, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, trange=400e-15, λlims=(200e-9, 4e-6), filepath=joinpath(td, makefilename(scan, scanidx))) open(joinpath(td, "$(scanidx)_on_$(myid())"), "w") do io @@ -234,7 +234,7 @@ end td = joinpath(tempdir(), tempname()) runscan(scan) do scanidx, energy println("running on $(myid())") - prop_capillary(125e-6, 3, :HeJ, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, + prop_capillary(125e-6, 3, :He, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, trange=400e-15, λlims=(200e-9, 4e-6), filepath=joinpath(td, makefilename(scan, scanidx))) open(joinpath(td, "$(scanidx)_on_$(myid())"), "w") do io @@ -253,7 +253,7 @@ end # if ~Sys.iswindows() scan = Scan("scantest_autofilename", Scans.LocalExec(); energy=energies) mktempdir() do td runscan(scan) do scanidx, energy - prop_capillary(125e-6, 3, :HeJ, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, + prop_capillary(125e-6, 3, :He, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, trange=400e-15, λlims=(200e-9, 4e-6), filepath=td, scan, scanidx) end @test length(readdir(td)) == length(energies) @@ -266,7 +266,7 @@ end scan = Scan("scantest_manualfilename", Scans.LocalExec(); energy=energies) mktempdir() do td runscan(scan) do scanidx, energy - prop_capillary(125e-6, 3, :HeJ, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, + prop_capillary(125e-6, 3, :He, 0.8; λ0=800e-9, τfwhm=10e-15, energy=energy, trange=400e-15, λlims=(200e-9, 4e-6), filepath=td, scan, scanidx, filename="newname") end diff --git a/test/test_tools.jl b/test/test_tools.jl index c54950e7..85e5aaf3 100644 --- a/test/test_tools.jl +++ b/test/test_tools.jl @@ -2,8 +2,8 @@ import Test: @test, @testset, @test_throws import Luna: Capillary, Tools, PhysData @testset "Params" begin -m = Capillary.MarcatiliMode(125e-6, :He, 0.4, model=:reduced) -p = Tools.params(300e-6, 10e-15, 800e-9, m, :He, P=0.4) +m = Capillary.MarcatiliMode(125e-6, :HeB, 0.4, model=:reduced) +p = Tools.params(300e-6, 10e-15, 800e-9, m, :HeB, P=0.4) # compare to Pufe @test isapprox(p.N, 2.239, rtol=1e-3) @test isapprox(p.Lfiss, 1.768, rtol=1e-3) @@ -16,7 +16,7 @@ end @testset "RDW phasematching" begin a = 125e-6 -gas = :HeJ +gas = :He pressure = 1 λ0 = 800e-9