Skip to content

Commit

Permalink
Merge branch 'develop' into s3_url_hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
profxj authored Feb 17, 2023
2 parents e2192c3 + a4777c6 commit 6878f66
Show file tree
Hide file tree
Showing 46 changed files with 1,351 additions and 239 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python: [3.8, 3.9]
python: ['3.9', '3.10']
toxenv: [test-alldeps, test-numpydev, test-linetoolsdev, test-gingadev, test-astropydev, conda]
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: develop
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
Expand Down
30 changes: 14 additions & 16 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
- release
- develop
pull_request:
schedule:
# run every Monday at 6am UTC
- cron: '0 6 * * 1'

env:
SETUP_XVFB: True # avoid issues if something tries to open a GUI window
Expand All @@ -20,13 +17,13 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python: [3.8, 3.9]
python: ['3.9', '3.10']
toxenv: [test, test-alldeps-cov, test-linetoolsdev, test-gingadev, test-astropydev, conda]
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
Expand All @@ -37,7 +34,7 @@ jobs:
tox -e ${{ matrix.toxenv }}
- name: Upload coverage to codecov
if: "contains(matrix.toxenv, '-cov')"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV }}
file: ./coverage.xml
Expand All @@ -51,13 +48,13 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
python: [3.8, 3.9]
python: ['3.9', '3.10']
toxenv: [test-alldeps]
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
Expand Down Expand Up @@ -87,9 +84,10 @@ jobs:
steps:
- name: Install base CentOS dependencies
run: |
yum update -y && yum install -y wget git gcc
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum update -y && yum install -y wget git gcc libgomp
- name: Check out repository
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install and configure miniconda
Expand All @@ -101,19 +99,19 @@ jobs:
/conda/bin/conda init
- name: Install base dependencies
run: |
source ~/.bashrc && python -m pip install --upgrade pip tox && python --version
source ~/.bashrc && python -m pip install --upgrade pip tox setuptools_scm && python --version
- name: Test with tox
run: |
source ~/.bashrc && tox -e ${{ matrix.toxenv }}
codestyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Python codestyle check
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
sphinx_rtd_theme
- (Hotfix) Fixed bug that caused crash of sensfunc routines using
telluric grids in offline processing
- (Hotfix) Fixed error when showing flats in Ginga when the fine correction is not performed
- Implemented the upgraded GTC/OSIRIS+
- (Hotfix) keymap error when displaying GUIs
- Added support for more NOT/ALFOSC grisms as well as NOT recommended standards
- Implemented the SOAR/Goodman (blue) M1 only

1.12.0 (31 Jan 2023)
--------------------
Expand All @@ -28,6 +33,9 @@
- Parse Keck/NIRES dither patterns, similar to MOSFIRE
- Introduce BitMaskArray class to ease use of bitmasks
- Fixed memory hogging by matplotlib when using version >= 3.6.1
- New docs on OneSpec
- Modify install notes to allow 3.10
- Allow for bad orders during extraction (without crashing)

1.11.0 (21 Oct 2022)
--------------------
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include setup.cfg

recursive-include pypeit *.pyx *.c *.pxd *.h
recursive-include pypeit/data *
recursive-include pypeit/tests *
recursive-include docs *
recursive-include licenses *
recursive-include cextern *
Expand Down
11 changes: 7 additions & 4 deletions doc/coadd1d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,19 @@ be provided directly using the ``coadd1dfile`` parameter in the
is ``coadd1d_<target>_<instrument name>_<YYYYMMDD>.fits`` or
``coadd1d_<target>_<instrument name>_<YYYYMMDD>-<YYYYMMDD>.fits``, if the coadd
included more than one day's worth of data. The default location of the file
will be along side the first spec1d file. Currently ``instrument_name`` is
will be along side the first spec1d file.
Currently ``instrument_name`` is
taken from the ``camera`` attribute of the relevant
:class:`~pypeit.spectrographs.spectrograph.Spectrograph` class.

The format of the 1D coadd file follows follows the general
class :class:`~pypeit.onespec.OneSpec`, such that its file extensions are:
The format of the 1D coadd file follows the general
class :class:`~pypeit.onespec.OneSpec`, such
that its file extensions are:

