distroi.model.geom_comp.geom_comp module#
A module to define geometric model components.
Defines the classes and methods for representing geometric components and calculating their complex visibilities. These geometric components can be used in conjunction to RT models in the calculation of interferometric observables.
Warning
A geometric component also includes a spectral profile to describe its flux dependence accross wavelength. By default, the spectrum is assumed to be flat in F_lam. A flat spectrum in F_lam implies a dependency of F_nu ~ nu^-2 ~ lambda^2. Hence, the correlated flux will not be flat. Take this in mind when calculating or comparing to observations in correlated flux.
- class distroi.model.geom_comp.geom_comp.Gaussian(fwhm: float, coords: tuple[float, float] | None = None, sp_dep: SpecDep | None = None)#
Bases:
GeomCompClass representing a Gaussian geometric component.
- Parameters:
fwhm (float) – Full-width-half-maximum of the Gaussian in the image plane (in mas units).
coords (tuple of float, optional) – 2D tuples with (x, y) coordinates of the point’s coordinates (in mas). Note that positive x is defined as leftward and positive y as upward (i.e. the East and North respectively in the OI convention). If not given, will default to (0, 0).
sp_dep (SpecDep, optional) – Optional spectral dependence of the component. If None, the spectral dependency will be assumed flat in F_lam flux accross wavelength (note that flatness in F_lam means a spectral dependency ~ wavelength^2 ~ frequency^-2 for F_nu, and thus for the correlated flux).
- fwhm#
See parameter description.
- Type:
float
- coords#
See parameter description.
- Type:
tuple of float
- calc_vis(uf: ndarray | float, vf: ndarray | float, wavelength: ndarray | float | None = None, ref_wavelength: float | None = None, ref_corr_flux: float | None = None) ndarray | float#
Calculate the visibility of the component.
Calculate the visibility of the component at given spatial frequencies. Wavelengths corresponding to these spatial frequencies and a reference total flux (at reference wavelength) can also be passed along, in which case the returned visibilities will be in correlated flux (Jy) instead of normalized.
- Parameters:
uf (np.ndarray or float) – 1D array with spatial x-axis frequencies in 1/radian.
vf (np.ndarray or float) – 1D array with spatial y-axis frequencies in 1/radian. Must be the same size as uf.
wavelength (np.ndarray or float, optional) – 1D array with wavelength values in micron.
ref_wavelength (float, optional) – Reference wavelength in micron.
ref_corr_flux (float, optional) – Reference correlated flux in Jy corresponding to ref_wavelength. If provided together with ref_corr_flux, then the returned visibilities are in correlated flux.
- Returns:
1D array with the calculated visibilities (normalized or in correlated flux, depending on the optional arguments).
- Return type:
np.ndarray or float
- class distroi.model.geom_comp.geom_comp.GeomComp#
Bases:
ABCAbstract class representing a geometric model component.
- abstract calc_vis(uf: ndarray | float, vf: ndarray | float, wavelength: ndarray | float | None = None, ref_wavelength: float | None = None, ref_corr_flux: float | None = None) ndarray | float#
Calculate the visibility of the component.
Calculate the visibility of the component at given spatial frequencies. Wavelengths corresponding to these spatial frequencies and a reference total flux (at reference wavelength) can also be passed along, in which case the returned visibilities will be in correlated flux (Jy) instead of normalized.
- Parameters:
uf (np.ndarray or float) – 1D array with spatial x-axis frequencies in 1/radian.
vf (np.ndarray or float) – 1D array with spatial y-axis frequencies in 1/radian. Must be the same size as uf.
wavelength (np.ndarray or float, optional) – 1D array with wavelength values in micron.
ref_wavelength (float, optional) – Reference wavelength in micron.
ref_corr_flux (float, optional) – Reference correlated flux in Jy corresponding to ref_wavelength. If provided together with ref_corr_flux, then the returned visibilities are in correlated flux.
- Returns:
1D array with the calculated visibilities (normalized or in correlated flux, depending on the optional arguments).
- Return type:
np.ndarray or float
- class distroi.model.geom_comp.geom_comp.Overresolved(sp_dep=None)#
Bases:
GeomCompClass representing a fully resolved geometric component.
- Parameters:
sp_dep (SpecDep, optional) – Optional spectral dependence of the component. If None, the spectral dependency will be assumed flat in F_lam flux accross wavelength (note that flatness in F_lam means a spectral dependency ~ wavelength^2 ~ frequency^-2 for F_nu, and thus for the correlated flux).
- calc_vis(uf: ndarray | float, vf: ndarray | float, wavelength: ndarray | float | None = None, ref_wavelength: float | None = None, ref_corr_flux: float | None = None) ndarray | float#
Calculate the visibility of the component.
Calculate the visibility of the component at given spatial frequencies. Wavelengths corresponding to these spatial frequencies and a reference total flux (at reference wavelength) can also be passed along, in which case the returned visibilities will be in correlated flux (Jy) instead of normalized.
- Parameters:
uf (np.ndarray or float) – 1D array with spatial x-axis frequencies in 1/radian.
vf (np.ndarray or float) – 1D array with spatial y-axis frequencies in 1/radian. Must be the same size as uf.
wavelength (np.ndarray or float, optional) – 1D array with wavelength values in micron.
ref_wavelength (float, optional) – Reference wavelength in micron.
ref_corr_flux (float, optional) – Reference correlated flux in Jy corresponding to ref_wavelength. If provided together with ref_corr_flux, then the returned visibilities are in correlated flux.
- Returns:
1D array with the calculated visibilities (normalized or in correlated flux, depending on the optional arguments).
- Return type:
np.ndarray or float
- class distroi.model.geom_comp.geom_comp.PointSource(coords: tuple[float, float] | None = None, sp_dep: SpecDep | None = None)#
Bases:
GeomCompClass representing a point source geometric component.
- Parameters:
coords (tuple of float, optional) – 2D tuples with (x, y) coordinates of the point’s coordinates (in mas). Note that positive x is defined as leftward and positive y as upward (i.e. the East and North respectively in the OI convention). If not given, will default to (0, 0).
sp_dep (SpecDep, optional) – Optional spectral dependence of the component. If None, the spectral dependency will be assumed flat in F_lam flux accross wavelength (note that flatness in F_lam means a spectral dependency ~ wavelength^2 ~ frequency^-2 for F_nu, and thus for the correlated flux).
- coords#
See parameter description.
- Type:
tuple of float
- calc_vis(uf: ndarray | float, vf: ndarray | float, wavelength: ndarray | float | None = None, ref_wavelength: float | None = None, ref_corr_flux: float | None = None) ndarray | float#
Calculate the visibility of the component.
Calculate the visibility of the component at given spatial frequencies. Wavelengths corresponding to these spatial frequencies and a reference total flux (at reference wavelength) can also be passed along, in which case the returned visibilities will be in correlated flux (Jy) instead of normalized.
- Parameters:
uf (np.ndarray or float) – 1D array with spatial x-axis frequencies in 1/radian.
vf (np.ndarray or float) – 1D array with spatial y-axis frequencies in 1/radian. Must be the same size as uf.
wavelength (np.ndarray or float, optional) – 1D array with wavelength values in micron.
ref_wavelength (float, optional) – Reference wavelength in micron.
ref_corr_flux (float, optional) – Reference correlated flux in Jy corresponding to ref_wavelength. If provided together with ref_corr_flux, then the returned visibilities are in correlated flux.
- Returns:
1D array with the calculated visibilities (normalized or in correlated flux, depending on the optional arguments).
- Return type:
np.ndarray or float
- class distroi.model.geom_comp.geom_comp.UniformDisk(diameter: float, coords: tuple[float, float] | None = None, sp_dep: SpecDep | None = None)#
Bases:
GeomCompClass representing a uniform disk geometric component.
- Parameters:
diameter (float) – The radius of the disk in milli-arcsecond.
coords (tuple of float, optional) – 2D tuples with (x, y) coordinates of the disk center’s coordinates (in mas). Note that positive x is defined as leftward and positive y as upward (i.e. the East and North respectively in the OI convention). If not given, will default to (0, 0).
sp_dep (SpecDep, optional) – Optional spectral dependence of the component. If None, the spectral dependency will be assumed flat in F_lam flux accross wavelength (note that flatness in F_lam means a spectral dependency ~ wavelength^2 ~ frequency^-2 for F_nu, and thus for the correlated flux).
- radius#
See parameter description.
- Type:
float
- coords#
See parameter description.
- Type:
tuple of float
- calc_vis(uf: ndarray | float, vf: ndarray | float, wavelength: ndarray | float | None = None, ref_wavelength: float | None = None, ref_corr_flux: float | None = None) ndarray | float#
Calculate the visibility of the component.
Calculate the visibility of the component at given spatial frequencies. Wavelengths corresponding to these spatial frequencies and a reference total flux (at reference wavelength) can also be passed along, in which case the returned visibilities will be in correlated flux (Jy) instead of normalized.
- Parameters:
uf (np.ndarray or float) – 1D array with spatial x-axis frequencies in 1/radian.
vf (np.ndarray or float) – 1D array with spatial y-axis frequencies in 1/radian. Must be the same size as uf.
wavelength (np.ndarray or float, optional) – 1D array with wavelength values in micron.
ref_wavelength (float, optional) – Reference wavelength in micron.
ref_corr_flux (float, optional) – Reference correlated flux in Jy corresponding to ref_wavelength. If provided together with ref_corr_flux, then the returned visibilities are in correlated flux.
- Returns:
1D array with the calculated visibilities (normalized or in correlated flux, depending on the optional arguments).
- Return type:
np.ndarray or float