Signal. Connect. Understand.
autofit_workspace · config/
← all sources · workspace · 19 files · 665 lines · looks up PyAutoFit · GitHub
44 lines · 35 keys · settings · GitHub
overrides PyAutoFit/general.yaml (stack: PyAutoFit) · 1 differ · 0 orphan · 2 owned by autonerves · 4 from the stack
1# version:2# python_version_check: False # uncomment to suppress the Python version warning3# # if running on a non-recommended Python (anything other than 3.12 / 3.13).45updates:6 iterations_per_quick_update: 1e99 # Non-linear search iterations between every quick update, which just displays the maximum likelihood model fit.7 iterations_per_full_update: 1e99 # Non-linear search iterations between every full update, which outputs all visuals and result fits (e.g. model.result, search.summary), this exits the search and can be slow.8 quick_update_background: false # If True, perform_quick_update runs on a background daemon thread so the sampler is never blocked while visuals render. Requires the Analysis subclass to set `supports_background_update = True`.9 live_visual_update: false # If True, quick-update visuals are pushed to a live surface (a Jupyter cell when in a kernel, a matplotlib viewer subprocess otherwise) in addition to being written to disk.10hpc:11 hpc_mode: false # If True, use HPC mode, which disables GUI visualization, logging to screen and other settings which are not suited to running on a super computer.12 iterations_per_quick_update: 10000 # Non-linear search iterations between every quick update, which just displays the maximum likelihood model fit.13 iterations_per_full_update: 1e99 # Non-linear search iterations between every full update, which outputs all visuals and result fits (e.g. model.result, search.summary), this exits the search and can be slow.14inversion:15 check_reconstruction: true # If True, the inversion's reconstruction is checked to ensure the solution of a meshs's mapper is not an invalid solution where the values are all the same.16 reconstruction_vmax_factor: 0.5 # Plots of an Inversion's reconstruction use the reconstructed data's bright value multiplied by this factor. 17output:18 force_pickle_overwrite: false # force_pickle_overwrite: false # If True, pickle files output by a search (e.g. samples.pickle) are recreated when a new model-fit is performed.19 force_visualize_overwrite: false # If True, visualization images output by a search (e.g. subplots of the fit) are recreated when a new model-fit is performed.20 info_whitespace_length: 80 # Length of whitespace between the parameter names and values in the model.info / result.info21 log_level: INFO # The level of information output by logging.22 log_to_file: false # If True, outputs the non-linear search log to a file (and not printed to screen).23 log_file: output.log # The name of the file the logged output is written to (in the non-linear search output folder)24 model_results_decimal_places: 3 # Number of decimal places estimated parameter values / errors are output in model.results.25 remove_files: false # If True, all output files of a non-linear search (e.g. samples, visualization, etc.) are deleted once the model-fit has completed, such that only the .zip file remains.26 samples_to_csv: true # If True, non-linear search samples are written to a .csv file.27 unconverged_sample_size : 100 # If outputting results of an unconverged search, the number of samples used to estimate the median PDF values and errors.28parallel:29 warn_environment_variables: true # If True, a warning is displayed when the search's number of CPU > 1 and enviromment variables related to threading are also > 1.30profiling:31 parallel_profile: false # If True, the parallelization of the fit is profiled outputting a cPython graph.32 repeats: 1 # The number of repeat function calls used to measure run-times when profiling.33test:34 exception_override: false35 lh_timeout_seconds: # If a float is input, the log_likelihood_function call is timed out after this many seconds, to diagnose infinite loops. Default is None, meaning no timeout.36 parallel_profile: false37version:38 # The compatibility FLOOR: the oldest library release whose API this39 # workspace's scripts require. Preferred over workspace_version40 # (autonerves/workspace.py). Bump DELIBERATELY — only when a script41 # starts needing new API — never per release. Must always name an42 # INSTALLABLE (non-yanked) release.43 minimum_library_version: 2026.7.9.144 workspace_version_check: True # If False, bypass the workspace/library version check. Set to False on `main`-branch clones — `main` updates faster than releases, so mismatches are expected and not actionable.
17 lines · 14 keys · settings · GitHub
overrides PyAutoFit/logging.yaml (stack: PyAutoFit) · 0 differ · 0 orphan · 1 from the stack
1version: 12disable_existing_loggers: false34handlers:5 console:6 class: logging.StreamHandler7 level: INFO8 stream: ext://sys.stdout9 formatter: formatter1011root:12 level: INFO13 handlers: [ console ]1415formatters:16 formatter:17 format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
41 lines · 23 keys · settings · GitHub
overrides PyAutoFit/notation.yaml (stack: PyAutoFit) · 0 differ · 0 orphan · 0 from the stack
1# The notation configs define the labels of every model parameter and its derived quantities, which are used when2# visualizing results (for example labeling the axis of the PDF triangle plots output by a non-linear search).345# label: The label given to the each parameter, for plots like PDF corner plots.67# For example, if `centre=x`, the plot axis will be labeled 'x'.8910# superscript: the superscript used on certain plots that show the results of different model-components.1112# For example, if `Gaussian=g`, plots where the parameters of the Gaussian model-component have superscript `g`.1314label:15 label:16 sigma: \sigma17 centre: x18 normalization: norm19 parameter0: a20 parameter1: b21 parameter2: c22 rate: \lambda23 superscript:24 Exponential: e25 Gaussian: g26 ModelComponent0: M027 ModelComponent1: M12829# label_format: The format certain parameters are output as in output files like the `model.results` file.3031# For example, if `centre={:.2d}`, the format of the centre parameter in results files will use this Python format.3233label_format:34 format:35 sigma: '{:.2f}'36 centre: '{:.2f}'37 normalization: '{:.2f}'38 parameter0: '{:.2f}'39 parameter1: '{:.2f}'40 parameter2: '{:.2f}'41 rate: '{:.2f}'
108 lines · 17 keys · settings · GitHub
overrides PyAutoFit/output.yaml (stack: PyAutoFit) · 0 differ · 0 orphan · 0 from the stack
1# Determines whether files saved by the search are output to the hard-disk. This is true both when saving to the2# directory structure and when saving to database.34default: true # If true then files which are not explicitly listed here are output anyway. If false then they are not.56### Samples ###78# The `samples.csv`file contains every sampled value of every free parameter with its log likelihood and weight.910# This file is often large, therefore disabling it can significantly reduce hard-disk space use.1112# `samples.csv` is used to perform marginalization, infer model parameter errors and do other analysis of the search13# chains. Even if output of `samples.csv` is disabled, these tasks are still performed by the fit and output to14# the `samples_summary.json` file. However, without a `samples.csv` file these types of tasks cannot be performed15# after the fit is complete, for example via the database.1617samples: true1819# The `samples.csv` file contains every accepted sampled value of every free parameter with its log likelihood and20# weight. For certain searches, the majority of samples have a very low weight and have no numerical impact on the21# results of the model-fit. However, these samples are still output to the `samples.csv` file, taking up hard-disk22# space and slowing down analysis of the samples (e.g. via the database).2324# The `samples_weight_threshold` below specifies the threshold value of the weight such that samples with a weight25# below this value are not output to the `samples.csv` file. This can be used to reduce the size of the `samples.csv`26# file and speed up analysis of the samples.2728# For many searches (e.g. MCMC) all samples have an equal weight of 1.0, and this threshold therefore has no impact.29# For these searches, there is no simple way to save hard-disk space. This input is more suited to nested sampling,30# where the majority of samples have a very low weight..3132# Set value to empty (e.g. delete 1.0e-10 below) to disable this feature.3334samples_weight_threshold: 1.0e-103536### Search Internal ###3738# The search internal folder which contains a saved state of the non-linear search in its internal reprsenetation,39# as a .pickle or .dill file.4041# For example, for the nested sampling dynesty, this .dill file is the `DynestySampler` object which is used to42# perform sampling, and it therefore contains all internal dynesty representations of the results, samples, weights, etc.4344# If the entry below is false, the folder is still output during the model-fit, as it is required to resume the fit45# from where it left off. Therefore, settings `false` below does not impact model-fitting checkpointing and resumption.46# Instead, the search internal folder is deleted once the fit is completed.4748# The search internal folder file is often large, therefore deleting it after a fit is complete can significantly49# reduce hard-disk space use.5051# The search internal representation that can be loaded from the .dill file has many additional quantities specific to52# the non-linear search that the standardized autofit forms do not. For example, for emcee, it contains information on53# every walker. This information is required to do certain analyes and make certain plots, therefore deleting the54# folder means this information is list.5556search_internal: false5758### Start Point ###5960# If an Initalizer is used to provide a start point for the non-linear search, visualization of that start point can be61# output to hard-disk to show the user the initial model-fit that is used to start the search. This visualization is62# the visualizer wrapped in the Analysis class, and therefore should show things like the quality of the fit63# to the data and the residuals at the start point.6465start_point: true6667### Latent Variables ###6869# A latent variable is not a model parameter but can be derived from the model. Its value and errors may be of interest70# and aid in the interpretation of a model-fit.7172# For example, for the simple 1D Gaussian example, it could be the full-width half maximum (FWHM) of the Gaussian. This73# is not included in the model but can be easily derived from the Gaussian's sigma value.7475# By overwriting an Analysis class's `compute_latent_variables` method we can manually specify latent variables that76# are calculated and output to a `latent.csv` file, which mirrors the `samples.csv` file. The `latent.csv` file has77# the same weight resampling performed on the `samples.csv` file, controlled via the `samples_weight_threshold` above.7879# There may also be a `latent.results` and `latent_summary.json` files output, which the inputs below control whether80# they are output and how often.8182# Outputting latent variables manually after a fit is complete is simple, just call83# the `analysis.compute_latent_variables()` function.8485# For many use cases, the best set up may be to disable autofit latent variable output during the fit and perform it86# manually after completing a successful model-fit. This will save computational run time by not computing latent87# variables during a any model-fit which is unsuccessful.8889latent_during_fit: false # Whether to output the `latent.csv`, `latent.results` and `latent_summary.json` files during the fit when it performs on-the-fly output.90latent_after_fit: true # If `latent_during_fit` is False, whether to output the `latent.csv`, `latent.results` and `latent_summary.json` files after the fit is complete.91latent_draw_via_pdf : true # Whether to draw latent variable values via the PDF of every sample, which uses fewer samples to estimate latent variable errors. If False, latent variable values are drawn from every sample.92latent_draw_via_pdf_size : 100 # The number of samples drawn to estimate latent variable errors if `latent_draw_via_pdf` is True.93latent_csv: true # Whether to ouptut the `latent.csv` file.94latent_results: true # Whether to output the `latent.results` file.9596# Other Files:9798covariance: true # `covariance.csv`: The [free parameters x free parameters] covariance matrix.99data: true # `data.json`: The value of every data point in the data.100noise_map: true # `noise_map.json`: The value of every RMS noise map value.101102search_log: true # `search.log`: logging produced whilst running the fit method103104model_graph: false # `model.graph`: graphical-model factor graph summary. Only meaningful for graphical models (autofit.graphical); empty for ordinary PriorModel/Collection fits, so disabled by default.105106# `model.png`: the model figure drawn beside `model.info` (af.ModelPlotter). Opt-in until the107# model-figures epic's phase-3 acceptance renders pass. Unlike other keys an absent key means off.108model_figure: false
13 lines · 6 keys · tooling · GitHub
1# Curated examples rendered to executed markdown pages (markdown/) with their2# real output images, so they can be read on GitHub. Built manually by3# PyAutoHands's generate_markdown.py — see that module's docstring for the4# rules (never TEST_MODE; features/ scripts never rendered; list order is5# execution order and index order).6# autofit has no root start_here.py; the overview scripts are the flagships7# (1D-Gaussian fits — seconds each).8- script: scripts/overview/overview_1_the_basics.py9 max_minutes: 3010- script: scripts/overview/overview_2_scientific_workflow.py11 max_minutes: 4512- script: scripts/overview/overview_3_statistical_methods.py13 max_minutes: 45
26 lines · 0 keys · tooling · GitHub
1# Scripts to skip during automated runs (smoke tests, pre-release checks, CI).2# Each entry is matched against script paths:3# - Entries with '/' do a substring match against the file path4# - Entries without '/' match the file stem exactly5# Add an inline # comment to document the reason for skipping.6#7# SLOW-skip convention:8# Entries tagged `# SLOW <YYYY-MM-DD> - <reason>` mark scripts that are9# skipped because they exceed the per-script timeout cap (300s by10# default; 1800s for mode=release runs). These are11# NOT permanent skips — every mega-run surfaces them with a loud warning12# banner. Fix the performance issue and remove the SLOW marker.13#14# NEEDS_FIX convention:15# Entries tagged `# NEEDS_FIX <YYYY-MM-DD> - <reason>` mark scripts that16# are broken and parked as a to-do list. Like SLOW-skips, these are NOT17# permanent skips — every mega-run surfaces them with a loud warning18# banner. Investigate the failure, fix the underlying bug, and remove19# the NEEDS_FIX marker.2021- get_dist # Cant get it to install, even in optional requirements.22- mcmc # Zeus section in merged mcmc.py fails Test Model Initialization.23- zeus_plotter # Test Model Iniitalization no good.24- dynesty_plotter # Test Model Iniitalization no good.25- start_point # bug https://github.com/rhayes777/PyAutoFit/issues/101726- features/expectation_propagation.py # NEEDS_FIX 2026-08-03 - EP parked as not release-ready. EP message projection is unstable: a truncated per-factor search projects an ESS=1 posterior with zero weighted variance, which EP feeds back as a delta-function prior. See PyAutoFit #1332 F10 and autofit_workspace_test graphical/ep.py.
45 lines · 11 keys · tooling · GitHub
1# Per-script environment variable configuration for the RELEASE-FIDELITY2# validation run (Heart's workspace-validation.yml, mode=release — the M33# wheel-based release-fidelity path). Distinct from profile_smoke.yaml, which is the4# `smoke` profile used by the per-PR CI gate.5#6# The `release` profile trades speed for fidelity: it is run once per release7# rehearsal against the TestPyPI wheels, not on every PR, so it can afford a8# reduced (not bypassed) sampler and real fit output/visualization/checks.9# Spec + acceptance table: PyAutoHeart/docs/release_validation.md.10#11# "defaults" are applied to every script on top of the inherited environment.12# Every var this profile cares about is given an EXPLICIT value in "defaults"13# (not left absent) — the runner only ever *sets* keys it's given, it never14# clears unrelated inherited env vars, so an absent key silently falls through15# to whatever the calling process already had (a leftover smoke-mode "1" from16# an earlier step, a developer's local shell, ...). Pinning everything here17# makes the profile self-contained regardless of the caller's environment.18#19# "overrides" then only ever `set:` a var to flip it away from this profile's20# own default for specific scripts — never `unset:` a var that "defaults"21# already pins, since unsetting just re-exposes the same inherited-env gap22# `defaults` exists to close.23#24# Pattern convention (same as no_run.yaml):25# - Patterns containing '/' do a substring match against the file path26# - Patterns without '/' match the file stem exactly2728defaults:29 PYAUTO_TEST_MODE: "1" # reduced iterations (real sampler), not bypassed30 PYAUTO_SKIP_FIT_OUTPUT: "0" # real fit output (release fidelity, not smoke)31 PYAUTO_SKIP_VISUALIZATION: "0" # real visualization (release fidelity, not smoke)32 PYAUTO_SKIP_CHECKS: "0" # real checks (release fidelity, not smoke)33 PYAUTO_DISABLE_JAX: "0" # JAX enabled (release fidelity, not smoke)34 PYAUTO_SKIP_WORKSPACE_VERSION_CHECK: "1" # TestPyPI dev version won't match the workspace pin35 JAX_ENABLE_X64: "True" # enable 64-bit precision in JAX36 NUMBA_CACHE_DIR: "/tmp/numba_cache" # writable cache dir for numba37 MPLCONFIGDIR: "/tmp/matplotlib" # writable config dir for matplotlib3839# plot/emcee_plotter + plot/zeus_plotter (which needed an override under the40# smoke profile to force a real search so `result.search_internal` is41# populated) need no override here: PYAUTO_TEST_MODE="1" above already runs a42# real (if reduced) sampler and PYAUTO_SKIP_FIT_OUTPUT="0" already writes43# real output. No script in this workspace needs to deviate from the44# defaults above under the release profile.45overrides: []
27 lines · 14 keys · tooling · GitHub
1# Per-script environment variable configuration for automated runs2# (smoke tests, pre-release checks, CI).3#4# "defaults" are applied to every script on top of the inherited environment.5# "overrides" selectively unset or replace vars for matching path patterns.6#7# Pattern convention (same as no_run.yaml):8# - Patterns containing '/' do a substring match against the file path9# - Patterns without '/' match the file stem exactly1011defaults:12 PYAUTO_TEST_MODE: "2" # 0=normal, 1=reduced iterations, 2=skip sampler (fastest)13 PYAUTO_SKIP_FIT_OUTPUT: "1" # Skip pre/post-fit I/O, VRAM profiling, result text14 PYAUTO_SKIP_VISUALIZATION: "1" # Skip fit visualization and plotting15 PYAUTO_SKIP_CHECKS: "1" # Skip mesh validation, position checks, weight thresholds16 PYAUTO_DISABLE_JAX: "1" # Force use_jax=False, avoid JIT compilation overhead17 JAX_ENABLE_X64: "True" # Enable 64-bit precision in JAX18 NUMBA_CACHE_DIR: "/tmp/numba_cache" # Writable cache dir for numba19 MPLCONFIGDIR: "/tmp/matplotlib" # Writable config dir for matplotlib2021overrides:22 # Plotter scripts need the real search to run so `result.search_internal` is23 # populated — bypass mode skips the sampler and returns None.24 - pattern: "plot/emcee_plotter"25 unset: [PYAUTO_TEST_MODE, PYAUTO_SKIP_FIT_OUTPUT]26 - pattern: "plot/zeus_plotter"27 unset: [PYAUTO_TEST_MODE, PYAUTO_SKIP_FIT_OUTPUT]
10 lines · 0 keys · tooling · GitHub
1# Notebook stems that should run when PyAutoHands's generate / run pipeline2# is invoked with --visualise. Used to refresh notebook output cells in main.3#4# Format: flat list of notebook stems (no extension, no path).5# An empty list means no notebooks need re-visualisation in this workspace.6#7# This file overrides PyAutoHands/autohands/config/visualise_notebooks.yaml8# for this workspace. Add or remove entries here, not there.910[]
5 lines · 3 keys · settings · GitHub
overrides PyAutoFit/non_linear/GridSearch.yaml (stack: PyAutoFit) · 0 differ · 0 orphan · 0 from the stack
1# The settings of a parallelized grid search of non-linear searches.23parallel:4 number_of_cores: 3 # The number of cores the search is parallelized over by default, using Python multiprocessing.5 step_size: 0.1 # The default step size of each grid search parameter, in terms of unit values of the priors.
64 lines · 64 keys · prior file · GitHub
| Class | Param | Type | Centre / lower | Width / upper | Width modifier | Limits |
|---|---|---|---|---|---|---|
| centre_0 | width_modifier | Absolute | value 0.05 | |||
| centre_0 | limits | |||||
| centre_1 | width_modifier | Absolute | value 0.05 | |||
| centre_1 | limits | |||||
| axis_ratio | width_modifier | Relative | value 1.0 | |||
| axis_ratio | limits | |||||
| angle | width_modifier | Relative | value 1.0 | |||
| angle | limits | |||||
| effective_radius | width_modifier | Relative | value 1.0 | |||
| effective_radius | limits | |||||
| intensity | width_modifier | Relative | value 0.5 | |||
| intensity | limits |
64 lines · 64 keys · prior file · GitHub
| Class | Param | Type | Centre / lower | Width / upper | Width modifier | Limits |
|---|---|---|---|---|---|---|
| centre_0 | width_modifier | Absolute | value 0.05 | |||
| centre_0 | limits | |||||
| centre_1 | width_modifier | Absolute | value 0.05 | |||
| centre_1 | limits | |||||
| axis_ratio | width_modifier | Relative | value 1.0 | |||
| axis_ratio | limits | |||||
| angle | width_modifier | Relative | value 1.0 | |||
| angle | limits | |||||
| effective_radius | width_modifier | Relative | value 1.0 | |||
| effective_radius | limits | |||||
| intensity | width_modifier | Relative | value 0.5 | |||
| intensity | limits |
14 lines · 14 keys · prior file · GitHub
1parameter0:2 type: Uniform3 lower_limit: 0.04 upper_limit: 1.05parameter1:6 type: TruncatedGaussian7 mean: 0.08 sigma: 0.19 lower_limit: 0.010 upper_limit: inf11parameter2:12 type: Uniform13 lower_limit: 0.014 upper_limit: 10.0
31 lines · 31 keys · prior file · GitHub
| Class | Param | Type | Centre / lower | Width / upper | Width modifier | Limits |
|---|---|---|---|---|---|---|
| Gaussian | sigma | Uniform | lower 0.0 | upper 25.0 | Relative 0.5 | [0.0, inf] |
| Gaussian | centre | Uniform | lower 0.0 | upper 100.0 | Absolute 20.0 | [-inf, inf] |
| Gaussian | normalization | LogUniform | lower 1e-06 | upper 1000000.0 | Relative 0.5 | [0.0, inf] |
62 lines · 62 keys · prior file · GitHub
overrides PyAutoFit/priors/model.yaml (stack: PyAutoFit) · 0 differ · 0 orphan · 0 from the stack
| Class | Param | Type | Centre / lower | Width / upper | Width modifier | Limits |
|---|---|---|---|---|---|---|
| Exponential | centre | Uniform | lower 0.0 | upper 100.0 | Absolute 20.0 | [-inf, inf] |
| Exponential | normalization | LogUniform | lower 1e-06 | upper 1000000.0 | Relative 0.5 | [0.0, inf] |
| Exponential | rate | Uniform | lower 0.0 | upper 10.0 | Relative 0.5 | [0.0, inf] |
| Gaussian | sigma | Uniform | lower 0.0 | upper 25.0 | Relative 0.5 | [0.0, inf] |
| Gaussian | centre | Uniform | lower 0.0 | upper 100.0 | Absolute 20.0 | [-inf, inf] |
| Gaussian | normalization | LogUniform | lower 1e-06 | upper 1000000.0 | Relative 0.5 | [0.0, inf] |
62 lines · 62 keys · prior file · GitHub
overrides PyAutoFit/priors/profiles.yaml (stack: PyAutoFit) · 0 differ · 0 orphan · 0 from the stack
| Class | Param | Type | Centre / lower | Width / upper | Width modifier | Limits |
|---|---|---|---|---|---|---|
| Exponential | centre | Uniform | lower 0.0 | upper 100.0 | Absolute 20.0 | [-inf, inf] |
| Exponential | normalization | LogUniform | lower 1e-06 | upper 1000000.0 | Relative 0.5 | [0.0, inf] |
| Exponential | rate | Uniform | lower 0.0 | upper 10.0 | Relative 0.5 | [0.0, inf] |
| Gaussian | sigma | Uniform | lower 0.0 | upper 25.0 | Relative 0.5 | [0.0, inf] |
| Gaussian | centre | Uniform | lower 0.0 | upper 100.0 | Absolute 20.0 | [-inf, inf] |
| Gaussian | normalization | LogUniform | lower 1e-06 | upper 1000000.0 | Relative 0.5 | [0.0, inf] |
26 lines · 26 keys · prior file · GitHub
| Class | Param | Type | Centre / lower | Width / upper | Width modifier | Limits |
|---|---|---|---|---|---|---|
| ModelComponent0 | parameter0 | Uniform | lower 0.0 | upper 1.0 | ||
| ModelComponent0 | parameter1 | LogUniform | lower 1e-06 | upper 1000000.0 | ||
| ModelComponent0 | parameter2 | Uniform | lower 0.0 | upper 25.0 | ||
| ModelComponent1 | parameter0 | Uniform | lower 0.0 | upper 1.0 | ||
| ModelComponent1 | parameter1 | LogUniform | lower 1e-06 | upper 1000000.0 | ||
| ModelComponent1 | parameter2 | Uniform | lower 0.0 | upper 1.0 |
2 lines · 2 keys · settings · GitHub
overrides PyAutoFit/visualize/general.yaml (stack: PyAutoFit) · 0 differ · 0 orphan · 0 from the stack
1general:2 backend: default # The matploblib backend used for visualization. `default` uses the system default, can specifiy specific backend (e.g. TKAgg, Qt5Agg, WXAgg).
4 lines · 4 keys · settings · GitHub
overrides PyAutoFit/visualize/plots_search.yaml (stack: PyAutoFit) · 0 differ · 0 orphan · 3 from the stack
1nest:2 corner_anesthetic: true # Output corner figure (using anestetic) during a non-linear search fit?3mcmc:4 corner_cornerpy: true # Output corner figure (using corner.py) during a non-linear search fit?