.. include:: include/datamodel_onespec.rst

You view the spectrum using the ``lt_xspec`` script, which loads the data
You view the spectrum using the ``lt_xspec`` script
(``pypeit_show_1dspec`` will not work), which loads the data
and launches a GUI from the `linetools`_ package. e.g.:

.. code-block:: console
Expand Down
6 changes: 4 additions & 2 deletions doc/include/spectrographs_table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ gemini_gmos_north_ham_ns :class:`~pypeit.spectrographs.gemini_gmos.GeminiGMOSNH
gemini_gmos_south_ham :class:`~pypeit.spectrographs.gemini_gmos.GeminiGMOSSHamSpectrograph` GEMINI-S GMOS-S `Link <http://www.gemini.edu/instrumentation/gmos>`__ MultiSlit True False Hamamatsu detector (R400, B600, R831); see :doc:`gemini_gmos`
gemini_gnirs :class:`~pypeit.spectrographs.gemini_gnirs.GeminiGNIRSSpectrograph` GEMINI-N GNIRS `Link <https://www.gemini.edu/instrumentation/gnirs>`__ Echelle True False
gtc_osiris :class:`~pypeit.spectrographs.gtc_osiris.GTCOSIRISSpectrograph` GTC OSIRIS `Link <http://www.gtc.iac.es/instruments/osiris/>`__ MultiSlit True False See :doc:`gtc_osiris`
jwst_nircam :class:`~pypeit.spectrographs.jwst_nircam.JWSTNIRCamSpectrograph` JWST NIRCAM `Link <https://jwst-docs.stsci.edu/jwst-near-infrared-camera/nircam-observing-modes/nircam-wide-field-slitless-spectroscopy>`__ MultiSlit False False
gtc_osiris_plus :class:`~pypeit.spectrographs.gtc_osiris.GTCOSIRISPlusSpectrograph` GTC OSIRIS+ `Link <http://www.gtc.iac.es/instruments/osiris/>`__ MultiSlit True False See :doc:`gtc_osiris`
jwst_nircam :class:`~pypeit.spectrographs.jwst_nircam.JWSTNIRCamSpectrograph` JWST NIRCAM `Link <https://jwst-docs.stsci.edu/jwst-near-infrared-camera/nircam-observing-modes/nircam-wide-field-slitless-spectroscopy>`__ MultiSlit False False
jwst_nirspec :class:`~pypeit.spectrographs.jwst_nirspec.JWSTNIRSpecSpectrograph` JWST NIRSPEC `Link <https://jwst-docs.stsci.edu/jwst-near-infrared-spectrograph>`__ MultiSlit True False
keck_deimos :class:`~pypeit.spectrographs.keck_deimos.KeckDEIMOSSpectrograph` KECK DEIMOS `Link <https://www2.keck.hawaii.edu/inst/deimos/>`__ MultiSlit True True Supported gratings: 600ZD, 830G, 900ZD, 1200B, 1200G; see :doc:`deimos`
keck_hires :class:`~pypeit.spectrographs.keck_hires.KECKHIRESSpectrograph` KECK HIRES `Link <https://www2.keck.hawaii.edu/inst/hires/>`__ Echelle True False
Expand Down Expand Up @@ -47,7 +48,8 @@ shane_kast_blue :class:`~pypeit.spectrographs.shane_kast.ShaneKastBlue
shane_kast_red :class:`~pypeit.spectrographs.shane_kast.ShaneKastRedSpectrograph` SHANE KASTr `Link <http://mthamilton.ucolick.org/techdocs/instruments/kast/>`__ MultiSlit True True
shane_kast_red_ret :class:`~pypeit.spectrographs.shane_kast.ShaneKastRedRetSpectrograph` SHANE KASTr `Link <http://mthamilton.ucolick.org/techdocs/instruments/kast/>`__ MultiSlit True True Red reticon
soar_goodman_red :class:`~pypeit.spectrographs.soar_goodman.SOARGoodmanRedSpectrograph` SOAR red `Link <https://noirlab.edu/science/programs/ctio/instruments/goodman-high-throughput-spectrograph>`__ MultiSlit True False Supported gratings: 400_SYZY at M1 and M2 tilts
tng_dolores :class:`~pypeit.spectrographs.tng_dolores.TNGDoloresSpectrograph` TNG DOLORES `Link <https://oapd.inaf.it/mos/>`__ MultiSlit False False DOLORES (LRS) spectrograph; LR-R
soar_goodman_blue :class:`~pypeit.spectrographs.soar_goodman.SOARGoodmanBlueSpectrograph` SOAR blue `Link <https://noirlab.edu/science/programs/ctio/instruments/goodman-high-throughput-spectrograph>`__ MultiSlit True False Supported gratings: 400_SYZY at M1 tilts
tng_dolores :class:`~pypeit.spectrographs.tng_dolores.TNGDoloresSpectrograph` TNG DOLORES `Link <https://oapd.inaf.it/mos/>`__ MultiSlit False False DOLORES (LRS) spectrograph; LR-R
vlt_fors2 :class:`~pypeit.spectrographs.vlt_fors.VLTFORS2Spectrograph` VLT FORS2 `Link <https://www.eso.org/sci/facilities/paranal/instruments/fors.html>`__ MultiSlit True False 300I, 300V gratings
vlt_sinfoni :class:`~pypeit.spectrographs.vlt_sinfoni.VLTSINFONISpectrograph` VLT SINFONI `Link <https://www.eso.org/sci/facilities/paranal/decommissioned/sinfoni.html>`__ MultiSlit True False Gratings tested: K
vlt_xshooter_nir :class:`~pypeit.spectrographs.vlt_xshooter.VLTXShooterNIRSpectrograph` VLT XShooter_NIR `Link <https://www.eso.org/sci/facilities/paranal/instruments/xshooter.html>`__ Echelle True False See :doc:`xshooter`
Expand Down
2 changes: 1 addition & 1 deletion doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Installation
.. warning::

