Skip to content

Commit

Permalink
Merge pull request #6 from Athanaseus/Prepare-release
Browse files Browse the repository at this point in the history
Prepare release
  • Loading branch information
Athanaseus authored Jan 29, 2018
2 parents 39d23f7 + 5e09818 commit c531d84
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 22 deletions.
14 changes: 0 additions & 14 deletions README.md

This file was deleted.

61 changes: 61 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
=======
aimfast
=======
|Doc Status|
|Pypi Version|
|Python Versions|

aimfast is an Astronomical Image Fidelity Assessment Tool

Main website: https://aimfast.readthedocs.io

==============
Introduction
==============

Image fidelity is a measure of the accuracy of the reconstructed sky brightness distribution. A related metric, dynamic range, is a measure of the degree to which imaging artifacts around strong sources are suppressed, which in turn implies a higher fidelity of the on-source reconstruction. Moreover, the choice of image reconstruction algorithm also affects the correctness of the on-source brightness distribution. For high dynamic ranges with wide bandwidths, algorithms that model the sky spectrum as well as the average intensity can yield more accurate reconstructions.

==============
Installation
==============
Installation from source_,
working directory where source is checked out

.. code-block:: bash
$ pip install .
This package is available on *PYPI*, allowing

.. code-block:: bash
$ pip install aimfast
=======
License
=======

This project is licensed under the GNU General Public License v3.0 - see license_ for details.

=============
Contribute
=============

Contributions are always welcome! Please ensure that you adhere to our coding
standards pep8_.

.. |Doc Status| image:: https://readthedocs.org/projects/aimfast/badge/?version=latest
:target: http://aimfast.readthedocs.io/en/latest
:alt:

.. |Pypi Version| image:: https://img.shields.io/pypi/v/aimfast.svg
:target: https://pypi.python.org/pypi/aimfast
:alt:

.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/aimfast.svg
:target: https://pypi.python.org/pypi/aimfast/
:alt:

.. _source: https://github.com/Athanaseus/aimfast
.. _license: https://github.com/Athanaseus/aimfast/blob/master/LICENSE
.. _pep8: https://www.python.org/dev/peps/pep-0008
4 changes: 2 additions & 2 deletions aimfast/aimfast.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def main():
R = '\033[31m' # red
W = '\033[0m' # white (normal)
print("%sPlease provide fits file name(s)."
"\nOr\nimage_fidelity -h for arguments%s" % (R, W))
"\nOr\naimfast -h for arguments%s" % (R, W))
else:
json_dump(output_dict)
print output_dict
print(output_dict)
23 changes: 17 additions & 6 deletions doc/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ and

.. math::
VARIANCE = \sum_{i=1}^{n}(x_{i} - \overline{x})^2
VARIANCE = \frac{1}{n}\sum_{i=1}^{n}(x_{i} - \overline{x})^2
whereby

Expand All @@ -77,7 +77,7 @@ The coefficient of skewness, the 3-rd moment, is obtained by
SKEWNESS = \frac{m_3}{{m_2}^{\frac{3}{2}}}
If there is a long tail in the positive directin, skewness will be positive,
If there is a long tail in the positive direction, skewness will be positive,
while if there is a long tail in the negative direction, skewness will be negative.

.. figure:: https://user-images.githubusercontent.com/16665629/35336554-7ce4953e-0121-11e8-8a14-ce1fbf3eece4.jpg
Expand Down Expand Up @@ -114,25 +114,36 @@ Installation from source_, working directory where source is checked out
$ pip install .
This package is available on *PYPI*, allowing

.. code-block:: bash
$ pip install aimfast
Command line usage
------------------

Get the four (4) statistical moments of the residual image

.. code-block:: bash
$ image_fidelity --residual-image cube.residual.fits
$ aimfast --residual-image cube.residual.fits
Get the dynamic range of the restored image
Get the dynamic range of the restored image, where argument -af is the multiplying factor of the peak source area

.. code-block:: bash
$ image_fidelity --restored-image cube.image.fits -af 5
$ aimfast --restored-image cube.image.fits -af 5
Get combination of the four (4) moments and dynamic range

.. code-block:: bash
$ image_fidelity --residual-image cube.residual.fits --restored-image cube.image.fits -af 5
$ aimfast --residual-image cube.residual.fits --restored-image cube.image.fits -af 5
NB: Outputs will be printed on the terminal and dumped into `fidelity_results.json` file.

.. code-block:: bash
$ cat fidelity_results.json
$ {"cube.residual.fits": {"SKEW": 0.124, "KURT": 3.825, "STDDev": 5.5e-05, "MEAN": 4.747e-07}, "cube.image.fits": {"DR": 53.868}}

0 comments on commit c531d84

Please sign in to comment.