-
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
Default atomic data distributed with Cherab #364
Comments
Thanks for opening an issue @vsnever. I think that creating the default_data could help in the future. It is in my opinion much better than storing any data in the core. Another option is importing classes/functions from the default_data in the "derived" data. Combining both imports and inheritance could give us enough flexibility in the future. The main point I see is to give users a flexible and simple way how to build their own Cherab data source. Without the need of copying the actual data between repositories. For example, in future, we can also have ALADDIN data source and users could combine data from both OpenADAS, ALADDIN and default_data to form their own repository. Here I think I would also ask for opinion of @CnlPepper and @mattngc, because this is an important decision to take. |
Also, we can connect a list of atomic data sources instead of a single data source to |
This could lead to undefined behaviour. What would happen if there were more data sources with different data in the list? I can imagine the debugging would be terrible procedure, or even worse, you could end up with wrong results without even realising. I think that giving the possibility to prepare a custom source can prevent a lot of problems |
This seems to be the correct way to solve this problem, but also complex in terms of implementation. However, the effort should pay off in the future. |
The way to solve this, and what Matt and I were working towards, was to give Cherab its own data repository and format. OpenADAS and any other data source would simply be used to populate the cherab repository. You can see the start of this inside the "openadas" module - the rates are "installed". You just need to expand this concept. We never got around to doing this due to us not needing/interacting with non-openadas data. So in short, the correct approach is:
This approach is the most scaleable and as a nice side effect, it would introduce a new.... hopefully cleaner data atomic data representation to the community. So the community can then chip away at the garbage (representation/API wise... looking at you ADAS) that are the current data sources. |
I'd add default data to the cherab repo, much like the wavelength data. Users can override it as they want. |
Thank you very much, @CnlPepper, I think I got it. The current format for representing atomic data in Cherab has a strong correlation with how data is provided in ADAS, and this also affects the |
While discussing where to store the Gaunt factor for
Bremsstrahlung
emission model in #352, @Mateasek proposed to create a subpackagecherab.default_data
to store the default atomic data distributed with Cherab.This was agreed, but the question remained whether the third party atomic data sources, like
OpenADAS
, should inherit from the coreAtomicData
interface or from theDefaultAtomicData
interface.I think that the third party data sources should inherit from the
DefaultAtomicData
, because theDefaultAtomicData
may contain the data not present in the third party data source. For example,DefaultAtomicData
has the Gaunt factor needed for bremsstrahlung, but lacks atomic rates, whileOpenADAS
, if inherited from the coreAtomicData
, will have the rates but not the Gaunt factor. Therefore, it will not be possible to simulate, for example, spectral line emission on top of the bremsstrahlung background without initializing line emission models withOpenADAS
andBremsstrahlung
model withDefaultAtomicData
. But the most convenient way to use atomic data is by connecting it to thePlasma
object and thus using the same data source for all models.We may run into a case when both the
DefaultAtomicData
and theOpenADAS
contain data for the same physical quantity. For such a case we may add a parameteroverride_default
toOpenADAS
, which, ifTrue
, will use theOpenADAS
data, and ifFalse
, the default data.@Mateasek, @jacklovell, what do you think?
The text was updated successfully, but these errors were encountered: