Configuration Files#
This document provides a detailed explanation of all the allowed options in the config.yaml files for dolphin, but some of them are optional, as indicated. Check out the io_directory_example/settings folder for some example config files.
Top-level information#
lens_name: The name of the lens system being modeled.Type:
stringExample:
lens_name: "DESJ0408-5354"
band: List of photometric bands used for modeling.Type:
list of stringsExample:
band: ["F475X", "F600LP"]
psf_supersampled_factor: (Optional) Factor by which the Point Spread Function (PSF) is supersampled. Default is 1.Type:
floatExample:
psf_supersampled_factor: 3
pixel_size: (Optional) Pixel size for each band. If not provided, it will be inferred from the image data.Type:
list of floatsExample:
pixel_size: [0.04, 0.04]
Model Section#
model: Defines the components of the lens model.Suboptions:
lens: List of lens mass profiles. Supported models include:EPL,SIE,SIS,SPEP,PEMD,SHEAR_GAMMA_PSI,FLEXION.Type:
list of stringsExample:
lens: ["EPL", "SHEAR_GAMMA_PSI"]
lens_light: List of lens light profiles. Supported models include:SERSIC,SERSIC_ELLIPSE,MGE_SET,MGE_SET_ELLIPSE,UNIFORM. The list will be duplicated for each band.Type:
list of stringsExample:
lens_light: ["SERSIC_ELLIPSE", "SERSIC_ELLIPSE"]
source_light: List of source light profiles. Supported models include:SERSIC_ELLIPSE,SHAPELETS. The list will be duplicated for each band.Type:
list of stringsExample:
source_light: ["SERSIC_ELLIPSE", "SHAPELETS"]
point_source: (Optional) List of point source models. Supported models include:LENSED_POSITION,SOURCE_POSITION. Can be an empty list for galaxy-galaxy lenses.Type:
list of stringsExample:
point_source: ["LENSED_POSITION"]
special: (Optional) String or list of special parameter types.Type:
stringorlist of stringsExample:
special: ["astrometric_uncertainty"]
Lens Options#
lens_options: Additional options for the lens model.Suboptions:
centroid_init: Initial guess for the lens centroid. This will apply to all lens model components. For more fine-tuned control of individual lens model positions, seeinitial_guessesbelow.Type:
list of floatsExample:
centroid_init: [0.04, -0.04]
centroid_bound: Half of the box width to constrain the deflector’s centroid. This will apply to all lens model components. For more fine-tuned control of the bounds for individual lens model positions, seeuniform_priorbelow.Type:
floatDefault:
0.5Example:
centroid_bound: 0.5
initial_guesses: (Optional) Adjustdolphin’s default initial lens parameters.Type:
dictionaryExample:
initial_guesses: 0: theta_E: 1.3 gamma: 2.0 1: e1: 0.3 e2: -0.1
gaussian_prior: (Optional) Gaussian priors for lens parameters.Type:
dictionaryExample:
gaussian_prior: 0: [[gamma, 2.11, 0.03], [theta_E, 1.11, 0.13]]
uniform_prior: (Optional) Adjustdolphin’s default lower and upper bounds for lens parameters.Type:
dictionaryExample:
uniform_prior: 0: [[theta_E, 0.2, 1.4], [center_x, 0.5, 0.9]] 1: [[gamma_ext, 0.02, 0.8]]
fix: (Optional) Fix specific parameters for the lens model.Type:
dictionaryExample:
fix: 0: gamma: 2.0
limit_mass_pa_from_light: (Optional) Maximum allowed difference between the position angle of the mass and light profiles.Type:
floatExample:
limit_mass_pa_from_light: 10.0
limit_mass_q_from_light: (Optional) Maximum allowed difference between the axis ratio of the mass and light profiles.Type:
floatExample:
limit_mass_q_from_light: 0.1
Satellites Option#
satellites: (Optional) Options for modeling satellite galaxies.Suboptions:
centroid_init: Initial guesses for the centroids of satellites.Type:
list of lists of floatsExample:
centroid_init: [[1, 1], [1.5, 1.5]]
centroid_bound: Half of the box width to constrain the centroids of satellites.Type:
floatExample:
centroid_bound: 0.5
is_elliptical: Whether each satellite is elliptical.Type:
list of booleansExample:
is_elliptical: [true, false]
Lens Light Options#
lens_light_options: (Optional) Additional options for the lens light model.Suboptions:
initial_guesses: (Optional) Adjustdolphin’s default initial lens light parameters.Type:
dictionaryExample:
initial_guesses: 0: R_sersic: 2.3 n_sersic: 1 1: R_sersic: 0.3 n_sersic: 4
fix: Fix specific parameters for the lens light profile.Type:
dictionaryExample:
fix: {0: {"n_sersic": 4.}}
gaussian_prior: Gaussian priors for lens light parameters.Type:
dictionaryExample:
gaussian_prior: 0: [[R_sersic, 0.21, 0.15]]
uniform_prior: (Optional) Adjustdolphin’s default lower and upper bounds for lens light parameters.Type:
dictionaryExample:
uniform_prior: 0: [[R_sersic, 0.2, 7.], [n_sersic, 0.5, 4.]]
mge_config: (Optional) Configuration for MGE_SET and MGE_SET_ELLIPSE light profiles. Can be used to set the number of Gaussian components.Type:
dictionaryExample:
mge_config: 0: n_comp: 20
Source Light Options#
source_light_options: (Optional) Additional options for the source light model.Suboptions:
initial_guesses: (Optional) Adjustdolphin’s default initial source light parameters.Type:
dictionaryExample:
initial_guesses: 0: R_sersic: 2.3 n_sersic: 1 1: R_sersic: 0.3 n_sersic: 4
gaussian_prior: Gaussian priors for source light parameters.Type:
dictionaryExample:
gaussian_prior: 0: [[beta, 0.15, 0.05]]
uniform_prior: (Optional) Adjustdolphin’s default lower and upper bounds for source light parameters.Type:
dictionaryExample:
uniform_prior: 0: [[R_sersic, 0.2, 7.], [n_sersic, 0.5, 4.]]
shapelet_scale_logarithmic_prior: Whether to apply a logarithmic prior on the shapelet scale parameter.Type:
booleanExample:
shapelet_scale_logarithmic_prior: true
n_max: Maximum number of Shapelet profiles for each band.Type:
integerorlist of integersExample:
n_max: [2, 4]
Point Source Options#
point_source_options: (Optional) Options for point source models.Suboptions:
ra_init: Initial guess for point source RA positions.Type:
list of floatsExample:
ra_init: [0.1, -0.1]
dec_init: Initial guess for point source DEC positions.Type:
list of floatsExample:
dec_init: [0.1, -0.1]
bound: Bound width for searching the point source centroids.Type:
floatExample:
bound: 0.2
gaussian_prior: Gaussian priors for point source parameters.Type:
dictionaryExample:
gaussian_prior: 0: [[ra_image, 0.1, 0.05]]
time_delays_measured: Relative time delays (in days) with respect to the first point-source image. If this is provided,time_delays_covariancemust also be provided to compute the time-delay likelihood, which is then added to the combined likelihood.Type:
list of floats`Example:
time_delays_measured: [3., 2., 1.]
time_delays_covariance: Full covariance matrix of the provided time delay measurements.Type:
list of list of floatsExample:
time_delays_covariance: [[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]
Special Options#
special_options: (Optional) Initialization of special parameters.Suboptions:
delta_x_image: Initial spread from point source centroid in the x-axis.Type:
array of floats corresponding to the number of point sourcesExample:
delta_x_image: [0.0, 0.0]
delta_y_image: Initial spread from point source centroid in the y-axis.Type:
array of floats corresponding to the number of point sourcesExample:
delta_y_image: [0.0, 0.0]
delta_image_lower: Lower bound in spread of point source centroid sampler.Type:
floatExample:
delta_image_lower: -0.004
delta_image_upper: Upper bound in spread of point source centroid sampler.Type:
floatExample:
delta_image_upper: 0.004
cosmology: (Optional) Astropy cosmology model to use for time-delay computations. Supported models:FlatLambdaCDM(default),LambdaCDM,FlatwCDM,wCDM,Flatw0waCDM,w0waCDM,w0wzCDM,Flatw0wzCDM,wpwaCDM,FlatwpwaCDM.Type:
stringExample:
cosmology: "FlatLambdaCDM"
H0: Fiducial Hubble constant in km/s/Mpc (required for all cosmologies).Type:
floatExample:
H0: 70.0
Om0: Fiducial matter energy density at z=0 (required for all cosmologies).Type:
floatExample:
Om0: 0.3
Ode0: (Optional) Fiducial dark energy density at z=0 (required for non-flat cosmologies likeLambdaCDM,wCDM,w0waCDM,w0wzCDM,wpwaCDM).Type:
floatExample:
Ode0: 0.7
w0: (Optional) Dark energy equation of state parameter at z=0 (used inwCDM,FlatwCDM,w0waCDM,Flatw0waCDM,w0wzCDM,Flatw0wzCDM).Type:
floatExample:
w0: -1.0
wa: (Optional) Dark energy equation of state parameter derivative (used inw0waCDM,Flatw0waCDM,wpwaCDM,FlatwpwaCDM).Type:
floatExample:
wa: 0.0
wz: (Optional) Dark energy equation of state parameter derivative with respect to redshift (used inw0wzCDM,Flatw0wzCDM).Type:
floatExample:
wz: 0.1
wp: (Optional) Dark energy equation of state parameter at the pivot redshift (used inwpwaCDM,FlatwpwaCDM).Type:
floatExample:
wp: -1.0
zp: (Optional) Pivot redshift (used inwpwaCDM,FlatwpwaCDM).Type:
floatExample:
zp: 0.5
Tcmb0: (Optional) Temperature of the CMB at z=0 in Kelvin.Type:
floatExample:
Tcmb0: 2.725
general_scaling: Scale specific model parameters together across multiple profiles. Input should be a dictionary mapping parameter names to the masks defining which lens models are scaled together.Type:
dictionaryExample: Scaling
theta_Efor the second and third mass profiles together, but not the first.general_scaling: theta_E: [False, 1, 1]
{param_name}_scale_factor: The scaling relation factor for the specified param_name across multiple profiles. Instead of individually sampling the connected parameters, only this scale factor will be sampled, and all the connected parameters will be scaled based on the same factor.Type:
listExample:
theta_E_scale_factor: [1]
{param_name}_scale_factor_sigma: Initial paramater spread relative to{param_name}_scale_factor.Type:
listExample:
theta_E_scale_factor_sigma: [0.05]
{param_name}_scale_pow: Power-law scaling factor for the specified param_name scaling.Type:
listExample:
theta_E_scale_pow: [1]
Combining all of the above, a specified parameter, \(p\), is scaled from the sampled scale factor, \(f_p\), and sampled power-law index, \(\alpha_p\), as:
\[p \rightarrow p_{\mathrm{scaled}} = f_p \, p^{\alpha_p}\]
Numeric Options#
numeric_options: Numerical settings for the modeling process.Suboptions:
supersampling_factor: Supersampling factor for each band.Type:
list of integersExample:
numeric_options: supersampling_factor: [2]
Fitting Options#
fitting: Settings for the fitting process.Suboptions:
pso: Whether to use Particle Swarm Optimization (PSO) for fitting.Type:
booleanExample:
pso: true
pso_settings: Settings for the PSO algorithm.Suboptions:
num_particle: Number of particles in the swarm.Type:
integerExample:
num_particle: 50
num_iteration: Number of iterations for PSO.Type:
integerExample:
num_iteration: 50
sampling: (Optional) Whether to perform sampling after optimization.Type:
booleanExample:
sampling: true
sampler: The sampler to use for sampling. Supported samplers areemceeandNautilus.Type:
stringExample:
sampler: emcee
sampler_settings: Settings for the sampler. For full documentation of parameters, refer to the lenstronomy sampler documentation and the Nautilus documentation.Suboptions:
Recommended Nautilus options:
n_live: Number of live points used by the nested sampler.Type:
integerExample:
n_live: 2000
n_eff: Minimum targeted effective sample size. The algorithm will sample from the shells until this is reached.Type:
floatExample:
n_eff: 10000.0
verbose: If True, prints detailed information about the sampler’s progress.Type:
booleanExample:
verbose: true
pass_dict: Whether to pass dictionaries to the likelihood. Usually set tofalsefor better performance.Type:
booleanExample:
pass_dict: false
filepath: Path to a file (.h5or.hdf5) where Nautilus will save its internal state for checkpointing.Type:
stringExample:
filepath: "nautilus_checkpoint.hdf5"
resume: Whether to resume a run from the file specified infilepath.Type:
booleanExample:
resume: true
Emcee-specific options:
n_burn: Number of burn-in steps.Type:
integerExample:
n_burn: 2
n_run: Number of sampling steps.Type:
integerExample:
n_run: 2
walkerRatio: Ratio of walkers to parameters.Type:
integerExample:
walkerRatio: 2
init_samples: (Optional) Initial samples for walkers.Type:
list of lists of floats
n_walkers: (Optional) Number of walkers of emcee. If set, this overwrites thewalkerRatioinput.Type:
integerExample:
n_walkers: 100
sigma_scale: (Optional) Scaling of the initial parameter spread relative to the width in the initial settings. Default is 1.0.Type:
floatExample:
sigma_scale: 1.0
threadCount: (Optional) Number of CPU threads to use for multiprocessing.Type:
integerExample:
threadCount: 4
re_use_samples: (Optional) If True andinit_samplesis provided, re-uses the samples described.Type:
boolean
progress: (Optional) If True, shows the progress bar during sampling.Type:
boolean
backend_filename: (Optional) Name of the HDF5 file where the emcee sampling state is saved for checkpointing.Type:
stringExample:
backend_filename: "mcmc_emcee_checkpoint.h5"
start_from_backend: (Optional) If True, start sampling from the state saved inbackend_filename.Type:
boolean
psf_iteration: (Optional) Whether to perform iterative PSF fitting.Type:
booleanExample:
psf_iteration: true
psf_iteration_settings: Settings for iterative PSF fitting.Suboptions:
stacking_method: Method for stacking PSFs.Type:
stringExample:
stacking_method: "median"
num_iter: Number of PSF iterations.Type:
integerExample:
num_iter: 20
psf_iter_factor: Factor for PSF iteration.Type:
floatExample:
psf_iter_factor: 0.5
keep_psf_variance_map: Whether to keep the PSF variance map.Type:
booleanExample:
keep_psf_variance_map: true
psf_symmetry: Symmetry of the PSF.Type:
integerExample:
psf_symmetry: 4
block_center_neighbour: Block center neighbour factor.Type:
floatExample:
block_center_neighbour: 0.0
fitting_kwargs_list: (Optional) User-provided list of fitting sequences to bypass the automated recipes in dolphin.
In order to use this list, the Processor.swim() method must be called with recipe_name="custom".
Type:
listExample:
fitting_kwargs_list: - ['PSO', {'sigma_scale': 1., 'n_particles': 50, 'n_iterations': 50}]
Lenstronomy Arbitrary Keyword Arguments#
Model Options#
kwargs_model: (Optional) Pass any arbitrary arguments strictly allowed in lenstronomy.LensModel, lenstronomy.LightModel inside this section.model_options(orkwargs_model): (Optional) Pass any arbitrary arguments strictly allowed in lenstronomy.Util.class_creator.create_class_instances() inside this section.kwargs_constraints: (Optional) Pass any arbitrary constraints strictly allowed in lenstronomy.Workflow.fitting_sequence inside this section.
Constraints Options#
constraints_options(orkwargs_constraints): (Optional) Pass any arbitrary constraints strictly allowed in lenstronomy.Sampling.parameters.Param() inside this section.Example:
kwargs_constraints: constraints_options: joint_lens_with_light: [[0, 0, ['center_x', 'center_y']]]
Likelihood Options#
likelihood_options(orkwargs_likelihood): (Optional) Pass any arbitrary likelihood arguments strictly allowed in lenstronomy.Sampling.likelihood.Likelihood() inside this section.
Mask Options#
mask: (Optional) Settings for masking regions of the image.Suboptions:
provided: Set to true to use custom .npy mask files from the settings/masks/ directory instead of using analytical masking below.Type:
booleanExample:
provided: false
centroid_offset: Offset for the centroid of the mask.Type:
list of lists of floatsExample:
centroid_offset: [[0.0, 0.0], [0.0, 0.0]]
mask_edge_pixels: Number of edge pixels to mask.Type:
list of integersExample:
mask_edge_pixels: [0, 2]
radius: Radius of the mask for each band.Type:
list of floatsExample:
radius: [20.0, 20.0]
a,b,angle: Elliptical mask parameters for each band. Used whenradiusis not provided.Type:
list of floatsExample:
a: [10.0, 10.0] b: [5.0, 5.0] angle: [0.0, 0.0]
extra_regions: List of circular regions to mask additionally. Format is[ra, dec, radius].Type:
list of lists of lists of floatsExample:
extra_regions: - [[1.0, -1.0, 0.5]]