Output analysis

Density profiles

jjmodel.analysis.rhor(p, a, **kwargs)[source]

Radial density profiles of the Galactic components.

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

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

  • 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.

Returns

The output consists of two quantities:

  • The midplane mass density (or surface density up to p.zmax) as a function of Galactocentric distance. Array shape is (6,a.Rbins), columns correspond to the different model components in the following order: thin disk, molecular gas, atomic gas, thick disk, stellar halo, and DM halo.

  • The same, but at for the Solar radius p.Rsun, array of length (6).

Return type

[2d-array, 1d-array]

jjmodel.analysis.rhor_monoage(mode_comp, zlim, ages, p, a, **kwargs)[source]

Radial density profiles of the mono-age subpopulations.

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 to be considered [zmin,zmax], pc.

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

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.rhor_monoage_save().

  • 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.

Returns

Surface density (stellar mass density integrated within zlim interval) in \(\mathrm{M_\odot \ pc^{-2}}\) or \(\mathrm{number \ pc^{-2}}\) or mass density in \(\mathrm{M_\odot \ pc^{-3}}\) or \(\mathrm{number \ pc^{-3}}\) (summed density within zlim) - as a function of Galactocentric distance and age. Array shape is (len(ages),a.Rbins) or (len(ages)-1,a.Rbins) if between = True.

Return type

2d-array

jjmodel.analysis.rhor_monomet(mode_comp, zlim, mets, p, a, **kwargs)[source]

Radial density profiles of the mono-metallicity subpopulations.

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 to be considered [zmin,zmax], pc.

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

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.rhor_monomet_save().

  • 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.

Returns

Surface density (stellar mass density integrated within zlim interval) in \(\mathrm{M_\odot \ pc^{-2}}\) or \(\mathrm{number \ pc^{-2}}\) or mass density in \(\mathrm{M_\odot \ pc^{-3}}\) or \(\mathrm{number \ pc^{-3}}\) (summed density within zlim) - as a function of Galactocentric distance and age. Array shape is (len(mets)-1,a.Rbins).

Return type

2d-array

jjmodel.analysis.rhoz_monoage(mode_comp, R, ages, p, a, **kwargs)[source]

Vertical profiles of the mono-age subpopulations calculated at a given Galactocentric distance.

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.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.rhoz_monoage_save().

  • 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.

Returns

Array of the shape (len(ages),a.n) with the densities of the selected mono-age subpopulations in \(\mathrm{M_\odot \ pc^{-3}}\) or \(\mathrm{number \ pc^{-3}}\). Use together with the model vertical grid a.z.

Return type

2d-array

jjmodel.analysis.rhoz_monomet(mode_comp, R, mets, p, a, **kwargs)[source]

Vertical profiles of the mono-metallicity subpopulations calculated at a given Galactocentric distance.

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.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.rhoz_monomet_save().

  • 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.

Returns

Array of the shape (len(ages),a.n) with the densities of the selected mono-metallicity subpopulations, in \(\mathrm{M_\odot \ pc^{-3}}\) or \(\mathrm{number \ pc^{-3}}\). Each profile corresponds to the model vertical grid a.z.

Return type

2d-array

Ages and metallicities

jjmodel.analysis.agez(mode_comp, p, a, **kwargs)[source]

