Skip to content

Commit

Permalink
Merge pull request #246 from simontorres/documentation_updates
Browse files Browse the repository at this point in the history
Documentation updates, also changed dcr installation
  • Loading branch information
Simon Torres committed Oct 18, 2018
2 parents b6412e3 + b2165f3 commit f53982f
Show file tree
Hide file tree
Showing 26 changed files with 263 additions and 182 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ branches:
- master
- development

before_install:
- ./install_dcr.sh
# before_install:
# - ./install_dcr.sh


install:
- export PATH="$PATH:$HOME/build/soar-telescope/goodman_pipeline/dcrbin"
# - export PATH="$PATH:$HOME/build/soar-telescope/goodman_pipeline/dcrbin"

- sudo apt-get update

Expand All @@ -40,8 +40,8 @@ install:
- source activate goodman_pipeline

# install
- python setup.py test
- python setup.py install
- python setup.py test

script:
- pytest
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ If you wish to know more about the instrument please check the
If you are having trouble operating the Goodman Pipeline we suggest the following
procedure.

* Check [existing issues](https://github.com/soar-telescope/goodman/issues) or
open a [new Issue](https://github.com/soar-telescope/goodman/issues/new) on GitHub.
* Check [existing issues](https://github.com/soar-telescope/goodman_pipeline/issues) or
open a [new Issue](https://github.com/soar-telescope/goodman_pipeline/issues/new) on GitHub.

## Development Team

Expand Down
93 changes: 93 additions & 0 deletions docs/_install_dcr.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
.. _dcr:

Installing DCR
**************

.. admonition:: Acknowledgement Note

Please cite: Pych, W., 2004, PASP, 116, 148

In terms of cosmic ray rejection we shifted to a non-python package because the
results were much better compared to LACosmic's implementation in Astropy.
LACosmic was not designed to work with spectroscopy. Though since version
:ref:`1.1.0 <v1.1.0>` we shifted from Astropy to Astroscrappy's implementation
of LACosmic.

The latest version of the Goodman Spectroscopic Pipeline uses a modified version
of ``dcr`` to help with the pipeline's workflow. It is included under

``<path_to_download_location>/goodman_pipeline/goodman_pipeline/data/dcr-source/dcr/``

``goodman_pipeline-<version>`` is the folder that will be created once you untar or unzip the latest
release of the |pipeline name|.

.. important::

The changes we made to DCR include deletion of all ``HISTORY`` and ``COMMENT`` keywords,
which we don't use in the pipeline. And addition of a couple of custom
keywords, such as: ``GSP_FNAM``, which stores the name of the file being
created. ``GSP_DCRR`` which stores the reference to the paper to cite.


You are still encouraged to visit the official
`Link <http://users.camk.edu.pl/pych/DCR/>`_. We remind again that users of the
Goodman Pipeline should cite the DCR paper with the reference indicated above.

Compiling DCR
^^^^^^^^^^^^^

Compiling ``dcr`` is actually very simple.

``cd <path_to_download_location>/goodman_pipeline/goodman_pipeline/data/dcr-source/dcr/``

Then simply type:

``make``

This will compile `dcr` and also it will create other files. The executable
binary here is ``dcr``.

We have successfully compiled *dcr* right out the box in several platforms, such as:

- Ubuntu 16.04
- Centos 7.1, 7.4
- MacOS Sierra
- Solaris 11


Installing the DCR binary
^^^^^^^^^^^^^^^^^^^^^^^^^

This is a suggested method. If you are not so sure what you are doing, we
recommend you follow the steps shown below. If you are a more advanced user and
you want to do it your own way, all you have to achieve is to have the ``dcr``
executable binary in your ``$PATH`` variable.

1. Open a terminal
2. In your home directory create a hidden directory ``.bin`` (Home directory
should be the default when you open a new terminal window)

``mkdir ~/.bin``

3. Move the binary of your choice and rename it ``dcr``. If you compiled it,
most likely it's already called ``dcr`` so you can ignore the renaming part of
this step.

``mv dcr.Ubuntu16.04 ~/.bin/dcr``

Or

``mv dcr ~/.bin/dcr``

4. Add your ``$HOME/.bin`` directory to your ``$PATH`` variable. Open the file
``.bashrc`` and add the following line.

``export PATH=$PATH:/home/myusername/.bin``

Where ``/home/myusername`` is of course your home directory.

5. Close and reopen the terminal or load the ``.bashrc`` file.

``source ~/.bashrc``

.. include:: _shortcuts.rst
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/_static/soar_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
8 changes: 5 additions & 3 deletions docs/_working_with_virtualenv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ If you know nothing about them we recommend you to start in the `Conda site <htt

For the purpose of this manual we will just say that a *Virtual Environment*
lets you have a custom set of libraries/tools in one place, and most importantly
is independent of your host system. Installation will not be discussed here but
it adds a layer of isolation from your host system. Installation will not be discussed here but
you can visit `this link <https://conda.io/docs/user-guide/tasks/manage-environments.html>`_
for information.

Here is a quick overview of the basic operations with virtual environments.

Discover what environments exist in your system.
``conda env list``

Will print a list where the first column is the name.

Activate (enter) the virtual Environment.
Activate the virtual Environment.
``source activate <venv-name>``

Where ``<venv-name>`` is the name of your virtual environment. Your shell's
Expand All @@ -29,7 +31,7 @@ Activate (enter) the virtual Environment.
``(<venv-name>) [user@hostname folder-name]$``


Deactivate (leave) the virtual environment.
Deactivate the virtual environment.
``source deactivate``

This time the prompt will change again to:
Expand Down
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@

html_theme = 'sphinx_rtd_theme'

html_logo = '_static/soar_logo.png'

html_context = {'license': 'BSD 3-Clause License'}

# Theme options are theme-specific and customize the look and feel of a theme
Expand Down

0 comments on commit f53982f

Please sign in to comment.