diff --git a/docs/src/man/charge_drift.md b/docs/src/man/charge_drift.md index 96a37f914..3b06b2add 100644 --- a/docs/src/man/charge_drift.md +++ b/docs/src/man/charge_drift.md @@ -275,16 +275,20 @@ Electron and hole clouds can be easily constructed using [`NBodyChargeCloud`](@r One way of defining an [`NBodyChargeCloud`](@ref) is having a center point charge surrounded by shells with point charges on the vertices of platonic solids. For now, all shells will have the same number of charges and be oriented the same way. -````@example NBodyChargeCloud +````@setup NBodyChargeCloud using SolidStateDetectors #hide using Unitful #hide using Plots #hide +gr(fmt = :png) #hide T = Float64 #hide +```` + +````@example NBodyChargeCloud center = CartesianPoint{T}([0,0,0]) energy = 1460u"keV" nbcc = NBodyChargeCloud(center, energy) plot(nbcc) -plot(nbcc, color = :red, size = (500,500), xlims = (-0.0012, 0.0012), ylims = (-0.0012,0.0012), zlims = (-0.0012,0.0012)) #hide +plot(nbcc, color = :red, size = (500,500), xlims = (-0.0012, 0.0012), ylims = (-0.0012,0.0012), zlims = (-0.0012,0.0012), fmt = :png) #hide ```` #### Equally Distributed on a Regular Sphere @@ -296,7 +300,7 @@ center = CartesianPoint{T}([0,0,0]) energy = 1460u"keV" nbcc = NBodyChargeCloud(center, energy, 100) plot(nbcc) -plot(nbcc, color = :red, size = (500,500), xlims = (-0.0012, 0.0012), ylims = (-0.0012,0.0012), zlims = (-0.0012,0.0012)) #hide +plot(nbcc, color = :red, size = (500,500), xlims = (-0.0012, 0.0012), ylims = (-0.0012,0.0012), zlims = (-0.0012,0.0012), fmt = :png) #hide ```` diff --git a/docs/src/man/csg.md b/docs/src/man/csg.md index fc17e534e..8cb82ec94 100644 --- a/docs/src/man/csg.md +++ b/docs/src/man/csg.md @@ -13,6 +13,7 @@ can be specified in the configuration files. using SolidStateDetectors import SolidStateDetectors.ConstructiveSolidGeometry as CSG using Plots +gr(fmt = :png) #hide T = Float64; nothing #hide ```` diff --git a/docs/src/man/plotting.md b/docs/src/man/plotting.md index b9be36205..32ff2fe56 100644 --- a/docs/src/man/plotting.md +++ b/docs/src/man/plotting.md @@ -7,7 +7,7 @@ First, we have to calculate something in order to demonstrate the plotting tools using Plots using SolidStateDetectors using Unitful -gr(fmt = :png) #hide +gr(fmt = :png) T = Float32 sim = Simulation{T}(SSD_examples[:InvertedCoax]); diff --git a/docs/src/tutorials/complete_simulation_chain_IVC_lit.jl b/docs/src/tutorials/complete_simulation_chain_IVC_lit.jl index 62cc80d50..7eabc4e3b 100644 --- a/docs/src/tutorials/complete_simulation_chain_IVC_lit.jl +++ b/docs/src/tutorials/complete_simulation_chain_IVC_lit.jl @@ -9,9 +9,8 @@ sim = Simulation{T}(SSD_examples[:InvertedCoax]) plot(sim.detector, xunit = u"mm", yunit = u"mm", zunit = u"mm", size = (700, 700)) #jl savefig("tutorial_det.pdf") # hide -#md savefig("tutorial_det.pdf") # hide -#md savefig("tutorial_det.svg"); nothing # hide -#md # [![tutorial_det](tutorial_det.svg)](tutorial_det.pdf) +#md savefig("tutorial_det.png"); nothing # hide +#md # [![tutorial_det](tutorial_det.png)](tutorial_det.png) # By default only the contacts and passives are shown in detector plots. One can also take a look at the semiconductor. The following plots show the semiconductor and slices in the y and z direction. @@ -22,9 +21,8 @@ plot( layout = (1,3), size = (1500,500), legend = false ) #jl savefig("tutorial_semiconductor.pdf") # hide -#md savefig("tutorial_semiconductor.pdf") # hide -#md savefig("tutorial_semiconductor.svg"); nothing # hide -#md # [![tutorial_semiconductor](tutorial_semiconductor.svg)](tutorial_semiconductor.pdf) +#md savefig("tutorial_semiconductor.png"); nothing # hide +#md # [![tutorial_semiconductor](tutorial_semiconductor.png)](tutorial_semiconductor.png) # One can also have a look at how the initial conditions look like on the grid (its starts with a very coarse grid): @@ -37,9 +35,8 @@ plot( layout = (1, 4), size = (1600, 500) ) #jl savefig("tutorial_initial_condition.pdf") # hide -#md savefig("tutorial_initial_condition.pdf") # hide -#md savefig("tutorial_initial_condition.svg"); nothing # hide -#md # [![tutorial_initial_condition](tutorial_initial_condition.svg)](tutorial_initial_condition.pdf) +#md savefig("tutorial_initial_condition.png"); nothing # hide +#md # [![tutorial_initial_condition](tutorial_initial_condition.png)](tutorial_initial_condition.png) # Next, calculate the electric potential: @@ -55,9 +52,8 @@ plot( layout = (1, 4), size = (1600, 500) ) #jl savefig("tutorial_calculated_potential.pdf") # hide -#md savefig("tutorial_calculated_potential.pdf") # hide -#md savefig("tutorial_calculated_potential.svg"); nothing # hide -#md # [![tutorial_calculated_potential](tutorial_calculated_potential.svg)](tutorial_calculated_potential.pdf) +#md savefig("tutorial_calculated_potential.png"); nothing # hide +#md # [![tutorial_calculated_potential](tutorial_calculated_potential.png)](tutorial_calculated_potential.png) # SolidStateDetectors.jl supports active (i.e. depleted) volume calculation: @@ -90,9 +86,8 @@ plot( layout = (1, 3), size = (1200, 600) ) #jl savefig("tutorial_calculated_potential_undep.pdf") # hide -#md savefig("tutorial_calculated_potential_undep.pdf") # hide -#md savefig("tutorial_calculated_potential_undep.svg"); nothing # hide -#md # [![tutorial_calculated_potential_undep](tutorial_calculated_potential_undep.svg)](tutorial_calculated_potential_undep.pdf) +#md savefig("tutorial_calculated_potential_undep.png"); nothing # hide +#md # [![tutorial_calculated_potential_undep](tutorial_calculated_potential_undep.png)](tutorial_calculated_potential_undep.png) # @@ -119,9 +114,8 @@ plot(sim.electric_field, full_det = true, φ = 0.0, size = (700, 700), xunit = u"mm", yunit = u"mm", zunit = u"V/mm", clims = (0,800).*u"V/mm") plot_electric_fieldlines!(sim, full_det = true, φ = 0.0) #jl savefig("tutorial_electric_field.pdf") # hide -#md savefig("tutorial_electric_field.pdf") # hide -#md savefig("tutorial_electric_field.svg"); nothing # hide -#md # [![tutorial_electric_field](tutorial_electric_field.svg)](tutorial_electric_field.pdf) +#md savefig("tutorial_electric_field.png"); nothing # hide +#md # [![tutorial_electric_field](tutorial_electric_field.png)](tutorial_electric_field.png) # ## Simulation of charge drifts @@ -150,9 +144,8 @@ drift_charges!(evt, sim, Δt = time_step) plot(sim.detector, xunit = u"mm", yunit = u"mm", zunit = u"mm", size = (700, 700)) plot!(evt.drift_paths) #jl savefig("tutorial_drift_paths.pdf") # hide -#md savefig("tutorial_drift_paths.pdf") # hide -#md savefig("tutorial_drift_paths.svg"); nothing # hide -#md # [![tutorial_drift_paths](tutorial_drift_paths.svg)](tutorial_drift_paths.pdf) +#md savefig("tutorial_drift_paths.png"); nothing # hide +#md # [![tutorial_drift_paths](tutorial_drift_paths.png)](tutorial_drift_paths.png) # ## Weighting potential calculation @@ -172,9 +165,8 @@ plot( size = (900, 700) ) #jl savefig("tutorial_weighting_potentials.pdf") # hide -#md savefig("tutorial_weighting_potentials.pdf") # hide -#md savefig("tutorial_weighting_potentials.svg"); nothing # hide -#md # [![tutorial_weighting_potentials](tutorial_weighting_potentials.svg)](tutorial_weighting_potentials.pdf) +#md savefig("tutorial_weighting_potentials.png"); nothing # hide +#md # [![tutorial_weighting_potentials](tutorial_weighting_potentials.png)](tutorial_weighting_potentials.png) # ## Detector Capacitance Matrix @@ -193,9 +185,8 @@ simulate!(evt, sim) # drift_charges + signal generation of all channels p_pc_signal = plot( evt.waveforms[1], lw = 1.5, xlims = (0, 1100), xlabel = "Time", unitformat = :slash, legend = false, tickfontsize = 12, ylabel = "Charge", guidefontsize = 14) #jl savefig("tutorial_waveforms.pdf") # hide -#md savefig("tutorial_waveforms.pdf") # hide -#md savefig("tutorial_waveforms.svg"); nothing # hide -#md # [![tutorial_waveforms](tutorial_waveforms.svg)](tutorial_waveforms.pdf) +#md savefig("tutorial_waveforms.png"); nothing # hide +#md # [![tutorial_waveforms](tutorial_waveforms.png)](tutorial_waveforms.png) # SolidStateDetectors.jl also allows to separate the observed charge signal into the charge induced by the electrons and the charge induced by the holes. @@ -203,6 +194,5 @@ contact_id = 1 plot_electron_and_hole_contribution(evt, sim, contact_id, xlims = (0, 1100), xlabel = "Time", legend = :topleft, tickfontsize = 12, ylabel = "Charge", guidefontsize = 14) #jl savefig("tutorial_waveform_contributions.pdf") # hide -#md savefig("tutorial_waveform_contributions.pdf") # hide -#md savefig("tutorial_waveform_contributions.svg"); nothing # hide -#md # [![tutorial_waveform_contributions](tutorial_waveform_contributions.svg)](tutorial_waveform_contributions.pdf) \ No newline at end of file +#md savefig("tutorial_waveform_contributions.png"); nothing # hide +#md # [![tutorial_waveform_contributions](tutorial_waveform_contributions.png)](tutorial_waveform_contributions.png) \ No newline at end of file diff --git a/docs/src/tutorials/custom_impurity_density_pn_junction_lit.jl b/docs/src/tutorials/custom_impurity_density_pn_junction_lit.jl index 922872f88..9d893a40e 100644 --- a/docs/src/tutorials/custom_impurity_density_pn_junction_lit.jl +++ b/docs/src/tutorials/custom_impurity_density_pn_junction_lit.jl @@ -20,6 +20,7 @@ using Plots using SolidStateDetectors using Unitful +#md gr(fmt = :png); nothing # hide sim = Simulation{Float32}(SSD_examples[:InfiniteParallelPlateCapacitor]) plot( sim.detector.semiconductor, fillalpha = 0.4)