Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-15872: Incorporate AP documentation into pipelines.lsst.io #29

Merged
merged 2 commits into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions doc/SConscript

This file was deleted.

31 changes: 0 additions & 31 deletions doc/ap_association/index.rst

This file was deleted.

Empty file removed doc/doxygen.conf.in
Empty file.
1 change: 0 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ ap_association documentation preview
.. toctree::
:maxdepth: 1

ap_association/index
lsst.ap.association/index
31 changes: 27 additions & 4 deletions doc/lsst.ap.association/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
.. py:currentmodule:: lsst.ap.association

.. _lsst.ap.association:

###################
lsst.ap.association
###################

.. Paragraph that describes what this Python module does and links to related modules and frameworks.
The ``ap_association`` package provides tools for associating DIAObjects to DIASources, persisting this association, and computing DIAObject summary statistics.

.. .. _lsst.ap.association-using:

.. Using lsst.ap.association
.. =========================

.. toctree linking to topics related to using the module's APIs.

.. .. toctree::
.. :maxdepth: 1

.. _lsst.ap.association-contributing:

Contributing
============

``lsst.ap.association`` is developed at https://github.com/lsst/ap_association.
You can find Jira issues for this module under the `ap_association <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20ap_association>`_ component.

.. If there are topics related to developing this module (rather than using it), link to this from a toctree placed here.

.. Add subsections with toctree to individual topic pages.
.. _lsst.ap.association-pyapi:

Python API reference
====================

.. automodapi:: lsst.ap.association.association
.. automodapi:: lsst.ap.association.dia_object
.. automodapi:: lsst.ap.association
:no-main-docstr:
:no-inheritance-diagram:
9 changes: 3 additions & 6 deletions doc/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Documentation manifest.

# Name of this package
# Also the name of the package documentation subdirectory.
package: "ap_association"

# List of names of Python modules in this package.
# For each module there is a corresponding module doc subdirectory.
modules:
- "lsst.ap.association"

# Name of the static content directories (subdirectories of `_static`).
# Static content directories are usually named after the package.
statics:
- "_static/ap_association"
# Most packages do not need a static content directory (leave commented out).
# statics:
# - "_static/ap_association"
22 changes: 11 additions & 11 deletions python/lsst/ap/association/afwUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ def make_minimal_dia_object_schema(filter_names=None):

Parameters
----------
filter_names : `list` of `str`s
filter_names : `list` of `str`
Names of the filters expect and compute means for.

Return
------
Returns
-------
schema : `lsst.afw.table.Schema`
Minimal schema for DIAObjects.
"""
Expand Down Expand Up @@ -79,8 +79,8 @@ def make_minimal_dia_object_schema(filter_names=None):
def make_minimal_dia_source_schema():
""" Define and create the minimal schema required for a DIASource.

Return
------
Returns
-------
schema : `lsst.afw.table.Schema`
Minimal schema for DIAObjects.
"""
Expand Down Expand Up @@ -111,9 +111,9 @@ def make_minimal_dia_source_schema():
def getCcdVisitSchemaSql():
"""Define the schema for the CcdVisit table.

Return
------
ccdVisitNames: `collections.OrderedDict`
Returns
-------
ccdVisitNames : `collections.OrderedDict`
Names of columns in the ccdVisit table.
"""
return oDict([("ccdVisitId", "INTEGER PRIMARY KEY"),
Expand All @@ -132,8 +132,8 @@ def get_ccd_visit_info_from_exposure(exposure):
"""
Extract info on the ccd and visit from the exposure.

Paramters
---------
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure to store information from.

