Database Integration
src.material_database
get_database_material(idx)
Retrieves the material name and absorption coefficients from a CSV file based on the given index. The CSV file is expected to be in the current working directory and named "materials.csv".
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idx
|
int
|
The index of the material in the CSV file. |
required |
Returns:
| Type | Description |
|---|---|
tuple
|
A tuple containing the material name material_name (str) and an array of absorption coefficients abs_coeff (np.ndarray). The absorption coefficients are expected to be in the columns 1 to 8 of the CSV file. |
Source code in src/material_database.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |