Section author: Robert Nikutta <robert.nikutta@noirlab.edu>
Version: 20220215
1.5.4. Helpers¶
Data Lab provides several convenient helper modules for use e.g. in Jupyter Notebooks & JupyterLab. They can simplify some of the more tedious or repetitive tasks that one would perform with Data Lab.
This collection is ever-evolving, and we welcome user suggestions for other helper functionalities.
1.5.4.1. Available helpers¶
The table below lists the currently available helper modules and briefly describes their function. All functions therein, and their call signatures, are described in the API documentation.
Helper module |
Description |
---|---|
|
find clusters in 2d (e.g. RA/Dec positions), compute convex hulls around clusters |
|
local (in-RAM) cross-matching of two datasets (RA/Dec positions) |
|
plot helpers, e.g. all-sky projected scatter plots |
|
utility functions, e.g. conversion of query results to various formats (pandas, ndarray, etc.) |
|
deprecated helpers; may still be used by some older notebooks |
|
alias that loads all of the above |
1.5.4.2. Importing¶
There are various ways to import either a single helper module, a function from a helper, or all helpers at once:
Import a single helper module:
1from dl.helpers import cluster
2result = cluster.findClusters(...) # use a function from the helper
Import one function from a helper module:
1from dl.helpers.cluster import findClusters
2result = findClusters(...)
Import all functions from all helper modules at once:
1from dl.helpers import all # `all` is a convenience module; loads all others
2result = findClusters(...) # use a function