extract_habitat_features

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

extract_habitat_features(config: Any, *, plugin_configs: Mapping[str, Any] | None = None, logger: Logger | None = None, backend: ExecutionBackend | None = None) → WorkflowResult[None][source]

Extract features from pre-computed habitat maps (habit extract recipe).

Families registered in the capability HabitatFeatureExtractorRegistry (built-ins plus habit.habitat_feature_extractor entry points) run through domain HabitatFeatureExtractor instances and an optional ExecutionBackend. Unknown names fail immediately; third-party families must register through the habit.habitat_feature_extractor entry-point group.

When the graph family runs and its settings block has visualize: true, per-subject topology figures are rendered under <out_dir>/visualizations/graph/ after the CSV export.

Parameters:
  • config – Validated feature-extraction configuration (schema object or mapping accepted by habit.recipes.habitat_config.build_feature_extraction_config()).

  • plugin_configs – Optional plugin settings (e.g. graph).

  • logger – Optional run logger.

  • backend – Optional execution backend. When omitted, n_processes from the config selects serial vs process-pool.

Returns:

WorkflowResult with output directory metadata and a run manifest path.

Raises:

HABITAPIError – If a requested feature type is registered nowhere.