ODHIN¶
- class odhin.ODHIN(settings_file, output_dir, idname='ID', raname='RA', decname='DEC')[source]¶
Bases:
objectMain class for the deblending process.
- Parameters
- settings_filestr
Settings file.
- output_dir: str
if not None, results of each group is saved in this directory
- Attributes
- table_groups
astropy.table.Table Table computed by
ODHIN.grouping, containing the information about groups.- table_sources
astropy.table.Table Table computed by
ODHIN.deblend, containing the information about the deblended sources.
- table_groups
Methods Summary
Build the result table from the sources.
deblend([listGroupToDeblend, njobs, verbose])Parallelized deblending on a list of groups
dump(filename)Dump the ODHIN object to a pickle file.
grouping([verbose, cut])Segment all sources in a number of connected (at the MUSE resolution) groups and build a table of the groups.
load(filename)Load an ODHIN object from a pickle file.
plotAGroup([ax, group_id, cmap])Plot a group, with sources positions and contour of the label image.
plotGroups([ax, groups, linewidth])Plot the segmentation map and groups.
plotHistArea([ax, nbins])Plot histogram of group areas.
plotHistNbS([ax, nbins])Plot histogram of the number of sources per group.
set_loglevel(level)Change the logging level.
Methods Documentation
- build_result_table()[source]¶
Build the result table from the sources.
This is called at the end of the
deblendmethod.
- deblend(listGroupToDeblend=None, njobs=None, verbose=True)[source]¶
Parallelized deblending on a list of groups
- Parameters
- listGroupToDeblendlist
List of group IDs to process. If not provided, all groups are processed, starting with the ones with the highest number of sources.
- njobsint
Number of process to run in parallel.
- verbosebool
If True, show a progress bar.
- grouping(verbose=True, cut=None)[source]¶
Segment all sources in a number of connected (at the MUSE resolution) groups and build a table of the groups.
- Parameters
- verbosebool
If True, show a progress bar.
- cut(float, float)
Threshold on the convolved intensity map, to get the segmentation image.
- plotAGroup(ax=None, group_id=None, cmap='Greys', **kwargs)[source]¶
Plot a group, with sources positions and contour of the label image.
- Parameters
- axmatplotlib axis
Axis to use for the plot.
- group_idint
Group id.
- cmapstr
Colormap for the image plot.
- kwargsdict
Passed to Image.plot.
- plotGroups(ax=None, groups=None, linewidth=1)[source]¶
Plot the segmentation map and groups.
- Parameters
- axmatplotlib axis
Axis to use for the plot.
- groupslist
List of groups.
- plotHistArea(ax=None, nbins=None)[source]¶
Plot histogram of group areas.
- Parameters
- axmatplotlib axis
Axis to use for the plot.
- nbinsstr or int
Number of bins for
matplotlib.pyplot.hist.