PyAutoNervesBoard

Signal. Connect. Understand.

PyAutoLens · autolens/config/

← all sources · library · 5 files · 297 lines · GitHub

(top level) (4)

general.yaml

4 lines · 4 keys · settings · 3 used · 0 section-read · 1 unused · GitHub

outputtest
source (4 lines)
1output:2  fit_dill: false unused3test:4  disable_positions_lh_inversion_check: false

latent.yaml

66 lines · 8 keys · settings · 0 used · 8 section-read · 0 unused · GitHub

total_lens_fluxtotal_lensed_source_fluxtotal_source_fluxtotal_lens_flux_mujytotal_lensed_source_flux_mujytotal_source_flux_mujymagnificationeffective_einstein_radius
source (66 lines)
1# Toggles for the catalogue of latent variables computed by `AnalysisImaging`2# (and, when wired in a follow-up, `AnalysisInterferometer`).3#4# Each entry maps a registered latent name (see5# `autolens/analysis/latent.py::LATENT_FUNCTIONS`) to a bool. Setting `false`6# excludes that latent from `LATENT_KEYS` so it is neither computed nor7# written to `latent/samples.csv` / `latent/latent_summary.json`.8#9# Workspaces should mirror this file in their own `config/latent.yaml` to10# override defaults locally (workspace values shadow library values).11#12# Raw-flux keys (`total_lens_flux`, `total_lensed_source_flux`,13# `total_source_flux`) require no instrument inputs and default `true`.14# The `_mujy` variants require `magzero` on the Analysis; they default15# `false` and return NaN + one warning per process if enabled without16# `magzero` (rather than raising, which would discard a converged search).17#18# autonerves lowercases yaml keys at read time, so the registry/yaml names19# must be snake_case-lowercase (this leaks into the `latent.csv` column20# header — e.g. `total_lens_flux_mujy`, not `_muJy`).2122# `total_lens_flux` — total integrated flux of the lens galaxy23# (`fit.tracer.galaxies[0]`), in the raw image units the fit was performed24# in. No instrument inputs required.25total_lens_flux: true2627# `total_lensed_source_flux` — image-plane integrated flux of the source28# galaxy after lensing (`fit.galaxy_image_dict[tracer.galaxies[-1]]`), in29# raw image units.30total_lensed_source_flux: true3132# `total_source_flux` — source-plane intrinsic flux of the source galaxy,33# in raw image units. Reads from34# `tracer_linear_light_profiles_to_light_profiles` so linear-profile fits35# get the correct (inversion-solved) flux.36total_source_flux: true3738# `total_lens_flux_mujy` — total integrated flux of the lens galaxy39# (`fit.tracer.galaxies[0]`) in microjanskies. Requires `magzero` via40# Analysis kwargs. Returns NaN + one warning if `magzero` is missing.41total_lens_flux_mujy: false4243# `total_lensed_source_flux_mujy` — image-plane integrated flux of the44# source galaxy after lensing (`fit.galaxy_image_dict[tracer.galaxies[-1]]`)45# in microjanskies. Requires `magzero`.46total_lensed_source_flux_mujy: false4748# `total_source_flux_mujy` — source-plane intrinsic flux of the source49# galaxy (computed via the source's light profile on `fit.dataset.grids.lp`)50# in microjanskies. Requires `magzero`.51total_source_flux_mujy: false5253# `magnification` — ratio of image-plane lensed source flux to source-plane54# intrinsic source flux. Dimensionless; `magzero` is accepted but unused.55# Default `false` because it routes through the `_mujy` latents internally56# (the µJy conversions cancel in the ratio) — to flip on, also flip on57# `total_lensed_source_flux_mujy` and `total_source_flux_mujy` and supply58# a `magzero`. A follow-up could rewire `magnification` to the raw-flux59# latents so it's universally enable-able.60magnification: false6162# `effective_einstein_radius` — effective Einstein radius in arcseconds,63# from the tangential critical curve via64# `LensCalc.einstein_radius_jit_from` (JAX) or `einstein_radius_from`65# (numpy). Does NOT require `magzero`.66effective_einstein_radius: false

non_linear.yaml

57 lines · 57 keys · settings · 0 used · 0 section-read · 57 unused · GitHub