Python 3.10 is not yet supported.
Python 3.11 is not yet supported.

Below, we provide detailed instructions for installing PypeIt. For
troubleshooting, please consult the PypeIt :ref:`community` and/or `submit
Expand Down
52 changes: 52 additions & 0 deletions doc/out_onespec.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

.. include:: include/links.rst

.. _onespec:

=======
OneSpec
=======

Overview
========

Generally, the ultimate PypeIt spectrum output is a single
spectrum per source, fully calibrated and (as desired)
with a :doc:`telluric` performed.

The standard way to generate this file is
with the :ref:`_pypeit_coadd_1dspec` script.

The naming of this file is user-generated,
i.e. it can be anything you wish.

The header of the primary extension includes the
`core_meta` of PypeIt, e.g. RA, DEC, MJD, and
configuration parameters of the instrument.

Inspection
==========

You view the spectrum using the ``lt_xspec`` script
(``pypeit_show_1dspec`` will not work), which loads the data
and launches a GUI from the `linetools`_ package. e.g.:

.. code-block:: console
lt_xspec J1217p3905_coadd.fits
Current Data Model
==================

Internally, the spectrum for a single object is held by the
:class:`~pypeit.onespec.OneSpec` class.

Here is its datamodel, which
is written as an `astropy.io.fits.BinTableHDU`_ in the
first HDU of the file.

.. include:: include/datamodel_onespec.rst

All wavelengths are in vacuum and flux units
depend on whether :doc:`Fluxing` was performed.
9 changes: 8 additions & 1 deletion doc/spectrographs/not_alfosc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ Common Items
Grisms
++++++

Currently only grisms 4, 7, 8, 17, 18 and 19 have full template solutions.
Currently only grisms 3, 4, 5, 7, 8, 10, 11 17, 18, 19 and 20 have full template solutions.

Grisms 10 and 11 are very low-resolution and only occupy part of the detector. Depending on the window used, it may be useful to set the find_min_max parameter to some suitable range, e.g.,
[reduce]
[[findobj]]
find_min_max = [0,680]
Furthermore, grisms 10 and 11 are so low resolution that the rms of the wavelength solution is often quite poor (roughly 0.2 pixels).


Vertical slits
++++++++++++++
Expand Down
18 changes: 5 additions & 13 deletions pypeit/core/gui/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,11 @@ def __init__(self, canvas, axes, spec, specres, detns, line_lists, par, lflag_co
self.anntexts = []

# Unset some of the matplotlib keymaps
matplotlib.pyplot.rcParams['keymap.fullscreen'] = '' # toggling fullscreen (Default: f, ctrl+f)
matplotlib.pyplot.rcParams['keymap.home'] = '' # home or reset mnemonic (Default: h, r, home)
matplotlib.pyplot.rcParams['keymap.back'] = '' # forward / backward keys to enable (Default: left, c, backspace)
matplotlib.pyplot.rcParams['keymap.forward'] = '' # left handed quick navigation (Default: right, v)
#matplotlib.pyplot.rcParams['keymap.pan'] = '' # pan mnemonic (Default: p)
matplotlib.pyplot.rcParams['keymap.zoom'] = '' # zoom mnemonic (Default: o)
matplotlib.pyplot.rcParams['keymap.save'] = '' # saving current figure (Default: s)
matplotlib.pyplot.rcParams['keymap.quit'] = '' # close the current figure (Default: ctrl+w, cmd+w)
matplotlib.pyplot.rcParams['keymap.grid'] = '' # switching on/off a grid in current axes (Default: g)
matplotlib.pyplot.rcParams['keymap.grid_minor'] = '' # switching on/off a (minor) grid in current axes (Default: G)
matplotlib.pyplot.rcParams['keymap.yscale'] = '' # toggle scaling of y-axes ('log'/'linear') (Default: l)
matplotlib.pyplot.rcParams['keymap.xscale'] = '' # toggle scaling of x-axes ('log'/'linear') (Default: L, k)
#matplotlib.pyplot.rcParams['keymap.all_axes'] = '' # enable all axes (Default: a)
for key in plt.rcParams.keys():
if 'keymap' in key:
plt.rcParams[key] = []
# Enable some useful ones, though
matplotlib.pyplot.rcParams['keymap.pan'] = ['p']

# Initialise the main canvas tools
canvas.mpl_connect('draw_event', self.draw_callback)
Expand Down
18 changes: 6 additions & 12 deletions pypeit/core/gui/object_find.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,12 @@ def __init__(self, canvas, image, frame, det, sobjs, left, right, obj_trace, tra
self._object_traces.from_specobj(sobjs, det)

# Unset some of the matplotlib keymaps
matplotlib.pyplot.rcParams['keymap.fullscreen'] = '' # toggling fullscreen (Default: f, ctrl+f)
#matplotlib.pyplot.rcParams['keymap.home'] = '' # home or reset mnemonic (Default: h, r, home)
matplotlib.pyplot.rcParams['keymap.back'] = '' # forward / backward keys to enable (Default: left, c, backspace)
matplotlib.pyplot.rcParams['keymap.forward'] = '' # left handed quick navigation (Default: right, v)
#matplotlib.pyplot.rcParams['keymap.pan'] = '' # pan mnemonic (Default: p)
matplotlib.pyplot.rcParams['keymap.zoom'] = '' # zoom mnemonic (Default: o)
matplotlib.pyplot.rcParams['keymap.save'] = '' # saving current figure (Default: s)
matplotlib.pyplot.rcParams['keymap.quit'] = '' # close the current figure (Default: ctrl+w, cmd+w)
matplotlib.pyplot.rcParams['keymap.grid'] = '' # switching on/off a grid in current axes (Default: g)
matplotlib.pyplot.rcParams['keymap.yscale'] = '' # toggle scaling of y-axes ('log'/'linear') (Default: l)
matplotlib.pyplot.rcParams['keymap.xscale'] = '' # toggle scaling of x-axes ('log'/'linear') (Default: L, k)
matplotlib.pyplot.rcParams['keymap.all_axes'] = '' # enable all axes (Default: a)
for key in plt.rcParams.keys():
if 'keymap' in key:
plt.rcParams[key] = []
# Enable some useful ones, though
matplotlib.pyplot.rcParams['keymap.home'] = ['h', 'r', 'home']
matplotlib.pyplot.rcParams['keymap.pan'] = ['p']

# Initialise the main canvas tools
canvas.mpl_connect('draw_event', self.draw_callback)
Expand Down
Loading

0 comments on commit 6878f66

Please sign in to comment.