autolens.PointDataset#
- class PointDataset[source]#
Bases:
objectA collection of the data component that can be used for point-source model-fitting, for example fitting the observed positions of a a strongly lensed quasar or supernovae or in strong lens cluster modeling, where there may be many tens or hundreds of individual source galaxies each of which are modeled as a point source.
The name of the dataset is required for point-source model-fitting, as it pairs a point-source dataset with its corresponding point-source in the model-fit. For example, if a dataset has the name source_1, it will be paired with the Point model-component which has the name source_1. If a dataset component is not successfully paired with a model-component, an error is raised.
The dataset holds observations only and stores no magnifications, which are model quantities. The magnification at each observed position is available on any point fit (e.g. FitFluxes, FitPositionsImagePairAllSolved) and on a finished model-fit’s ResultPoint, via signed_magnifications_at_positions (sign = image parity) and magnifications_at_positions (|mu|). For arbitrary (y,x) image-plane coordinates use ag.LensCalc.from_tracer(tracer=…).magnification_2d_via_hessian_from(grid=…).
- Parameters:
name (
str) – The name of the point source dataset which is paired to a Point in the Model.positions (
Union[Grid2DIrregular,List[List],List[Tuple]]) – The image-plane (y,x) positions of the point-source.positions_noise_map (
Union[float,ArrayIrregular,List[float]]) – The noise-value of every (y,x) position, which is typically the pixel-scale of the data.fluxes (
Union[ArrayIrregular,List[float],None]) – The image-plane flux of each observed point-source of light.fluxes_noise_map (
Union[float,ArrayIrregular,List[float],None]) – The noise-value of every observed flux, which is typically measured from the pixel values of the pixel containing the point source after convolution with the PSF.time_delays (
Union[ArrayIrregular,List[float],None]) – The time delays of each observed point-source of light in days.time_delays_noise_map (
Union[float,ArrayIrregular,List[float],None]) – The noise-value of every observed time delay, which is typically measured from the time delay analysis.redshift (
Optional[float]) – The redshift of the source. Optional; when provided it is carried through CSV round-trips alongside the positions so cluster-scale workflows can encode per-source redshifts in a single spreadsheet.
Methods
Load a single
PointDatasetfrom a CSV written byto_csvoroutput_to_csv.Write this dataset to
file_pathas a CSV with one row per image.Attributes
A dictionary representation of this instance.
- property info: str#
A dictionary representation of this instance.
Arrays are represented as lists or lists of lists.
- to_csv(file_path)[source]#
Write this dataset to
file_pathas a CSV with one row per image.Optional flux / time-delay columns are included only when this dataset carries the corresponding values. For multi-dataset output use
output_to_csv.