smpy.run¶
- smpy.run(config_input)[source]¶
Execute the complete mass mapping analysis workflow.
Main entry point for mass mapping analysis that handles configuration processing, data validation, mass reconstruction, and optional SNR analysis. Supports multiple input formats and provides comprehensive output including maps and coordinate boundaries.
- Parameters:
config_input (str, pathlib.Path, dict, or Config) – Configuration specification. Supported formats: - str or pathlib.Path: Path to YAML configuration file - dict: Configuration dictionary with required parameters - Config: SMPy Config object instance
- Returns:
result – Complete analysis results containing: - ‘maps’: Dictionary of reconstructed mass maps by mode - ‘scaled_boundaries’: Coordinate boundaries for plotting - ‘true_boundaries’: Original coordinate boundaries - ‘snr_maps’: SNR maps (if create_snr=True in config) - ‘counts_map’: Per-pixel counts (if create_counts_map=True)
- Return type:
dict
- Raises:
TypeError – If config_input is not one of the supported types.
FileNotFoundError – If specified input data file does not exist.
ValueError – If configuration validation fails or method is not supported.
Notes
The function automatically handles: - File existence validation before processing - FITS file output generation (if save_fits=True) - SNR map creation and output (if create_snr=True) - Method-specific output directory creation - Coordinate system conversions for file output
For command-line usage, this function can be called directly with a configuration file path.