Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
d7b4c3b
Handle some corner cases noted by csimpson: fully-masked input array …
jehturner May 8, 2021
04b9fb9
Fix condition to allow plotting row/column 0.
jehturner May 8, 2021
15800d6
Make model attribute do something that's probably closer to the inten…
jehturner May 8, 2021
ff879da
Merge branch 'master' into fit_1D_fixes
chris-simpson Oct 27, 2021
29d1e80
fix indentation issue that got messed up in the merge
chris-simpson Oct 27, 2021
24f0ae5
activate loglinear resampling and add simple test
chris-simpson Apr 30, 2025
f571910
Merge branch 'release/4.x' into enh/loglinear_resampling
chris-simpson May 1, 2025
7679199
wrong parameter name in test
chris-simpson May 1, 2025
f1b3c99
resampleToCommonFrame(): fix(?) logic for deciding whether to preserv…
chris-simpson May 1, 2025
75053ff
resampleToCommonFrame() loglinear resampling: another synthetic test
chris-simpson May 1, 2025
a035814
add longlinear resampling to one GNIRS LS test
chris-simpson May 2, 2025
ab68d3d
modify Jenkinsfile to only run GNIRS tests
chris-simpson May 2, 2025
4bb2b6e
reactivating the f2ls and gnirsxd flags in tox.ini. They were remove…
KathleenLabrie May 6, 2025
8c8bec5
keep output files
chris-simpson May 6, 2025
975b5f4
update failing test to write output
chris-simpson May 6, 2025
43c3930
fitTelluric() bugfix for XD and showing correct orders
chris-simpson May 7, 2025
23702b2
add support for GMOS central stamp imaging. also added a nostack rec…
KathleenLabrie May 8, 2025
2d0b845
seed RNG in test
chris-simpson May 8, 2025
e15b5d7
Merge branch 'bugfix/fitTelluric_xd' into release/4.x
chris-simpson May 8, 2025
49809f6
Merged enh/bpm_tidy (squashed commits)
chris-simpson May 8, 2025
329b322
bzip GMOS illumination masks, update LUTs and manifest
chris-simpson May 8, 2025
212546c
distortionCorrect() now corrects to later of "rectified" or "distorti…
chris-simpson May 10, 2025
c2a1622
new recipe for wavecal from sky lines for GNIRS XD.
KathleenLabrie May 12, 2025
7e2c1ff
Merge branch 'release/4.x' into test_4.x
chris-simpson May 12, 2025
4a47bb2
attachWavelengthSolution(): place distortion correction model *before…
chris-simpson May 12, 2025
355739f
attachWavelengthSolution(): refactor to use insert_frame()
chris-simpson May 13, 2025
77656af
put "rectification" model at end of sequence of pixel coordinate frames
chris-simpson May 13, 2025
6f886c0
run slow tests only
chris-simpson May 13, 2025
bfe523e
Revert "run slow tests only"
chris-simpson May 14, 2025
fd23177
reorganize test workflow
chris-simpson May 14, 2025
ea23fca
windowedOp(): deepcopy the meta when creating the output as otherwise…
chris-simpson May 14, 2025
5decc97
stackFrames(): propagate other tables/arrays (both top-level and exte…
chris-simpson May 14, 2025
f5f7563
increase test tolerance due to floating-point error growth
chris-simpson May 15, 2025
8af06f3
Merge branch 'release/4.x' into enh/loglinear
chris-simpson May 15, 2025
86f6fa4
now that stackFrames propagates SLITEDGE we can do flatCorrect before…
KathleenLabrie May 16, 2025
3616aab
TelluricCorrector: fix problem where it was yielding 2 instances of e…
chris-simpson May 20, 2025
4d3e929
do not arbitrarily set minimum value of "max_separation" to 5 arcsec;…
chris-simpson May 20, 2025
d38b7db
remove unnecessary hardcoding of min/max values for findApertures "th…
chris-simpson May 21, 2025
5a65e52
implement "no-op" button for skyCorrectFromSlit() GUI
chris-simpson May 21, 2025
cbda2a0
abstract names for GUI tabs to private methods of Spect class/subclasses
chris-simpson May 22, 2025
a0f6648
fix incorrect logging
chris-simpson May 22, 2025
8feaef8
skyCorrectFromSlit(): first implementation of negative beam masking
chris-simpson May 24, 2025
d038182
Merge remote-tracking branch 'origin/fit_1D_fixes' into enh/pr260_fin…
chris-simpson May 27, 2025
47ece43
Added attachPinholeTelluric to GNIRS XD reduceTelluric recipe.
KathleenLabrie May 22, 2025
4a7cc09
additional robustness for catalog client test with Vizier
chris-simpson May 27, 2025
2a0952a
skyCorrectFromSlit(): fix row/column masking and write test for negat…
chris-simpson May 28, 2025
95083c6
Fix reassigning the `linelist` variable in create_interactive_inputs
May 29, 2025
3e1f53b
Add num_atran_lines to the generated linelist name
May 29, 2025
31d05b3
Merge branch 'bugfix/apertures_and_sky' into release/4.x
chris-simpson May 29, 2025
62f2872
revert order of Abort/Accept buttons in GUIs that had been accidental…
chris-simpson May 29, 2025
d801030
Merge branch 'release/4.x' of github.com:GeminiDRSoftware/DRAGONS int…
May 29, 2025
024fe0c
rename "allow_noop" to "allow_skip"
chris-simpson May 29, 2025
e300856
change colour of "Skip" button
chris-simpson May 29, 2025
85f1893
skyCorrectFromSlit(): fix sign error in location of negative beams
chris-simpson May 30, 2025
a5e58f1
change color for the "Skip" button in the GUI and highlighted "Skip" …
KathleenLabrie May 30, 2025
d8cca58
skyCorrectFromSlit(): don't remove edge maxima as this can prevent it…
chris-simpson May 30, 2025
2a23de0
adjust defaults for GNIRS XD based on early SV.
KathleenLabrie May 30, 2025
e02a506
swap labelling order for GUI XD (put "Order" before "Aperture")
chris-simpson May 30, 2025
f0c12a8
traceApertures(): refactor to collate data from all apertures on all …
chris-simpson May 31, 2025
bd5c0b3
Merge branch 'release/4.x' into enh/loglin
chris-simpson Jun 6, 2025
0e6a4cc
_get_spectrophotometry(): cut wavelengths below 300nm to allow vac_to…
chris-simpson Jun 7, 2025
40c8375
add test for loglinear resampling
chris-simpson Jun 7, 2025
3255a30
fluxCalibrate(): suppress RuntimeWarning and overflow
chris-simpson Jun 9, 2025
c670f50
Tidy up exceptions raised to be more consistent with python documenta…
phirstgemini May 24, 2025
bea1fe6
fix docstring and tests to match updated exception
phirstgemini May 24, 2025
3f7f504
test for corrected Exception type
phirstgemini May 30, 2025
da9b692
improvements to dgsplot for XD data
chris-simpson Jun 11, 2025
277213e
Merge branch 'enh/dgsplot_xd' into release/4.x
KathleenLabrie Jun 11, 2025
b5c3e11
Merge branch 'release/4.x' into enh/loglin
chris-simpson Jun 12, 2025
2e8c7b5
remove GNIRS mdf_dict (copied from G-IRAF; not used)
chris-simpson Jun 12, 2025
8e3188c
create IRDC primitives class
chris-simpson Jun 12, 2025
7f53123
add nonlinearityCorrect() to GNIRS recipes
chris-simpson Jun 13, 2025
a09e02a
first effort at GNIRSSpect.normalizeFlat()
chris-simpson Jun 13, 2025
ede03d1
rejig format of nonlinearity coefficients for GNIRS
chris-simpson Jun 13, 2025
c3b0d01
add stats primitive which adds simple pixel statistics headers for us…
phirstgemini Jun 13, 2025
666848c
add simple checkBias and checkFlat QA recipes for GMOS instrument mon…
phirstgemini Jun 13, 2025
2c67015
increase tolerance of test to account for pre-numpy2 coercion of inte…
chris-simpson Jun 13, 2025
600dbcf
merge instrument monitoring / gmos calibration checking code
phirstgemini Jun 13, 2025
62023a9
return list of NoneTypes if there are no non-linearity coefficients f…
chris-simpson Jun 14, 2025
b58ac2b
add missing "continue"
chris-simpson Jun 14, 2025
acd9ae8
adjust start position when tracing GNIRS XD pinholes to better match …
KathleenLabrie Jun 16, 2025
c660d07
Merge branch 'release/4.x' of github.com:GeminiDRSoftware/DRAGONS int…
KathleenLabrie Jun 16, 2025
dd988ef
Merge branch 'release/4.x' into enh/gnirs_nonlinearity
chris-simpson Jun 16, 2025
24fe511
Revert "adjust start position when tracing GNIRS XD pinholes to bette…
chris-simpson Jun 16, 2025
d98dd07
Merge branch 'release/4.x' into enh/gnirs_nonlinearity
chris-simpson Jun 16, 2025
386f97c
new well depths/nonlinearity limits for GNIRS SN7638228.1.2
chris-simpson Jun 17, 2025
43b087d
Merge branch 'release/4.x' of github.com:GeminiDRSoftware/DRAGONS int…
Jun 17, 2025
9a194d1
Create airglow linelist on the fly from the updated linelist.
Jun 24, 2025
531cc63
Merge branch 'release/4.x' of github.com:GeminiDRSoftware/DRAGONS int…
Jun 24, 2025
9bad364
Merge branch 'release/4.x' into xd_wavecal
Jun 24, 2025
501afa8
makeWavecalFromAbsorption bugfixes
Jun 26, 2025
ded4cb8
temporarily skip some tests
Jun 26, 2025
23e334a
unskip some tests
Jun 26, 2025
3ccb6e3
change generated_linelist from False to None
Jun 26, 2025
1d12e86
commented out the only failing wavecal test, needs to be looked at later
Jun 27, 2025
778fb80
test with FitsStorage 3.5.0 beta 1
phirstgemini Jun 27, 2025
33f55dc
dynamically calculate the GNIRS XD MDF for North-Long-LXD-111
KathleenLabrie Jun 27, 2025
66645a8
add early error handling to catch when the pinholes are not found rat…
KathleenLabrie Jun 30, 2025
ee3b38d
Merge branch 'release/4.x' into enh/gnirsxd_mdf
KathleenLabrie Jun 30, 2025
3f39fcd
Merge branch 'enh/gnirsxd_mdf' into release/4.x
KathleenLabrie Jun 30, 2025
b8122e6
expose min_snr in adjustWavelengthZeroPoint. It was failing in some …
KathleenLabrie Jul 7, 2025
39edf2d
dataselect expression returns a np.bool_ type instead of straight boo…
KathleenLabrie Jul 10, 2025
66b03df
fix a slicing error where a -1 on the end-bound index was missing cau…
KathleenLabrie Jul 11, 2025
e9a84a4
fitTelluric(): make "stellar_mask" creation parameters into debug-lev…
chris-simpson Jul 11, 2025
06fea45
use at.divide0() to get absorption in case continuum underflows to zero
chris-simpson Jul 11, 2025
00024c9
set PARENT_BRANCH to release/4.x for testing
chris-simpson Jul 11, 2025
d88b0e5
add a XD recipe to combine wavelength solutions from 2 different sour…
KathleenLabrie Jul 11, 2025
2bc5f70
fitTelluric(): use correct default value for stellar_mask_threshold
chris-simpson Jul 12, 2025
5b1847c
Revert "set PARENT_BRANCH to release/4.x for testing"
chris-simpson Jul 12, 2025
e622db4
bugfix (i'm not well)
chris-simpson Jul 12, 2025
39fc257
Merge branch 'bugfix/fitTelluric_infs_nans_crash' into release/4.x
chris-simpson Jul 12, 2025
c183870
updated GNIRS LUT to match the upcoming changes to the mechanism and …
KathleenLabrie Jul 14, 2025
72c513a
merge of release/4.x into master. This is a bookkeeping merge.
KathleenLabrie Jul 14, 2025
26b80b4
unskip the niri nonlinearity test. There is a specific refs for rele…
KathleenLabrie Jul 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 88 additions & 49 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@
// @Library('dragons_ci@master') _

// Change these to automatically skip steps
def runtests_unit = 1
def runtests_regress = 1
def runtests_gmosls = 1 // 1 to enable
def runtests_slow = 1
def runtests_f2 = 1
def runtests_niri = 1
def runtests_gsaoi = 1
def runtests_gnirs = 1
def runtests_wavecal = 1
def runtests_ghost = 1
def runtests_gmos = 1
def runtests_unit = 1
def runtests_regress = 1
def runtests_gmosls = 1 // 1 to enable
def runtests_slow = 1
def runtests_f2 = 1
def runtests_niri = 1
def runtests_gsaoi = 1
def runtests_gnirs = 1
def runtests_wavecal = 1
def runtests_ghost = 1
def runtests_gmos = 1
def runtests_ghost_integ = 1

pipeline {

Expand Down Expand Up @@ -162,6 +163,45 @@ pipeline {
}
} // end post
}

stage('WaveCal Tests') {
when {
expression { runtests_wavecal == 1 }
}

agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "wavecal_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/wavecal/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py312-wavecal -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/wavecal_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F wavecal'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside WaveCal Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py312-wavecal/reports/*_results.xml'
)
echo "Deleting WaveCal Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage

} // end parallel
}

