rockverse.dect.PeriodicTable#
- class rockverse.dect.PeriodicTable(zgroup)[source]#
Manages periodic table information for the Monte Carlo Dual Energy Computed Tomography (DECT) processing. This class allows for the retrieval and modification of atomic numbers and masses for elements used in DECT processing.
Note
This class is designed to be created and managed within the main
DECTGroup. It should not be called directly.- Parameters:
zgroup (zarr.hierarchy.Group) – The Zarr group where the main
DECTGroupis stored.
Examples
Create a dual energy CT group. The periodic table will be created using default values:
>>> import rockverse as rv >>> dectgroup = rv.dect.create_group('/path/to/group/dir') >>> dectgroup.periodic_table
You can get the values for a specific element using a key in the format ‘<element>/Z’ for atomic number or ‘<element>/M’ for atomic mass:
>>> dectgroup.periodic_table['O/Z'] # Oxygen atomic number 8 >>> dectgroup.periodic_table['C/M'] # Carbon atomic mass 12.011
If you want to fine tune Z or M values, you can set new values just like you get current values:
>>> dectgroup.periodic_table['C/M'] get current value 12.011 >>> dectgroup.periodic_table['C/M'] = 12.109999 # set new value >>> dectgroup.periodic_table['C/M'] # check... 12.109999
Exceptions will be raised if the element is not in the table, if value for Z is not a positive integer, or if value for M is not a positive integer or float.
Methods#
|
Returns the periodic table as a dictionary. |
Returns the periodic table as a pandas DataFrame. |
|
|
Adds a new element to the periodic table. |