From 48afbfe72efa4abc6c15fc8d02e3ab23aaa7f5ed Mon Sep 17 00:00:00 2001 From: Simon Torres Date: Thu, 18 Jul 2019 13:53:14 -0400 Subject: [PATCH] Included change history, license. Minimized README. Increased version from 0.2.0 to 0.3.0 --- CHANGES.rst | 17 +++++-- README.md | 100 +-------------------------------------- docs/index.rst | 6 +++ docs/install.rst | 13 +++-- docs/usingit.rst | 3 ++ goodman_focus/version.py | 2 +- setup.cfg | 2 +- 7 files changed, 34 insertions(+), 109 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index c7f20cd..df301d5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,11 +1,18 @@ -0.2.1 (Unreleased) -================== -- Created dedicated documentation for rtd -- Fixed bug where return was missing +.. _v0.3.0: + +0.3.0 +===== + +- Created dedicated documentation for readthedocs. +- Fixed bug where return was missing, - GoodmanFocus need to be instantiated only once [#19] +- Calling instance of GoodmanFocus can receive a list of files as input [#19] - Argument --file-pattern is now actually used in file selection [#18] -- Eliminated some warnings +- Eliminated some warnings. +- Included plots in documentation. + +.. _v0.2.0: 0.2.0 ===== diff --git a/README.md b/README.md index cd2fdf3..64c2ac9 100644 --- a/README.md +++ b/README.md @@ -10,105 +10,9 @@ Finds the best focus for one or more focus sequences. -## How to Install +# Documentation -This tool requires python `3.6` at least to work. It will not install with `3.5`. - -We recommend using [astroconda](https://astroconda.readthedocs.io/en/latest/) since it is easier. - -### Using PYPI - -Create a virtual environment using `conda` and specify python version `3.6`. -```bash -conda create -n goodman_focus python=3.6 -``` - -Install using `pip` -```bash -pip install goodman-focus -``` - -### Using github - -Clone the latest version using: - -```bash -git clone https://github.com/soar-telescope/goodman_focus.git -``` - -Move into the new directory -```bash -cd goodman_focus -``` - -Create a virtual environment using the `environment.yml` file and activate it. -```bash -conda env create python=3.6 -f environment.yml - -conda activate goodman_focus - -``` - -Install using `pip` -```bash -pip install . -``` -## How to use it - -### From terminal - -There is an automatic script that will obtain focus from a folder containing -a focus sequence. - -If you have `fits` files you can simply run. - -```bash -goodman-focus -``` - -It will run with the following defaults: - -```text ---data-path: (Current Working Directory) ---file-pattern: *fits ---obstype: FOCUS ---features-model: gaussian ---debug: (not activated) - -``` - -To get some help and a full list of options use: - -```bash -goodman-focus -h -``` - -### In other code - -After installing using pip you can also import the class and instatiate it -providing a list of arguments and values. - -```python -from goodman_focus.goodman_focus import GoodmanFocus -``` - -If no argument is provided it will run with the default values. - -The list of arguments can be defined as follow: - -```python -arguments = ['--data-path', '/provide/some/path', - '--file-pattern', '*.fits', - '--obstype', 'FOCUS', - '--features-model', 'gaussian', - '--debug'] -``` - - -``--features-model`` is the function/model to fit to each detected line. -``gaussian`` will use a ```Gaussian1D``` which provide more consistent results. -and ``moffat`` will use a ```Moffat1D``` model which fits the profile better but -is harder to control and results are less consistent than when using a gaussian. +All the documentation is maintained in https://goodman.readthedocs.io/projects/focus/en/latest/ # Found a problem? diff --git a/docs/index.rst b/docs/index.rst index 241309e..6d0db1e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -48,6 +48,12 @@ We recommend using `astroconda `_ :caption: Contents: +.. toctree:: + :maxdepth: 2 + :caption: About + + changes + Indices and tables ================== diff --git a/docs/install.rst b/docs/install.rst index d237400..04c5c5b 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -1,7 +1,12 @@ +.. note:: + + We recommend using a virtual environment management system such as + `astroconda `_ + .. _`Installing with PIP`: -Using PYPI -########## +Install Using PYPI +################## Create a virtual environment using `conda` and specify python version `3.6`. @@ -11,8 +16,8 @@ Install using `pip` ``pip install goodman-focus`` -Using GitHub -############ +Install Using GitHub +#################### Clone the latest version using: diff --git a/docs/usingit.rst b/docs/usingit.rst index 6110e3d..bbe89a8 100644 --- a/docs/usingit.rst +++ b/docs/usingit.rst @@ -82,6 +82,9 @@ Finally you need to call the instance, here is a full example. results = goodman_focus() +However since version :ref:`v0.3.0` you can pass a list of files and all will only check that all files exists + + Interpreting Results #################### diff --git a/goodman_focus/version.py b/goodman_focus/version.py index 880ae93..f71451d 100644 --- a/goodman_focus/version.py +++ b/goodman_focus/version.py @@ -1,2 +1,2 @@ # This is an automatic generated file please do not edit -__version__ = '0.2.1' \ No newline at end of file +__version__ = '0.3.0' \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 3ead780..8b2bfd8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,4 +32,4 @@ install_requires = sphinx>=2.1.2 # version should be PEP440 compatible (http://www.python.org/dev/peps/pep-0440) -version = 0.2.1 +version = 0.3.0