diff --git a/CITATION.rst b/CITATION.rst new file mode 100644 index 00000000..43f8f9e3 --- /dev/null +++ b/CITATION.rst @@ -0,0 +1,43 @@ +Citing ccdproc +-------------- + +If you use ccdproc for a project that leads to a publication, +whether directly or as a dependency of another package, please include +the following acknowledgment: + +.. code-block:: text + + This research made use of ccdproc, an Astropy package for + image reduction (Craig et al. 20XX). + +where (Craig et al. 20XX) is a citation to the `Zenodo record +`_ of the ccdproc version +that was used. We also encourage citations in the main text wherever +appropriate. + +For example, for ccdprpoc v1.3.0.post1 one would cite Craig et al. 2017 +with the BibTeX entry (https://zenodo.org/record/1069648/export/hx): + +.. code-block:: text + + + @misc{matt_craig_2017_1069648, + author = {Matt Craig and Steve Crawford and Michael Seifert and + Thomas Robitaille and Brigitta Sip{\H o}cz and + Josh Walawender and Z\`e Vin{\'{\i}}cius and Joe Philip Ninan and Michael Droettboom and Jiyong Youn and + Erik Tollerud and Erik Bray and + Nathan Walker and VSN Reddy Janga and + Connor Stotts and Hans Moritz G{\"u}nther and Evert Rol and + Yoonsoo P. Bach and Larry Bradley and Christoph Deil and + Adrian Price-Whelan and Kyle Barbary and Anthony Horton and + William Schoenell and Nathan Heidt and Forrest Gasdia and + Stefan Nelson and Ole Streicher}, + title = {astropy/ccdproc: v1.3.0.post1}, + month = dec, + year = 2017, + doi = {10.5281/zenodo.1069648}, + url = {https://doi.org/10.5281/zenodo.1069648} + } + +All ccdproc versions (and more citation formats) can be found at +https://doi.org/10.5281/zenodo.1069648. diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst new file mode 100644 index 00000000..d72d30d5 --- /dev/null +++ b/CODE_OF_CONDUCT.rst @@ -0,0 +1,6 @@ +Code of Conduct +=============== + +Ccdproc is an `Astropy`_ affiliated +package and we follow the `Astropy Community Code of Conduct +`_. diff --git a/docs/_static/ccdproc_banner.pdf b/docs/_static/ccdproc_banner.pdf new file mode 100644 index 00000000..17fbd927 Binary files /dev/null and b/docs/_static/ccdproc_banner.pdf differ diff --git a/docs/_static/ccdproc_banner.png b/docs/_static/ccdproc_banner.png new file mode 100644 index 00000000..e3c53d13 Binary files /dev/null and b/docs/_static/ccdproc_banner.png differ diff --git a/docs/_static/ccdproc_banner.svg b/docs/_static/ccdproc_banner.svg new file mode 100755 index 00000000..a6ba8cfc --- /dev/null +++ b/docs/_static/ccdproc_banner.svg @@ -0,0 +1,1257 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ccd + proc + + + + An Astropy image reduction package + + diff --git a/docs/api.rst b/docs/api.rst new file mode 100644 index 00000000..ecdbed7d --- /dev/null +++ b/docs/api.rst @@ -0,0 +1,11 @@ +API Reference +============= + +.. automodapi:: ccdproc + :skip: CCDData + :skip: fits_ccddata_writer + :skip: fits_ccddata_reader + +.. automodapi:: ccdproc.utils.slices + +.. _GitHub repo: https://github.com/astropy/ccdproc diff --git a/docs/ccdproc/ccddata.rst b/docs/ccddata.rst similarity index 100% rename from docs/ccdproc/ccddata.rst rename to docs/ccddata.rst diff --git a/docs/citation.rst b/docs/citation.rst new file mode 100644 index 00000000..98595164 --- /dev/null +++ b/docs/citation.rst @@ -0,0 +1,3 @@ +.. _ccdproc_citation: + +.. include:: ../CITATION.rst diff --git a/docs/conduct.rst b/docs/conduct.rst new file mode 100644 index 00000000..236ce420 --- /dev/null +++ b/docs/conduct.rst @@ -0,0 +1,3 @@ +.. _ccdproc_coc: + +.. include:: ../CODE_OF_CONDUCT.rst diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 00000000..30f4acc8 --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1,38 @@ +Reporting Issues and contributing code +====================================== + +Reporting Issues +---------------- + +If you have found a bug in ccdproc please report it by creating a +new issue on the `ccdproc GitHub issue tracker +`_. That requires +creating a `free Github account `_ if you do not +have one. + +Please include an example that demonstrates the issue and will allow the +developers to reproduce and fix the problem, if possible. You may be asked to +also provide information about your operating system and a full Python stack +trace. The developers will walk you through obtaining a stack trace if it is +necessary. + + +Contributing code +----------------- + +Like the `Astropy`_ project, `ccdproc `_ is made both by and for its +users. We accept contributions at all levels, spanning the gamut from +fixing a typo in the documentation to developing a major new feature. +We welcome contributors who will abide by the `Astropy Code of Conduct +`_. + +Ccdproc follows the same workflow and coding guidelines as +`Astropy`_. The following pages will help you get started with +contributing fixes, code, or documentation (no git or GitHub +experience necessary): + +* `How to make a code contribution `_ + +* `Coding Guidelines `_ + +* `Developer Documentation `_ diff --git a/docs/ccdproc/index.rst b/docs/getting_started.rst similarity index 73% rename from docs/ccdproc/index.rst rename to docs/getting_started.rst index 5c927f0a..254207c4 100644 --- a/docs/ccdproc/index.rst +++ b/docs/getting_started.rst @@ -1,30 +1,5 @@ -CCD Data reduction (`ccdproc`) -============================== - -Introduction ------------- - -.. note:: - `ccdproc` works only with astropy version 2.0 or later. - -The `ccdproc` package provides: - -+ An image class, `~astropy.nddata.CCDData`, that includes an uncertainty for the - data, units and methods for performing arithmetic with images including the - propagation of uncertainties. -+ A set of functions performing common CCD data reduction steps (e.g. dark - subtraction, flat field correction) with a flexible mechanism for logging - reduction steps in the image metadata. -+ A function for reprojecting an image onto another WCS, useful for stacking - science images. The actual reprojection is done by the - `reproject package `_. -+ A class for combining and/or clipping images, `~ccdproc.Combiner`, and - associated functions. -+ A class, `~ccdproc.ImageFileCollection`, for working with a directory of - images. - Getting Started ---------------- +=============== A ``CCDData`` object can be created from a numpy array (masked or not) or from a FITS file: @@ -111,24 +86,3 @@ use an `~ccdproc.image_collection.ImageFileCollection`. It constructs, given a d ... for data, fname in ic.data(imagetyp='LIGHT', return_fname=True): ... if data.mean() > 4000.: ... print(fname) - -Using `ccdproc` ---------------- - -.. toctree:: - :maxdepth: 1 - - ccddata.rst - image_combination.rst - reduction_toolbox.rst - image_management.rst - reduction_examples.rst - -.. automodapi:: ccdproc - :skip: CCDData - :skip: fits_ccddata_writer - :skip: fits_ccddata_reader - -.. automodapi:: ccdproc.utils.slices - -.. _GitHub repo: https://github.com/astropy/ccdproc diff --git a/docs/ccdproc/image_combination.rst b/docs/image_combination.rst similarity index 100% rename from docs/ccdproc/image_combination.rst rename to docs/image_combination.rst diff --git a/docs/ccdproc/image_management.rst b/docs/image_management.rst similarity index 100% rename from docs/ccdproc/image_management.rst rename to docs/image_management.rst diff --git a/docs/index.rst b/docs/index.rst index f9ac6c76..acbcd7ef 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,32 +1,71 @@ +.. the "raw" directive below is used to hide the title in favor of + just the logo being visible +.. raw:: html -================ - CCDPROC -================ + -Welcome to the ccdproc documentation! Ccdproc is is an affiliated package for -the AstroPy package for basic data reductions of CCD images. The ccdproc -package provides many of the necessary tools for processing of ccd images built -on a framework to provide error propagation and bad pixel tracking throughout -the reduction process. +======= +ccdproc +======= -Documentation -============= +.. raw:: html -The documentation for this package is here: + + +.. only:: latex + + .. image:: _static/ccdproc_banner.pdf + +**Ccdproc** is is an `Astropy`_ `affiliated package +`_ for basic data reductions +of CCD images. It provides the essential tools for processing of CCD images +in a framework that provides error propagation and bad pixel tracking +throughout the reduction process. + +.. Important:: + If you use `ccdproc`_ for a project that leads to a publication, + whether directly or as a dependency of another package, please + include an :doc:`acknowledgment and/or citation `. + +Detailed, step-by-step guide +---------------------------- + +In addition to the documentation here, a detailed guide to the topic of CCD +data reduction using ``ccdproc`` and other `astropy`_ tools is available here: +https://mwcraig.github.io/ccd-as-book/00-00-Preface + +Getting started +--------------- .. toctree:: - :maxdepth: 2 + :maxdepth: 1 - ccdproc/install.rst + install + overview + getting_started + citation + contributing + conduct + authors_for_sphinx + changelog + license + +Using `ccdproc` +--------------- .. toctree:: - :maxdepth: 3 + :maxdepth: 1 - ccdproc/index.rst + ccddata + image_combination + reduction_toolbox + image_management + reduction_examples .. toctree:: - :maxdepth: 1 + :maxdepth: 1 + + api - authors_for_sphinx - changelog - license diff --git a/docs/ccdproc/install.rst b/docs/install.rst similarity index 71% rename from docs/ccdproc/install.rst rename to docs/install.rst index 20c983f4..c7a3d24f 100644 --- a/docs/ccdproc/install.rst +++ b/docs/install.rst @@ -15,7 +15,7 @@ Ccdproc has the following requirements: - `reproject `_ One easy way to get these dependencies is to install a python distribution -like `anaconda `_. +like `anaconda`_. Installing ccdproc ================== @@ -23,25 +23,18 @@ Installing ccdproc Using pip ------------- -To install ccdproc with `pip `_, simply run:: +To install ccdproc with `pip `_, simply run:: - pip install --no-deps ccdproc - -.. note:: - - The ``--no-deps`` flag is optional, but highly recommended if you already - have Numpy installed, since otherwise pip will sometimes try to "help" you - by upgrading your Numpy installation, which may not always be desired. + pip install ccdproc Using conda ------------- -To install ccdproc with `anaconda `_, simply run:: +To install ccdproc with `anaconda`_, run:: conda install -c astropy ccdproc - Building from source ==================== @@ -52,7 +45,7 @@ Source packages ^^^^^^^^^^^^^^^ The latest stable source package for ccdproc can be `downloaded here -`_. +`_. Development repository ^^^^^^^^^^^^^^^^^^^^^^ @@ -71,7 +64,12 @@ To build ccdproc (from the root of the source tree):: To install ccdproc (from the root of the source tree):: - python setup.py install + pip install . + +To set up a development install in which changes to the source are immediately +reflected in the installed package (from the root of the source tree):: + + pip install -e . Testing a source code build of ccdproc -------------------------------------- @@ -81,3 +79,4 @@ installing ccdproc) is to run this from the root of the source tree:: python setup.py test +.. _anaconda: https://anaconda.com/ diff --git a/docs/overview.rst b/docs/overview.rst new file mode 100644 index 00000000..a135e0bb --- /dev/null +++ b/docs/overview.rst @@ -0,0 +1,21 @@ +Overview +======== + +.. note:: + `ccdproc` works only with astropy version 2.0 or later. + +The `ccdproc` package provides: + ++ An image class, `~astropy.nddata.CCDData`, that includes an uncertainty for the + data, units and methods for performing arithmetic with images including the + propagation of uncertainties. ++ A set of functions performing common CCD data reduction steps (e.g. dark + subtraction, flat field correction) with a flexible mechanism for logging + reduction steps in the image metadata. ++ A function for reprojecting an image onto another WCS, useful for stacking + science images. The actual reprojection is done by the + `reproject package `_. ++ A class for combining and/or clipping images, `~ccdproc.Combiner`, and + associated functions. ++ A class, `~ccdproc.ImageFileCollection`, for working with a directory of + images. diff --git a/docs/ccdproc/reduction_examples.rst b/docs/reduction_examples.rst similarity index 74% rename from docs/ccdproc/reduction_examples.rst rename to docs/reduction_examples.rst index 1e8e5c1c..4dcd24c3 100644 --- a/docs/ccdproc/reduction_examples.rst +++ b/docs/reduction_examples.rst @@ -1,8 +1,9 @@ -Reduction examples -================== +Reduction examples and tutorial +=============================== Here are some examples and different repositories using `ccdproc`. +* `Extended guide to image calibration using ccdproc`_ * `ipython notebook`_ * `WHT basic reductions`_ * `pyhrs`_ @@ -10,7 +11,7 @@ Here are some examples and different repositories using `ccdproc`. * `astrolib`_ * `mont4k_reduction`_ *Processes multi-image-extension FITS files* - +.. _Extended guide to image calibration using ccdproc: https://mwcraig.github.io/ccd-as-book/00-00-Preface .. _ipython notebook: http://nbviewer.ipython.org/gist/mwcraig/06060d789cc298bbb08e .. _WHT basic reductions: https://github.com/crawfordsm/wht_reduction_scripts/blob/master/wht_basic_reductions.py .. _pyhrs: https://github.com/saltastro/pyhrs diff --git a/docs/ccdproc/reduction_toolbox.rst b/docs/reduction_toolbox.rst similarity index 100% rename from docs/ccdproc/reduction_toolbox.rst rename to docs/reduction_toolbox.rst