Skip to content

Zeeman splitting (broadening?)#432

Draft
ajwheeler wants to merge 15 commits intomainfrom
zeeman
Draft

Zeeman splitting (broadening?)#432
ajwheeler wants to merge 15 commits intomainfrom
zeeman

Conversation

@ajwheeler
Copy link
Owner

This is experimental and may not every be merged. I want to get it to the point where it's producing correct spectra, but I may not every make the interface/performance good.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

TODOs and @show instances found in this PR:

src/line_absorption.jl:111:                        # TODO upper or lower E
src/line_absorption.jl-112-                        Δλ_zeeman .= @. line.wl^2 / (c_cgs * hplanck_cgs) * ΔE_zeeman
src/line_absorption.jl-113-                        ∂λ_∂E = -line.wl^2 / (c_cgs * hplanck_cgs)
src/line_absorption.jl-114-                        Δλ_zeeman = ∂λ_∂E .* ΔE_zeeman
--
src/line_absorption.jl:122:                for shift in (-Δλ_zeeman, 0, Δλ_zeeman) # TODO selection rules
src/line_absorption.jl-123-                    λ = @. line.wl + shift
src/line_absorption.jl-124-
src/line_absorption.jl-125-                    # calculate the window center from the nominal line center, not the shifted line
--
src/line_absorption.jl:135:                    # TODO selection rules scaling
src/line_absorption.jl-136-                    α_task[:, lb:ub] .+= line_profile.(λ, σ, γ, amplitude, view(λs, lb:ub)')
src/line_absorption.jl-137-                end
src/line_absorption.jl-138-            end
--
src/linelist.jl:17:    # TODO
src/linelist.jl-18-    lande_g_even # Landé g factor for even level
src/linelist.jl-19-    lande_g_odd  # Landé g factor for odd level
src/linelist.jl-20-    J_even
--
src/linelist.jl:403:        # TODO make this more robust!  I think this was the problem!
src/linelist.jl-404-        if length(row) == 159
src/linelist.jl-405-            row = " " * row
src/linelist.jl-406-        end
--
src/linelist.jl:415:        # TODO I HAD TO EDIT gf0640.10 !!!
src/linelist.jl-416-        # I inserted a space at the begining of every line to make it match the spec
src/linelist.jl-417-
src/linelist.jl-418-        # Parse lande g factors (columns 28 and 29, chars 141:145 and 146:150)

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

Benchmark Results (Julia v1)

Time benchmarks
main 5ba957f... main / 5ba957f...
synthesis/M dwarf/100 Å of APOGEE w/ water 7.53 ± 0.029 s 20.1 ± 0.0027 s 0.375 ± 0.0014
synthesis/M dwarf/4000 Å - 8000 Å VALD solar 12.4 ± 0.037 s 25.7 ± 0.056 s 0.484 ± 0.0018
synthesis/M dwarf/APOGEE DR17 w/o water 9.48 ± 0.076 s 21.2 ± 0.021 s 0.447 ± 0.0036
synthesis/M dwarf/one wavelength 0.306 ± 0.00066 s 0.31 ± 0.0014 s 0.984 ± 0.0051
synthesis/sun/100 Å of APOGEE w/ water 0.85 ± 0.0017 s 1.17 ± 0.0033 s 0.727 ± 0.0025
synthesis/sun/4000 Å - 8000 Å VALD solar 5.58 ± 0.012 s 8.54 ± 0.042 s 0.653 ± 0.0036
synthesis/sun/APOGEE DR17 w/o water 4.85 ± 0.021 s 9.19 ± 0.034 s 0.528 ± 0.003
synthesis/sun/one wavelength 0.118 ± 0.00056 s 0.119 ± 0.00043 s 0.993 ± 0.0059
time_to_load 2.63 ± 0.01 s 2.82 ± 0.11 s 0.932 ± 0.035
Memory benchmarks
main 5ba957f... main / 5ba957f...
synthesis/M dwarf/100 Å of APOGEE w/ water 1.73 M allocs: 3.21 GB 3.34 M allocs: 9.14 GB 0.351
synthesis/M dwarf/4000 Å - 8000 Å VALD solar 8.62 M allocs: 7.11 GB 8.88 M allocs: 15.8 GB 0.45
synthesis/M dwarf/APOGEE DR17 w/o water 5.6 M allocs: 5.11 GB 6.47 M allocs: 12.4 GB 0.412
synthesis/M dwarf/one wavelength 1.15 M allocs: 0.288 GB 1.15 M allocs: 0.289 GB 0.997
synthesis/sun/100 Å of APOGEE w/ water 1.17 M allocs: 0.226 GB 2.18 M allocs: 0.516 GB 0.439
synthesis/sun/4000 Å - 8000 Å VALD solar 8.48 M allocs: 2.81 GB 8.73 M allocs: 4.59 GB 0.612
synthesis/sun/APOGEE DR17 w/o water 5.29 M allocs: 2.12 GB 6.21 M allocs: 4.45 GB 0.477
synthesis/sun/one wavelength 0.782 M allocs: 0.107 GB 0.785 M allocs: 0.108 GB 0.994
time_to_load 0.159 k allocs: 11.2 kB 0.159 k allocs: 11.2 kB 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant