Split the openadas module into atomic repository and OpenADAS parser#377
Draft
vsnever wants to merge 28 commits intocherab:developmentfrom
Draft
Split the openadas module into atomic repository and OpenADAS parser#377vsnever wants to merge 28 commits intocherab:developmentfrom
vsnever wants to merge 28 commits intocherab:developmentfrom
Conversation
…ted Atomic Data section in the documentation.
… separate the data from Zeeman triplet parameters.
…the path to the default atomic repository. (cherab#416)
Member
Author
Member
Author
|
Obviously, this change is too big to make in one PR. I'll break it down into several PRs. The first will affect only the documentation, improving docstrings of the |
This was referenced Jul 22, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #352 and #364, the user should be able to mix atomic data from different providers in a single local repository. In particular, some data such as the dictionary of spectral line wavelengths and Gaunt factors for bremsstrahlung, which are already distributed, or will be distributed with Cherab, are not taken from OpenADAS. Therefore, following @CnlPepper's advice, this PR splits the old
opeanadasmodule into two components: theatomicmodule for working with a local json repository, and the newopenadasmodule for parsing ADAS files and installing them in a local repository.The list of changes includes:
openadas.repositoryis moved toatomic.repository,openadas.ratesis moved toatomic.rates,openadas/openadas.pyis moved toatomic/atomicdata.pyandOpenADAS()class is renamed toAtomicData().~/.cherab/atomicdata/default_repository.openadas.repository,openadas.ratesandopenadas.OpenADAS()now redirect toatomic.repository,atomic.ratesandatomic.AtomicData()respectively.AtomicData()methods now search for the isotope data, and fallback to the element data only if the isotope data is missing. This behaviour is controlled by therate_element_fallbackargument, which is set toTrueby default.atomic.repositoryandopenadas.installare improved. The new sections "Atomic data repository" and "Open-ADAS" are added to the documentation under the "Atomic Data" section.AtomicData()interface.Of course, the format for representing the atomic rates in the local repository is very specific to ADAS. In the future, this format can be generalised. For example, parameters such as interpolation type or the order of coordinates for interpolation should also be stored in json. I think that a fairly general format for representing atomic and molecular data in ITER IMAS,
AMNS_dataIDS, can serve as a guide here.P.S. I used
git mvfor all moved files, but for some reason (too many changes?) git treats some of those files as new.