Closed hervasa2 closed 1 week ago
At first glance, this looks very promising to me. Are you planning to add some text for the plotting documentation? https://juliaphysics.github.io/SolidStateDetectors.jl/stable/man/plotting/
Yes. But first I would like to consider if this is the most intuitive front end slice_plane
selection. What do you think of it now versus having x,y,...
as keyword arguments?
I think that having x,y,...
as keyword argument might indeed be more intuitive, especially keeping in mind that most users would use this together with potential slice plot.
I tried out the code, works very smoothly. Great job!!
Some questions I would have:
scatter
seriestype.
What would be the recommended syntax to draw bigger/thinner lines?linewidth
series attribute to also be able to modify the thickness of the contacts in the slice plot? The slice plot looks basically like a line and might have people thinking that it is actually a path
plot, where the line thickness could be adjusted via linewidth
/lw
.ϕ
, is there any convenient way to let the method also sample points in "negative" ϕ
direction, similar to the full_det
keyword in the electric potential plotting?
slice
seriestype to the documentation?All the requested changes have been pushed. linewidth/lw
is reinterpreted as markersize
in the internal plot recipes for st = :slice
. full_det
is now also suported. Additionally when a z
slice is chosen the projection/proj = :polar
keyword is supported.
plot(sim.electric_potential, z = 30u"mm")
plot!(sim.detector, st = :slice, z = 30u"mm", proj = :polar, lw = 2)
A long awaited feature has finally arrived! 2D slice plotting is now available via
seriestype = :slice
It is based on the sample surface method. Only a subset of these points are selected and projected on a 2D plane which can be set with the
x,y,z,φ
attributes. Default is set toy = 0
. Sampling density can be set as usual withn_samples
. Even though the default density is set 5 times higher than for:samplesurface
plots can be generated without lag. Example:Sampling density was not set correctly when multiple CSGs where plotted at once (eg.
:samplesurface
in the plot recipe for SolidStateDetectors). This was corrected and carried over to:slice
.Default values for
n_samples
are 40 and 100 or 200 forsamplesurface
and:slice
respectively.:slice
checks if any surface is coplanar with the plotting plane. In such casesn_samples = 100
, elsen_samples = 200
.Looping over values for the plotting planes gives:
y
z
φ