Skip to content

Commit

Permalink
Merge pull request #373 from simontorres/small_fixes_2023
Browse files Browse the repository at this point in the history
Small fixes 2023
  • Loading branch information
simontorres authored Oct 6, 2023
2 parents 16a7779 + 1dc85cb commit 8806796
Show file tree
Hide file tree
Showing 25 changed files with 63 additions and 34 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -30,10 +30,10 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Compile DCR Binaries
run: |
SOURCE_DIR=${{ github.workspace }}/goodman_pipeline/data/dcr-source/dcr
SOURCE_DIR=${{ github.workspace }}/goodman_pipeline/data/dcr_source/dcr
make --directory $SOURCE_DIR
chmod +x $SOURCE_DIR/dcr
echo "${{ github.workspace }}/goodman_pipeline/data/dcr-source/dcr" >> $GITHUB_PATH
echo "${{ github.workspace }}/goodman_pipeline/data/dcr_source/dcr" >> $GITHUB_PATH
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -44,7 +44,7 @@ jobs:
run: |
pytest --cov=goodman_pipeline
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
fail_ci_if_error: true # optional (default = false)
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ __pycache__/*
.ipynb_checkpoints/*
files.txt
docs/_build/*
goodman_pipeline/data/dcr-source/dcr
goodman_pipeline/data/dcr-source/*.o
goodman_pipeline/data/dcr_source/dcr
goodman_pipeline/data/dcr_source/*.o
/dev-tools/
.cache/*
.eggs/*
Expand Down
31 changes: 30 additions & 1 deletion docs/_file_suffixes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,33 @@ There are two scenarios where this can happen:
================ ========= ========================================


Assuming the two targets in `sci_file.fits` are extracted we'll end up with
Assuming the two targets in `sci_file.fits` are extracted and they are approximately at the position
400 and 600 (pixels in spatial axis), after extraction we'll end up with:

.. code-block:: bash
esci_file_target_1.fits
esci_file_target_2.fits
elamp_001_390-410.fits
elamp_001_590-610.fits
elamp_002_390-410.fits
elamp_002_590-610.fits
The default prefix for extraction is ``e`` and does not have an underscore to separate it from the
file name.

After wavelength calibration, since there are two suitable lamps and due to the fact that the
pipeline does not combine solutions, it will save two wavelength calibrated files with each one
solved by the respective lamp. Then:

.. code-block:: bash
wesci_file_target_1_ws_1.fits
wesci_file_target_1_ws_2.fits
wesci_file_target_2_ws_1.fits
wesci_file_target_2_ws_2.fits
welamp_001_390-410.fits
welamp_001_590-610.fits
welamp_002_390-410.fits
welamp_002_590-610.fits
4 changes: 2 additions & 2 deletions docs/_install_dcr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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/``
``<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|.
Expand All @@ -38,7 +38,7 @@ Compiling DCR

Compiling ``dcr`` is actually very simple.

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

Then simply type:

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'sphinx.ext.autodoc',
'sphinx.ext.mathjax',
'sphinx.ext.intersphinx',
'sphinxcontrib.napoleon']
'sphinx.ext.napoleon']


intersphinx_mapping = {
Expand Down Expand Up @@ -81,7 +81,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
16 changes: 8 additions & 8 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ dependencies:
- matplotlib
- scipy
- cython
- astropy
- pip
- pip:
- ccdproc
- coveralls
- pydata-sphinx-theme
- astroplan
- mock
- sphinx
- sphinxcontrib.napoleon
- astropy>=5.3
- ccdproc
- coveralls
- pydata-sphinx-theme
- astroplan
- mock
- sphinx
- sphinxcontrib.napoleon
2 changes: 1 addition & 1 deletion goodman_pipeline/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ def extraction(ccd,

def extract_fractional_pixel(ccd, target_trace, target_fwhm, extraction_width,
background_spacing=3):
"""Performs an spectrum extraction using fractional pixels.
"""Performs a spectrum extraction using fractional pixels.
Args:
ccd (CCDData) Instance of :class:`~astropy.nddata.CCDData` that
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion goodman_pipeline/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__ = '1.3.6'
__version__ = '1.3.7'
6 changes: 3 additions & 3 deletions install_dcr.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

SOURCE_DIR=$(pwd)/goodman_pipeline/data/dcr-source/dcr
SOURCE_DIR=$(pwd)/goodman_pipeline/data/dcr_source/dcr



Expand All @@ -10,8 +10,8 @@ then
echo 'You do not have any virtual environment activated'

else
ENV_NAME=$(conda info | grep 'active environment' | sed 's/\<active environment\>//g' | sed "s/[: ]//g")
ENV_PATH=$(conda info | grep 'active env location' | sed 's/\<active env location\>//g' | sed "s/[: ]//g")
ENV_NAME=$(conda info | grep 'active environment' | sed 's/active environment//g' | sed "s/[: ]//g")
ENV_PATH=$(conda info | grep 'active env location' | sed 's/active env location//g' | sed "s/[: ]//g")
echo "Using Virtual Environment: " $ENV_NAME
echo "Environment path information: " $ENV_PATH
if [ -d $SOURCE_DIR ]
Expand Down
12 changes: 6 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[build_docs]
source-dir = docs
build-dir = docs/_build
source_dir = docs
build_dir = docs/_build
all_files = 1

[build_sphinx]
project = 'Goodman Pipeline'
source-dir = docs
build-dir = docs/_build
source_dir = docs
build_dir = docs/_build

[upload_docs]
upload-dir = docs/_build/html
show-response = 1
upload_dir = docs/_build/html
show_response = 1

[metadata]
package_name = goodman_pipeline
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def create_version_py(packagename, version, source_dir='.'):
package_data={'goodman_pipeline': ['data/params/dcr.par',
'data/params/*.json_output',
'data/ref_comp/*fits',
'data/dcr-source/README.md',
'data/dcr-source/dcr/*',
'data/dcr_source/README.md',
'data/dcr_source/dcr/*',
'data/test_data/master_flat/*',
'data/test_data/wcs_data/*']},

Expand Down
2 changes: 1 addition & 1 deletion travis_install_dcr.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

SOURCE_DIR=$(pwd)/goodman_pipeline/data/dcr-source/dcr
SOURCE_DIR=$(pwd)/goodman_pipeline/data/dcr_source/dcr

BINARY_FOLDER=$VIRTUAL_ENV/bin

Expand Down

0 comments on commit 8806796

Please sign in to comment.