f4enix.output.cdgs.cdgs.CDGS#
- class f4enix.output.cdgs.cdgs.CDGS(mesh: StructuredGrid, energy_type: CDGS_ENERGY_TYPE = CDGS_ENERGY_TYPE.LINE, particle: str = 'gamma', e_bins: ndarray | None = None)#
Bases:
objectCDGS object. Handles all operations with respect to .cdgs and .vtk format. Computes lines and emission probabilities for isotopes.
- Parameters:
mesh (pv.StructuredGrid) – The mesh containing the activity and atom density data for isotopes.
energy_type (CDGS_ENERGY_TYPE, optional) – The type of energy representation, by default CDGS_ENERGY_TYPE.LINE
particle (str, optional) – The type of particle, by default “gamma”. Other supported one is “neutron”. Be sure that the radioisotopes you are using have the corresponding particle emission data in the actigamma database.
e_bins (np.ndarray, optional) – The energy bins for the CDGS object, by default None. Mandatory if energy_type is CDGS_ENERGY_TYPE.BINS. Should be a 1D array of bin edges in eV.
Methods
__init__(mesh[, energy_type, particle, e_bins])CDGS object.
from_cloud_point(csv_file, isotopes, ...[, ...])Read a csv (typically produced from fluent) that contains a cloud point of data and convert it into a CDGS object.
get_total_intensity(isotope)Get the total intensity (photons/s) of the specified isotope in the mesh or of all isotopes together if "all" is specified.
particle()to_cdgs(outfile, isotope)to_vtk(outfile)Write the CDGS object to a VTK file.
Attributes
Get the cooling time of the CDGS object.
- property cooling_time: float#
Get the cooling time of the CDGS object.
- Returns:
The cooling time of the CDGS object.
- Return type:
float
- classmethod from_cloud_point(csv_file: str | Path, isotopes: dict[str, str], interpolation_kernel: InterpolationKernel, mesh_definition: RegularMeshDefinition, col_names: dict[str, str] | None = None, e_bins: ndarray | None = None, particle: str = 'gamma') CDGS#
Read a csv (typically produced from fluent) that contains a cloud point of data and convert it into a CDGS object.
- Parameters:
csv_file (str | Path) – Path to the CSV file containing the cloud point data.
isotopes (dict[str, str]) – Dictionary mapping isotope names to their column in the CSV file. Isotopes names should be like “Co60”.
interpolation_kernel (InterpolationKernel) – An instance of an InterpolationKernel subclass that defines how to distribute the activity from the cloud point to the regular mesh.
mesh_definition (RegularMeshDefinition) – An instance of a RegularMeshDefinition subclass that defines the mesh structure.
col_names (dict[str, str] | None, optional) –
Dictionary mapping column names in the CSV to desired names in the CDGS object. If None, default names will be used. Default dictionary is: {
”x”: “x-coordinate”, “y”: “y-coordinate”, “z”: “z-coordinate”, “vol”: “cell-volume”,
}
e_bins (np.ndarray, optional) – The energy bins for the CDGS object, by default None. If provided, the emission lines will be computed in the energy bins. Otherwise, pure emission lines will be used.
particle (str, optional) – The type of particle, by default “gamma”. Other supported one is “neutron”. Be sure that the radioisotopes you are using have the corresponding particle emission data in the actigamma database.
- Returns:
A CDGS object populated with data from the CSV file.
- Return type:
- get_total_intensity(isotope: str) float#
Get the total intensity (photons/s) of the specified isotope in the mesh or of all isotopes together if “all” is specified. The total intensity is calculated as the sum of the specific activities in the mesh multiplied by the voxel volume and the sum of the gamma line intensities for the isotope.
- Parameters:
isotope (str) – The name of the isotope. If “all” is specified, combine all isotopes.
- Returns:
The total intensity (photons/s) of the specified isotope in the mesh.
- Return type:
float
- to_vtk(outfile: str | Path) None#
Write the CDGS object to a VTK file.
- Parameters:
outfile (str | Path) – Path to the output VTK file.