Skip to content

Commit b8d5433

Browse files
committed
Add tests for reading impurity density values from crystal metadata
1 parent ca9d766 commit b8d5433

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/test_ext_ssd.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ include("testing_utils.jl")
1919
sim = Simulation{Float64}(l200, detname, crystal_impurity = true)
2020
@test sim isa Simulation
2121

22-
# Compare active volume from SSD to active volume from LegendDataManagement
2322
SolidStateDetectors.apply_initial_state!(sim, ElectricPotential, Grid(sim, max_tick_distance = 0.1u"mm"))
23+
24+
# Check that all crystals are p-type
25+
@test all(sim.q_eff_imp.data .<= 0)
26+
27+
# Compare active volume from SSD to active volume from LegendDataManagement
2428
active_volume_ssd = SolidStateDetectors.get_active_volume(sim.point_types)
2529
active_volume_ldm = LegendDataManagement.get_active_volume(l200.metadata.hardware.detectors.germanium.diodes[Symbol(detname)], 0.0)
2630
@test isapprox(active_volume_ssd, active_volume_ldm, rtol = 0.01)

0 commit comments

Comments
 (0)