Skip to content

Commit

Permalink
Merge pull request #1047 from pypeit/staged
Browse files Browse the repository at this point in the history
Merges develop into master (1.2.0 tag)
  • Loading branch information
kbwestfall authored Oct 16, 2020
2 parents d34dcf6 + ce7eea9 commit 0c3f22b
Show file tree
Hide file tree
Showing 250 changed files with 19,010 additions and 16,306 deletions.
4 changes: 3 additions & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.1
current_version = 1.2.0
commit = False
tag = False
tag_name = {new_version}
Expand All @@ -20,3 +20,5 @@ values =

[bumpversion:file:doc/conf.py]

[bumpversion:file:doc/index.rst]

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ dist/*
*.exe
*.o
*.so
*.pyd
*.pyc
*_rjc*
*.nbi
*.nbc

# Packages #
############
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ env:
- SKLEARN_VERSION=stable
- MAIN_CMD='python setup.py'
- SETUP_CMD='test'
- CONDA_DEPENDENCIES='scipy pyyaml matplotlib future numba scikit-learn configobj IPython'
- CONDA_DEPENDENCIES='scipy pyyaml matplotlib future numba scikit-learn configobj IPython pytest'
- PIP_DEPENDENCIES='extension_helpers ginga linetools'
- EVENT_TYPE='pull_request push'
- TASK='test'
Expand Down Expand Up @@ -115,13 +115,13 @@ matrix:

# Do a PEP8 test with pycodestyle
- os: linux
env: MAIN_CMD='pycodestyle packagename --count' SETUP_CMD=''
env: MAIN_CMD='pycodestyle pypeit --count' SETUP_CMD=''

allow_failures:
# Do a PEP8 test with pycodestyle
# (allow to fail unless your code completely compliant)
- os: linux
env: MAIN_CMD='pycodestyle packagename --count' SETUP_CMD=''
env: MAIN_CMD='pycodestyle pypeit --count' SETUP_CMD=''

install:

Expand Down
24 changes: 23 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@

1.2.0 (15 Oct 2020)
-------------------

- Frame-typing tweaks for DEIMOS
- Exposure-time ranges removed
- All frame types now key off OBSTYPE
- Added more detail on citation policy to main page on readthedocs
- Added docs for BitMasks
- Altered scripts interface to allow for dynamically making the help
doc files
- full spatial/spectral flexure and heliocentric corrections implemented for IFU reductions
- optimal weights in datacube generation
- Docs for skysub, extraction, flat fielding
- New skysub options for masking and suppressing local
- Added `pypeit/core/convert_DEIMOSsavfiles.py` to convert .sav files into fits files
- Added "amap" and "bmap" fits files in `pypeit/data/static_calibs/keck_deimos/` for DEIMOS
optical model
- Added `pypeit/core/slitdesign_matching.py` and `maskdesign_matching` to `EdgeTraceSet`
- Added ParSet for switching ON the slit-mask design matching. Default is ON for `keck_deimos`
- Pypeit registers `maskdef_id` in SlitTraceSet if instrument is `keck_deimos`
- Fix assignment bug in fitting bspline

1.1.1 (10 Sep 2020)
-------------------

Expand Down Expand Up @@ -53,7 +75,7 @@
- Correct det bug in keck_lris
- Modifications to allow for flailing LRISr detector
- Modifications for parse LRIS LAMPS prior to 2010 upgrade
- Add P200/TripleSpec
- Added support for P200/DBSP and P200/TripleSpec

1.0.6 (22 Jul 2020)
-------------------
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.md
include LICENSE.rst
#include CHANGES.rst

include setup.cfg
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Conduct](https://pypeit.readthedocs.io/en/latest/codeconduct.html).
* MMT/MMIRS (HK_zJ, J_zJ, and K_K tested)
* MDM/OSMOS
* Keck/DEIMOS (600ZD, 830G, 1200G)
* Keck/LRIS
* Keck/KCWI (BM, BH2)
* Keck/LRIS
* Keck/MOSFIRE (J and Y gratings tested)
* Keck/NIRES
* Keck/NIRSPEC (low-dispersion)
Expand Down
6 changes: 3 additions & 3 deletions bin/pypeit_arcid_plot
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
This script generates an ArcID plot from a Master WaveSoln file
"""

import pypeit.scripts.arcid_plot as arcid_plot
from pypeit.scripts import arcid_plot

if __name__ == '__main__':
args = arcid_plot.parser()
arcid_plot.main(args)
arcid_plot.main(arcid_plot.parse_args())

4 changes: 2 additions & 2 deletions bin/pypeit_chk_2dslits
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
Print slit info summary to the screen for a given spec2D file
"""

from pypeit.scripts import chk_spec2d_slits
from pypeit.scripts import chk_2dslits
if __name__ == '__main__':
chk_spec2d_slits.main(chk_spec2d_slits.parser())
chk_2dslits.main(chk_2dslits.parse_args())
2 changes: 1 addition & 1 deletion bin/pypeit_chk_alignments
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Show the alignments in a Ginga window

from pypeit.scripts import chk_alignments
if __name__ == '__main__':
chk_alignments.main(chk_alignments.parser())
chk_alignments.main(chk_alignments.parse_args())
3 changes: 1 addition & 2 deletions bin/pypeit_chk_edges
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ Show the trace image in a Ginga window with edges
from pypeit.scripts import chk_edges

if __name__ == '__main__':
args = chk_edges.parser()
chk_edges.main(args)
chk_edges.main(chk_edges.parse_args())

2 changes: 1 addition & 1 deletion bin/pypeit_chk_flats
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Show the trace image in a Ginga window with edges

from pypeit.scripts import chk_flats
if __name__ == '__main__':
chk_flats.main(chk_flats.parser())
chk_flats.main(chk_flats.parse_args())
5 changes: 2 additions & 3 deletions bin/pypeit_chk_for_calibs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ This script examines a set of files and figures
out which have sufficient calibrations and which do not!
"""

import pypeit.scripts.chk_calibs as chk_calibs
from pypeit.scripts import chk_for_calibs

if __name__ == '__main__':
args = chk_calibs.parser()
chk_calibs.main(args)
chk_for_calibs.main(chk_for_calibs.parse_args())
6 changes: 3 additions & 3 deletions bin/pypeit_chk_tilts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Show the arc image in a Ginga window with tilts
"""

import pypeit.scripts.chk_tilts as chk_tilts
from pypeit.scripts import chk_tilts

if __name__ == '__main__':
args = chk_tilts.parser()
chk_tilts.main(args)
chk_tilts.main(chk_tilts.parse_args())

6 changes: 3 additions & 3 deletions bin/pypeit_coadd_1dspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Plot a spectrum with an interactive QT GUI
"""

import pypeit.scripts.coadd_1dspec as coadd_1dspec
from pypeit.scripts import coadd_1dspec

if __name__ == '__main__':
args = coadd_1dspec.parser()
coadd_1dspec.main(args)
coadd_1dspec.main(coadd_1dspec.parse_args())

6 changes: 3 additions & 3 deletions bin/pypeit_coadd_2dspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Perform 2d coadds of PypeIt spectra.
"""

import pypeit.scripts.coadd_2dspec as coadd_2dspec
from pypeit.scripts import coadd_2dspec

if __name__ == '__main__':
args = coadd_2dspec.parser()
coadd_2dspec.main(args)
coadd_2dspec.main(coadd_2dspec.parse_args())

6 changes: 3 additions & 3 deletions bin/pypeit_coadd_datacube
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Perform datacube coadds of PypeIt 2D spectra.
"""

import pypeit.scripts.coadd_datacube as coadd_datacube
from pypeit.scripts import coadd_datacube

if __name__ == '__main__':
args = coadd_datacube.parser()
coadd_datacube.main(args)
coadd_datacube.main(coadd_datacube.parse_args())

69 changes: 7 additions & 62 deletions bin/pypeit_compare_sky
Original file line number Diff line number Diff line change
@@ -1,67 +1,12 @@
#!/usr/bin/env python
#
# See top-level LICENSE file for Copyright information
#
# -*- coding: utf-8 -*-

"""
Plots an extracted sky spectrum with an archived one
Probably most useful for exploring sky spectra in the blue
"""
import pdb
import sys, os
from pypeit.scripts import compare_sky

this_file = os.path.realpath(__file__)
#sky_path = this_file[:this_file.rfind('/')]+'/../data/sky_spec/'
sky_path ='/{0}/pypeit/data/sky_spec/'.format(this_file.strip('bin/pypeit_compare_sky'))
#sys.path.append(os.path.abspath(this_path+'/../src'))

from linetools.spectra.io import readspec

try:
from xastropy.xutils import xdebug as debugger
except:
import pdb as debugger

# Script to run XSpec from the command line or ipython
def main(*args, **kwargs):
""" Runs the XSpecGui on an input file
"""
import argparse

parser = argparse.ArgumentParser(description='Parse')
parser.add_argument("file", type=str, help="Spectral file")
parser.add_argument("skyfile", type=str, help="Archived PypeIt sky file (e.g. paranal_sky.fits")
parser.add_argument("--exten", type=int, help="FITS extension")
parser.add_argument("--optimal", default=False,
help="Show Optimal? Default is boxcar", action="store_true")
parser.add_argument("--scale_user", default=1., type=float, help="Scale user spectrum by a factor")

pargs = parser.parse_args()
from matplotlib import pyplot as plt

# Extension
exten = (pargs.exten if hasattr(pargs, 'exten') else 0)
#scale = (pargs.scale_user if hasattr(pargs, 'scale_user') else 1.)

# Read spec keywords
ikwargs = {}
if pargs.optimal:
ikwargs['wave_tag'] = 'opt_wave'
ikwargs['flux_tag'] = 'opt_sky'
else:
ikwargs['wave_tag'] = 'box_wave'
ikwargs['flux_tag'] = 'box_sky'

# Load user file
user_sky = readspec(pargs.file, exten=exten, **ikwargs)
# Load sky spec
arx_sky = readspec(sky_path+pargs.skyfile)

# Plot
plt.clf()
plt.plot(user_sky.wavelength, user_sky.flux*pargs.scale_user, 'k-', label='user')
plt.plot(arx_sky.wavelength, arx_sky.flux, 'b-', label='archive')
legend = plt.legend(loc='upper left', scatterpoints=1, borderpad=0.3,
handletextpad=0.3, fontsize='small', numpoints=1)
plt.show()
if __name__ == '__main__':
compare_sky.main(compare_sky.parse_args())


if __name__ == '__main__':
main()
7 changes: 4 additions & 3 deletions bin/pypeit_find_objects
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
This script opens the interactive object finding/tracing
"""

import pypeit.scripts.object_finding as object_finding
from pypeit.scripts import find_objects

if __name__ == '__main__':
args = object_finding.parser()
object_finding.main(args)
find_objects.main(find_objects.parse_args())


6 changes: 3 additions & 3 deletions bin/pypeit_flux_calib
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Flux the spectra and/or generate a sensitity function
"""

import pypeit.scripts.flux_calib as flux_calib
from pypeit.scripts import flux_calib

if __name__ == '__main__':
args = flux_calib.parser()
flux_calib.main(args)
flux_calib.main(flux_calib.parse_args())

6 changes: 3 additions & 3 deletions bin/pypeit_flux_setup
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Generate pypeit files for fluxing, coadd1d and telluric fitting.
"""

import pypeit.scripts.flux_setup as flux_setup
from pypeit.scripts import flux_setup

if __name__ == '__main__':
args = flux_setup.parser()
flux_setup.main(args)
flux_setup.main(flux_setup.parse_args())

6 changes: 3 additions & 3 deletions bin/pypeit_identify
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Launch the identify GUI tool
"""

from pypeit.scripts import launch_identify
from pypeit.scripts import identify

if __name__ == '__main__':
args = launch_identify.parser()
launch_identify.main(args)
identify.main(identify.parse_args())

5 changes: 2 additions & 3 deletions bin/pypeit_lowrdx_pixflat
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
This script pushes a FITS file to ginga
"""

import pypeit.scripts.lowrdx_pixflat as lowrdx_pixflat
from pypeit.scripts import lowrdx_pixflat

if __name__ == '__main__':
args = lowrdx_pixflat.parser()
lowrdx_pixflat.main(args)
lowrdx_pixflat.main(lowrdx_pixflat.parse_args())

5 changes: 2 additions & 3 deletions bin/pypeit_lowrdx_skyspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
This script generates a sky spectrum from a LowRedux IDL save file
"""

import pypeit.scripts.lowrdx_skyspec as lowrdx_skyspec
from pypeit.scripts import lowrdx_skyspec

if __name__ == '__main__':
args = lowrdx_skyspec.parser()
lowrdx_skyspec.main(args)
lowrdx_skyspec.main(lowrdx_skyspec.parse_args())

6 changes: 3 additions & 3 deletions bin/pypeit_qa_html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Build the HTML files for QA
"""

import pypeit.scripts.qa_html as qa_html
from pypeit.scripts import qa_html

if __name__ == '__main__':
args = qa_html.parser()
qa_html.main(args)
qa_html.main(qa_html.parse_args())

5 changes: 2 additions & 3 deletions bin/pypeit_ql_keck_mosfire
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ from pypeit.scripts import ql_keck_mosfire
import sys

if __name__ == '__main__':
args = ql_keck_mosfire.parser()
rtval = ql_keck_mosfire.main(args)
sys.exit(rtval)
sys.exit(ql_keck_mosfire.main(ql_keck_mosfire.parse_args()))

4 changes: 1 addition & 3 deletions bin/pypeit_ql_keck_nires
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ from pypeit.scripts import ql_keck_nires
import sys

if __name__ == '__main__':
args = ql_keck_nires.parser()
rtval = ql_keck_nires.main(args)
sys.exit(rtval)
sys.exit(ql_keck_nires.main(ql_keck_nires.parse_args()))

4 changes: 2 additions & 2 deletions bin/pypeit_ql_mos
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Run QL on MOS
from pypeit.scripts import ql_mos

if __name__ == '__main__':
args = ql_mos.parser()
ql_mos.main(args)
ql_mos.main(ql_mos.parse_args())

6 changes: 3 additions & 3 deletions bin/pypeit_sensfunc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Computes sensitivity function
"""

import pypeit.scripts.sensfunc as sensfunc
from pypeit.scripts import sensfunc

if __name__ == '__main__':
args = sensfunc.parser()
sensfunc.main(args)
sensfunc.main(sensfunc.parse_args())

Loading

0 comments on commit 0c3f22b

Please sign in to comment.