-
Notifications
You must be signed in to change notification settings - Fork 24
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
Split the openadas module into atomic repository and OpenADAS parser #377
base: development
Are you sure you want to change the base?
Split the openadas module into atomic repository and OpenADAS parser #377
Conversation
…ted Atomic Data section in the documentation.
… separate the data from Zeeman triplet parameters.
…the path to the default atomic repository. (cherab#416)
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 |
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
opeanadas
module into two components: theatomic
module for working with a local json repository, and the newopenadas
module for parsing ADAS files and installing them in a local repository.The list of changes includes:
openadas.repository
is moved toatomic.repository
,openadas.rates
is moved toatomic.rates
,openadas/openadas.py
is moved toatomic/atomicdata.py
andOpenADAS()
class is renamed toAtomicData()
.~/.cherab/atomicdata/default_repository
.openadas.repository
,openadas.rates
andopenadas.OpenADAS()
now redirect toatomic.repository
,atomic.rates
andatomic.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_fallback
argument, which is set toTrue
by default.atomic.repository
andopenadas.install
are 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_data
IDS, can serve as a guide here.P.S. I used
git mv
for all moved files, but for some reason (too many changes?) git treats some of those files as new.