Skip to content

Commit

Permalink
Included change history, license. Minimized README. Increased version…
Browse files Browse the repository at this point in the history
… from 0.2.0 to 0.3.0
  • Loading branch information
Simon Torres committed Jul 18, 2019
1 parent 904d934 commit 48afbfe
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 109 deletions.
17 changes: 12 additions & 5 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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
=====
Expand Down
100 changes: 2 additions & 98 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
6 changes: 6 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ We recommend using `astroconda <https://astroconda.readthedocs.io/en/latest/>`_
:caption: Contents:


.. toctree::
:maxdepth: 2
:caption: About

changes


Indices and tables
==================
Expand Down
13 changes: 9 additions & 4 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.. note::

We recommend using a virtual environment management system such as
`astroconda <https://astroconda.readthedocs.io/en/latest/>`_

.. _`Installing with PIP`:

Using PYPI
##########
Install Using PYPI
##################

Create a virtual environment using `conda` and specify python version `3.6`.

Expand All @@ -11,8 +16,8 @@ Install using `pip`

``pip install goodman-focus``

Using GitHub
############
Install Using GitHub
####################

Clone the latest version using:

Expand Down
3 changes: 3 additions & 0 deletions docs/usingit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
####################

Expand Down
2 changes: 1 addition & 1 deletion goodman_focus/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This is an automatic generated file please do not edit
__version__ = '0.2.1'
__version__ = '0.3.0'
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 48afbfe

Please sign in to comment.