Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykubica committed Jan 11, 2025
1 parent 7436615 commit 79f78b6
Show file tree
Hide file tree
Showing 31 changed files with 133 additions and 58 deletions.
5 changes: 5 additions & 0 deletions docs/source/api_reference/analysis/create_stamps.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: create_stamps
=====================

.. automodule:: kbmod.analysis.create_stamps
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/analysis/plotting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: plotting
================

.. automodule:: kbmod.analysis.plotting
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/analysis/visualizer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: visualizer
==================

.. automodule:: kbmod.analysis.visualizer
:members:
5 changes: 0 additions & 5 deletions docs/source/api_reference/analysis_utils.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/api_reference/fake_data/insert_fake_orbit.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/api_reference/file_utils.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/api_reference/filters/base_filter.rst

This file was deleted.

5 changes: 5 additions & 0 deletions docs/source/api_reference/filters/basic_filter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: basic_filters
=====================

.. automodule:: kbmod.filters.basic_filters
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/filters/clustering_filters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: clustering_filters
==========================

.. automodule:: kbmod.filters.clustering_filters
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/filters/known_object_filters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: known_object_filters
============================

.. automodule:: kbmod.filters.known_object_filters
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/filters/sigma_g_filter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: sigma_g_filter
======================

.. automodule:: kbmod.filters.sigma_g_filter
:members:
5 changes: 0 additions & 5 deletions docs/source/api_reference/filters/stats_filters.rst

This file was deleted.

22 changes: 17 additions & 5 deletions docs/source/api_reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ Object Search
configuration
run_search_referenceapi
search_referenceapi
results
trajectory_explorer
trajectory_generator
work_unit

Preprocessing
Expand All @@ -20,7 +22,13 @@ Preprocessing
:maxdepth: 1

image_collection
masking
standardizers/butler_standardizer
standardizers/fits_standardizer
standardizers/kbmodv1
standardizers/kbmodv05
standardizers/multi_extension_fits
standardizers/single_extension_fits
standardizers/standardizer
reprojection

Filtering Results
Expand All @@ -29,19 +37,22 @@ Filtering Results
.. toctree::
:maxdepth: 1

filters/base_filter
filters/basic_filter
filters/clustering_filters
filters/known_object_filters
filters/sigma_g_filter
filters/stamp_filters
filters/stats_filters

Analyzing Results
-----------------

.. toctree::
:maxdepth: 1

analysis_utils
analysis/create_stamps
analysis/plotting
analysis/visualizer
jointfit_functions
result_list

Miscelaneous utilities
----------------------
Expand All @@ -53,4 +64,5 @@ Miscelaneous utilities
fake_data/insert_fake_orbit
file_utils
trajectory_utils
util_functions
wcs_utils
5 changes: 0 additions & 5 deletions docs/source/api_reference/masking.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/api_reference/result_list.rst

This file was deleted.

5 changes: 5 additions & 0 deletions docs/source/api_reference/results.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: results
===============

.. automodule:: kbmod.results
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: butler_standardizer
===========================

.. automodule:: kbmod.standardizers.butler_standardizer
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/standardizers/fits_standardizer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: fits_standardizer
=========================

.. automodule:: kbmod.standardizers.fits_standardizers.fits_standardizer
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/standardizers/kbmodv05.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: kbmodv05
================

.. automodule:: kbmod.standardizers.fits_standardizers.kbmodv05
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/standardizers/kbmodv1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: kbmodv1
===============

.. automodule:: kbmod.standardizers.fits_standardizers.kbmodv1
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: multi_extension_fits
============================

.. automodule:: kbmod.standardizers.fits_standardizers.multi_extension_fits
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: single_extension_fits
=============================

.. automodule:: kbmod.standardizers.fits_standardizers.single_extension_fits
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/standardizers/standardizer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: standardizer
=====================

.. automodule:: kbmod.standardizers.standardizer
:members:
5 changes: 5 additions & 0 deletions docs/source/api_reference/trajectory_generator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Module: trajectory_generator
============================

.. automodule:: kbmod.trajectory_generator
:members:
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@
" per_distance_earth_dist_diff_geom = []\n",
"\n",
" for ra in range(min_ra, max_ra, ra_step):\n",
"\n",
" icrs_ra1 = ra # range of 0-360\n",
" icrs_dec1 = 10.0 # perhaps set this to 10.\n",
" icrs_time1 = Time(\"2023-03-20T16:00:00\", format=\"isot\", scale=\"utc\")\n",
Expand Down
26 changes: 23 additions & 3 deletions src/kbmod/analysis/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def iter_over_obj(objects):
iterates over them sorted by date-time stamp.
Parameters
-----------
----------
objects : `astropy.table.Table`
Table of objects.
Returns
--------
-------
obj : `iterator`
Iterator over individual object observations.
"""
Expand Down Expand Up @@ -316,7 +316,7 @@ def plot_cutouts(axes, cutouts, remove_extra_axes=True):
left empty are removed from the plot.
Raises
-------
------
ValueError - When number of given axes is less than
the number of given cutouts.
"""
Expand Down Expand Up @@ -560,6 +560,26 @@ def plot_result_row(row, times=None, figure=None):


def compute_lightcurve_histogram(row, min_val=0.0, max_val=1000.0, bins=20):
"""Compute a historgram from a light curve.
Parameters
----------
row : astropy Table row
The row for this results.
min_val : `float`
The minimum bin edge for the historgram.
Default: 0.0
max_val : `float`
The maximum bin edge for the historgram.
Default: 1000.0
bins : `int`
The number of bins.
Returns
-------
numpy histogram object
The histogram.
"""
psi = row["psi_curve"]
phi = row["phi_curve"]
valid = (phi != 0) & np.isfinite(psi) & np.isfinite(phi)
Expand Down
5 changes: 2 additions & 3 deletions src/kbmod/analysis/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def count_num_days(self):
self.results.table["num_days"] = num_days

def plot_daily_coadds(self, result_idx, filename=None):
"""Plots a coadded stamp for each day of valid observations for a
given result.
"""Plots a coadded stamp for each day of valid observations for a given result.
Parameters
----------
Expand All @@ -71,7 +70,7 @@ def plot_daily_coadds(self, result_idx, filename=None):
image file.
Raises
----------
------
`RuntimeError` if `num_days` or `all_stamps` are not in the
results table (i.e. not been generated with `count_num_days` or
`generate_all_stamps`).
Expand Down
12 changes: 6 additions & 6 deletions src/kbmod/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ def is_empty_value(self, colname):
is an 'empty' value (None or anything of length 0). Used to mark or
filter missing values.
Parameter
---------
Parameters
----------
colname : str
The name of the column to check.
Expand Down Expand Up @@ -590,8 +590,8 @@ def get_filtered(self, label=None):
def revert_filter(self, label=None, add_column=None):
"""Revert the filtering by re-adding filtered ResultRows.
Note
----
Notes
-----
Filtered rows are appended to the end of the list. Does not return
the results to the original ordering.
Expand Down Expand Up @@ -647,8 +647,8 @@ def revert_filter(self, label=None, add_column=None):
def write_table(self, filename, overwrite=True, cols_to_drop=(), extra_meta=None):
"""Write the unfiltered results to a single (ecsv) file.
Parameter
---------
Parameters
----------
filename : `str`
The name of the result file.
overwrite : `bool`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def resolveFromPath(cls, tgt):
`"hdulist"`` key contains the constructed `~fits.HDUList` object.
Raises
-----
------
FileNotFoundError - when file doesn't exist
"""
resources = {}
Expand Down Expand Up @@ -146,7 +146,7 @@ def resolveTarget(cls, tgt):
containing `~fits.HDUList` when ``canStandardize`` is `True`.
Raises
-----
------
FileNotFoundError - when target is path to file that doesn't exist
TypeError - when target is not HDUList or a filepath.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/kbmod/trajectory_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ def match_trajectory_sets(traj_query, traj_base, threshold, times=[0.0]):
query trajectories and base trajectories such that each trajectory is used in
at most one pair.
Note
----
Notes
-----
This function is designed to evaluate the performance of searches by determining
which true trajectories (traj_query) were found in the result set (traj_base).
Expand Down
2 changes: 1 addition & 1 deletion src/kbmod/util_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def mjd_to_day(mjd):
mjd format date.
Returns
----------
-------
A `str` with a calendar date, in the format YYYY-MM-DD.
e.g., mjd=60000 -> '2023-02-25'
"""
Expand Down

0 comments on commit 79f78b6

Please sign in to comment.