Expand Down Expand Up @@ -205,7 +205,7 @@ def convert_dia_source_to_asssoc_schema(dia_sources,
----------
dia_sources : `lsst.afw.table.SourceCatalog`
Input source catalog to alias and overwrite values of.
obj_ids: array-like of `int`
obj_ids : array-like of `int`
DIAObject ids to associate with the input DIASources. Overwrites
the current value in diaObjectId column. If None the obj_id no action
is taken. The array should be the same length as dia_sources.
Expand Down
16 changes: 8 additions & 8 deletions python/lsst/ap/association/assoc_db_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def load_dia_sources(self, dia_obj_ids):

Parameters
----------
dia_obj_ids : array-like of `int`s
dia_obj_ids : array-like of `int`
Id of the DIAObject that is associated with the DIASources
of interest.

Expand Down Expand Up @@ -375,7 +375,7 @@ def store_dia_sources(self,
----------
dia_sources : `lsst.afw.table.SourceCatalog`
Catalog of DIASources to store.
associated_ids : array-like of `int`s (optional)
associated_ids : array-like of `int` (optional)
DIAObject ids that have been associated with these DIASources
exposure : `lsst.afw.image.Exposure`
Exposure object the DIASources were detected in.
Expand All @@ -388,8 +388,8 @@ def store_dia_sources(self,
def store_ccd_visit_info(self, exposure):
"""Store information describing the exposure for this ccd, visit.

Paramters
---------
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure to store information from.
"""
Expand All @@ -410,7 +410,7 @@ def _get_dia_object_catalog(self, indexer_indices, bbox, wcs):

Parameters
----------
indexer_indices : array-like of `int`s
indexer_indices : array-like of `int`
Pixelized indexer indices from which to load.
bbox : `lsst.geom.Box2D`
Bounding box of exposure.
Expand Down Expand Up @@ -442,7 +442,7 @@ def _query_dia_objects(self, indexer_indices):

Parameters
----------
indexer_indices : array-like of `int`s
indexer_indices : array-like of `int`
Spatial indices in the indexer specifying the area on the sky
to load DIAObjects for.

Expand Down Expand Up @@ -500,7 +500,7 @@ def _query_dia_sources(self, dia_object_ids):

Parameters
----------
dia_object_ids : array-like of `int`s
dia_object_ids : array-like of `int`
Spatial indices in the indexer specifying the area on the sky
to load DIAObjects for.

Expand Down Expand Up @@ -541,7 +541,7 @@ def _store_catalog(self, source_catalog, converter, obj_ids=None, exposure=None)
converter : `lsst.ap.association.SqliteDBConverter`
A converter object specifying the correct database table to write
into.
obj_id : array-like of `int`s (optional)
obj_id : array-like of `int` (optional)
Ids of the DIAObjects these objects are associated with. Use only
when storing DIASources.
exposure : `lsst.afw.image.Exposure` (optional)
Expand Down
22 changes: 12 additions & 10 deletions python/lsst/ap/association/association.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def associate_sources(self, dia_objects, dia_sources):

Returns
-------
updated_ids: array-like of `int`s
updated_ids : array-like of `int`
Ids of the DIAObjects that the DIASources associated to including
the ids of newly created DIAObjects.
"""
Expand All @@ -185,7 +185,7 @@ def update_dia_objects(self, dia_objects, updated_obj_ids, exposure):
dia_objects : `lsst.afw.table.SourceCatalog`
Pre-existing/loaded DIAObjects to copy values that are not updated
from.
updated_obj_ids : array-like of `int`s
updated_obj_ids : array-like of `int`
Ids of the dia_objects that should be updated.
exposure : `lsst.afw.image.Exposure`
Input exposure representing the region of the sky the dia_sources
Expand Down Expand Up @@ -254,11 +254,12 @@ def score(self, dia_objects, dia_sources, max_dist):
Results struct with components:

- ``scores``: array of floats of match quality updated DIAObjects
(array-like of `float`s).
(array-like of `float`).
- ``obj_idxs``: indexes of the matched DIAObjects in the catalog.
(array-like of `int`s)
(array-like of `int`)
- ``obj_ids``: array of floats of match quality updated DIAObjects
(array-like of `int`s).
(array-like of `int`).

Default values for these arrays are
INF, -1, and -1 respectively for unassociated sources.
"""
Expand Down Expand Up @@ -328,11 +329,12 @@ def match(self, dia_objects, dia_sources, score_struct):
Results struct with components:

- ``scores``: array of floats of match quality
updated DIAObjects (array-like of `float`s).
updated DIAObjects (array-like of `float`).
- ``obj_ids``: array of floats of match quality
updated DIAObjects (array-like of `ints`s).
updated DIAObjects (array-like of `int`).
- ``obj_idxs``: indexes of the matched DIAObjects in the catalog.
(array-like of `int`s)
(array-like of `int`)

Default values for these arrays are
INF, -1 and -1 respectively for unassociated sources.

Expand All @@ -342,7 +344,7 @@ def match(self, dia_objects, dia_sources, score_struct):
Results struct with components:

- ``updated_and_new_dia_object_ids`` : ids of new and updated
dia_objects as the result of association. (`list` of `int`s).
dia_objects as the result of association. (`list` of `int`).
- ``n_updated_dia_objects`` : Number of previously know dia_objects
with newly associated DIASources. (`int`).
- ``n_new_dia_objects`` : Number of newly created DIAObjects from
Expand Down Expand Up @@ -406,7 +408,7 @@ def _add_association_meta_data(self, match_result):
Results struct with components:

- ``updated_and_new_dia_object_ids`` : ids new and updated
dia_objects in the collection (`list` of `int`s).
dia_objects in the collection (`list` of `int`).
- ``n_updated_dia_objects`` : Number of previously know dia_objects
with newly associated DIASources. (`int`).
- ``n_new_dia_objects`` : Number of newly created DIAObjects from
Expand Down
6 changes: 3 additions & 3 deletions python/lsst/ap/association/l1dbproto.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def load_dia_sources(self, dia_obj_ids):

Parameters
----------
dia_obj_ids : array-like of `int`s
dia_obj_ids : array-like of `int`
Id of the DIAObject that is associated with the DIASources
of interest.

Expand All @@ -215,7 +215,7 @@ def store_dia_objects(self,
compute_spatial_index : `bool`
If True, compute the spatial search indices using the
indexer specified at class instantiation.
exposure: `lsst.afw.image.Exposure` (optional)
exposure : `lsst.afw.image.Exposure` (optional)
CcdExposure associated with these DIAObjects being inserted.
Inserts the CcdVisitInfo for this exposure in the CcdVisitTable.
"""
Expand Down Expand Up @@ -254,7 +254,7 @@ def store_dia_sources(self,
----------
dia_sources : `lsst.afw.table.SourceCatalog`
Catalog of DIASources to store.
associated_ids : array-like of `int`s (optional)
associated_ids : array-like of `int` (optional)
DIAObject ids that have been associated with these DIASources
exposure : `lsst.afw.image.Exposure`
Exposure object the DIASources were detected in.
Expand Down