Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting local models #2

Open
DougBurke opened this issue Sep 18, 2021 · 0 comments
Open

Supporting local models #2

DougBurke opened this issue Sep 18, 2021 · 0 comments

Comments

@DougBurke
Copy link
Member

I want to be able to able support users who want to use XSPEC local models. The idea would be to provide functionality in this module to act like XSPECs initpackage and lmod commands (i.e. create a new module) rather than have then added to this module. I'm basing this in my create_xspec_user_model script in CIAO.

Things we may want

  • access to the initialization routine from C++ scope
  • access to the C++ template code that is used to create the function to wrap the model - that is both
template <xsccCall model, int NumPars>
py::array_t<Real> wrapper_C(py::array_t<Real> pars,
                            py::array_t<Real, py::array::c_style | py::array::forcecast> energyArray,
                            const int spectrumNumber,
                            const string initStr) {
...

and

    m.def("apec", wrapper_C<C_apec, 3>, "The XSPEC additive apec model (3 parameters).","pars"_a,"energies"_a,"spectrum"_a=1,"initStr"_a="");
DougBurke added a commit that referenced this issue Sep 24, 2021
This separation is intended to help #2 - allowing us to build
a module to access user models but still interact with this module -
but it currently doesn't work as I don't understand the modern
setuptools/PEP 517++ world (not that I understood the old version)
and so have no idea how to get the include file actually installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant