English
DeepChoice / utils /dataset_contract.py
antoine.carreaud67
Clean and reorganize repository for public release
4a48212
Raw
History Blame Contribute Delete
482 Bytes
FEATURE_NAMES = [
"angle",
"distance",
"contrast",
"blur",
"snr",
"saturation",
]
def select_visibility_indices(feature_names, selected_names):
if selected_names is None:
return list(range(len(feature_names)))
if all(isinstance(item, int) for item in selected_names):
return list(selected_names)
index_by_name = {name: idx for idx, name in enumerate(feature_names)}
return [index_by_name[name] for name in selected_names]