Age as a function of distance from the Galactic plane calculated at the different radii.

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

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

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

  • R (scalar) -- Optional. Galactocentric distance, kpc. Required when parameter tab is specified. If not given, age profiles will be calculated for the whole range of modeled radii a.R.

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.agez_save().

  • 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(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. If a single Galactocentric distance is modeled with parameter R, then tab is constructed as [table_d,table_t,table_sh] with tables for this radius.

  • 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.

Returns

Usually, the output is a list of two arrays:

  • Age as a function of height z at the different Galactocentric distances a.R. Array shape is (a.Rbins,a.n) (by default) or (a.n) (if parameter R is given). The profiles has to be used with z-grid a.z.

  • The same, but for the Solar radius, array of shape (a.n).

If the optional parameter R is given and equals to p.Rsun, the output only contains the local vertical age profile.

Return type

[2d-array, 1d-array] or [1d-array, 1d-array], or 1d-array

jjmodel.analysis.ager(mode_comp, zlim, p, a, **kwargs)[source]

Age as a function of Galactocentric distance.

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 to be considered [zmin,zmax], pc.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.ager_save().

  • 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.

Returns

Radial age profile, array of length a.Rbins.

Return type

1d-array

jjmodel.analysis.metz(mode_comp, p, a, **kwargs)[source]

Metallicity as a function of distance from the Galactic plane.

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

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

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

  • R (scalar) -- Optional. Galactocentric distance, kpc. Required when parameter tab is specified. If not given, age profiles will be calculated for the whole range of modeled radii a.R.

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.metz_save().

  • 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(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. If a single Galactocentric distance is modeled with parameter R, then tab is constructed as [table_d,table_t,table_sh] with tables for this radius.

  • 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.

Returns

Usually, the output is a list of two arrays:

  • Metallicity as a function of height at the different Galactocentric distances a.R. Array shape is (a.Rbins,a.n) (by default) or (a.n) (if parameter R is given). The profiles has to be used with z-grid a.z.

  • The same, but for the Solar radius, array of shape (a.n).

If the optional parameter R is given and equals to p.Rsun, the output only contains the local metallicity profile.

Return type

[2d-array, 1d-array] or [1d-array, 1d-array], or 1d-array

jjmodel.analysis.metr(mode_comp, zlim, p, a, **kwargs)[source]

Metallicity as a function of Galactocentric distance.

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 to be considered [zmin,zmax], pc.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.metr_save().

  • 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.

Returns

Radial metallicity profile, array of length a.Rbins.

Return type

1d-array

jjmodel.analysis.agehist(mode_comp, zlim, p, a, **kwargs)[source]

Age distributions at the different Galactocentric distances.

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 to be considered [zmin,zmax], pc.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.agehist_save().

  • 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.

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

  • 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

There are two types of output:

  • Age distributions at the different Galactocentric distances, array shape is (a.Rbins,a.jd).

  • The same, but at the Solar radius, array of length (a.jd).

Distributions are normalized to area and correspond to the model time-grid a.t.

Return type

[2d-array, 1d-array]

jjmodel.analysis.methist(mode_comp, zlim, p, a, **kwargs)[source]

Metallicity distributions at the different Galactocentric distances.

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 to be considered [zmin,zmax], pc.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are prescribed by jjmodel.iof.TabSaver.methist_save().

  • 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.

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

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

  • 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

There are two types of output:

  • Metallicity distributions at the different Galactocentric distances, array shape is (a.Rbins,38) (default) or (a.Rbins,len(metbins)-1) if metbins is in kwargs.

  • The same, but at the Solar radius, array of length (38) or (len(metbins)-1).

Distributions are normalized to area and correspond to the time-grid a.t.

Return type

[2d-array, 1d-array]

Scale heights

jjmodel.analysis.hr_monoage(mode_comp, ages, p, a, **kwargs)[source]

Scale heights of the mono-age subpopulations as a function of Galactocentric distance.

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.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.hr_monoage_save().

  • 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.

Returns

Radial profiles of scale heights for age bins, pc. Array shape is (a.Rbins,len(ages)) or (a.Rbins,len(ages)-1) if between is True.

Return type

2d-array.

jjmodel.analysis.hr_monomet(mode_comp, mets, p, a, **kwargs)[source]

Scale heights of the mono-metallicity subpopulations as a function of Galactocentric distance.

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.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.hr_monomet_save().

  • 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.

Returns

Radial profiles of scale heights for metallicity bins, pc. Array shape is (a.Rbins,len(mets)-1).

Return type

2d-array.

Kinematics

jjmodel.analysis.sigwz(mode_comp, p, a, **kwargs)[source]

W-velocity dispersion as a function of distance from the Galactic plane.

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

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

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

  • R (scalar) -- Optional. Galactocentric distance, kpc. Required when parameter tab is specified. If not given, velocity dispersion profiles will be calculated for the whole range of modeled radii a.R.

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.sigwz_save().

  • 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]]) -- 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. If a single Galactocentric distance is modeled with parameter R, then tab is constructed as [table_d,table_t,table_sh] with tables for this radius.

  • 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.

