Assessing models accuracy and systematics#

This package provides approximations to the extinction effects in photometric bands. It is not meant to be a full implementation of the extinction curves but a shortcut. Models come with inherent uncertainties due to the approximation process. To first order, we provide global uncertainties (e.g., rms, biases) associated with the models but it may not be sufficient for all use cases. To obtain complete uncertainties, one needs to use models and compute the specific statistics. This may require to evaluate the models on a test set with known properties.

This notebook illustrates how to use the ModelCharacteristicsRunner class from the dustapprox.tools.model_characteristics module to evaluate the accuracy and systematics of dust attenuation models.

version

This notebook is based on Dustapprox version 0.2.0.

Principles#

To assess the characteristics of a dustapprox model, we need to compare its predictions to a reference set of data with known properties.

Any given model is defined by a set of passbands, an extinction curve, and a grid of parameters: \(R_0\), \(A_0\), stellar temperatures, gravities, and metallicities to first order. The underlying photometric of the models are too large to be distributed with the package, but one can compute them using the dustapprox.tools.generate_model module. In particular, one can compute a sparse version of the model grid to be used as a test set. If one changes some properties (e.g. extinction curve), this can also be used to analysis the effect of such changes on the model predictions.

The following lists the steps to run the model characteristics analysis:

  1. load a precomputed model library using dustapprox.models.PrecomputedModel.find()

  2. If needed, compute a grid of test data using the properties of the model (passbands, curve, etc), dustapprox.tools.generate_model.GridParameters, and dustapprox.tools.generate_model.GridParameters.generate_grid().

  3. Evaluate the model predictions on the test data using the predict() method.

  4. Compute residuals and other statistics of the model predictions against the test data

We provide a convenience class dustapprox.tools.model_characteristics.ModelCharacteristicsRunner to perform these steps and generate some plots of the model characteristics.

Examples#

Gaia DR3 passbands, F99 extinction curve with variable A0, R0#

This section illustrates how to use the ModelCharacteristicsRunner to evaluate the characteristics of a dustapprox model associated with Gaia DR3 passbands and the F99 extinction curve with variable \(A_0\) and \(R_0\).

The following snippet (run_model_characteristics()) runs the steps outlined above and generates 2D plots of the model residuals as a function of \(A_0\) and \(R_0\), one plot per passband.

from dustapprox.tools.model_characteristics import run_model_characteristics

run_model_characteristics(
    passbands="Gaia",
    extinction_curve="F99",
    plot_1d=False,
    plot_2d=True,
    close_figure=False,
)
_images/661bb01ff99315af82a1294c36e9f0f472f3f0603721dd504781dee3cb9edf4d.png _images/f682e2303299eb430920a27a6f920e75ea0a37762d34c4e81a3b7c0d21ab347b.png _images/5f19854af271e3fbb9101d21be0e9a059d56daa742c05c105ad18cf57e76ccad.png

These plots show that the residuals are generally small (within a few mmag) across the parameter space, indicating that the dustapprox model provides a good approximation of the extinction effects in the Gaia DR3 passbands for the F99 extinction curve with variable \(A_0\) and \(R_0\). However, this is not perfect and some systematics are visible, especially at low extinction values. One can remark the polynomial nature of the residuals, which is expected given the polynomial approximations used in these dustapprox models.

Hence it is important to be careful and consider these systematics when using the models for scientific analysis.

Note

The runner calculates some approximate zeropoints that are not traditional photometric zeropoints. These correspond to the magnitude offset of the normalized stellar atmospheres and are only used to plot meaninful magnitudes.

Common generic passbands with F99 extinction curve#

run_model_characteristics(
    passbands="Generic",
    extinction_curve="F99",
    plot_1d=True,
    plot_2d=True,
    close_figure=False,
)
_images/728359d9bd987f8ab8b8918a6846a2cf59c0e7637c2d4b8d167bdc835d89c4e5.png _images/8d26a26d362243b03379b37d11ebe0a25df17a9ccd720d9bb015c6993d218234.png _images/7915a2f5f2c07c67768061a20926f05ab80fc8f3a714af385fa29510474ff1be.png _images/9274131e5f14da5aa5ddf00bacb315bfa6c2ac603835d6d991cd634024f751fd.png _images/1fbfed1604b0f93ce049e301f96e4652b50476558d140162ee6e4813d5a8bcb2.png _images/a92e6ce77c7d886556b1cc5a4de1ab1d03f2dd067f27b8fa86c8569a7892cf3d.png _images/b1f0a59f62241a3a98a4d4df32bce87092b63e2c04f83a25d6b897cec1b1ec43.png _images/a6340eeb8a705e8161b38f9d4c5c6bf792c54a20c04589160d93c619e1b92148.png _images/6c05e8d772cb9502e306d710066ccb270de97ed3ecdf088e0e2b0445b534ea3f.png _images/1e596b7b046950e2bba2704674dd136aafd93c3928fc180b74312f6228c7114c.png _images/687eb4e18edc65771e28ecde2636767cb04cf15bbff27204dee2d34b949f0fe3.png _images/803e6542d07ff6d0789560c9241aa3efbecf6012ce4a728a1c23e80b893a68b2.png _images/a2e0c29b15198d5f09cde6036269d1ebd9a121e0940d5fe5f27c585ea19601e4.png _images/6a2effa2e8202aa364d34c0bd917d8fb03bac97ab823ba3a4a962f72c1f0e828.png _images/49dcb82bd32785e93016ca943c46b2961efb8c1306e7f86de818076cc00566f6.png _images/b6fc899c09c44653f9f626800012a1a6ef31853a4809bb60cc7ff195588f5ee7.png