From b43980e3cf64cda6014e63738c805ad26763caf4 Mon Sep 17 00:00:00 2001 From: fjebaker Date: Sun, 26 May 2024 02:58:40 +0100 Subject: [PATCH] fix: few minor doc string improvements and typo correction --- src/ccall-wrapper.jl | 18 ++++++++++++++++++ src/meta-models/surrogate-models.jl | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/ccall-wrapper.jl b/src/ccall-wrapper.jl index 1f9f818f..16102f81 100644 --- a/src/ccall-wrapper.jl +++ b/src/ccall-wrapper.jl @@ -48,6 +48,19 @@ function unsafe_parameter_vector_conditioned( unsafe_parameter_vector(alloc_model) end +""" + function _unsafe_ffi_invoke!( + output, + error_vec, + input, + params, + ModelType::Type{<:AbstractSpectralModel}, + ) + +Wrapper to do a foreign function call to an XSPEC model. + +See also [`_safe_ffi_invoke!`](@ref). +""" function _unsafe_ffi_invoke!( output, error_vec, @@ -63,6 +76,11 @@ function _unsafe_ffi_invoke!( """) end +""" + function _safe_ffi_invoke!(output, input, params, ModelType::Type{<:AbstractSpectralModel}) + +Wrapper to do a foreign function call to an XSPEC model. +""" function _safe_ffi_invoke!(output, input, params, ModelType::Type{<:AbstractSpectralModel}) error( "This error should be unreachable. Please open an issue with your use-case and include the stack trace.", diff --git a/src/meta-models/surrogate-models.jl b/src/meta-models/surrogate-models.jl index 8a1f736f..52e66b5b 100644 --- a/src/meta-models/surrogate-models.jl +++ b/src/meta-models/surrogate-models.jl @@ -6,10 +6,10 @@ Used to wrap a surrogate function into an [`AbstractSpectralModel`](@ref). # Example -Creating a surrogate function using [`make_surrogate_function`](@ref): +Creating a surrogate function using [`make_surrogate_harness`](@ref): ```julia # build and optimize a surrogate model -surrogate = make_surrogate_function(model, lower_bounds, upper_bounds) +surrogate = make_surrogate_harness(model, lower_bounds, upper_bounds) # create surrogate spectral model sm = SurrogateSpectralModel( @@ -169,7 +169,7 @@ function optimize_accuracy!(harness::SurrogateHarness, ; kwargs...) end """ - make_surrogate_function( + make_surrogate_harness( model::M, lowerbounds::T, upperbounds::T;