nest
unused: nestunused: nest.DynestyDynamicunused: nest.DynestyDynamic.initializeunused: nest.DynestyDynamic.initialize.methodunused: nest.DynestyDynamic.parallelunused: nest.DynestyDynamic.parallel.force_x1_cpuunused: nest.DynestyDynamic.parallel.number_of_coresunused: nest.DynestyDynamic.printingunused: nest.DynestyDynamic.printing.silenceunused: nest.DynestyDynamic.rununused: nest.DynestyDynamic.run.dlogz_initunused: nest.DynestyDynamic.run.logl_max_initunused: nest.DynestyDynamic.run.maxcallunused: nest.DynestyDynamic.run.maxcall_initunused: nest.DynestyDynamic.run.maxiterunused: nest.DynestyDynamic.run.maxiter_initunused: nest.DynestyDynamic.run.n_effectiveunused: nest.DynestyDynamic.run.n_effective_initunused: nest.DynestyDynamic.run.nlive_initunused: nest.DynestyDynamic.searchunused: nest.DynestyDynamic.search.bootstrapunused: nest.DynestyDynamic.search.boundunused: nest.DynestyDynamic.search.enlargeunused: nest.DynestyDynamic.search.faccunused: nest.DynestyDynamic.search.first_updateunused: nest.DynestyDynamic.search.fmoveunused: nest.DynestyDynamic.search.max_moveunused: nest.DynestyDynamic.search.sampleunused: nest.DynestyDynamic.search.slicesunused: nest.DynestyDynamic.search.update_intervalunused: nest.DynestyDynamic.search.walksunused: nest.DynestyStaticunused: nest.DynestyStatic.initializeunused: nest.DynestyStatic.initialize.methodunused: nest.DynestyStatic.parallelunused: nest.DynestyStatic.parallel.number_of_coresunused: nest.DynestyStatic.printingunused: nest.DynestyStatic.printing.silenceunused: nest.DynestyStatic.rununused: nest.DynestyStatic.run.dlogzunused: nest.DynestyStatic.run.logl_maxunused: nest.DynestyStatic.run.maxcallunused: nest.DynestyStatic.run.maxiterunused: nest.DynestyStatic.run.n_effectiveunused: nest.DynestyStatic.searchunused: nest.DynestyStatic.search.bootstrapunused: nest.DynestyStatic.search.boundunused: nest.DynestyStatic.search.enlargeunused: nest.DynestyStatic.search.faccunused: nest.DynestyStatic.search.first_updateunused: nest.DynestyStatic.search.fmoveunused: nest.DynestyStatic.search.max_moveunused: nest.DynestyStatic.search.nliveunused: nest.DynestyStatic.search.sampleunused: nest.DynestyStatic.search.slicesunused: nest.DynestyStatic.search.update_intervalunused: nest.DynestyStatic.search.walks
source (57 lines)
1nest: unused2  DynestyDynamic: unused3    initialize: unused4      method: prior unused5    parallel: unused6      force_x1_cpu: false unused7      number_of_cores: 1 unused8    printing: unused9      silence: false unused10    run: unused11      dlogz_init: 0.01 unused12      logl_max_init: .inf unused13      maxcall: null unused14      maxcall_init: null unused15      maxiter: null unused16      maxiter_init: null unused17      n_effective: .inf unused18      n_effective_init: .inf unused19      nlive_init: 500 unused20    search: unused21      bootstrap: null unused22      bound: multi unused23      enlarge: null unused24      facc: 0.2 unused25      first_update: null unused26      fmove: 0.9 unused27      max_move: 100 unused28      sample: rwalk unused29      slices: 5 unused30      update_interval: null unused31      walks: 5 unused32  DynestyStatic: unused33    initialize: unused34      method: prior unused35    parallel: unused36      number_of_cores: 1 unused37    printing: unused38      silence: false unused39    run: unused40      dlogz: null unused41      logl_max: .inf unused42      maxcall: null unused43      maxiter: null unused44      n_effective: null unused45    search: unused46      bootstrap: null unused47      bound: multi unused48      enlarge: null unused49      facc: 0.2 unused50      first_update: null unused51      fmove: 0.9 unused52      max_move: 100 unused53      nlive: 50 unused54      sample: rwalk unused55      slices: 5 unused56      update_interval: null unused57      walks: 5 unused

output.yaml

98 lines · 12 keys · settings · 9 used · 3 section-read · 0 unused · GitHub

defaultsamplessamples_weight_thresholdsearch_internalstart_pointlatent_during_fitlatent_after_fitlatent_draw_via_pdflatent_draw_via_pdf_sizelatent_csvlatent_resultssearch_log
source (98 lines)
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:9798search_log: true # `search.log`: logging produced whilst running the fit method

visualize (1)

visualize/plots.yaml

72 lines · 44 keys · settings · 5 used · 39 section-read · 0 unused · GitHub

