Plotting tools

class jjmodel.plotting.Plotting(p, a, inp)[source]

Class for plotting. All methods of this class return figure and axes (f, ax).

__init__(p, a, inp)[source]

Class instance is initialized by three basic parameters.

Parameters
  • p (namedtuple) -- Set of model parameters from the parameter file.

  • a (namedtuple) -- Collection of the fixed model parameters, useful quantities, and arrays.

  • inp (dict) -- Collection of the input functions including SFR, AVR, AMR, and IMF.

agehist_plt(mode_comp, zlim, **kwargs)[source]

Age distribution (normalized on area) as a function of height and Galactocentric distance. Plotting for jjmodel.analysis.agehist().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc.

  • cumulative (boolean) -- Optional. If True, the normalized cumulative age distributions will be plotted.

  • sigma_gauss (scalar) -- Optional. Standard deviation of the Gaussian kernel used to smooth the age distributions, Gyr.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is weighted the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.agehist_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

agehist_rsun_plt(mode_comp, zlim, **kwargs)[source]

Age distribution (normalized on area) as a function of height for the Solar neighbourhood, p.Rsun. Plotting for jjmodel.analysis.agehist().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc. Or set of z-bin edges, pc.

  • cumulative (boolean) -- Optional. If True, the normalized cumulative age distributions will be plotted.

  • sigma_gauss (scalar) -- Optional. Standard deviation of the Gaussian kernel used to smooth the age distributions, Gyr.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (astropy table or list[astropy table]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [table_d,table_t,table_sh] with tables for p.Rsun.

  • number (boolean) -- Optional. If True, calculated quantity is weighted the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name. Needed only when zlim is not a single slice, but a set of z-bins.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.agehist_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

ager_plt(mode_comp, zlim, **kwargs)[source]

Radial age profiles. Plotting for jjmodel.analysis.ager().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.ager_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

agez_plt(mode_comp, **kwargs)[source]

Mean age as a function of height z and Galactocentric distance R. Plotting for jjmodel.analysis.agez().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density in (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.agez_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

agez_rsun_plt(mode_comp, **kwargs)[source]

Mean age as a function of height z for the Solar neighbourhood, p.Rsun. Plotting for jjmodel.analysis.agez().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (astropy table or list[astropy table]) -- Optional. Stellar assemblies table, parameter alternative to mode_pop. For mode_pop = tot, tab is constructed as [table_d,table_t,table_sh] with tables for p.Rsun.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density in (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.agez_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

amr_rsun_plt(mode_comp, **kwargs)[source]

Age-metallicity relation (AMR) for the Solar neighbourhood, p.Rsun.

Parameters
  • mode_comp (str) -- Galactic component. Can be 'd' (thin disk), 't' (thick disk), or 'dt' (thin + thick disk).

  • save (boolean) -- Optional. If True, the figure will be saved (call a.T['inpplt'] to display the folder name).

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

amrr_plt(mode_comp, **kwargs)[source]

Age-metallicity relation (AMR) of the disk as a function of Galactocentric distance.

Parameters
  • mode_comp (str) -- Galactic component. Can be 'd' (thin disk), 't' (thick disk), or 'dt' (thin + thick disk).

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved (call a.T['inpplt'] to display the folder name).

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

avr_plt(**kwargs)[source]

Plots age - W-velocity dispersion relation (AVR).

Parameters
  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If true, the figure will be saved. The output directory is a.T['kinplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

avr_rsun_plt(**kwargs)[source]

Plots age - W-velocity dispersion relation (AVR) for the Solar neighbourhood, at p.Rsun.

Parameters
  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['kinplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

disk_brightness_plt(mode_comp, mode_geom, bands, **kwargs)[source]

Surface brightness or colour profile of the MW viewed edge-on or face-on. Plotting for jjmodel.analysis.disk_brightness().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • mode_geom (str) -- Modeled geometry. Disk orientation with respect to the observer: 'face-on' or 'edge-on'.

  • bands (str or list) -- If a string, this parameter corresponds to the band for the surface brightness profile. If it is a list, then bands gives the names of two bands to be used for the color profile - e.g. ['U','V'] for U-V.

  • zlim (array-like) -- Optional. Range of heights [zmim,zmax] to be considered, pc. If not given, all heights up to p.zmax are taken into account.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.disk_brightness_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

fi_iso_plt(**kwargs)[source]

2d map (R-z plane) of the normalized gravitational potential with isolines.

Parameters
  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['fiplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

fi_plt(**kwargs)[source]

Vertical gravitational potential as a function of Galactocentric distance. Potential is normalized to SIGMA_E^2.

Parameters
  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['fiplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

fi_rsun_plt(**kwargs)[source]

The normalized vertical gravitational potential for the Solar neighbourhood, at p.Rsun.

Parameters
  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['fiplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

fw_hist_plt(mode_comp, R, zlim, **kwargs)[source]

W-velocity distribution function. Plotting for jjmodel.analysis.fw_hist().

Parameters
  • mode_comp (str) -- Galactic component. Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • R (scalar or array-like) -- Galactocentric distance, kpc. Can be a single distance bin or a set of bins.

  • zlim (array-like) -- Range of heights, pc. Can be a single slice [zmin,zmax] or a set of z-bin edges.

  • ages (array-like) -- Optional. Set of age bins, Gyr.

  • mets (array-like) -- Optional. Set of metallicity bins.

  • wmax (scalar) -- Maximum value of W-velocity, \(\mathrm{km \ s^{-1}}\).

  • dw (scalar) -- Step in W-velocity, \(\mathrm{km \ s^{-1}}\).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (astropy table or list[astropy table], or list[list[astropy table]]) -- Optional. Stellar assemblies table, parameter alternative to mode_pop. For a single radius R and mode_comp = 'tot', tab must be organized as a list of tables corresponding to this R: [table_d,*table_t*,table_sh*]. If R is an array, then tab is [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are the minimum and maximum values from R. If R is not specified, rmin and rmax correspond to p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.fw_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

g_rsun_plt(mode_comp, **kwargs)[source]

Plots mass loss function for the Solar neighbourhood, p.Rsun.

Parameters
  • mode_comp (str) -- Galactic component. Can be 'd' (thin disk), 't' (thick disk), or 'dt' (thin + thick disk).

  • save (boolean) -- Optional. If True, the figure will be saved (call a.T['inpplt'] to display the folder name).

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

gr_plt(mode_comp, **kwargs)[source]

Mass loss as a function of time and Galactocentric distance.

Parameters
  • mode_comp (str) -- Galactic component. Can be 'd' (thin disk), 't' (thick disk), or 'dt' (thin + thick disk).

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved (call a.T['inpplt'] to display the folder name).

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

h_plt(**kwargs)[source]

MW thin-disk's scale height as a function of time (and age).

Parameters
  • cbar (str) -- Optional. Matplotlib colomap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['heightplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

h_rsun_plt(**kwargs)[source]

MW thin-disk's scale height as a function of time (and age) for the Solar neighbourhood, at p.Rsun.

Parameters
  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['heightplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

hess_simple_plt(mode_comp, mode_geom, bands, mag_range, mag_step, **kwargs)[source]

Hess diagram for the simple volumes. PLotting for jjmodel.analysis.hess_simple().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • mode_geom (str) -- Modeled geometry. Can be 'local_sphere', 'local_cylinder', or 'rphiz_box'.

  • bands (list[str]) -- List of names of photometric columns. Three column names must be given, e.g. ['B','V','V'] for (B-V) versus \(M_\mathrm{V}\).

  • mag_range (list[list[scalar]]) -- Minimal and maximal magnitude along the x- and y-axis of the Hess diagram, [[x_min,x_max],[y_min,y_max]].

  • mag_step (array-like) -- Step along the x- and y-axis of the Hess diagram, [dx,dy].

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • r_minmax (array-like) -- Optional. Minimal and maximal radius of the spherical shell if mode_geom is 'sphere' or minimal and maximal radius of the cylindrical shell if mode_geom is 'cylinder', pc.

  • R_minmax (array-like) -- Optional. Minimal and maximal Galactocentric distance if mode_geom is 'rphiz_box', kpc.

  • dphi (array-like) -- Optional. Minimal and maximal Galactic angle \(\phi\) if mode_geom is 'rphiz_box', deg.

  • smooth (array-like) -- Optional. Width of the smoothing window in x and y, mag.

  • zlim (array-like) -- Optional. Range of heights [zmim,zmax] to be considered, pc.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.hess_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

hr_gas_plt(**kwargs)[source]

Scale heights of molecular and atomic gas as functions of Galactocentric distance.

Parameters
  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['inpplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

hr_monoage_plt(mode_comp, ages, **kwargs)[source]

Scale heights of the disk's mono-age subpopulations as a function of Galactocentric distance. Plotting for jjmodel.analysis.hr_monoage().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 'dt', or 'tot' (thin disk, thin+thick disk, or total).

  • ages (array-like) -- Set of age bins, Gyr.

  • between (boolean) -- Optional. If True, the output quantity corresponds to the age intervals specified by parameter ages. Otherwise the individual single mono-age subpopulations are returned (i.e., age-bins of width tr, model age resolution).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.hr_monoage_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

hr_monomet_plt(mode_comp, mets, **kwargs)[source]

Scale heights of the disk's mono-metallicity sub-populations as a function of Galactocentric distance. Plotting for jjmodel.analysis.hr_monomet().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 'dt', or 'tot' (thin disk, thin+thick disk, or total).

  • mets (array-like) -- Set of metallicity bins.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.hr_monomet_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

kz_plt(R, **kwargs)[source]

Vertical gravitational force of the different model components calculated for a fixed Galactocentric distance.

Parameters
  • R (scalar) -- Galactocentric distance, kpc.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['fiplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

methist_plt(mode_comp, zlim, **kwargs)[source]

Metallicity distribution (normalized on area) as a function of height and Galactocentric distance. Plotting for jjmodel.analysis.methist().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc.

  • metbins (array-like) -- Optional. Set of metallicity bins. If not given, the grid is -1.1,...,0.8 dex with 0.05 dex step.

  • cumulative (boolean) -- Optional. If True, the normalized cumulative metallicity distributions will be plotted.

  • sigma_gauss (scalar) -- Optional. Standard deviation of the Gaussian kernel used to smooth the metallicity distributions, dex.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.methist_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

methist_rsun_plt(mode_comp, zlim, **kwargs)[source]

Metallicity distribution (normalized on area) as a function of height for the Solar neighbourhood, p. Rsun. Plotting for jjmodel.analysis.methist.

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc. Or set of z-bin edges, pc.

  • metbins (array-like) -- Optional. Set of metallicity bins. If not given, the grid is -1.1,...,0.8 dex with 0.05 dex step.

  • cumulative (boolean) -- Optional. If True, the normalized cumulative age distributions will be plotted.

  • sigma_gauss (scalar) -- Optional. Standard deviation of the Gaussian kernel used to smooth the metallicity distributions, dex.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (astropy table or list[astropy table]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [table_d,table_t,table_sh] with tables for p.Rsun.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name. Needed only when zlim is not a single slice, but a set of z-bins.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.methist_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

metr_plt(mode_comp, zlim, **kwargs)[source]

Radial metallicity profiles. Plotting for jjmodel.analysis.metr().

Parameters
  • mode_comp (str) -- Galactic component. Can be 'd' (thin disk), 'dt' (thin + thick disk), or 'tot' (total: thin + thick disk + stellar halo).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.metr_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

metz_plt(mode_comp, **kwargs)[source]

Mean metallicity as a function of height z and Galactocentric distance R. Plotting for jjmodel.analysis.metz().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.metz_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

metz_rsun_plt(mode_comp, **kwargs)[source]

Mean metallicity as a function of height z for the Solar neighbourhood, p.Rsun. Plotting for jjmodel.analysis.metz.

:param mode_comp:Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot'

(thin disk, thick disk, halo, thin+thick disk, or total).

Parameters
  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (astropy table or list[astropy table]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. For mode_comp = tot, tab is constructed as [table_d,table_t,table_sh] with tables for p.Rsun.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.metz_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

nsfr_plt(mode_comp, **kwargs)[source]

Normalized star formation rate (NSFR) as a function of Galactocentric distance.

Parameters
  • mode_comp (str) -- Galactic component. Can be 'd' (thin disk), 't' (thick disk), or 'dt' (thin + thick disk).

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved (call a.T['inpplt'] to display the folder name).

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

nsfr_rsun_plt(mode_comp, **kwargs)[source]

Normalized star formation rate (NSFR) for the Solar neighbourhood, p.Rsun.

Parameters
  • mode_comp (str) -- Galactic component. Can be 'd' (thin disk), 't' (thick disk), or 'dt' (thin + thick disk).

  • save (boolean) -- Optional. If True, the figure will be saved (call a.T['inpplt'] to display the folder name).

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

rhor_monoage_plt(mode_comp, zlim, ages, **kwargs)[source]

Radial densiy profiles of the mono-age subpopulations. Plotting for jjmodel.analysis.rhor_monoage().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc.

  • ages (array-like) -- Set of age bins, Gyr.

  • sigma (boolean) -- Optional. If True, the result is surface density in \(\mathrm{M_\odot \ pc^{-2}}\), otherwise the midplane mass density in \(\mathrm{M_\odot \ pc^{-3}}\) is calculated. In combination with number = True, returns the number surface density in \(\mathrm{number \ pc^{-2}}\).

  • between (boolean) -- Optional. If True, the output quantity corresponds to the age intervals specified by parameter ages. Otherwise the individual single mono-age subpopulations are returned (i.e., age-bins of width tr, model age resolution).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is the spatial number density of stars in \(\mathrm{number \ pc^{-3}}\), not matter density in \(\mathrm{M_\odot \ pc^{-3}}\). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.rhor_monoage_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

rhor_monomet_plt(mode_comp, zlim, mets, **kwargs)[source]

Radial densiy profiles of the mono-metallicity subpopulations. Plotting for jjmodel.analysis.rhor_monomet().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc.

  • mets (array-like) -- Set of metallicity bins, dex.

  • sigma (boolean) -- Optional. If True, the result is surface density in \(\mathrm{M_\odot \ pc^{-2}}\), otherwise the midplane mass density in \(\mathrm{M_\odot \ pc^{-3}}\) is calculated. In combination with number = True, returns the number surface density in \(\mathrm{number \ pc^{-2}}\).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is the spatial number density of stars in \(\mathrm{number \ pc^{-3}}\), not matter density in \(\mathrm{M_\odot \ pc^{-3}}\). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.rhor_monomet_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

rhor_plt(**kwargs)[source]

Radial density profiles of the Galactic components (thin and thick disk, molecular and atomic gas, DM and stellar halo).

Parameters
  • sigma (boolean) -- Optional. If True, surface density profiles (\(\mathrm{M_\odot \ pc^{-2}}\)) will be plotted. By default, the plot displayes midplane densities (\(\mathrm{M_\odot \ pc^{-3}}\)).

  • save (boolean) -- Optional. If True, the figure will be saved (call a.T['inpplt'] to display the folder name).

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

rhoz_monoage_plt(mode_comp, R, ages, **kwargs)[source]

Vertical density profiles of the mono-age subpopulations (plotting for jjmodel.analysis.rhoz_monoage()).

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • R (scalar) -- Galactocentric distance, kpc.

  • ages (array-like) -- Set of age bins, Gyr.

  • between (boolean) -- Optional. If True, the output quantity corresponds to the age intervals specified by parameter ages. Otherwise the individual single mono-age subpopulations are returned (i.e., age-bins of width tr, model age resolution).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (astropy table or list[astropy table]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'dt', tab must be organized as a list of tables for the thin and thick disk: [table_d,table_t]. If mode_comp = 'tot', tab must be [table_d,table_t,table_sh].

  • number (boolean) -- Optional. If True, calculated quantity is the spatial number density of stars in \(\mathrm{number \ pc^{-3}}\), not matter density in \(\mathrm{M_\odot \ pc^{-3}}\). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.rhoz_monoage_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

rhoz_monomet_plt(mode_comp, R, mets, **kwargs)[source]

Vertical density profiles of the mono-metallicity subpopulations (plotting for jjmodel.analysis.rhoz_monomet).

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • R (scalar) -- Galactocentric distance, kpc.

  • mets (array-like) -- Set of metallicity bins, dex.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (astropy table or list[astropy table]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'dt', tab must be organized as a list of tables for the thin and thick disk: [table_d,table_t]. If mode_comp = 'tot', tab must be [table_d,table_t,table_sh].

  • number (boolean) -- Optional. If True, calculated quantity is the spatial number density of stars in \(\mathrm{number \ pc^{-3}}\), not matter density in \(\mathrm{M_\odot \ pc^{-3}}\). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.rhoz_monomet_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

rhoz_plt(R, **kwargs)[source]

Vertical density profiles of the Galactic components (thin and thick disk, molecular and atomic gas, DM and stellar halo) at some radius.

Parameters
  • R (scalar) -- Galactocentric distance, kpc.

  • normalized (boolean) -- Optional. If True, the profiles are normalized at each height on the total density at this height.

  • cumulative (boolean) -- Optional. If True, the normalized cumulative mass profiles are plotted. At each height z, profiles are normalized on the total mass up to this z.

  • save (boolean) -- Optional. If True, the figure will be saved (call a.T['densplt'] to display the folder name).

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

rot_curve_plt(**kwargs)[source]

Rotation curve as follows from the assumed MW mass model.

Parameters
  • R (array-like) -- Optional. Galactocentric distance grid, kpc.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['kinplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

rz_map_plt(mode_comp, **kwargs)[source]

Density distribution in R and z Galactic coordinates. Can be matter or number density. Plotting for jjmodel.analysis.rz_map().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • ages (array-like) -- Optional. Set of age bins, Gyr.

  • mets (array-like) -- Optional. Set of metallicity bins.

  • dz (scalar) -- Vertical resolution, pc.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.rz_map_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

rz_map_quantity_plt(mode_comp, quantity, **kwargs)[source]

Distribution of some quantity Q in Rz-plane. Q can be W-velocity dispersion or stellar physical parameter from isochrones. Plotting for jjmodel.analysis.rz_map_quantity().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 't', 'sh', 'dt', or 'tot' (thin disk, thick disk, halo, thin+thick disk, or total).

  • quantity (str) --

    param quantity

    Name of the column in a stellar assemblies table to which

    the function has to be applied; for velocity dispersion use 'sigw'.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • ages (array-like) -- Optional. Set of age bins, Gyr.

  • mets (array-like) -- Optional. Set of metallicity bins.

  • dz (scalar) -- Vertical resolution, pc.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.rz_map_quantity_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

sigwr_gas_plt(**kwargs)[source]

W-velocity dispersion of the atomic and molecular gas as a function of Galactocentric distance.

Parameters
  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['kinplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

sigwr_monoage_plt(mode_comp, zlim, ages, **kwargs)[source]

W-velocity dispersion of mono-age sub-populations as a function of Galactocentric distance. Plotting for jjmodel.analysis.sigwr_monoage().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 'dt', or 'tot' (thin disk, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc. Or set of z-bin edges, pc.

  • ages (array-like) -- Set of age bins, Gyr.

  • between (boolean) -- Optional. If True, the output quantity corresponds to the age intervals specified by parameter ages. Otherwise the individual single mono-age subpopulations are returned (i.e., age-bins of width tr, model age resolution).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.sigwr_monoage_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

sigwr_monomet_plt(mode_comp, zlim, mets, **kwargs)[source]

W-velocity dispersion of mono-metallicity subpopulations as a function of Galactocentric distance. Plotting for jjmodel.analysis.sigwr_monomet().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 'dt', or 'tot' (thin disk, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc. Or set of z-bin edges, pc.

  • mets (array-like) -- Set of metallicity bins.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.sigwr_monomet_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

sigwr_plt(mode_comp, zlim, **kwargs)[source]

W-velocity dispersion as a function of Galactocentric distance. Plotting for jjmodel.analysis.sigwr().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 'dt', or 'tot' (thin disk, thin+thick disk, or total).

  • zlim (array-like) -- Range of heights [zmin,zmax], pc. Or set of z-bin edges, pc.

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Optional. Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colormap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.sigwr_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

sigwr_thick_plt(**kwargs)[source]

Thick-disk W-velocity dispersion as a function of Galactocentric distance.

Parameters
  • save (boolean) -- Optional. If True, the figure will be saved. The output directory is a.T['kinplt'].

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

sigwz_plt(mode_comp, **kwargs)[source]

W-velocity dispersion as a function of height z and Galactocentric distance. Plotting for jjmodel.analysis.sigwz().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 'dt', or 'tot' (thin disk, thin+thick disk, or total).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (list[astropy table] or list[list[astropy table]]) -- Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [[table_d,table_t,table_sh]_ rmin,...,[table_d,table_t,table_sh]_ rmax], where rmin and rmax are p.Rmin and p.Rmax.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • cbar (str) -- Optional. Matplotlib colomap name.

  • cbar_bins (boolean) -- Optional. If True, the colorbar will be discrete. By default, it is continious.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.sigwz_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

sigwz_rsun_plt(mode_comp, **kwargs)[source]

W-velocity dispersion as a function of height z for the Solar neighbourhood, at p.Rsun. Plotting for jjmodel.analysis.sigwz().

Parameters
  • mode_comp (str) -- Galactic component, can be 'd', 'dt', or 'tot' (thin disk, thin+thick disk, or total).

  • mode_pop (str) -- Optional. Name of stellar population. Can be a pre-defined one ('a', 'f', 'ceph', 'rc', 'rc+', 'gdw', 'kdw', 'mdw') or custom (if it was selected and saved as a table in advance).

  • tab (astropy table or list[astropy table]) -- Stellar assemblies table(s), parameter alternative to mode_pop. If mode_comp = 'tot', tab must be [table_d,table_t,table_sh] with tables for p.Rsun.

  • number (boolean) -- Optional. If True, calculated quantity is weighted by the spatial number density of stars (\(\mathrm{number \ pc^{-3}}\)), not by matter density (\(\mathrm{M_\odot \ pc^{-3}}\)). Active only when mode_pop or tab is given.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • save (boolean) -- Optional. If True, the figure will be saved. The output directory and figure name are prescribed by jjmodel.iof.TabSaver.sigwz_save().

  • save_format (str) -- Optional. Format of the figure.

  • close (boolean) -- Optional. If True, the figure window is closed in the end.

Returns

Figure and axes.

class jjmodel.plotting.PlotBlocks(p, a, inp)[source]

Class to plot and save many figures automatically.

__init__(p, a, inp)[source]

Class is initialized with tuples p and a and dictionary inp.

Parameters
  • p (namedtuple) -- Set of model parameters from the parameter file.

  • a (namedtuple) -- Collection of the fixed model parameters, useful quantities, and arrays.

  • inp (dict) -- Collection of the input functions including SFR, AVR, AMR, and IMF.

ages(zlim_set, age_sm, **kwgs)[source]

Plots and saves disk's age distributions at different heights and Galactocentric distances.

Parameters
  • zlim_set (array-like) -- Edges of z-bins where the quantity will be calculated.

  • age_sm (scalar) -- Standard deviation of the Gaussian kernel, which is used to smooth age distributions, Gyr.

  • print_time (boolean) -- Optional. If True, calculation time is printed.

Returns

None.

basic_output(zlim_set, ages, mets, age_sm, met_sm, rmax, **kwargs)[source]

Plots and saves all figures (basic output of the model).

Parameters
  • zlim_set (array-like) -- Edges of z-bins where the quantities will be calculated.

  • ages (array-like) -- Set of age bins, Gyr.

  • mets (array-like) -- Set of meallicity bins.

  • age_sm (scalar) -- Standard deviation of the Gaussian kernel, which is used to smooth age distributions, Gyr.

  • met_sm (scalar) -- Standard deviation of the Gaussian kernel, which is used to smooth metallicity distributions.

  • rmax (scalar) -- Radius of the local sphere or cylinder (for calculation of Hess diagram), pc.

  • dz (scalar) -- Optional. Vertical resolution for Rz maps, pc. If not specified, dz = 25 pc.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

Returns

None.

densities(zlim, ages, mets, **kwgs)[source]

Plots and saves predicted vertical and radial profiles of the Galactic components and of the disk's mono-age and mono-metallicity subpopulations.

Parameters
  • zlim (array-like) -- Single z-bin [zmin,zmax], where the quantity will be calculated, pc.

  • ages (array-like) -- Set of age bins, Gyr.

  • mets (array-like) -- Set of meallicity bins.

  • print_time (boolean) -- Optional. If True, calculation time is printed.

Returns

None.

heights(ages, mets, **kwgs)[source]

Plots and saves disk's scale heights as a function of age and Galactocentric distance.

Parameters
  • mets (array-like) -- Set of meallicity bins.

  • print_time (boolean) -- Optional. If True, calculation time is printed.

Returns

None.

kinematics(zlim_set, ages, mets, **kwgs)[source]

Plots and saves disk's kinematic functions: AVR, W-velocity dispersion of the thick disk and gas at different Galactocentric distances.

Parameters
  • zlim_set (array-like) -- Edges of z-bins where the quantity will be calculated.

  • mets (array-like) -- Set of meallicity bins.

  • print_time (boolean) -- Optional. If True, calculation time is printed.

Returns

None.

metallicities(zlim_set, met_sm, **kwgs)[source]

Plots and saves disk's age distributions at different heights and Galactocentric distances.

Parameters
  • zlim_set (array-like) -- Edges of z-bins where the quantity will be calculated.

  • met_sm (scalar) -- Standard deviation of the Gaussian kernel, which is used to smooth metallicity distributions.

  • print_time (boolean) -- Optional. If True, calculation time is printed.

Returns

None.

model_input(**kwgs)[source]

Plots and saves all model input: radial density profiles of the Galactic components, SFR, mass loss, gas scale heights.

Parameters

print_time (boolean) -- Optional. If True, calculation time is printed.

Returns

None.

populations(zlim, ages, mets, age_sm, met_sm, rmax, **kwgs)[source]

Plots and saves radial density profiles, age, metallicity , and f(W) distributions, Hess diagrams and Rz-maps for the different populations.

Parameters
  • ages (array-like) -- Set of age bins, Gyr.

  • mets (array-like) -- Set of meallicity bins.

  • age_sm (scalar) -- Standard deviation of the Gaussian kernel, which is used to smooth age distributions, Gyr.

  • met_sm (scalar) -- Standard deviation of the Gaussian kernel, which is used to smooth metallicity distributions.

  • rmax (scalar) -- Radius of the local sphere or cylinder (for calculation of Hess diagram), pc.

  • dz (scalar) -- Optional. Vertical resolution, pc. If not specified, dz = 25 pc.

  • mode_iso (str) -- Optional. Defines which set of isochrones is used, can be 'Padova', 'MIST', or 'BaSTI'. If not specified, Padova is the default isochrone set.

  • print_time (boolean) -- Optional. If True, calculation time is printed.

Returns

None.

potential(**kwgs)[source]

Plots and saves vertical grvitational potential and gravitational force.

Parameters

print_time (boolean) -- Optional. If True, calculation time is printed.

Returns

None.

rz_maps(dz, **kwgs)[source]

Plots and saves density/age/[Fe/H]/sigw maps in Rz plane.

Parameters
  • dz (scalar) -- Optional. Vertical resolution, pc.

  • print_time (boolean) -- Optional. If True, calculation time is printed.

Returns

None.