Skip to content

Commit

Permalink
Merge pull request #1881 from pypeit/bump_to_313
Browse files Browse the repository at this point in the history
Bump dependency restriction to enable use with python 3.13
  • Loading branch information
kbwestfall authored Dec 18, 2024
2 parents fd0074f + 14dcbee commit 73abd3b
Show file tree
Hide file tree
Showing 35 changed files with 133 additions and 111 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.11', '3.12']
toxenv: [test-alldeps, test-numpydev, test-linetoolsdev, test-gingadev, test-astropydev]
python: ['3.11', '3.12', '3.13']
toxenv: [test, test-alldeps-cov, test-numpydev, test-linetoolsdev, test-gingadev, test-astropydev]
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.11', '3.12']
python: ['3.11', '3.12', '3.13']
toxenv: [test, test-alldeps-cov, test-numpydev, test-linetoolsdev, test-gingadev, test-astropydev]
steps:
- name: Check out repository
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
python: ['3.11', '3.12']
python: ['3.11', '3.12', '3.13']
toxenv: [test-alldeps]
steps:
- name: Check out repository
Expand Down
20 changes: 20 additions & 0 deletions deprecated/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,23 @@ def match_qa(arc_spec, tcent, line_list, IDs, scores, outfile = None, title=None

plt.close()
return


def gen_timestamp():
""" Generate a simple time stamp including the current user
Returns
-------
timestamp : str
user_datetime
"""
tstamp = datetime.datetime.today().strftime('%Y-%m-%d-T%Hh%Mm%Ss')
try:
import getpass
user = getpass.getuser()
except ModuleNotFoundError:
# there appears to be a bug in getpass in windows systems where the pwd module doesn't load
user = os.getlogin()
# Return
return '{:s}_{:s}'.format(user, tstamp)

4 changes: 2 additions & 2 deletions doc/help/pypeit_chk_for_calibs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
options:
-h, --help show this help message and exit
-s SPECTROGRAPH, --spectrograph SPECTROGRAPH
-s, --spectrograph SPECTROGRAPH
A valid spectrograph identifier: aat_uhrf, bok_bc,
gemini_flamingos1, gemini_flamingos2,
gemini_gmos_north_e2v, gemini_gmos_north_ham,
Expand All @@ -34,7 +34,7 @@
soar_goodman_red, tng_dolores, vlt_fors2, vlt_sinfoni,
vlt_xshooter_nir, vlt_xshooter_uvb, vlt_xshooter_vis,
wht_isis_blue, wht_isis_red (default: None)
-e EXTENSION, --extension EXTENSION
-e, --extension EXTENSION
File extension to use. Must include the period (e.g.,
".fits") and it must be one of the allowed extensions
for this spectrograph. If None, root directory will be
Expand Down
4 changes: 2 additions & 2 deletions doc/help/pypeit_clean_cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
options:
-h, --help show this help message and exit
-p PATTERN [PATTERN ...], --pattern PATTERN [PATTERN ...]
-p, --pattern PATTERN [PATTERN ...]
Remove any files matching the provided pattern. If
combined with --version, this selects only files
downloaded from the identified GitHub versoin. If the
version is not specified, any file matching the provided
pattern(s) are removed. (default: None)
-v VERSION [VERSION ...], --version VERSION [VERSION ...]
-v, --version VERSION [VERSION ...]
Remove files associated one or more provided tags,
branches, or commit references on GitHub. These must be
an exact match to the relevant GitHub reference. If
Expand Down
2 changes: 1 addition & 1 deletion doc/help/pypeit_coadd_1dspec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
--show show QA during coadding process
--par_outfile PAR_OUTFILE
Output to save the parameters
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename
coadd_1dspec_YYYYMMDD-HHMM.log
Expand Down
2 changes: 1 addition & 1 deletion doc/help/pypeit_coadd_2dspec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
--basename BASENAME Basename of files to save the parameters, spec1d, and
spec2d (default: None)
--debug show debug plots? (default: False)
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename
coadd_2dspec_YYYYMMDD-HHMM.log (default: 1)
Expand Down
2 changes: 1 addition & 1 deletion doc/help/pypeit_coadd_datacube.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
--det DET Detector (default: 1)
-o, --overwrite Overwrite any existing files/directories (default:
False)
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename
coadd_datacube_YYYYMMDD-HHMM.log (default: 1)
Expand Down
2 changes: 1 addition & 1 deletion doc/help/pypeit_collate_1d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
to crash or lead to erroneous results. I.e., you really
need to know what you are doing if you set this to
False!
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename
collate_1d_YYYYMMDD-HHMM.log
Expand Down
8 changes: 4 additions & 4 deletions doc/help/pypeit_extract_datacube.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
options:
-h, --help show this help message and exit
-e EXT_FILE, --ext_file EXT_FILE
-e, --ext_file EXT_FILE
Configuration file with extraction parameters (default:
None)
-s SAVE, --save SAVE Output spec1d filename (default: None)
-s, --save SAVE Output spec1d filename (default: None)
-o, --overwrite Overwrite any existing files/directories (default:
False)
-b BOXCAR_RADIUS, --boxcar_radius BOXCAR_RADIUS
-b, --boxcar_radius BOXCAR_RADIUS
Radius of the circular boxcar (in arcseconds) to use for
the extraction. (default: None)
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename
extract_datacube_YYYYMMDD-HHMM.log (default: 1)
Expand Down
2 changes: 1 addition & 1 deletion doc/help/pypeit_flux_calib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
options:
-h, --help show this help message and exit
--par_outfile Output to save the parameters
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename
flux_calib_YYYYMMDD-HHMM.log
Expand Down
2 changes: 1 addition & 1 deletion doc/help/pypeit_identify.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
--force_save Save the solutions, despite the RMS (default: False)
--rescale_resid Rescale the residual plot to include all points?
(default: False)
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename identify_YYYYMMDD-
HHMM.log (default: 1)
Expand Down
14 changes: 7 additions & 7 deletions doc/help/pypeit_obslog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
options:
-h, --help show this help message and exit
-r ROOT, --root ROOT Root to search for data files. You can provide the top-
-r, --root ROOT Root to search for data files. You can provide the top-
level directory (e.g., /data/Kast) or the search string
up through the wildcard (.e.g, /data/Kast/b). Use the
--extension option to set the types of files to search
Expand All @@ -44,7 +44,7 @@
associated header cards. Metadata keys with header cards
that are None have no simple mapping between keyword and
header card. (default: False)
-c COLUMNS, --columns COLUMNS
-c, --columns COLUMNS
A comma-separated list of columns to include in the
output table. Each column must be a valid pypeit
metadata keyword specific to this spectrograph (run
Expand All @@ -57,7 +57,7 @@
(default: pypeit)
-b, --bad_frames Clean the output of bad frames that cannot be reduced by
pypeit. (default: False)
-t BAD_TYPES, --bad_types BAD_TYPES
-t, --bad_types BAD_TYPES
Dictates how frames that could not be given a valid type
should be treated. Options are: "keep" to include them
in the output, "rm" to remove them from the output,
Expand All @@ -72,20 +72,20 @@
IPython session that you can use to interact with the
table (an Astropy.Table called fitstbl) directly.
(default: False)
-s SORT, --sort SORT Metadata keyword (pypeit-specific) to use to sort the
-s, --sort SORT Metadata keyword (pypeit-specific) to use to sort the
output table. (default: mjd)
-e EXTENSION, --extension EXTENSION
-e, --extension EXTENSION
File extension to use. Must include the period (e.g.,
".fits") and it must be one of the allowed extensions
for this spectrograph. If None, root directory will be
searched for all files with any of the allowed
extensions. (default: None)
-d OUTPUT_PATH, --output_path OUTPUT_PATH
-d, --output_path OUTPUT_PATH
Path to top-level output directory. (default: current
working directory)
-o, --overwrite Overwrite any existing files/directories (default:
False)
-f FILE, --file FILE Name for the ascii output file. Any leading directory
-f, --file FILE Name for the ascii output file. Any leading directory
path is stripped; use -d to set the output directory. If
None, the table is just printed to stdout. If set to
'default', the file is set to [spectrograph].obslog.
Expand Down
6 changes: 3 additions & 3 deletions doc/help/pypeit_sensfunc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
[sensfunc]
multi_spec_det = 3,7
-o OUTFILE, --outfile OUTFILE
-o, --outfile OUTFILE
Output file for sensitivity function. If not specified,
the sensitivity function will be written out to a
standard filename in the current working directory, i.e.
Expand All @@ -69,7 +69,7 @@
same extensions for QA and throughput will be used if
outfile is provided but with .fits trimmed off if it is
in the filename.
-s SENS_FILE, --sens_file SENS_FILE
-s, --sens_file SENS_FILE
Configuration file with sensitivity function parameters
-f, --use_flat Use the extracted spectrum of the flatfield calibration
to estimate the blaze function when generating the
Expand All @@ -89,7 +89,7 @@
--par_outfile PAR_OUTFILE
Name of output file to save the parameters used by the
fit
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename sensfunc_YYYYMMDD-
HHMM.log
Expand Down
12 changes: 6 additions & 6 deletions doc/help/pypeit_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
options:
-h, --help show this help message and exit
-s SPECTROGRAPH, --spectrograph SPECTROGRAPH
-s, --spectrograph SPECTROGRAPH
A valid spectrograph identifier: aat_uhrf, bok_bc,
gemini_flamingos1, gemini_flamingos2,
gemini_gmos_north_e2v, gemini_gmos_north_ham,
Expand All @@ -32,24 +32,24 @@
soar_goodman_red, tng_dolores, vlt_fors2, vlt_sinfoni,
vlt_xshooter_nir, vlt_xshooter_uvb, vlt_xshooter_vis,
wht_isis_blue, wht_isis_red (default: None)
-r ROOT [ROOT ...], --root ROOT [ROOT ...]
-r, --root ROOT [ROOT ...]
Root to search for data files. You can provide the top-
level directory (e.g., /data/Kast) or the search string
up through the wildcard (.e.g, /data/Kast/b). Use the
--extension option to set the types of files to search
for. (default: current working directory)
-e EXTENSION, --extension EXTENSION
-e, --extension EXTENSION
File extension to use. Must include the period (e.g.,
".fits") and it must be one of the allowed extensions
for this spectrograph. If None, root directory will be
searched for all files with any of the allowed
extensions. (default: None)
-d OUTPUT_PATH, --output_path OUTPUT_PATH
-d, --output_path OUTPUT_PATH
Path to top-level output directory. (default: current
working directory)
-o, --overwrite Overwrite any existing files/directories (default:
False)
-c CFG_SPLIT, --cfg_split CFG_SPLIT
-c, --cfg_split CFG_SPLIT
Generate the PypeIt files and folders by input
configuration. To write all unique configurations
identifed, use 'all', otherwise provide the list of
Expand All @@ -62,7 +62,7 @@
-m, --manual_extraction
Include the manual extraction column for the user to
edit (default: False)
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename setup_YYYYMMDD-
HHMM.log (default: 1)
Expand Down
11 changes: 5 additions & 6 deletions doc/help/pypeit_setup_coadd2d.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
.. code-block:: console
$ pypeit_setup_coadd2d -h
usage: pypeit_setup_coadd2d [-h]
(-f PYPEIT_FILE | -d SCIENCE_DIR [SCIENCE_DIR ...])
[--keep_par] [--obj OBJ [OBJ ...]]
[--det DET [DET ...]]
usage: pypeit_setup_coadd2d [-h] (-f PYPEIT_FILE |
-d SCIENCE_DIR [SCIENCE_DIR ...]) [--keep_par]
[--obj OBJ [OBJ ...]] [--det DET [DET ...]]
[--only_slits ONLY_SLITS [ONLY_SLITS ...]]
[--exclude_slits EXCLUDE_SLITS [EXCLUDE_SLITS ...]]
[--spat_toler SPAT_TOLER] [--offsets OFFSETS]
Expand All @@ -16,9 +15,9 @@
options:
-h, --help show this help message and exit
-f PYPEIT_FILE, --pypeit_file PYPEIT_FILE
-f, --pypeit_file PYPEIT_FILE
PypeIt reduction file (default: None)
-d SCIENCE_DIR [SCIENCE_DIR ...], --science_dir SCIENCE_DIR [SCIENCE_DIR ...]
-d, --science_dir SCIENCE_DIR [SCIENCE_DIR ...]
One or more directories with spec2d files to stack (use
wildcard to specify multiple directories). (default:
None)
Expand Down
2 changes: 1 addition & 1 deletion doc/help/pypeit_show_2dspec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
--prefix PREFIX Channel name prefix [lets you display more than one set]
(default: )
--no_clear Do *not* clear all existing tabs (default: True)
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all] (default:
1)
--try_old Attempt to load old datamodel versions. A crash may
Expand Down
2 changes: 1 addition & 1 deletion doc/help/pypeit_skysub_regions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-i, --initial Use initial slit edges? (default: False)
-f, --flexure Use flexure corrected slit edges? (default: False)
-s, --standard List standard stars as well? (default: False)
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename
skysub_regions_YYYYMMDD-HHMM.log (default: 1)
Expand Down
10 changes: 5 additions & 5 deletions doc/help/pypeit_tellfit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@
poly = For other type object, You might need to set
fit_wv_min_max, and norder in the tell_file.
-r REDSHIFT, --redshift REDSHIFT
-r, --redshift REDSHIFT
Specify redshift. Used with the --objmodel qso option
above.
-g TELL_GRID, --tell_grid TELL_GRID
-g, --tell_grid TELL_GRID
Telluric grid. You should download the giant grid file
to the pypeit/data/telluric folder. It should only be
passed if you want to overwrite the default tell_grid
that is set via each spectrograph file.
-p PCA_FILE, --pca_file PCA_FILE
-p, --pca_file PCA_FILE
Quasar PCA fits file with full path. The default file
(qso_pca_1200_3100.fits) is stored in the
pypeit/data/telluric folder. If you change the fits
file, make sure to set the pca_lower and pca_upper in
the tell_file to specify the wavelength coverage of your
model. The defaults are pca_lower=1220. and
pca_upper=3100.
-t TELL_FILE, --tell_file TELL_FILE
-t, --tell_file TELL_FILE
Configuration file to change default telluric
parameters. Note that the parameters in this file will
be overwritten if you set argument in your terminal.
Expand All @@ -71,7 +71,7 @@
--par_outfile PAR_OUTFILE
Name of output file to save the parameters used by the
fit
-v VERBOSITY, --verbosity VERBOSITY
-v, --verbosity VERBOSITY
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename tellfit_YYYYMMDD-
HHMM.log
Expand Down
Loading

0 comments on commit 73abd3b

Please sign in to comment.