subplot_formatfits_are_zoomeddatasetpositionsfitfit_imagingtracerinversionadaptfit_interferometerpoint_datasetfit_point_datasetweak_datasetfit_weakfit_ellipsegalaxies
source (72 lines)
1# The `plots` section customizes every image that is output to hard-disk during a model-fit.23# For example, if `plots: fit: subplot_fit=True``, the ``subplot_fit.png`` subplot file will4# be plotted every time visualization is performed.56# One setting is important for inspecting results via the dataset after a fit is complete:78# -`fits_adapt_images`, This outputs `adapt_images.fits` which the database functionality may use to reperform fits.910# It can be disabled to save on hard-disk space but will lead to certain database functionality being disabled.1112# The dataset itself is always output as `dataset.fits` to the `image` folder of every fit, and is not controlled13# by any setting here.1415subplot_format: [png]                      # Output format of all subplots, can be png, pdf or both (e.g. [png, pdf])16fits_are_zoomed: false                     # If true, output .fits files are zoomed in on the center of the unmasked region image, saving hard-disk space.1718dataset:                                   # Settings for plots of all datasets (e.g. Imaging, Interferometer).19  subplot_dataset: true                    # Plot subplot containing all dataset quantities (e.g. the data, noise-map, etc.)?2021positions:                                 # Settings for plots with resampling image-positions on (e.g. the image).22  image_with_positions: true2324fit:                                       # Settings for plots of all fits (e.g. FitImaging, FitInterferometer).25  subplot_fit: true                        # Plot subplot of all fit quantities for any dataset (e.g. the model data, residual-map, etc.)?26  subplot_fit_log10: false                  # Plot subplot of all fit quantities for any dataset using log10 color maps (e.g. the model data, residual-map, etc.)?27  subplot_of_planes: false                 # Plot subplot of the model-image, subtracted image and other quantities of each plane?28  subplot_galaxies_images: false              # Plot subplot of the image of each plane in the model?29  fits_fit: true                           # Output a .fits file containing the fit model data, residual map, normalized residual map and chi-squared?30  fits_galaxy_images : true                # Output a .fits file containing the images (e.g. without PSF convolution) of every galaxy?31  fits_model_galaxy_images : true          # Output a .fits file containing the model images (e.g. with PSF convolution) of every galaxy?3233fit_imaging: {}                            # Settings for plots of fits to imaging datasets (e.g. FitImaging).3435tracer:                                    # Settings for plots of tracers (e.g. Tracer).36  subplot_tracer: true                     # Plot subplot of all quantities in each tracer (e.g. images, convergence)?37  subplot_galaxies_images: false           # Plot subplot of the image of each plane in the tracer?38  fits_tracer: true                        # Output tracer.fits file of tracer's convergence, potential, deflections_y and deflections_x?39  fits_source_plane_images: true           # Output source_plane_images.fits file of the source-plane image (light profiles only) of each galaxy in the tracer?40  fits_source_plane_shape: (100, 100)      # The shape of the source-plane image output in the fits_source_plane_images.fits file.4142inversion:                                 # Settings for plots of inversions (e.g. InversionPlotter).43  subplot_inversion: true                  # Plot subplot of all quantities in each inversion (e.g. reconstrucuted image, reconstruction)?44  subplot_mappings: false                  # Plot subplot of how the brightest source regions map to their multiple images in the image-plane (works for pixelized and parametric sources)?45  csv_reconstruction: true               # output source_plane_reconstruction_0.csv containing the source-plane mesh y, x, reconstruction and noise map values.4647adapt:                                     # Settings for plots of adapt images used by adaptive pixelizations.48  subplot_adapt_images: true               # Plot subplot showing each adapt image used for adaptive pixelization?49  fits_adapt_images: true                  # Output a .fits file containing the adapt images used for adaptive pixelization?5051fit_interferometer:                        # Settings for plots of fits to interferometer datasets (e.g. FitInterferometer).52  subplot_fit_dirty_images: false          # Plot subplot of the dirty-images of all interferometer datasets?53  subplot_fit_real_space: false            # Plot subplot of the real-space images of all interferometer datasets?54  fits_dirty_images: true                  # output dirty_images.fits showing the dirty image, noise-map, model-data, resiual-map, normalized residual map and chi-squared map?5556point_dataset:                             # Settings for plots of point source datasets (e.g. PointDatasetPlotter).57  subplot_dataset: true                    # Plot subplot containing all dataset quantities (e.g. the data, noise-map, etc.)?5859fit_point_dataset: {}                      # Settings for plots of fits to point source datasets (e.g. FitPointDatasetPlotter).6061weak_dataset:                              # Settings for plots of weak lensing shear catalogues (e.g. PlotterWeak).62  subplot_dataset: true                    # Plot subplot containing all dataset quantities (e.g. the shear field, noise-map, etc.)?6364fit_weak: {}                               # Settings for plots of fits to weak lensing shear catalogues (e.g. PlotterWeak).6566fit_ellipse:                               # Settings for plots of ellipse fitting fits (e.g. FitEllipse)67  data : true                              # Plot the data of the ellipse fit?68  data_no_ellipse: true                    # Plot the data without the black data ellipses, which obscure noisy data?6970galaxies:                                  # Settings for plots of galaxies (e.g. Galaxies).71  subplot_galaxies: true                   # Plot subplot of all quantities in each galaxies group (e.g. images, convergence)?72  subplot_galaxy_images: false             # Plot subplot of the image of each galaxy in the model?