astrodendro.analysis¶
-
class
astrodendro.analysis.
PPStatistic
(stat, metadata=None)¶ Compute properties of structures in a position-position (PP) cube.
Parameters: structure :
Structure
instanceThe structure to compute the statistics for
metadata : dict
Key-value pairs of metadata
Available statistics
flux |
The integrated flux of the structure, in Jy (note that this does not include any kind of background subtraction, and is just a plain sum of the values in the structure, converted to Jy). |
major_sigma |
Major axis of the projection onto the position-position (PP) plane, computed from the intensity weighted second moment in direction of greatest elongation in the PP plane. |
minor_sigma |
Minor axis of the projection onto the position-position (PP) plane, computed from the intensity weighted second moment perpendicular to the major axis in the PP plane. |
position_angle |
The position angle of sky_maj, sky_min in degrees counter-clockwise from the +x axis. |
radius |
Geometric mean of major_sigma and minor_sigma . |
area_exact |
The exact area of the structure on the sky. |
area_ellipse |
The area of the ellipse defined by the second moments, where the semi-major and semi-minor axes used are the HWHM (half-width at half-maximum) derived from the moments. |
x_cen |
The mean position of the structure in the x direction (in pixel coordinates, or in world coordinates if the WCS transformation is available in the meta-data). |
y_cen |
The mean position of the structure in the y direction (in pixel coordinates, or in world coordinates if the WCS transformation is available in the meta-data). |
to_mpl_ellipse (**kwargs) |
Returns a Matplotlib ellipse representing the first and second moments of the structure. |
Methods (detail)
-
PPStatistic.
to_mpl_ellipse
(**kwargs)¶ Returns a Matplotlib ellipse representing the first and second moments of the structure.
Any keyword arguments are passed to
Ellipse
-
class
astrodendro.analysis.
PPVStatistic
(stat, metadata=None)¶ Compute properties of structures in a position-position-velocity (PPV) cube.
Parameters: structure :
Structure
instanceThe structure to compute the statistics for
metadata : dict
Key-value pairs of metadata
Available statistics
flux |
The integrated flux of the structure, in Jy (note that this does not include any kind of background subtraction, and is just a plain sum of the values in the structure, converted to Jy). |
major_sigma |
Major axis of the projection onto the position-position (PP) plane, computed from the intensity weighted second moment in direction of greatest elongation in the PP plane. |
minor_sigma |
Minor axis of the projection onto the position-position (PP) plane, computed from the intensity weighted second moment perpendicular to the major axis in the PP plane. |
position_angle |
The position angle of sky_maj, sky_min in degrees counter-clockwise from the +x axis (note that this is the +x axis in pixel coordinates, which is the -x axis for conventional astronomy images). |
radius |
Geometric mean of major_sigma and minor_sigma . |
area_exact |
The exact area of the structure on the sky. |
area_ellipse |
The area of the ellipse defined by the second moments, where the semi-major and semi-minor axes used are the HWHM (half-width at half-maximum) derived from the moments. |
x_cen |
The mean position of the structure in the x direction. |
y_cen |
The mean position of the structure in the y direction. |
v_cen |
The mean velocity of the structure (where the velocity axis can be specified by the vaxis metadata parameter, which defaults to 0 following the Numpy convention - the third axis in the FITS convention). |
v_rms |
Intensity-weighted second moment of velocity (where the velocity axis can be specified by the vaxis metadata parameter, which defaults to 0 following the Numpy convention - the third axis in the FITS convention). |
to_mpl_ellipse (**kwargs) |
Returns a Matplotlib ellipse representing the first and second moments of the structure. |
Methods (detail)
-
PPStatistic.
to_mpl_ellipse
(**kwargs) Returns a Matplotlib ellipse representing the first and second moments of the structure.
Any keyword arguments are passed to
Ellipse
-
astrodendro.analysis.
pp_catalog
(structures, metadata, fields=None, verbose=True)¶ Iterate over a collection of position-position (PP) structures, extracting several quantities from each, and building a catalog.
Parameters: structures : iterable of Structures
The structures to catalog (e.g., a dendrogram)
metadata : dict
The metadata used to compute the catalog
fields : list of strings, optional
The quantities to extract. If not provided, defaults to all PPV statistics
verbose : bool, optional
If True (the default), will generate warnings about missing metadata
Returns: table : a
Table
instanceThe resulting catalog
-
astrodendro.analysis.
ppv_catalog
(structures, metadata, fields=None, verbose=True)¶ Iterate over a collection of position-position-velocity (PPV) structures, extracting several quantities from each, and building a catalog.
Parameters: structures : iterable of Structures
The structures to catalog (e.g., a dendrogram)
metadata : dict
The metadata used to compute the catalog
fields : list of strings, optional
The quantities to extract. If not provided, defaults to all PPV statistics
verbose : bool, optional
If True (the default), will generate warnings about missing metadata
Returns: table : a
Table
instanceThe resulting catalog