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

Draft: Implement functionality for potential data #63

Open
14 tasks
daanboer opened this issue May 23, 2023 · 1 comment
Open
14 tasks

Draft: Implement functionality for potential data #63

daanboer opened this issue May 23, 2023 · 1 comment
Labels
api application enhancement New feature or request

Comments

@daanboer
Copy link
Contributor

daanboer commented May 23, 2023

In the enhance-schema branch I am working on generalizing the schema such that it supports different data types. This will of course also include potential data. Once this work has been finished, different aspects of the platform need to be updated to be able to work with the potential data.

  • The main data selection page needs to be updated: app/src/pages/scat-cs/index.tsx.

    • Move the data selection page from scat-cs to a more general path, e.g. data. This is also a great opportunity to port this page from pages to the new app directory.
    • Add the option for the user to select the type of data they are interested in (e.g. cross section, potential, or rate coefficient). The user should be able to select multiple data types, perhaps a MultiSelect component would be most suitable.
      • The relevant API routes need to be updated to support this extra parameter. They can be found at app/src/pages/api/reactions.
      • An extra API route needs to be added for the additional parameters, e.g. /api/data_type.
      • Make sure to update the preloaded SWR cache. This is done by updating the generateCachePairs function located in app/src/pages/scat-cs/index.tsx.
  • The data inspection page needs to be updated: app/src/app/scat-cs/bag/page.tsx.

    • Different types of plots/representations need to be added for the different types of data, this can for example be done using a Tabs component. Note that additionally to table-based data, we now also need to support a host of model potentials. It would be nice to both show the equation for the model potential, the provided model parameters, and a plot of the evaluated expression.
  • Integration of MagnumPI. It would be nice to host some tools that can consume the potential data, similar to the Boltzmann solvers for cross section data. MagnumPI is an open-source potential integrator that allows the user to compute e.g. elastic cross sections based on a provided potential. It is written in C++, but already provides a WebAssembly build.

    • Think of the best way to serve WebAssembly tools as part of LXCat. Preferably, different tools should act as plugins that can be enabled and disabled (this would probably require more work regarding input/output schemas and automatic creation of interfaces, but this is a nice start).
    • Update MagnumPI to support the latest version of the potential schemas.
    • Integrate MagnumPI and build the web interface (input form and plots). This page can be similar to the BOLSIG+ page, see app/src/app/scat-cs/compute/page.tsx.
  • The data compute page needs to be updated: app/src/app/scat-cs/compute/page.tsx

    • Currently, the compute page immediately navigates to the BOLSIG+ interface, it makes sense to provide an intermediate stage where the user can select the tool they want to use. This can be done in multiple ways, e.g. by providing the selection interface on the inspect page, by providing an intermediate page that provides a tool selection interface, or by updating the compute page to supply the different tools (e.g. using tabs or a sidebar).
@daanboer
Copy link
Contributor Author

The schema generalization necessary to support potential data has been applied in #547.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api application enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant