Skip to content

Commit

Permalink
fix: few minor doc string improvements and typo correction
Browse files Browse the repository at this point in the history
  • Loading branch information
fjebaker committed May 26, 2024
1 parent 353b8ac commit b43980e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions src/ccall-wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.",
Expand Down
6 changes: 3 additions & 3 deletions src/meta-models/surrogate-models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -169,7 +169,7 @@ function optimize_accuracy!(harness::SurrogateHarness, ; kwargs...)
end

"""
make_surrogate_function(
make_surrogate_harness(
model::M,
lowerbounds::T,
upperbounds::T;
Expand Down

0 comments on commit b43980e

Please sign in to comment.