Skip to content

Commit

Permalink
Added more to docs. Also added better type hint to diagnostic.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisfish committed Apr 15, 2020
1 parent c3da56c commit 7be348c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
5 changes: 5 additions & 0 deletions docs/casgm.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
*****
CASgm
*****


.. automodule:: pawlikMorphLSST.casgm
:members:
:undoc-members:
5 changes: 5 additions & 0 deletions docs/diagnostic.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
***********
Diagnostics
***********


.. automodule:: pawlikMorphLSST.diagnostic
:members:
:undoc-members:
4 changes: 0 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ PawlikMorph-LSST's documentation!
PawlikMorph-LSST is a python package for calculating various non-parametric morphological measures of galaxies.
The code in this package is based upon/translation of `pawlikMorph <https://github.com/SEDMORPH/PawlikMorph>`_ in IDL.

.. automodule pawlikMorphLSST.main
:members:
:undoc-members:

Getting Started
===============
Expand Down
15 changes: 15 additions & 0 deletions docs/overview.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
********
Overview
********

For a given image (or folder of images), pawlikMorph-LSST will calculate a segmentation map of the galaxy of interest, subtract the sky background, then analyse the image for the following statistics:

* Gini index
* M20
* CAS
* As
* Sérsic index

There are also options to provide pawlikMorph-LSST with a star catalogue to "clean" the image of external sources, so that they do not interfere with the morphology statistics.

The overall aim of this package is to be able to analyse the images that the LSST telescope will produce.
This will involve being able to interface with the LSST data via Edinburgh's LSST servers, using LSST data Butler.

This package is based upon M. Pawlik's IDL code, and some functions are direct translations from IDL to python.
15 changes: 9 additions & 6 deletions pawlikMorphLSST/diagnostic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List
from typing import List, Type
import warnings

import numpy as np
Expand All @@ -15,6 +15,8 @@
from matplotlib.offsetbox import AnchoredText
from scipy.ndimage import gaussian_filter

from .result import Result

__all__ = ["make_figure"]


Expand Down Expand Up @@ -269,17 +271,17 @@ def make_twotwo(ax, img, modelImage, listofStarstoPlot, result):
ax.set_title("Sersic fit residual")


def make_figure(result, folder, save=False, show=False):
def make_figure(result: Type[Result], folder: bool, save=False, show=False) -> None:
'''Function plots results from image analysis.
Plots two or four images.
Top row: original image and object map with stars overplotted if any.
bottom row: Sersic fit and residual with stars overplotted if any.
Plots two or four images.
Top row: original image and object map with stars overplotted if any.
bottom row: Sersic fit and residual with stars overplotted if any.
Parameters
----------
result : Results class
result : Type[Result]
Data class container of calculated results.
folder : bool
Expand All @@ -294,6 +296,7 @@ def make_figure(result, folder, save=False, show=False):
Returns
-------
None
'''

Expand Down

0 comments on commit 7be348c

Please sign in to comment.