diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 44d48d9c..9c8d6090 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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 @@ -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 @@ -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) diff --git a/.gitignore b/.gitignore index 3bc9f118..c1e95b49 100644 --- a/.gitignore +++ b/.gitignore @@ -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/* diff --git a/docs/_file_suffixes.rst b/docs/_file_suffixes.rst index f06421b4..f3fac557 100644 --- a/docs/_file_suffixes.rst +++ b/docs/_file_suffixes.rst @@ -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 \ No newline at end of file +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 diff --git a/docs/_install_dcr.rst b/docs/_install_dcr.rst index c29d1e80..0648e0d0 100644 --- a/docs/_install_dcr.rst +++ b/docs/_install_dcr.rst @@ -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 - ``/goodman_pipeline/goodman_pipeline/data/dcr-source/dcr/`` + ``/goodman_pipeline/goodman_pipeline/data/dcr_source/dcr/`` ``goodman_pipeline-`` is the folder that will be created once you untar or unzip the latest release of the |pipeline name|. @@ -38,7 +38,7 @@ Compiling DCR Compiling ``dcr`` is actually very simple. - ``cd /goodman_pipeline/goodman_pipeline/data/dcr-source/dcr/`` + ``cd /goodman_pipeline/goodman_pipeline/data/dcr_source/dcr/`` Then simply type: diff --git a/docs/conf.py b/docs/conf.py index a53eb39a..0bbc8496 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,7 +39,7 @@ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.intersphinx', - 'sphinxcontrib.napoleon'] + 'sphinx.ext.napoleon'] intersphinx_mapping = { @@ -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. diff --git a/environment.yml b/environment.yml index bed43dbe..091a4347 100644 --- a/environment.yml +++ b/environment.yml @@ -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 diff --git a/goodman_pipeline/core/core.py b/goodman_pipeline/core/core.py index 61c8ae35..d6caf652 100644 --- a/goodman_pipeline/core/core.py +++ b/goodman_pipeline/core/core.py @@ -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 diff --git a/goodman_pipeline/data/dcr-source/README.md b/goodman_pipeline/data/dcr_source/README.md similarity index 100% rename from goodman_pipeline/data/dcr-source/README.md rename to goodman_pipeline/data/dcr_source/README.md diff --git a/goodman_pipeline/data/dcr-source/dcr/dcr.c b/goodman_pipeline/data/dcr_source/dcr/dcr.c similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/dcr.c rename to goodman_pipeline/data/dcr_source/dcr/dcr.c diff --git a/goodman_pipeline/data/dcr-source/dcr/dcr.h b/goodman_pipeline/data/dcr_source/dcr/dcr.h similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/dcr.h rename to goodman_pipeline/data/dcr_source/dcr/dcr.h diff --git a/goodman_pipeline/data/dcr-source/dcr/dcr.par b/goodman_pipeline/data/dcr_source/dcr/dcr.par similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/dcr.par rename to goodman_pipeline/data/dcr_source/dcr/dcr.par diff --git a/goodman_pipeline/data/dcr-source/dcr/makefile b/goodman_pipeline/data/dcr_source/dcr/makefile similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/makefile rename to goodman_pipeline/data/dcr_source/dcr/makefile diff --git a/goodman_pipeline/data/dcr-source/dcr/pfitshead.c b/goodman_pipeline/data/dcr_source/dcr/pfitshead.c similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/pfitshead.c rename to goodman_pipeline/data/dcr_source/dcr/pfitshead.c diff --git a/goodman_pipeline/data/dcr-source/dcr/pfitshead.h b/goodman_pipeline/data/dcr_source/dcr/pfitshead.h similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/pfitshead.h rename to goodman_pipeline/data/dcr_source/dcr/pfitshead.h diff --git a/goodman_pipeline/data/dcr-source/dcr/pfitsin.c b/goodman_pipeline/data/dcr_source/dcr/pfitsin.c similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/pfitsin.c rename to goodman_pipeline/data/dcr_source/dcr/pfitsin.c diff --git a/goodman_pipeline/data/dcr-source/dcr/pfitsin.h b/goodman_pipeline/data/dcr_source/dcr/pfitsin.h similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/pfitsin.h rename to goodman_pipeline/data/dcr_source/dcr/pfitsin.h diff --git a/goodman_pipeline/data/dcr-source/dcr/pfitsio.c b/goodman_pipeline/data/dcr_source/dcr/pfitsio.c similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/pfitsio.c rename to goodman_pipeline/data/dcr_source/dcr/pfitsio.c diff --git a/goodman_pipeline/data/dcr-source/dcr/pfitsio.h b/goodman_pipeline/data/dcr_source/dcr/pfitsio.h similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/pfitsio.h rename to goodman_pipeline/data/dcr_source/dcr/pfitsio.h diff --git a/goodman_pipeline/data/dcr-source/dcr/swap.c b/goodman_pipeline/data/dcr_source/dcr/swap.c similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/swap.c rename to goodman_pipeline/data/dcr_source/dcr/swap.c diff --git a/goodman_pipeline/data/dcr-source/dcr/swap.h b/goodman_pipeline/data/dcr_source/dcr/swap.h similarity index 100% rename from goodman_pipeline/data/dcr-source/dcr/swap.h rename to goodman_pipeline/data/dcr_source/dcr/swap.h diff --git a/goodman_pipeline/version.py b/goodman_pipeline/version.py index cb14e6bd..c3bb1098 100644 --- a/goodman_pipeline/version.py +++ b/goodman_pipeline/version.py @@ -1,2 +1,2 @@ # This is an automatic generated file please do not edit -__version__ = '1.3.6' \ No newline at end of file +__version__ = '1.3.7' \ No newline at end of file diff --git a/install_dcr.sh b/install_dcr.sh index 1b0b2ae5..ffc29144 100755 --- a/install_dcr.sh +++ b/install_dcr.sh @@ -1,6 +1,6 @@ #!/bin/bash -SOURCE_DIR=$(pwd)/goodman_pipeline/data/dcr-source/dcr +SOURCE_DIR=$(pwd)/goodman_pipeline/data/dcr_source/dcr @@ -10,8 +10,8 @@ then echo 'You do not have any virtual environment activated' else - ENV_NAME=$(conda info | grep 'active environment' | sed 's/\//g' | sed "s/[: ]//g") - ENV_PATH=$(conda info | grep 'active env location' | sed 's/\//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 ] diff --git a/setup.cfg b/setup.cfg index ad69c0f6..ddfd28de 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/setup.py b/setup.py index c49fa10f..caa5c8ed 100644 --- a/setup.py +++ b/setup.py @@ -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/*']}, diff --git a/travis_install_dcr.sh b/travis_install_dcr.sh index f1909505..4bb9f90b 100755 --- a/travis_install_dcr.sh +++ b/travis_install_dcr.sh @@ -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