Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"

[compat]
Distributions = "0.25.117"
ElectronicStructureModels = "0.1"
ElectronicStructureModels = "0.2"
HDF5 = "0.17.2"
LinearAlgebra = "1.10"
LogExpFunctions = "0.3.29"
Expand Down
2 changes: 1 addition & 1 deletion src/max_finder/quantile_reduction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ function _findmax(method::QuantileReductionMethod, weights::AbstractVector)
return weight
end
end
return
return sorted_weights[end]
end
17 changes: 0 additions & 17 deletions src/patch_QEDcore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,6 @@ end
coordinate_symbols(in_psl::TwoBodyRestSystem) = coordinate_symbols(in_psl.coord)
@inline coord_index(c_sym, coord_syms)::Int64 = findfirst(x -> x == c_sym, coord_syms)

function QEDcore.PhaseSpacePoint(
p::AbstractProcessDefinition,
m::AbstractModelDefinition,
psl::AbstractPhaseSpaceLayout,
coords::Tuple,
)

in_dim = phase_space_dimension(p, m, in_phase_space_layout(psl))
out_dim = phase_space_dimension(p, m, psl)
return PhaseSpacePoint(
p,
m,
psl,
ntuple(i -> coords[i], in_dim),
ntuple(i -> coords[in_dim + i], out_dim),
)
end

# PSL for heads-on collision

Expand Down
2 changes: 1 addition & 1 deletion test/setups/probing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const FIELD = DistributionBasedField(PHOTONDIST)

# MEDIUM
const NE = 1.0e21u"cm^(-3)"
const MATTERMODEL = IdealElectronSystem{ZeroTemperature}(NE)
const MATTERMODEL = IdealElectronSystem(NE, ZeroTemperatureApprox())
const SCREENING = Screening()
const MEDIUM = InteractingElectronSystem(MATTERMODEL, SCREENING)

Expand Down
9 changes: 5 additions & 4 deletions test/test-max_finder.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ using QEDbase
using QEDprocesses
using XRTSProbing

RNG = Xoshiro(137)
#RNG = Xoshiro(137)
RNG = Random.Xoshiro(0xade95f7911a5ed27, 0x6afdf5bc148e56ef, 0x889de92d3feffd84, 0x3434b2628160aa75, 0x0769af4118a58ebb)
ATOL = sqrt(eps())
RTOL = sqrt(eps())

Expand All @@ -22,7 +23,7 @@ const MAXITER = 50

const QUANTILES = (0.01, 0.001, 0.0001)

const OMEGAS = (rand(RNG), 1.0e2 * rand(RNG), rand(RNG), 1.0e3 * rand(RNG), 1.0e4 * rand(RNG))
const OMEGAS = (rand(RNG), 1.0e2 * rand(RNG), 1.0e3 * rand(RNG), 1.0e4 * rand(RNG))


@testset "om: $om" for om in OMEGAS
Expand All @@ -34,12 +35,12 @@ const OMEGAS = (rand(RNG), 1.0e2 * rand(RNG), rand(RNG), 1.0e3 * rand(RNG), 1.0e

train!(RNG, VP, MAXITER, NCALLS)

@testset "p: %p" for p in QUANTILES
@testset "p: $p" for p in QUANTILES
test_max_finder = QuantileReductionMethod(p, Int(1.0e6))

test_max_weight = XRTSProbing.findmax(RNG, DCSCACHED, test_max_finder, VP)

@testset "n: %n" for n in (Int(2.0e5), Int(1.0e6))
@testset "n: $n" for n in (Int(1.0e6),)
# groundtruth
samples, jac = XRTSProbing._generate_coords(RNG, VP, n)
weights = sort(@. DCSCACHED(samples) * jac)
Expand Down
Loading