plot_data_models_residual#
- torusimaging.plot.plot_data_models_residual(binned_data, model, params_fit, params_init=None, smooth_residual=None, vlim_residual=None, residual_normalization=None, usys=None)#
Make a 4 panel figure showing data (number counts of stars in z-vz), initial model, fitted model, and residual of the fitted model
- Parameters:
binned_data (
dict[str,Union[Quantity,_SupportsArray[dtype[Any]],_NestedSequence[_SupportsArray[dtype[Any]]],bool,int,float,complex,str,bytes,_NestedSequence[Union[bool,int,float,complex,str,bytes]]]]) – The binned data dictionary.model (
TorusImaging1D) – The model instance.params_fit (
dict) – The optimized parameters, or the MAP parameters, or the parameters you would like to show.params_init (
Optional[dict]) – The initial parameters. If specified, will plot the initial model as well.smooth_residual (
Optional[float]) – If specified (as a float), smooth the residual image by a Gaussian with kernel with set by this parameter.vlim_residual (
Optional[float]) – The vmin, vmax for the residual colormap are set using this value such thatvmin=-vlim_residualandvmax=vlim_residual.residual_normalization (
Union[_SupportsArray[dtype[Any]],_NestedSequence[_SupportsArray[dtype[Any]]],bool,int,float,complex,str,bytes,_NestedSequence[Union[bool,int,float,complex,str,bytes]],None]) – If specified, the residual is divided by this value. This is useful for plotting fractional residuals.usys (
Optional[UnitSystem]) – The unit system to use for plotting. If None, will use the unit system of the model.
- Return type: