Skip to content

Commit

Permalink
docs updated. added apps docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pravirkr committed Feb 26, 2022
1 parent 2fc514d commit d4980d6
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 9 deletions.
8 changes: 8 additions & 0 deletions docs/api/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ sigpyproc.core.stats
:undoc-members:
:show-inheritance:

sigpyproc.core.rfi
--------------------

.. automodule:: sigpyproc.core.rfi
:members:
:undoc-members:
:show-inheritance:


sigpyproc.core.kernels
----------------------
Expand Down
8 changes: 8 additions & 0 deletions docs/api/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@ sigpyproc.io.fileio
:members:
:undoc-members:
:show-inheritance:

sigpyproc.io.pfits
-------------------

.. automodule:: sigpyproc.io.pfits
:members:
:undoc-members:
:show-inheritance:
18 changes: 18 additions & 0 deletions docs/cmd.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Command line utilities
======================

.. click:: sigpyproc.apps.spp_header:main
:prog: spp_header
:nested: full

.. click:: sigpyproc.apps.spp_decimate:main
:prog: spp_decimate
:nested: full

.. click:: sigpyproc.apps.spp_extract:main
:prog: spp_extract
:nested: full

.. click:: sigpyproc.apps.spp_clean:main
:prog: spp_clean
:nested: full
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"myst_nb",
"sphinx_click",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Contents
:caption: User Guide

install
cmd
modules
dev
changes
Expand Down
3 changes: 3 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ Some of the required dependencies are:
- `astropy <https://www.astropy.org>`_
- `numba <https://numba.pydata.org>`_
- `bottleneck <https://bottleneck.readthedocs.io>`_
- `h5py <https://docs.h5py.org/en/stable/>`_
- `attrs <https://attrs.org>`_
- `rich <https://rich.readthedocs.io>`_
- `click <https://click.palletsprojects.com/en/latest/>`_
- `iqrm <https://github.com/v-morello/iqrm>`_


.. _source:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ docs =
sphinx>=4.4.0
sphinx-book-theme>=0.2.0
myst-nb
sphinx-click

develop =
wemake-python-styleguide
Expand Down
2 changes: 1 addition & 1 deletion sigpyproc/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ def clean_rfi(
Returns
-------
tuple[str, RFIMask]
tuple(str, :class:`~sigpyproc.core.rfi.RFIMask`)
Filename and mask of cleaned data
Raises
Expand Down
2 changes: 1 addition & 1 deletion sigpyproc/core/rfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def double_mad_mask(array: npt.ArrayLike, threshold: float = 3) -> np.ndarray:
Returns
-------
numpy.ndarray
:py:obj:`~numpy.ndarray`
The mask for the array.
Raises
Expand Down
4 changes: 2 additions & 2 deletions sigpyproc/core/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def zscore_mad(array: npt.ArrayLike) -> np.ndarray:
Returns
-------
numy.ndarray
:py:obj:`~numpy.ndarray`
The modified z-score of the array.
Notes
Expand Down Expand Up @@ -95,7 +95,7 @@ def zscore_double_mad(array: npt.ArrayLike) -> np.ndarray:
Returns
-------
numy.ndarray
:py:obj:`~numpy.ndarray`
The modified z-score of the array.
Notes
Expand Down
6 changes: 3 additions & 3 deletions sigpyproc/io/pfits.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def location(self) -> EarthLocation:

@property
def receiver(self) -> Receiver:
"""sigpyproc.io.hdu.Receiver: Receiver information."""
""":class:`~sigpyproc.io.hdu.Receiver`: Receiver information."""
return Receiver(
name=self.header["FRONTEND"],
nrcvr=self.header["NRCVR"],
Expand All @@ -136,7 +136,7 @@ def receiver(self) -> Receiver:

@property
def backend(self) -> Backend:
"""sigpyproc.io.hdu.Backend: Backend information."""
""":class:`~sigpyproc.io.hdu.Backend`: Backend information."""
return Backend(
name=self.header["BACKEND"],
phase=self.header["BE_PHASE"],
Expand Down Expand Up @@ -165,7 +165,7 @@ def date_obs(self) -> Time:

@property
def freqs(self) -> FrequencyChannels:
"""sigpyproc.utils.FrequencyChannels: Frequency channels."""
""":class:`~sigpyproc.utils.FrequencyChannels`: Frequency channels."""
return FrequencyChannels.from_pfits(
self.header["OBSFREQ"], self.header["OBSBW"], self.header["OBSNCHAN"]
)
Expand Down
4 changes: 2 additions & 2 deletions sigpyproc/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ def __init__(self, filename: str) -> None:

@property
def pri_hdr(self) -> pfits.PrimaryHdr:
""":class:`~sigpyproc.io.hdu.PFITSPrimaryHdr`: Primary header of input file."""
""":class:`~sigpyproc.io.pfits.PrimaryHdr`: Primary header of input file."""
return self._fitsfile.pri_hdr

@property
def sub_hdr(self) -> pfits.SubintHdr:
""":class:`~sigpyproc.io.hdu.PFITSSubintHdr`: Subint header of input file."""
""":class:`~sigpyproc.io.pfits.SubintHdr`: Subint header of input file."""
return self._fitsfile.sub_hdr

@property
Expand Down

0 comments on commit d4980d6

Please sign in to comment.