firecrown.app.cosmology

Cosmology configuration generator.

This module provides a CLI command to generate cosmology configuration files for parameter estimation and inference. The generated YAML contains cosmological parameter specifications with default values and optional prior constraints.

Classes

Cosmology

Supported cosmologies.

PriorWrapper

Wrapper for prior dictionary.

Generate

Cosmology configuration generator.

Module Contents

class firecrown.app.cosmology.Cosmology[source]

Bases: enum.StrEnum

Inheritance diagram of firecrown.app.cosmology.Cosmology

Supported cosmologies.

VANILLA_LCDM = 'vanilla_lcdm'
VANILLA_LCDM_WITH_NEUTRINOS = 'vanilla_lcdm_with_neutrinos'
class firecrown.app.cosmology.PriorWrapper(/, **data)[source]

Bases: pydantic.BaseModel

Inheritance diagram of firecrown.app.cosmology.PriorWrapper

Wrapper for prior dictionary.

Parameters:

data (Any)

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

value: firecrown.app.analysis.Prior
class firecrown.app.cosmology.Generate[source]

Bases: firecrown.app.logging.Logging

Inheritance diagram of firecrown.app.cosmology.Generate

Cosmology configuration generator.

output_file: Annotated[pathlib.Path, typer.Argument(help='Output file path for generated configuration.')]
cosmology: Annotated[Cosmology, typer.Option('--cosmology', '-c', help='Cosmology to generate configuration for.')]
camb_halofit: Annotated[str | None, typer.Option('--camb-halofit', help='Add CAMB halofit extra parameters to the cosmology.')] = None
parameter: Annotated[list[str], typer.Option('--parameter', '-p', help='Update parameter values and/or priors. Can be used to set default values, add prior constraints, or both. Use multiple times. Examples: --parameter m_nu=0.06,mean=0.06,sigma=0.01 --parameter Omega_c=0.26,lower=0.2,upper=0.3 --parameter sigma8,mean=0.8,sigma=0.1', default_factory=list)]
exclude_defaults: Annotated[bool, typer.Option('--exclude-defaults', '-e', help='Exclude fields with default values.')] = False
print_output: Annotated[bool, typer.Option('--print-output', help='Print generated YAML to console (in addition to file).')] = False
__post_init__()[source]

Initialize and execute the complete cosmology generation workflow.