Returns

There are usually two arrays in the output:

  • Vertical profile of the W-velocity dispersion at a.R, \(\mathrm{km \ s^{-1}}\). Array shape is (a.Rbins, a.n) (by default) or (a.n) (if parameter R is given). The profiles has to be used with z-grid a.z.

  • Same, but for the Solar radius p.Rsun, array of length (a.n).

If the optional parameter R is given and equals to p.Rsun, the output only contains the local vertical W-velocity dispersion profile.

Return type

[2d-array, 1d-array] or [1d-array, 1d-array], or 1d-array

jjmodel.analysis.sigwr(mode_comp, zlim, p, a, **kwargs)[source]

W-velocity dispersion as a function of Galactocentric distance.

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.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.sigwr_save().

  • 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.

Returns

Radial profile of the W-velocity dispersion, \(\mathrm{km \ s^{-1}}\). Array of length a.Rbins.

Return type

1d-array

jjmodel.analysis.sigwr_monoage(mode_comp, zlim, ages, p, a, **kwargs)[source]

W-velocity dispersion for the mono-age subpopulations as a function of Galactocentric distance.

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.

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

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.sigwr_monoage_save().

  • 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.

Returns

Radial profiles of the W-velocity dispersion of mono-age subpopulations, \(\mathrm{km \ s^{-1}}\). Array shape is (a.Rbins,len(ages)) or (a.Rbins,len(ages)-1) if between is True.

Return type

2d-array

jjmodel.analysis.sigwr_monomet(mode_comp, zlim, mets, p, a, **kwargs)[source]

W-velocity dispersion for the mono-metallicity subpoplations as a function of Galactocentric distance.

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.

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

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.sigwr_monomet_save().

  • 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.

Returns

Radial profile of the W-velocity dispersion for the mono-metallicity bins, \(\mathrm{km \ s^{-1}}\). Array shape is (a.Rbins,len(mets)-1).

Return type

2d-array

jjmodel.analysis.fw_hist(mode_comp, R, zlim, p, a, **kwargs)[source]

W-velocity distribution function at a given Galactocentric distance.

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.

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

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.fw_save().

  • 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. If mode_comp=='tot', tab must be organized as a list of tables corresponding to this R: [table_d,*table_t*,table_sh*].

  • 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.

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

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

Returns

Normalized on area W-velocity distribution (histogram) and W-grid (bin centers), \(\mathrm{km \ s^{-1}}\).

Return type

[1d-array, 1d-array]

jjmodel.analysis.rot_curve(ah, p, a, **kwargs)[source]

Calculatess the circular velocity \(\upsilon_\mathrm{c}\) as a function of Galactocentric distance.

Parameters
  • ah (scalar) -- DM scaling parameter, kpc.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.rot_curve_save().

  • R (array-like) -- Radial grid, kpc.

Returns

Galactic rotation curve, \(\mathrm{km / s^{-1}}\).

Return type

dict

2D maps and Hess diagrams

jjmodel.analysis.rz_map(mode_comp, p, a, **kwargs)[source]

Mass (or number) density map in R and z Galactic coordinates.

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

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.rz_map_save().

  • 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) -- Optional. Vertical resolution, pc.

Returns

Map of stellar mass or number density in Galactic coordinates.

