Prints STARLIGHT runs contained in synthesis dataset.
Parameters : | synthesisFile : string
|
---|
See also
Prints bases used in STARLIGHT runs contained in synthesis dataset..
Parameters : | synthesisFile : string
|
---|
Prints qbick runs contained in synthesis dataset.
Parameters : | synthesisFile : string
|
---|
The class h5Q3DataCube manages the HDF5 interface and implements IQ3DataCube, which contains the storage-agnostic methods for data handling.
Interface to CALIFA HDF5 synthesis dataset.
Identifier of the base used in the synthesis.
Identifier of the qbick run used in the synthesis.
Version of PyCASSO used to import the synthesis.
Version of qbick.
NED name of the galaxy.
CALIFA name of the galaxy.
Number of ages in base.
Number of metallicities in base.
Number of elements in base.
Number of pixels in X direction.
Number of pixels in Y direction.
Number of voronoi zones.
Number of wavelengths.
X position of the galaxy center.
Y position of the galaxy center.
Half light radius in pixels.
Half light radius in parsecs.
Distance to galaxy in megaparsecs.
Pixel scale in parsecs.
Pixel scale in arcseconds.
Half light radius in pixels.
\(A_\lambda / A_V\). Used in reddening calculations.
Initial wavelength of spectra, in angstroms.
Final wavelength of spectra, in angstroms.
Wavelength step, in angstroms.
Dictionary containing the masterlist data for this galaxy.
Dictionary containing all synthesis, base and qbick keywords. Keys are uppercase.
Dictionary containing additional synthesis data for integrated spectra. Keys are uppercase.
Position angle of the ellipse used in radial profiles.
Ellipticity \(b/a\) of the ellipse used in radial profiles.
Distance of each pixel to the galaxy center.
- Units: [pixel]
- Shape: (N_y, N_x)
Angle of each pixel relative to the semimajor axis, corrected for a disk perspective. See pa and ba. Ranges from \(-\pi\) to \(+\pi\).
- Units: [radians]
- Shape: (N_y, N_x)
Area in pixels of each zone.
- Units: [pixel]
- Shape: (N_Zone)
Area in square parsecs of each zone.
- Units: \([pc^2]\)
- Shape: (N_y, N_x)
Fill value used when building images from zones.
Load a galaxy from a run, and update the metadata.
Parameters : | runId : string
TODO: test LoadGalaxy() : |
---|
Ages of the base.
- Units: \([Yr]\)
- Shape: (N_zone)
Metalicities of the base.
- Units: dimensionless
- Shape: (N_zone)
A recarray (x, y) containing the position of the center of each zone.
- Units: pixel
- Shape: (N_zone)
Signal at wavelength WINDOWSN.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (N_y, N_x)
TODO: Add description of cubes.
S/N at wavelength WINDOWSN.
- Units: dimensionless
- Shape: (N_y, N_x)
Image at wavelength WINDOWSN (quick, not masked).
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (N_y, N_x)
TODO: Add description of qNoiseUnmasked.
TODO: Add description of qPipeNoise.
Voronoi/segmentation zones (bins).
- Units: index
- Shape: (N_y, N_x)
S/N in Voronoi zones.
- Units: dimensionless
- Shape: (N_y, N_x)
Noise (RMS) in Voronoi zones.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (N_y, N_x)
Ratio of flags in window at wavelength WINDOWSN
- Units: \([\%]\)
- Shape: (N_y, N_x)
S/N in Voronoi zones (unresampled, beta).
- Units: dimensionless
- Shape: (N_y, N_x)
Noise (RMS) in Voronoi zones (unresampled, beta).
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (N_y, N_x)
Voronoi program output S/N.
- Units: dimensionless
- Shape: (N_y, N_x)
Noise image derived from formal errors (unresampled).
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (N_y, N_x)
Noise image derived from formal errors in Voronoi zones (unresampled).
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (N_y, N_x)
TODO: Add description of qSpatialMask.
TODO: Add description of qSnMask.
TODO: Add description of qFilledMask.
Boolean image mask used for data.
- Units: bool
- Shape: (N_y, N_x)
Flux in norm window for output spectra, in voronoi zones.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs, N_zone)
Observed flux (input spectra for the synthesis), in voronoi zones.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs, N_zone)
Error in observed spetra, in voronoi zones.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs, N_zone)
Flagged spaxels, in voronoi zones.
FIXME: describe flags.
- Units: dimensionless
- Shape: (Nl_obs, N_zone)
Observed flux (input spectra for the synthesis), in integrated spectrum.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs)
Error in integrated observed spetrum.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs)
Flagged spaxels, in integrated spectrum.
FIXME: describe flags.
- Units: dimensionless
- Shape: (Nl_obs)
Fraction of the initial stellar mass for a given population that is still trapped inside stars.
- Units: dimensionless
- Shape: (N_age, N_met)
TODO: Add description of cubes.
Light fractions for each population, in voronoi zones.
- Units: \([\%]\)
- Shape: (N_age, N_met, N_zone)
Current mass fractions for each population, in voronoi zones.
- Units: \([\%]\)
- Shape: (N_age, N_met, N_zone)
Initial mass fractions for each population, in voronoi zones.
- Units: \([\%]\)
- Shape: (N_age, N_met, N_zone)
Extinction for each population, in voronoi zones.
- Units: \([mag]\)
- Shape: (N_age, N_met, N_zone)
TODO: Add description of popexAV_flag.
TODO: Add description of cubes.
TODO: Add description of cubes.
TODO: Add description of cubes.
TODO: Add description of cubes.
Luminosity density in norm window, in voronoi zones.
- Units: \([L_\odot/\overset{\circ}{A}]\)
- Shape: (N_zone)
Initial mass for each population, in voronoi zones.
- Units: \([M_\odot]\)
- Shape: (N_zone)
Current mass for each population, in voronoi zones.
- Units: \([M_\odot]\)
- Shape: (N_zone)
Extinction by dust, in voronoi zones.
- Units: \([mag]\)
- Shape: (N_zone)
Velocity displacement, in voronoi zones.
- Units: \([km/s]\)
- Shape: (N_zone)
Velocity dispersion, in voronoi zones.
- Units: \([km/s]\)
- Shape: (N_zone)
Mean absolute relative deviation, in percent, only for the Nl_eff points actually used in the synthesis.
- Units: \([\%]\)
- Shape: (N_zone)
Best single SSP fit, to use in SSP_*, in voronoi zones.
FIXME: index_Best_SSP is j or (age,met)?
- Units: index
- Shape: (N_zone)
Number of OK wavelengths in input spectrum, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
Number of wavelengths actually used in spectral fit, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
Number of wavelengths clipped, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
Number of steps in spectral fitting, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
\(\chi^2 / Nl_{eff}\) of the fit, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
Total \(\chi^2\) of the fit, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
\(\chi^2\) of the optical fit, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
\(\chi^2\) of the far-IR fit, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
\(\chi^2\) of the QH-related fit in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
\(\chi^2\) of the photometric fit, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
Synthetic spectra, in voronoi zones.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs, N_zone)
Weight of the spaxels in the input spectra. This is the weight actually used by the synthesis, after clipping, etc. Values for voronoi zones.
FIXME: describe flags and weights.
- Units: dimensionless
- Shape: (Nl_obs, N_zone)
TODO: Add description of chains_best_par.
TODO: Add description of chains_ave_par.
TODO: Add description of chains_par.
TODO: Add description of chains_best_LAx.
TODO: Add description of chains_ave_LAx.
TODO: Add description of chains_LAx.
TODO: Add description of chains_best_mu_cor.
TODO: Add description of chains_ave_mu_cor.
TODO: Add description of chains_mu_cor.
Best \(\chi^2\) (in chains), in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
Average \(\chi^2\) (in chains), in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
TODO: Add description of cubes.
Best Mcor (in chains), in voronoi zones.
- Units: \([M_\odot]\)
- Shape: (N_zone)
Average Mcor (in chains), in voronoi zones.
- Units: \([M_\odot]\)
- Shape: (N_zone)
TODO: Add description of cha_Mcor.
Light fractions for each population, in integrated spectrum.
- Units: \([\%]\)
- Shape: (N_age, N_met)
Current mass fractions for each population, in integrated spectrum.
- Units: \([\%]\)
- Shape: (N_age, N_met)
Current mass fractions for each population, in integrated spectrum.
- Units: \([\%]\)
- Shape: (N_age, N_met)
Extinction by dust for each population, in integrated spectrum.
- Units: \([mag]\)
- Shape: (N_age, N_met)
TODO: Add description of popexAV_flag.
TODO: Add description of integrated_SSP_chi2r.
TODO: Add description of integrated_SSP_adev.
TODO: Add description of integrated_SSP_AV.
TODO: Add description of integrated_SSP_x.
Synthetic integrated spectrum.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs)
Weight of the spaxels in the integrated input spectra. This is the weight actually used by the synthesis, after clipping, etc.
FIXME: describe flags and weights.
- Units: dimensionless
- Shape: (Nl_obs, N_y, N_x)
TODO: Add description of integrated_chains_best_par.
TODO: Add description of integrated_chains_ave_par.
TODO: Add description of integrated_chains_par.
TODO: Add description of integrated_chains_best_LAx.
TODO: Add description of integrated_chains_ave_LAx.
TODO: Add description of integrated_chains_LAx.
TODO: Add description of integrated_chains_best_mu_cor.
TODO: Add description of integrated_chains_ave_mu_cor.
TODO: Add description of integrated_chains_mu_cor.
Wavelength array for the spectral.
- Units: \([\overset{\circ}{A}]\)
- Shape: (Nl_obs)
Abstract class for Q3 datacubes manipulation.
This class defines the high level operations on the data, such as conversion from zones to spatial coordinates and radial profiles.
Do not use this class directly, use one of the implementations instead.
See also
h5Q3DataCube, fitsQ3DataCube
Abstract method used to load galaxy data if allowed by the underlying infrastructure.
Enable or disable smooth dezonification. If smooth is True, use qSignal image to weight the pixels in each zone. Otherwise use the zone area.
Parameters : | smooth : boolean, optional
|
---|
Create the weight image for dezonification. If smooth is True, use prop image to weight the pixels in each zone. Otherwise use the zone area. If prop is not set, use qSignal.
Here we use a scheme similar to zoneToYX(), when using smooth dezonification, except that we use numpy.histogram() to calculate the weight of the pixels.
Parameters : | smooth : boolean
prop : array, optional
|
---|
Convert a zone array to an image.
This scheme takes advantage of the qZones image, which has, for every pixel (x, y) the index of the corresponding zone. Using this array as a “smart index” for prop, we get to reconstruct the image.
Parameters : | prop : array
extensive : boolean, optional
surface_density : boolean, optional
fill_value : float, optional
|
---|---|
Returns : | prop__yx : masked array
|
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
The A_V attribute contains the extincion for each zone.
>>> K.A_V.shape
(1638,)
Convert A_V to spatial coordinates. Note that the extinction is not extensive.
>>> A_V__yx = K.zoneToYX(K.A_V, extensive=False)
>>> A_V__yx.shape
(73, 77)
Plot the image.
>>> import matplotlib.pyplot as plt
>>> plt.imshow(A_V__yx)
Change the geometry of the rings used when calculating radial profiles.
Parameters : | pa : float
ba : float
HLR_pix : float, optional
center : (float, float), optional
|
---|
See also
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
Find the ellipse parameters.
>>> pa, ba = K.getEllipseParams()
Set the geometry, using a predefined value for HLR_pix.
>>> K.setGeometry(pa, ba, HLR_pix=10.5)
Get the distance for each pixel from the galaxy center.
>>> dist__yx = K.getPixelDistance()
Plot the distance image. Note that its shape should resemble the ellipticity of the galaxy (if it is well-behaved).
>>> import matplotlib.pyplot as plt
>>> plt.imshow(dist__yx)
Generate an operator for calculating the radial profile using exact elliptic apertures. See the examples below for the usage.
Parameters : | bin_r : array
rad_scale : float, optional
mask : array, optional
|
---|---|
Returns : | ryx : masked array
area_pix : masked array
|
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
Create the bins from 0.0 to 3.0 in 0.1 steps, using rad_scale units.
>>> import numpy as np
>>> bin_r = np.arange(0.0, 3.0 + 0.1, 0.1)
Create the radial profile operator.
>>> ryx, area = K.getYXToRadialBinsTensorExact(bin_r)
Calculate the radial profile for some properties. Note the np.tensordot() index convention. In general, one has to match the XY indices in both the ryx array (1, 2) and the property (the last two indices). The order of the arguments is important.
>>>
Calculate the radial profile of a property, using exact elliptic apertures. This is suited for a one-shot radial profile. See getYXToRadialBinsTensorExact() for a more efficient approach.
Parameters : | prop : array
bin_r : array
rad_scale : float, optional
mask : array, optional
return_npts : bool, optional
|
---|---|
Returns : | radProf : masked array
npts : masked array, optional
|
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
Create the bins from 0.0 to 3.0 in 0.1 steps, using rad_scale units.
>>> import numpy as np
>>> bin_r = np.arange(0.0, 3.0 + 0.1, 0.1)
Calculate the radial profile of the time resolved mass surface density, using a radial scale of 10.5 pixels.
>>> McorSD__tyx = K.McorSD__tZyx.sum(axis=1)
>>> McorSD__tr = K.radialProfileExact(McorSD__tyx, bin_r, rad_scale=10.5)
Plot the Radial profile.
>>> import matplotlib.pyplot as plt
>>> plt.pcolormesh(np.log10(K.ageBase), bin_r, McorSD__r)
Calculate the radial profile of a property. The last two dimensions of prop must be of length N_y and N_x.
Parameters : | prop : array
bin_r : array
rad_scale : float, optional
mask : array, optional
r__yx : array, optional
mode : {‘mean’, mean_exact’, ‘median’, ‘sum’}, optional
return_npts : bool, optional
|
---|---|
Returns : | radProf : array
npts : array, optional
|
See also
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
Create the bins from 0.0 to 3.0 in 0.1 steps, using rad_scale units.
>>> import numpy as np
>>> bin_r = np.arange(0.0, 3.0 + 0.1, 0.1)
Calculate the radial profile of the time resolved mass surface density, using a radial scale of 10.5 pixels.
>>> McorSD__tyx = K.McorSD__tZyx.sum(axis=1)
>>> McorSD__tZr = K.radialProfile(McorSD__tyx, bin_r, rad_scale=10.5)
Plot the Radial profile.
>>> import matplotlib.pyplot as plt
>>> plt.pcolormesh(np.log10(K.ageBase), bin_r, McorSD__r)
Calculate the radial profile of a property. The last two dimensions of prop must be of length N_y and N_x.
Parameters : | prop : array
bin_r : array
rad_scale : float, optional
mask : array, optional
r__yx : array, optional
mode : {‘mean’, ‘median’, ‘sum’}, optional
return_npts : bool, optional
|
---|---|
Returns : | radProf : [masked] array
npts : [masked] array, optional
|
See also
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
Create the bins from 0.0 to 3.0 in 0.1 steps, using rad_scale units.
>>> import numpy as np
>>> bin_r = np.arange(0.0, 3.0 + 0.1, 0.1)
Calculate the radial profile of the time resolved mass surface density, using a radial scale of 10.5 pixels.
>>> McorSD__tyx = K.McorSD__tZyx.sum(axis=1)
>>> McorSD__tZr = K.radialProfileNd(McorSD__tyx, bin_r, rad_scale=10.5)
Plot the Radial profile.
>>> import matplotlib.pyplot as plt
>>> plt.pcolormesh(np.log10(K.ageBase), bin_r, McorSD__r)
Calculates the radial profile from a zone array. This method is a wrapper for zoneToYX() and radialProfile().
Parameters : | prop : array
bin_r : array
rad_scale : float, optional
mask : array, optional
r__yx : array, optional
mode : {‘mean’, mean_exact’, ‘median’, ‘sum’}, optional
extensive : boolean, optional
surface_density : boolean, optional
|
---|---|
Returns : | radProf : array
|
See also
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
Create the bins from 0.0 to 3.0 in 0.1 steps, using rad_scale units.
>>> import numpy as np
>>> bin_r = np.arange(0.0, 3.0 + 0.1, 0.1)
Calculate the radial profile of mass surface density, using a radial scale of 10.5 pixels. The extensive option is the key for “surface density”.
>>> McorSD__r = K.zoneToRad(K.Mcor__z, bin_r, rad_scale=10.5, extensive=True)
Note that bin_r is the bin boundaries, it is not fit for plotting along with McorSD__r. We need the bin centers.
>>> bin_center = (bin_r[:-1] + bin_r[1:]) / 2.0
Plot the Radial profile.
>>> import matplotlib.pyplot as plt
>>> plt.plot(bin_center, McorSD__r)
Calculate the azimuthal profile of a property. The last two dimensions of prop must be of legth N_y and N_x.
Parameters : | prop : array
bin_a : array
bin_r : array
rad_scale : float, optional
mask : array, optional
r__yx : array, optional
a__yx : array, optional
mode : {‘mean’, ‘median’, ‘sum’}, optional
return_npts : bool, optional
|
---|---|
Returns : | azProf : array
npts : array, optional
|
See also
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
Create the radial bins from 0.0 to 3.0 in 0.5 steps, using rad_scale units, and the angular bins as 21 boundaries between -180 and 180 degrees, converted to radians.
>>> import numpy as np
>>> bin_r = np.arange(0.0, 3.0 + 0.5, 0.5)
>>> bin_a = np.linspace(-180.0, 180.0, 21) / 180.0 * np.pi
Calculate the azimuthal profile of the time resolved mass surface density, using a radial scale of 10.5 pixels.
>>> McorSD__tyx = K.McorSD__tZyx.sum(axis=1)
>>> McorSD__taR = K.azimuthalProfileNd(McorSD__tyx, bin_a, bin_r, rad_scale=10.5)
Note that bin_a contains the bin boundaries, it is not fit for plotting along with McorSD__tZaR. We will use the bin centers.
>>> bin_a_center = (bin_a[:-1] + bin_a[1:]) / 2.0
Plot the azimuthal profile for the first and last radial bins, summing in all ages. Note that McorSD__taR.shape is (N_ages, len(bin_a) - 1, len(bin_r) - 1).
>>> import matplotlib.pyplot as plt
>>> plt.plot(bin_a_center, McorSD__taR[...,0].sum(axis=0)
>>> plt.plot(bin_a_center, McorSD__taR[...,-1].sum(axis=0)
Fill a 2-D the masked pixels of an image of a property using the values of a radial profile. The pixels to fill are chosen by mode.
Parameters : | prop : array
prop__r : the radial profile to use to fill the data.
r : array
r__yx : array
mode : {‘convex’, ‘hollow’}, string
|
---|---|
Returns : | prop_fill : array
mask : array
|
Estimate ellipticity and orientation of the galaxy using the “Stokes parameters”, as described in: http://adsabs.harvard.edu/abs/2002AJ....123..485S The image used is qSignal.
Parameters : | prop : array, optional
mask : array, optional
|
---|---|
Returns : | pa : float
ba : float
|
Return an image (numpy.ndarray of same shape as :attr`qSignal`) of the distance from the center of the galaxy (x0, y0) in HLR units (default), assuming a projected disk.
Parameters : | use_HLR_units : boolean, optional
pixel_scale : float, optional
x : array, optional
y : array, optional
pa : float, optional
ba : float, optional
|
---|---|
Returns : | pixelDistance : array
|
See also
Return an image (numpy.ndarray of same shape as :attr`qSignal`) of the angle in radians (default) of each pixel, relative from the axis of the position angle pa. The projection is fixed assuming the galaxy is a disk, throught the ellipticity parameter ba.
Parameters : | units : {‘radians’, ‘degrees’}, optional
x : array, optional
y : array, optional
pa : float, optional
ba : float, optional
|
---|---|
Returns : | pixelDistance : 2-D array
|
Find the half radius of the desired property. Using radial bins of 1 pixel, calculate the cumulative sum of prop. The “half prop radius” is the radius where the cumulative sum reaches 50% of its peak value.
Parameters : | prop : array
fill : boolean, optional
mask : array(bool), optional
|
---|---|
Returns : | HXR : float
|
See also
Notes
This value should be close to $dfrac{HLR_{circular}}{sqrt{b/a}}$ if the isophotes of the galaxy are all ellipses with parameters p.a. and b/a.
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
Calculate the half mass radius, in pixels.
>>> HMR_pix = K.getHalfRadius(K.McorSD)
Calculate the radial profile of extinction by dust, using HMR_pix as radial scale, in bins from 0.0 to 3.0, in 0.1 steps.
>>> import numpy as np
>>> bin_r = np.arange(0.0, 3.0 + 0.1, 0.1)
>>> A_V__r = K.radialProfile(K.A_V__yx, bin_r, rad_scale=HMR_pix)
Note that bin_r is the bin boundaries, it is not fit for plotting along with A_V__r. We need the bin centers.
>>> bin_center = bin_center = (bin_r[:-1] + bin_r[1:]) / 2.0
Plot the Radial profile.
>>> import matplotlib.pyplot as plt
>>> plt.plot(bin_center, A_V__r)
Find the half light radius using the image at the normalization window (qSignal). Using radial bins of 1 pixel, calculate the cumulative sum of luminosity. The HLR is the radius where the cum. sum reaches 50% of its peak value.
Parameters : | fill : boolean
|
---|---|
Returns : | HLR : float
|
See also
Notes
This value should be close to $dfrac{HLR_{circular}}{sqrt{b/a}}$ if the isophotes of the galaxy are all ellipses with parameters p.a. and b/a.
TODO: move to utils?
Calculate the cumulative growth in age space. In age = 0, we have the sum of prop in age, and as age increases the sum of prop decreases.
Parameters : | prop : array
mask : array
relative : bool
|
---|---|
Returns : | cs : array
|
Examples
Load the dataset:
>>> from pycasso.h5datacube import h5Q3DataCube
>>> K = h5Q3DataCube('qalifa-synthesis.002.h5', 'run001', 'K0277')
Get the spatially resolved mass surface density for each age.
>>> MiniSD__tyx = K.MiniSD__tZyx.sum(axis=1)
Calculate the mass build up for the whole galaxy (notice the “all data” mask, K.qMask). The mask could be any selection of data pixels.
>>> MtotGrow__t = K.growthInAge(MiniSD__tyx, mask=K.qMask)
MtotGrow__t is a surface mass density, in \(M_\odot / pc^2\). Converting to absolute mass.
>>> MtotGrow__t *= K.parsecPerPixel ** 2
Plot the mass buildup as a function of log. time.
>>> ages = np.log10(K.ageBase)
>>> import matplotlib.pyplot as plt
>>> plt.plot(ages, MtotGrow__t)
Calculate the star formation rate using a smooth-resampled age base, as prescribed by Asari et al. (2007) <http://adsabs.harvard.edu/abs/2007MNRAS.381..263A>.
Parameters : | logtc_ini : float
logtc_fin : float
logtc_step : float
logtc_FWHM : float
|
---|---|
Returns : | SFR : array
logtc : array
|
See also
pystarlight.util.StarlightUtils.calcSFR
Area, in pixels, of the data regions. This is the area to use when dealing with qMask.
Aarea, in pixels, of the masked regions. This is the area to use when dealing with qHollowPixels.
Area, in pixels, of the convex hull of qMask. This is the area to use when dealing with qConvexHull.
Masked (bad) pixels inside the data mask.
- Units: bool
- Shape: (N-y, N_x)
Convex hull of data mask.
- Units: bool
- Shape: (N-y, N_x)
Spatially resolved light fractions for each population.
- Units: \([\%]\)
- Shape: (N_age, N_met, N_y, N_x)
Spatially resolved corrected mass fractions for each population.
- Units: \([\%]\)
- Shape: (N_age, N_met, N_y, N_x)
Spatially resolved initial mass fractions for each population.
- Units: \([\%]\)
- Shape: (N_age, N_met, N_y, N_x)
Spatially resolved extinction by dust for each population.
- Units: \([mag]\)
- Shape: (N_age, N_met, N_y, N_x)
Spatially resolved extinction by dust.
- Units: \([mag]\)
- Shape: (N_y, N_x)
Spatially resolved velocity displacement.
- Units: \([km/s]\)
- Shape: (N_y, N_x)
Spatially resolved velocity dispersion.
- Units: \([km/s]\)
- Shape: (N_y, N_x)
Luminosity of each population in normalization window of the integrated spectrum.
- Units: \([L_\odot]\)
- Shape: (N_age, N_met)
Luminosity in normalization window of the integrated spectrum.
- Units: \([L_\odot]\)
- Type: float
Luminosity of each population in normalization window, in voronoi zones.
- Units: \([L_\odot]\)
- Shape: (N_age, N_met, N_zone)
Luminosity in normalization window, in voronoi zones.
- Units: \([L_\odot]\)
- Shape: (N_zone)
Spatially resolved luminosity surface density of each population in normalization window.
- Units: \([L_\odot / pc^2]\)
- Shape: (N_age, N_met, N_y, N_x)
Luminosity surface density of each population in normalization window.
- Units: \([L_\odot / pc^2]\)
- Shape: (N_y, N_x)
window of the integrated spectrum.
“Dereddened” luminosity in normalization window of the integrated spectrum.
- Units: \([L_\odot]\)
- Type: float
“Dereddened” luminosity of each population in normalization window, in voronoi zones.
- Units: \([L_\odot]\)
- Shape: (N_age, N_met, N_zone)
“Dereddened” luminosity in normalization window, in voronoi zones.
- Units: \([L_\odot]\)
- Shape: (N_zone)
Spatially resolved “dereddened” luminosity surface density of each population in normalization window.
- Units: \([L_\odot / pc^2]\)
- Shape: (N_age, N_met, N_y, N_x)
“Dereddened” luminosity surface density of each population in normalization window.
- Units: \([L_\odot / pc^2]\)
- Shape: (N_y, N_x)
Current mass of each population of the integrated spectrum.
- Units: \([M_\odot]\)
- Shape: (N_age, N_met)
Current mass of the integrated spectrum.
- Units: \([M_\odot]\)
- Type: float
Current mass of each population, in voronoi zones.
- Units: \([M_\odot]\)
- Shape: (N_age, N_met, N_zone)
Current mass, in voronoi zones.
- Units: \([M_\odot]\)
- Shape: (N_age, N_met, N_zone)
Spatially resolved current mass surface density of each population.
- Units: \([M_\odot / pc^2]\)
- Shape: (N_age, N_met, N_y, N_x)
Spatially resolved current mass surface density.
- Units: \([M_\odot / pc^2]\)
- Shape: (N_y, N_x)
Initial mass of each population of the integrated spectrum.
- Units: \([M_\odot]\)
- Shape: (N_age, N_met)
Initial mass of the integrated spectrum.
- Units: \([M_\odot]\)
- Type: float
Initial mass of each population, in voronoi zones.
- Units: \([M_\odot]\)
- Shape: (N_age, N_met, N_zone)
Initial mass, in voronoi zones.
- Units: \([M_\odot]\)
- Shape: (N_age, N_met, N_zone)
Spatially resolved initial mass surface density of each population.
- Units: \([M_\odot / pc^2]\)
- Shape: (N_age, N_met, N_y, N_x)
Spatially resolved initial mass surface density.
- Units: \([M_\odot / pc^2]\)
- Shape: (N_y, N_x)
Mass to light ratio of the integrated spectrum.
- Units: \([M_\odot / L_\odot]\)
- Type: float
Spatially resolved mass to light ratio.
- Units: \([M_\odot / L_\odot]\)
- Shape: (N_y, N_x)
“Dereddened” mass to light ratio of the integrated spectrum.
- Units: \([M_\odot / L_\odot]\)
- Type: float
Spatially resolved “dereddened” mass to light ratio.
- Units: \([M_\odot / L_\odot]\)
- Shape: (N_y, N_x)
Flux-weighted average log. age of the integrated spectrum.
- Units: \([\log Gyr]\)
- Type: float
Flux-weighted average log. age, in voronoi zones.
- Units: \([\log Gyr]\)
- Shape: (N_zone)
Spatially resolved, flux-weighted average log. age.
- Units: \([\log Gyr]\)
- Shape: (N_y, N_x)
Mass-weighted average log. age of the integrated spectrum.
- Units: \([\log Gyr]\)
- Type: float
Mass-weighted average log. age, in voronoi zones.
- Units: \([\log Gyr]\)
- Shape: (N_zone)
Spatially resolved, mass-weighted average log. age.
- Units: \([\log Gyr]\)
- Shape: (N_y, N_x)
Flux-weighted average metallicity of the integrated spectrum.
- Units: dimensionless
- Type: float
Flux-weighted average metallicity, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
Spatially resolved, flux-weighted average metallicity.
- Units: dimensionless
- Shape: (N_y, N_x)
Mass-weighted average metallicity of the integrated spectrum.
- Units: dimensionless
- Type: float
Mass-weighted average metallicity, in voronoi zones.
- Units: dimensionless
- Shape: (N_zone)
Spatially resolved, mass-weighted average metallicity.
- Units: dimensionless
- Shape: (N_y, N_x)
Mean absolute relative deviation, in percent, only for the Nl_eff points actually used in the synthesis.
- Units: \([\%]\)
- Shape: (N_y, N_x)
\(\chi^2 / Nl_{eff}\) of the fit.
- Units: dimensionless
- Shape: (N_y, N_x)
Spatially resolved observed flux (input spectra for the synthesis).
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs, N_y, N_x)
Spatially resolved flagged spaxels.
FIXME: describe flags.
- Units: dimensionless
- Shape: (Nl_obs, N_y, N_x)
Spatially resolved synthetic spectra.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs, N_y, N_x)
Spatially resolved weight of the spaxels in the input spectra. This is the weight actually used by the synthesis, after clipping, etc.
FIXME: describe flags and weights.
- Units: dimensionless
- Shape: (Nl_obs, N_y, N_x)
Spatially resolved error in observed spetra.
- Units: \([erg / s / cm^2 / \overset{\circ}{A}]\)
- Shape: (Nl_obs, N_y, N_x)
Age bin edges, in log. Computes the bin edges as the bissection of the bins, expanding the borders accordingly.
- Units: \([\log age / yr]\)
- Shape: (N_age + 1)
Return ageBase as a row matrix to simplify multiplications.
Parameters : | n : integer
|
---|---|
Returns : | ageBaseNd : n-D array
|
See also
Return metBase as a row matrix to simplify multiplications.
Parameters : | n : integer
|
---|---|
Returns : | metBaseNd : n-D array
|
See also
Return zoneArea_pc2 as a row matrix to simplify multiplications.
Parameters : | n : integer
|
---|---|
Returns : | zoneAreaNd : n-D array
|
From Cid @ 26/05/2012: Here’s my request for pycasso reader: That it defines a new figure of merit analogous to adev, but which uses the synthetic flux in the denominator instead of the observed one. This is the adevS__z thing defined below in awful python. Why? Well, despite all our care there are still some non-flagged pixels with very low fluxes, which screws up adev, and this alternative definition fixes it.
Original code:
>>> adevS__z = np.zeros((self.nZones))
>>> for i_z in np.arange(self.nZones):
>>> _a = np.abs(self.f_obs[:,i_z] - self.f_syn[:,i_z]) / self.f_syn[:,i_z]
>>> _b = _a[self.f_wei[:,i_z] > 0]
>>> adevS__z[i_z] = 100.0 * _b.mean()
>>> return adevS__z
Returns : | aDevS : array of length (nZones) |
---|