-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from fjebaker/no-xspec
Remove LibXSPEC_jll dependency
- Loading branch information
Showing
39 changed files
with
252 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name = "XSPECModels" | ||
uuid = "e051c099-9e89-4e1f-aad2-39a4611ecf4d" | ||
authors = ["fjebaker <fergusbkr@gmail.com>"] | ||
version = "0.1.0" | ||
|
||
[deps] | ||
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" | ||
LibXSPEC_jll = "50917eeb-3e3c-5f3a-99bd-93e1c30e1561" | ||
SpectralFitting = "f2c56810-742e-4b72-8bf4-27af3bb81a12" | ||
|
||
[compat] | ||
DocStringExtensions = "0.9.3" | ||
LibXSPEC_jll = "0.1.15" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module XSPECModels | ||
|
||
using DocStringExtensions | ||
using LibXSPEC_jll | ||
using SpectralFitting | ||
import SpectralFitting: _check_model_directory_present, register_model_data | ||
|
||
const LIBXSPEC_STORAGE_PATH = joinpath(LibXSPEC_jll.artifact_dir, "spectral", "modelData") | ||
|
||
include("ccall-wrapper.jl") | ||
|
||
# include xspec models | ||
include("additive.jl") | ||
include("multiplicative.jl") | ||
include("convolutional.jl") | ||
|
||
function register_xspec_data() | ||
push!(SpectralFitting.ALL_STORAGE_PATHS, LIBXSPEC_STORAGE_PATH) | ||
register_model_data(XS_KerrDisk, "kerrtable.fits"; root = LIBXSPEC_STORAGE_PATH) | ||
register_model_data(XS_KyrLine, "KBHline01.fits"; root = LIBXSPEC_STORAGE_PATH) | ||
register_model_data(XS_Laor, "ari.mod"; root = LIBXSPEC_STORAGE_PATH) | ||
end | ||
|
||
|
||
function __init__() | ||
# init HEASOFT | ||
if get(ENV, "SPECTRAL_FITTING_XSPEC_INIT", "") == "" | ||
# push our storage path | ||
register_xspec_data() | ||
ccall((:FNINIT, libXSFunctions), Cvoid, ()) | ||
# set an environment variable so we don't accidentally init again | ||
ENV["SPECTRAL_FITTING_XSPEC_INIT"] = "true" | ||
end | ||
end | ||
|
||
end # module XSPECModels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.