Expand Down Expand Up @@ -355,44 +395,6 @@ pipeline {
} // end parallel
}

stage('WaveCal Tests') {
when {
expression { runtests_wavecal == 1 }
}

agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "wavecal_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/wavecal/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py312-wavecal -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/wavecal_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F wavecal'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside WaveCal Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py312-wavecal/reports/*_results.xml'
)
echo "Deleting WaveCal Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage

stage('Slower tests') {
parallel {
stage('GMOS LS Tests') {
Expand Down Expand Up @@ -507,6 +509,43 @@ pipeline {
}
} // end post
} // end stage

stage('GHOST Integration test') {
when {
expression { runtests_ghost_integ == 1 }
}

agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "ghost_integ_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/ghost_integ/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
echo "${env.PATH}"
sh '.jenkins/scripts/setup_dirs.sh'
echo "GHOST tests"
sh 'tox -e py312-ghost_integ -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/ghost_integ_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F ghost_integ'
} // end steps
post {
always {
junit (
allowEmptyResults: true,
testResults: '.tmp/py312-ghost_integ/reports/*_results.xml'
)
echo "Deleting GHOST Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
}
} // end post
} // end stage
} // end parallel
}

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include tox.ini
include gempy/library/config/README

recursive-include geminidr *.dat
recursive-include geminidr *.fits *.html *.css *.js *.ico *.png *.xml *.svg *.json
recursive-include geminidr *.fits *.fits.bz2 *.html *.css *.js *.ico *.png *.xml *.svg *.json
recursive-include gempy *.c
recursive-include gempy *.pyx
recursive-include gempy/share/man/man1 *
Expand Down
2 changes: 1 addition & 1 deletion astrodata/fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def generate_boxes(shape, kernel):
np.empty(shape, dtype=dtype),
variance=np.zeros(shape, dtype=dtype) if with_uncertainty else None,
mask=np.empty(shape, dtype=np.uint16) if with_mask else None,
meta=sequence[0].meta,
meta=deepcopy(sequence[0].meta),
wcs=sequence[0].wcs,
)
# Delete other extensions because we don't know what to do with them
Expand Down
4 changes: 2 additions & 2 deletions astrodata/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def assert_most_close(actual, desired, max_miss, rtol=1e-7, atol=0,
if n_miss > max_miss:
error_message = (
"%g mismatching elements are more than the " % n_miss +
"expected %g." % max_miss +
"expected %g.\n" % max_miss +
'\n'.join(e.args[0].split('\n')[3:]))

raise AssertionError(error_message)
Expand Down Expand Up @@ -101,7 +101,7 @@ def assert_most_equal(actual, desired, max_miss, verbose=True):
if n_miss > max_miss:
error_message = (
"%g mismatching elements are more than the " % n_miss +
"expected %g." % max_miss +
"expected %g.\n" % max_miss +
'\n'.join(e.args[0].split('\n')[3:]))

raise AssertionError(error_message)
Expand Down
2 changes: 1 addition & 1 deletion gemini_instruments/gemini/adclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -2229,4 +2229,4 @@ def actual_central_wavelength(self, *args, **kwargs):
This is not a descriptor. The args/kwargs accept whatever unit
information central_wavelength() can handle.
"""
return self.central_wavelength(*args, **kwargs)
return self.central_wavelength(*args, **kwargs)
9 changes: 6 additions & 3 deletions gemini_instruments/gnirs/adclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ..common import build_group_id

from .lookup import detector_properties, nominal_zeropoints, read_modes
from .lookup import dispersion_by_config
from .lookup import dispersion_by_config, xd_orders
from .lookup import pixel_scale

# NOTE: Temporary functions for test. gempy imports astrodata and
Expand Down Expand Up @@ -128,8 +128,11 @@ def dispersion(self):
camera = 'Long'
else:
camera = None

filter = str(self.filter_name(pretty=True))[0]
if "XD" in self.tags:
order = self._grating_order()
filter = xd_orders.get(order, None)
else:
filter = str(self.filter_name(pretty=True))[0]
dispersion = dispersion_by_config.get((grating, camera), {}).get(filter)

if dispersion is None:
Expand Down
Loading