JuliaPhysics / JuliaPhysics/SolidStateDetectors.jl

Result of `estimate_depletion_handling` depends on precision type

Open
#640 1 comment 0 reactions 0 assignees Claimed by @hervasa2 View on GitHub
bug
Dominant language
Julia
Stars
178
Forks
59
Avg merge
1d 20h
Merged PRs (30d)
4

Description

When running the tests in `test/test_real_detectors.jl` with `Float64` instead of `Float32`, some tests regarding the depletion state and the depletion voltage fail:

```
julia> include("test/utils.jl"); include("test_real_detectors.jl")
Precompiling SolidStateDetectors...
┌ Info: In electric field calculation: Keyword `n_points_in_φ` not set.
└ Default is `n_points_in_φ = 36`. 2D field will be extended to 36 points in φ.
[ Info: Detector simulation done
[ Info: 2.0
Convergence: Time: 0:00:04 (8 iterations)
[ Info: Depletion voltage: 2030.006416947449 V
Inverted Coax: Test Failed at ~/Software/SolidStateDetectors.jl/test/test_real_detectors.jl:28
Expression: isapprox(deplV, 1871 * u"V", atol = 10.0 * u"V")
Evaluated: isapprox(2030.006416947449 V, 1871 V; atol = 10.0 V)

...

Inverted Coax: Test Failed at ~/Software/SolidStateDetectors.jl/test/test_real_detectors.jl:33
Expression: !(is_depleted(sim.point_types))
```
(Note that these tests both pass using `Float32`)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running test/test_real_detectors.jl with Float32 and Float64 and compare the depletion-state and depletion-voltage failures reported at lines 28 and 33. Trace the estimate_depletion_handling path used by those tests; done means both precisions produce consistent depletion voltage and state results within the existing assertions.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.