Return type

2d-array

jjmodel.analysis.rz_map_quantity(mode_comp, quantity, p, a, **kwargs)[source]

Calculates mean value of some quantity in R and z Galactic coordinates.

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) -- Name of the column in a stellar assemblies table to which the function has to be applied; for velocity dispersion use 'sigw'.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.rz_map_quantity_save().

  • 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.

Returns

Map of the chosen quantity in Galactic coordinates.

Return type

2d-array

jjmodel.analysis.hess_simple(mode_comp, mode_geom, bands, mag_range, mag_step, p, a, **kwargs)[source]

Hess diagram for the simple volumes.

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].

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.hess_save().

  • 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.

Returns

Hess diagram.

Return type

2d-array

Other

jjmodel.analysis.fi_iso(ah, p, a, **kwargs)[source]

Calculates the normalized vertical gravitational potential as a function of Galactocentric distance.

Parameters
  • ah (scalar) -- DM scaling parameter, kpc.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.fi_iso_save().

Returns

Total graviatational potential.

Return type

2d-array

jjmodel.analysis.mean_quantity(mode_comp, R, zlim, quantity, p, a, **kwargs)[source]

Calculates mean value of some quantity as a function of height z weighted by the spatial number densities of 'stellar assemblies'.

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.

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

  • quantity (str) -- Name of the column in a stellar assemblies table to which the function has to be applied; for velocity dispersion use 'sigw'.

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

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

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.mean_quantity_save().

  • 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. If mode_comp=='tot', tab must be organized as a list of tables corresponding to this R: [table_d,*table_t*,table_sh*].

  • 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

Vertical profile of the given quantity in the selected horizontal slice zlim. Array of length (zlim[1]-zlim[0])//p.dz.

Return type

1d-array

jjmodel.analysis.pops_in_volume(mode_comp, R, volume, p, a, **kwargs)[source]

Calculates the number of stars in a volume.

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.

  • volume (scalar or array-like) -- If scalar, then volume is the same for all z-bins, e.g. cylinder can be modeled in this way. If volume is an array (must match the model grid a.z or be consistent with the assumed zlim in kwargs, see below), then volumes of the different z-bins can also be different. This is suitable for the modeling of a sphere or a cone. Units are \(\mathrm{pc}^3\). Note that if the modeled volume is located at both positive and negative z, volume must include their sum, as this function works with the absolute z-values.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.mean_quantity_save().

  • 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. If mode_comp=='tot', tab must be organized as a list of tables corresponding to this R: [table_d,*table_t*,table_sh*].

  • 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.

  • zlim (array-like) -- Optional. Range of heights [zmim,zmax] to be considered. Note that zmax-zmin > p.dz, the slice cannot be thinner than the model vertical resolution. If zlim is given, and volume is an array, be sure that length of volume equals to (zmax-zlim)//p.dz. If no zlim is given, then all heights from 0 to p.zmax are considered.

  • vln (str) -- Info about the chosen volume shape.

Returns

Table. Column 'Nz' contains the number of stars (stellar assembly populations) located in the volume specified by the parameters R (where in the disk), zlim (range of heights), and volume (what are volumes of z-slices - allows to model different shapes).

Return type

astropy table or list[astropy table]

jjmodel.analysis.disk_brightness(mode_comp, mode_geom, bands, p, a, **kwargs)[source]

MW as an external galaxy. Function calculates the surface brightness or colour profile of the MW if it is viewed edge-on or face-on (individual model components and stellar populations can be selected).

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.

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

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

  • save (boolean) -- Optional. If True, the calculated quantities are saved as tables to the output directory. The output path and table name are predcribed by jjmodel.iof.TabSaver.disk_brightness_save().

  • 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.

Returns

Disk surface brightness profile (\(\mathrm{mag \ arcsec^{-2}}\)) or color profile (mag). Use together with a.R array.

Return type

1d-array