![]() |
TkN 2.7.1
Toolkit for Nuclei
|
The database used for the levels and decays is extracted from the ENSDF database.
For a given nucleus, the database is composed of different validated datasets, corresponding to different ways to produce the nucleus. A global dataset named : "ADOPTED LEVELS, GAMMAS" is used to merge all the different datasets in one. This is the default dataset of any nucleus in TkN.
TkN allows to load the different datasets. For a given nucleus, the datasets and their associated ID can be listed using:
The datasets are displayed in two sections: evaluated ENSDF datasets and non-evaluated XUNDL datasets. The publication date of each dataset (in YYYY-MM format) is shown in brackets when available, e.g. [2024-01].
To display dataset comments alongside the list, pass the "com" option:
Select by name rather than a hardcoded ID: IDs are not stable across database versions. Names below are examples; inspect the available datasets first.
The manager caches one shared scheme per nucleus. Selection and edits affect all callers of that scheme, not just the current tknucleus. Save/restore selections (using an RAII guard when exceptions or early returns are possible). Do not select or edit datasets while other threads read them. For a private selection, construct a separate tklevel_scheme in single-threaded code. Use a detached tkdataset for user-created levels instead of modifying the shared adopted dataset.
The current dataset object can be retrieved and inspected programmatically:
To iterate over all available datasets:
Here are the main methods available on a tkdataset:
| method name | description |
|---|---|
| get_id() | returns the dataset integer ID |
| get_name() | returns the dataset name as a string |
| get_comment() | returns the dataset comment string (can be empty) |
| has_comment() | returns true if a comment is available |
| get_date() | returns the publication date in YYYY-MM format (can be empty) |
| has_date() | returns true if a publication date is available |
| get_source() | returns the source string: "ENSDF" or "XUNDL" |
| is_xundl() | returns true if the dataset comes from XUNDL |