emmi.preprocessing.process_drivaer_and_ahmed_volumetric¶
Converts raw DrivAerML or AhmedML dataset into subsampled pytorch files
Attributes¶
Classes¶
Functions¶
|
Checks that all arrays have the same length. |
|
A context manager to measure execution time of a code block. |
|
Merge .part VTU fragments into a full .vtu file in the specified folder. |
|
|
|
Module Contents¶
- class emmi.preprocessing.process_drivaer_and_ahmed_volumetric.DataFieldKeyMap¶
- emmi.preprocessing.process_drivaer_and_ahmed_volumetric.dataset_keymaps¶
- emmi.preprocessing.process_drivaer_and_ahmed_volumetric.parse_args()¶
- emmi.preprocessing.process_drivaer_and_ahmed_volumetric.assert_same_length(*arrays)¶
Checks that all arrays have the same length.
- Parameters:
*arrays (numpy.ndarray | torch.Tensor) – any number of arrays.
- Return type:
None
- emmi.preprocessing.process_drivaer_and_ahmed_volumetric.time_block(run_folder, label)¶
A context manager to measure execution time of a code block.
- Parameters:
run_folder – The name of the run folder. Will be printed.
label (str) – The name of the process/algorithm/code executed within the with block. Will be printed.
- Usage:
- with time_block(“some task”):
# code
- emmi.preprocessing.process_drivaer_and_ahmed_volumetric.merge_vtu_parts(folder)¶
Merge .part VTU fragments into a full .vtu file in the specified folder.
This function is required for DrivAerML on Huggingface, where the volume data is split into two .part files. See files in https://huggingface.co/datasets/neashton/drivaerml/tree/main/run_1.
- Parameters:
folder (str | Path) – Path to the run_i directory containing .part files.
- Raises:
NotADirectoryError – If the provided folder path is not a directory.
- emmi.preprocessing.process_drivaer_and_ahmed_volumetric.process_run(run_folder, src, dst, data_field_keymap, subsample_factor, compute_surface_distance_via_trimesh)¶
- Parameters:
run_folder (str)
src (pathlib.Path)
dst (pathlib.Path)
data_field_keymap (DataFieldKeyMap)
subsample_factor (int)
compute_surface_distance_via_trimesh (bool)
- Return type:
None