Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1227 commits
Select commit Hold shift + click to select a range
56de744
fit A1, angle and shift_y first to prepare the fit
jeremyneveu Mar 14, 2024
8ffb1d0
change unit of reso parameter in labels (nm)
jeremyneveu Mar 14, 2024
d0f987b
more robust way to set weight of outliers to zero
jeremyneveu Mar 14, 2024
b8423ea
restrict bounds for moffat parameters alpha=(1.1,10) and gamma > 1 pixel
jeremyneveu Mar 14, 2024
c1459e9
fit temporarily A1 to help finding the trace of the spectrogram with …
jeremyneveu Mar 14, 2024
27d1e51
set very high uncertainties below 380nm and above 1000nm to ease the …
jeremyneveu Mar 14, 2024
9aa2545
SDSS g filter
jeremyneveu Mar 14, 2024
ff1bd72
Merge branch 'v3.1.0' of github.com:LSSTDESC/Spectractor into v3.1.0
jeremyneveu Mar 14, 2024
99becf5
debug position of B, Astar
jeremyneveu Mar 14, 2024
43b1a7f
sketch of auxtel full chain test
jeremyneveu Mar 14, 2024
956d835
Merge branch 'v3.1.0' of github.com:LSSTDESC/Spectractor into v3.1.0
jeremyneveu Mar 14, 2024
138e880
keep tentative to set bounds for polynomial parameters
jeremyneveu Mar 15, 2024
f89d3a2
for CTIO PSF_POLY_ORDER=2
jeremyneveu Mar 15, 2024
5d4de72
Merge branch 'v3.1.0' of github.com:LSSTDESC/Spectractor into v3.1.0
jeremyneveu Mar 15, 2024
6e62664
Add hd111980_stis_006.fits to test cache.
erykoff Apr 15, 2024
9786564
Fix scipy.signal.windows.gaussian import
erykoff Apr 15, 2024
e662836
Fix deprecation warning for use_gaussian_derivatives.
erykoff Apr 15, 2024
5c67ca4
Merge pull request #150 from erykoff/u/erykoff/test006
jeremyneveu Apr 15, 2024
624f189
pin pytest version <8.1
jeremyneveu Apr 15, 2024
8d72713
pin version of pytest<8.1
jeremyneveu Apr 15, 2024
cea30f1
pin version pytest=8.0.0
jeremyneveu Apr 15, 2024
07d9510
Merge pull request #152 from LSSTDESC/151-coverage-from-pytest-is-broken
jeremyneveu Apr 15, 2024
06c7cfc
Merge branch 'master' of https://github.com/LSSTDESC/Spectractor into…
jeremyneveu Apr 15, 2024
f7d0701
first version, with gaia targets loaded inside getCalspec.
corentinravoux Jun 19, 2024
e112d2f
adding new gaiaspec package
corentinravoux Jul 17, 2024
3166760
importation of gaia module with try
corentinravoux Jul 17, 2024
4f31e6d
getting ra dec and z for gaia
corentinravoux Jul 17, 2024
c959105
small fix
corentinravoux Jul 17, 2024
4eb59e4
adding gaiaspec in fit spectrum and spectrogram
corentinravoux Jul 23, 2024
7231206
default pst poly type to polynomial
jeremyneveu Aug 8, 2024
43870ac
repair fit_spectrum.plot_fit concerning outliers
jeremyneveu Aug 8, 2024
8df4e4b
include model err for outlier sigma clipping
jeremyneveu Aug 8, 2024
030f024
use integrate.simpson instead of simps (deprecated)
jeremyneveu Aug 8, 2024
8095a97
Merge branch 'v3.1.0' of https://github.com/LSSTDESC/Spectractor into…
jeremyneveu Aug 8, 2024
844f599
use integrate.simpson instead of simps (deprecated)
jeremyneveu Aug 8, 2024
10d1bd9
use integrate.simpson instead of simps (deprecated)
jeremyneveu Aug 8, 2024
ed5f3b1
Merge branch 'v3.1.0' into adr
jeremyneveu Aug 8, 2024
f4ad171
add DoubleMoffat PSF model
jeremyneveu Aug 8, 2024
ebcf9a0
Merge pull request #155 from LSSTDESC/adr
jeremyneveu Aug 8, 2024
326f747
add DoubleMoffat PSF model
jeremyneveu Aug 8, 2024
dd199ae
add DoubleMoffat PSF model
jeremyneveu Aug 8, 2024
fe1a5ed
typos
jeremyneveu Aug 14, 2024
643db63
debug set_mask() to not accumulate masked pixels iteration after iter…
jeremyneveu Aug 14, 2024
b5bacb6
reshape spectrogram_fit and speectrogram_residuals as 2D array
jeremyneveu Aug 14, 2024
df0dbfa
remove some unseen cosmics with FFM residuals
jeremyneveu Aug 14, 2024
1dd0210
making gaiaspec loading more explicit
corentinravoux Aug 21, 2024
0a15587
adapt to gaiaspec changes
corentinravoux Aug 21, 2024
ac7e604
Fix to not download everytime the gaia cache spectrum + clearer code
corentinravoux Aug 23, 2024
889e31e
add mask_cosmics function
jeremyneveu Aug 23, 2024
eb5ebcb
for doublemoffat class change eta upper bound to 1
jeremyneveu Aug 23, 2024
e2ce07a
at the end transverse_fit_profile function outliers are detected usin…
jeremyneveu Aug 23, 2024
f3226e6
use ratio 2/1 for holo4_003 where a hologram transmission model is fi…
jeremyneveu Aug 23, 2024
3f533f1
Free pressure parameter for ADR; y_c parameters fixed; only zeroth or…
jeremyneveu Aug 23, 2024
4eeabcb
Free pressure for ADR only (not for Rayleigh), free angle and shiftds…
jeremyneveu Aug 23, 2024
c7c6079
fix A1, higher upper bound for VAOD
jeremyneveu Aug 23, 2024
1a65d73
new auxtel transmission using latest ratio 2/1 (BG40 data rescaled by…
jeremyneveu Aug 23, 2024
fc7e20c
new auxtel transmission using latest ratio 2/1 (BG40 data rescaled by…
jeremyneveu Aug 23, 2024
81a0b82
merge mask_cosmics
jeremyneveu Aug 23, 2024
5aa42b2
Merge branch 'v3.1.0' of github.com:LSSTDESC/Spectractor into gaia_ta…
jeremyneveu Aug 23, 2024
5570042
loosen test on A2 for fit_spectrum
jeremyneveu Aug 23, 2024
d1558d8
repair tests on A2 for fit_spectrum
jeremyneveu Aug 23, 2024
bdda67d
repair extraction CTIO test with rebin=1
jeremyneveu Aug 23, 2024
9958b70
missing else
jeremyneveu Aug 23, 2024
7bb9af6
debug
jeremyneveu Aug 23, 2024
37fc9b3
adapt to pytest>=8.3 suite
jeremyneveu Aug 23, 2024
a72f6e5
cosmetics
jeremyneveu Aug 23, 2024
e21056e
repair test_atmosphere test
jeremyneveu Aug 26, 2024
c0fd560
Merge pull request #157 from LSSTDESC/156-switch-nose-to-pytest
jeremyneveu Aug 26, 2024
5322c06
merge with master
jeremyneveu Aug 26, 2024
410f5a3
add sed error
jeremyneveu Sep 11, 2024
1ab853e
Merge pull request #149 from LSSTDESC/v3.1.0
jeremyneveu Nov 14, 2024
a668e7c
small debugs
jeremyneveu Nov 14, 2024
73a5f83
change version number to 3.1.1
jeremyneveu Nov 15, 2024
19c4abb
Merge pull request #160 from LSSTDESC/debug
jeremyneveu Nov 15, 2024
17c7d1b
remove minimum or negative values for stat fit in check_statistical_e…
jeremyneveu Dec 4, 2024
b92627a
Merge pull request #162 from LSSTDESC/161-bug-in-check_statistical_error
jeremyneveu Dec 4, 2024
04dc5df
put zero arrays for second order if None when saving the spectrum fit…
jeremyneveu Dec 4, 2024
ad23bfc
Merge pull request #164 from LSSTDESC/163-bug-when-saving-order2-if-i…
jeremyneveu Dec 5, 2024
fa4d87d
for SPECTRACTOR_FIT_TARGET_CENTROID = guess replace target_pixcoords …
jeremyneveu Dec 8, 2024
87bc447
Merge pull request #166 from LSSTDESC/165-bug-for-spectractor_fit_tar…
jeremyneveu Dec 8, 2024
95d3728
more precise parameters for wl calib
jeremyneveu Dec 20, 2024
26e1ee2
more robust psf1d transverse function if fit fails
jeremyneveu Dec 20, 2024
b01bdee
add more hydrgoden lines, set Hgamma to H8 for calibration
jeremyneveu Dec 20, 2024
6ad6ba8
add quadnotch
jeremyneveu Dec 20, 2024
31d7ab4
remove prints
jeremyneveu Dec 20, 2024
d6faee3
remove prints
jeremyneveu Jan 20, 2025
2b2fdfd
DM-48491: Modify simbad query code so it works with astroquery 0.4.8 …
jeremyneveu Jan 20, 2025
13b4e93
new quadnotch transmission
jeremyneveu Jan 28, 2025
8473054
Update build.yaml
jeremyneveu Jan 28, 2025
beddecd
Update build.yaml
jeremyneveu Jan 28, 2025
679869d
Update .readthedocs.yml
jeremyneveu Feb 13, 2025
d669e32
switch to micromamba
jeremyneveu Feb 17, 2025
3f3d954
Update build.yaml with conda
jeremyneveu Feb 17, 2025
b60fa2a
Update targets.py to adapt to new astroquery simbad release
jeremyneveu Feb 17, 2025
ad9c278
Update targets.py with imports
jeremyneveu Feb 17, 2025
21f7aec
Update targets.py with self.get_radec_position_after_pm(self.…
jeremyneveu Feb 17, 2025
9db9e1f
Merge pull request #170 from LSSTDESC/169-micromamba-failing-in-ci
jeremyneveu Feb 17, 2025
9b4e6a0
don't overpropagate background uncertainties because bckgrd RMS is al…
jeremyneveu Feb 22, 2025
4eb95a9
faster amplitude params solution with Cholesky, introdude __post_fit_…
jeremyneveu Feb 22, 2025
2504767
try except for DALServerError
jeremyneveu Mar 1, 2025
4e7fc9d
format print of parameters if uncertainty is zero
jeremyneveu Mar 1, 2025
862fe07
remove unused sigma_clip attribute
jeremyneveu Mar 1, 2025
cf12ba4
rewriting of the fitworkspace class, with new arguments and epsilons
jeremyneveu Mar 1, 2025
85236ae
remove x argument from FitWorkspace
jeremyneveu Mar 1, 2025
ddaefd5
remove x argument from FitWorkspace
jeremyneveu Mar 1, 2025
a82946c
rewrite FitWorkspace calls
jeremyneveu Mar 1, 2025
e72c774
Merge branch 'debug' of https://github.com/LSSTDESC/Spectractor into …
jeremyneveu Mar 1, 2025
7a6e0bc
repair load target coordinates
jeremyneveu Mar 14, 2025
0dd5f01
caching mechanisms for target coordinates
jeremyneveu Mar 15, 2025
2fd2cc1
exclude pickle files
jeremyneveu Mar 15, 2025
63a6f8b
remove weak lines from detection algorithm
jeremyneveu Mar 15, 2025
38b0258
positive eta allowed for moffatGauss
jeremyneveu Mar 15, 2025
5b95142
remove background error propagation
jeremyneveu Mar 15, 2025
c953ee6
remove last colum in rotated spectrogram if it is full of nan
jeremyneveu Mar 15, 2025
babc537
correct label for spectrogram amplitude parameter depending on diffra…
jeremyneveu Mar 15, 2025
7d3242f
exclude cache folder
jeremyneveu Mar 15, 2025
d76b5a9
proper motion keys are set using table coordinates keys and not astro…
jeremyneveu Mar 15, 2025
12558f6
use only simbad+cache query for coordinates
jeremyneveu Mar 24, 2025
06e4d98
remove last pixel column if contains nan or zero when cropping the sp…
jeremyneveu Mar 24, 2025
d028b86
more robust filtering of bad psf1d fit before polynome fit
jeremyneveu Mar 24, 2025
a4777c4
merge with head
jeremyneveu Mar 24, 2025
5d113f3
optimize curve_fit fitter method
jeremyneveu Apr 14, 2025
e711ec0
change default paths
jeremyneveu Apr 14, 2025
c8f4644
debut cache coordinates simbad
jeremyneveu Apr 14, 2025
d4b659d
from_config_to_dict
jeremyneveu Apr 14, 2025
0a45403
from_config_to_dict
jeremyneveu Apr 14, 2025
89f9dc7
from_config_to_dict with path in argument
jeremyneveu Apr 14, 2025
04231d6
new Disperser class with configurable .ini files; Distanc2CCD is no m…
jeremyneveu Apr 16, 2025
b633660
Distanc2CCD is no more an implicit default argument of the Disperser …
jeremyneveu Apr 16, 2025
eb5b3d4
calibrate_spectrum with_adr=True if object is a star
jeremyneveu Apr 21, 2025
70e64b9
save chi2_fit after 1d extraction
jeremyneveu Apr 21, 2025
147d96a
repair curve_fit
jeremyneveu Apr 21, 2025
69dd898
load_gaia deals with PNG objects
jeremyneveu Apr 21, 2025
44c90f5
repair test_fitter
jeremyneveu Apr 21, 2025
82f0755
REBIN=1 for test_extractor.py CTIO; repair planetary nebula test
jeremyneveu Apr 21, 2025
fdac8eb
repair test full chain
jeremyneveu Apr 21, 2025
3a757c1
minimum line width with at 1 instead of 0.5 for better line fits
jeremyneveu Apr 21, 2025
7a33a29
fit A1
jeremyneveu Apr 21, 2025
26827dc
remove unuseful derived parameters
jeremyneveu Apr 24, 2025
30ac53a
adapt fit_multispectra to new derivative procedures and add regularis…
jeremyneveu Jul 5, 2025
1a833d7
cancel low value points
jeremyneveu Jul 17, 2025
a2b6d6e
typo
jeremyneveu Jul 17, 2025
ba765fe
ajout de la collecte des lignes de calibration dans la fonction detec…
jeremyneveu Jul 17, 2025
bcafbf1
add lines for quadnotch filter
jeremyneveu Jul 17, 2025
ae19b5a
ajout d'un TODO pour attribuer l'utilisation de la calibration aux li…
jeremyneveu Jul 17, 2025
ba1a543
don't fit A1 when adjusting the position parameters at the beginning …
jeremyneveu Jul 17, 2025
f331c7c
robuts fit of the polynomial evolution of the individual PSF shape pa…
jeremyneveu Jul 17, 2025
8a261fa
rewrite entirely the spectrum calibration to fit spectral lines
jeremyneveu Jul 17, 2025
2405264
Merge branch 'debug' of https://github.com/LSSTDESC/Spectractor into …
jeremyneveu Jul 17, 2025
0f58acc
Merge branch 'master' into debug
jeremyneveu Jul 17, 2025
2af2b03
Merge branch 'master' into debug
jeremyneveu Jul 17, 2025
7dacfec
Supprimer l'argument niter dans la méthode compute_dispersion_in_spec…
jeremyneveu Jul 17, 2025
7810f7e
Ajouter une liste calib_lines pour stocker les lignes de calibration …
jeremyneveu Jul 17, 2025
42f6d77
Mettre à jour la version minimale requise de Python à 3.9 dans setup.py
jeremyneveu Jul 17, 2025
3391bb9
Mettre à jour la version à 3.2.0 dans _version.py
jeremyneveu Jul 17, 2025
2da2a2b
Supprimer l'argument niter dans les appels à compute_dispersion_in_sp…
jeremyneveu Jul 17, 2025
5331b83
debug full_testchain
jeremyneveu Jul 17, 2025
3b12580
Ajouter un paramètre epsilon à l'initialisation de FitWorkspace pour …
jeremyneveu Jul 18, 2025
711bd3e
Renommer la variable 't' en 'tr' pour améliorer la clarté du code dan…
jeremyneveu Jul 18, 2025
b539476
repair doctests and old pieces of code
jeremyneveu Jul 18, 2025
212a250
Modifier l'initialisation de l'objet Astrometry pour utiliser la tabl…
jeremyneveu Jul 18, 2025
ad4c2a7
Modifier la fonction find_target pour utiliser la table Simbad lors d…
jeremyneveu Jul 18, 2025
51557cb
repair doctest
jeremyneveu Jul 18, 2025
3536c3e
repair doctest
jeremyneveu Jul 18, 2025
4dda36d
repair doctests
jeremyneveu Jul 18, 2025
e9d21d1
repair doctests
jeremyneveu Jul 18, 2025
3a72aad
repair doctests
jeremyneveu Jul 18, 2025
71205f1
repair doctests
jeremyneveu Jul 18, 2025
09da036
repair doctests
jeremyneveu Jul 18, 2025
88bb109
repair doctests
jeremyneveu Jul 18, 2025
9bf8767
repair doctests
jeremyneveu Jul 18, 2025
ca26fec
add doctests for NED and Gaia targets
jeremyneveu Jul 18, 2025
41d1092
increase VAOD upper bound
jeremyneveu Jul 18, 2025
c20ae49
disable check statistical error due to strange fitting errors not rel…
jeremyneveu Jul 18, 2025
238d1ff
remove versbosity
jeremyneveu Jul 18, 2025
0a9061d
Merge pull request #167 from LSSTDESC/debug
jeremyneveu Jul 18, 2025
d9d73a6
correction of crop image out of bounds problem in image.py
AngeloLF Oct 14, 2025
cb074ec
replace np.fromstrings
jeremyneveu Oct 15, 2025
ac7e19a
use pyproject.toml
jeremyneveu Oct 15, 2025
4a126d3
correction of crop image out of bounds problem in image.py (and littl…
AngeloLF Oct 15, 2025
d6e3b26
Mise à jour du fichier .gitignore pour inclure des modèles supplément…
jeremyneveu Oct 15, 2025
d9f1d18
correction of crop image out of bounds problem in image.py (and littl…
AngeloLF Oct 15, 2025
c67b420
Merge pull request #173 from LSSTDESC/angelolf
jeremyneveu Oct 15, 2025
2001101
Merge branch 'master' of https://github.com/LSSTDESC/Spectractor into…
jeremyneveu Oct 15, 2025
9befa15
give true Dx Dy for sub_image in image.py
AngeloLF Oct 20, 2025
e9a36c4
Merge pull request #176 from LSSTDESC/angelolf
jeremyneveu Oct 20, 2025
8e84790
Merge branch 'master' of https://github.com/LSSTDESC/Spectractor into…
jeremyneveu Oct 20, 2025
2592627
clean runSimulator.py from obsolete libraries
jeremyneveu Oct 20, 2025
93cf8c6
fix A1
jeremyneveu Nov 21, 2025
3642949
change function name into load_transmission_file
jeremyneveu Nov 21, 2025
7e38a21
auxtel throughput rescaled by 1.30/1.1
jeremyneveu Nov 21, 2025
73858f4
remove wavelengths above 1100nm
jeremyneveu Dec 1, 2025
05699bd
rescale by 1.30552 / 1.1 to account for bad gain value (1.1 instead o…
jeremyneveu Dec 1, 2025
7b3c185
free A2 and free A1
jeremyneveu Dec 1, 2025
86e1a15
small fix for compatibility with gaiaspec
corentinravoux Dec 4, 2025
8a2a42d
Improve hardcoded votable field
corentinravoux Dec 4, 2025
80b81f8
fix
corentinravoux Dec 4, 2025
c48cfd4
last fix
corentinravoux Dec 4, 2025
f8f14c9
ignore parameters.py in tests
jeremyneveu Dec 6, 2025
66c5088
adapter getattr function to pytest
jeremyneveu Dec 6, 2025
a1a107a
simplify library and dependencies installation
jeremyneveu Dec 6, 2025
2480d76
pin astroquery version >=0.4.8
jeremyneveu Dec 6, 2025
30adc8c
use micromamba
jeremyneveu Dec 6, 2025
f221423
add lsst-utils and getobsatmo
jeremyneveu Dec 6, 2025
1ed305c
typo conda-forge
jeremyneveu Dec 6, 2025
c577e19
move getobsatmo
jeremyneveu Dec 6, 2025
e185039
pytest verbosity
jeremyneveu Dec 6, 2025
d0d2655
version number 3.2.1
jeremyneveu Dec 6, 2025
c2552bd
remove mcmc.py from coverage and exceptions
jeremyneveu Dec 6, 2025
96baad2
exclude mcmc.py from tests
jeremyneveu Dec 6, 2025
4163d80
ignore astrometry.py for coverage and test
jeremyneveu Dec 6, 2025
0249878
Merge pull request #174 from LSSTDESC/v3.2.1
jeremyneveu Dec 6, 2025
7272569
merge with v3.2.1
jeremyneveu Dec 6, 2025
958fe4f
add chi2 and outlier numbers in extra parameter results
jeremyneveu Dec 6, 2025
1b3a148
robuts test of null jacobian adapted to different machine precision
jeremyneveu Dec 6, 2025
1b6b6af
extend angstrom_exp bounds to (0,4)
jeremyneveu Dec 6, 2025
be3ff1c
Merge branch 'master' into test_ccdgains
jeremyneveu Dec 6, 2025
a1b6a0f
add len(touliers) in extra
jeremyneveu Dec 6, 2025
0df9e88
Merge branch 'test_ccdgains' of github.com:LSSTDESC/Spectractor into …
jeremyneveu Dec 6, 2025
3f9a9d8
Solution to avoid linalg errors in the linear system evaluation
corentinravoux Dec 15, 2025
bb3572d
Merge branch 'test_ccdgains' of https://github.com/LSSTDESC/Spectract…
jeremyneveu Dec 16, 2025
9b37109
explicit A1 fixed value
jeremyneveu Dec 16, 2025
ad75659
J maybe a list of list so remove J.shape[1]
jeremyneveu Dec 16, 2025
4120b70
obsolete np.trapz
jeremyneveu Dec 16, 2025
20fa66a
explicit list of packages
jeremyneveu Dec 16, 2025
a8c4a7f
move config files in spectractor because it's the only way for pyproj…
jeremyneveu Dec 22, 2025
f25c1c6
add config link
jeremyneveu Dec 22, 2025
0b5d474
unweight edges
jeremyneveu Dec 23, 2025
b48a52b
widen boundaries for DCCD and shiftx; stringent enf of fit conditions…
jeremyneveu Dec 23, 2025
a1f4a63
bug in self.flat type
jeremyneveu Dec 23, 2025
0a930e6
alpha_pix free and reso fitted in wl calibration step
jeremyneveu Dec 23, 2025
8a1c587
sometimes data is zero, put large error
jeremyneveu Dec 24, 2025
bbb1dc3
fix A1; fix A2 only for fit_spectrum
jeremyneveu Dec 24, 2025
aed0ea4
allow negative angstrom exponent for getobsatmo
jeremyneveu Dec 24, 2025
d000224
fix A1=1, fix A2; free VAOD
jeremyneveu Dec 25, 2025
2ca381c
add triangle plot
jeremyneveu Dec 26, 2025
c5cecc1
debug print J.shape
jeremyneveu Dec 28, 2025
9aa4df8
fix angstrom_exp at 0 if min(lambdas)> 500nm
jeremyneveu Dec 29, 2025
b33279b
new transmissions from v3.2.1 best collection u/jneveu/test_auxtel_at…
jeremyneveu Dec 29, 2025
aef34a6
debug installation
jeremyneveu Dec 29, 2025
41be62e
debug intalltaiont
jeremyneveu Dec 29, 2025
9a9b99b
robust relative paths in parameters.py
jeremyneveu Dec 29, 2025
ad3ba46
remove A2 from test if it is fixed
jeremyneveu Dec 29, 2025
b01f4bd
repair test full chain with A2 fixed
jeremyneveu Jan 2, 2026
9c63376
remove absolute paths from config otherwise they are hard written in …
jeremyneveu Jan 2, 2026
09377bb
rmeove MANIFEST.in
jeremyneveu Jan 2, 2026
cc1c95c
Merge pull request #177 from LSSTDESC/test_ccdgains
jeremyneveu Jan 11, 2026
b02ba0d
Merge branch 'master' of https://github.com/LSSTDESC/Spectractor into…
jeremyneveu Jan 11, 2026
83a7460
remove comment
jeremyneveu Jan 11, 2026
cfa5be1
Merge pull request #178 from LSSTDESC/test_ccdgains_robustfit
jeremyneveu Jan 11, 2026
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
85 changes: 85 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: build_and_test

on:
push:
branches:
- main
- lsst-dev
- master
pull_request:

jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: 'latest'
environment-name: test
create-args: >-
python=3.11
channels: conda-forge,defaults
cache-environment: true
cache-downloads: true

- name: Install system dependencies
shell: micromamba-shell {0}
run: |
micromamba install -y astrometry rubin-libradtran -c conda-forge

- name: Install Spectractor with dependencies
shell: micromamba-shell {0}
run: |
pip install -v -e ".[dev]"
pip install git+https://github.com/LSSTDESC/getObsAtmo.git@main


- name: Download test data
shell: micromamba-shell {0}
run: |
wget -r -q -nc http://data.astrometry.net/5000/index-5002-24.fits
wget -r -q -nc http://data.astrometry.net/5000/index-5000-40.fits
mkdir -p $MAMBA_ROOT_PREFIX/envs/test/data/
mv data.astrometry.net/5000/index-*.fits $MAMBA_ROOT_PREFIX/envs/test/data/
export ASTROMETRYNET_DIR=$MAMBA_ROOT_PREFIX/envs/test

- name: List installed packages
shell: micromamba-shell {0}
run: |
micromamba list
pip list -v

- name: Run full chain test
shell: micromamba-shell {0}
run: |
pytest tests/test_fullchain.py --log-cli-level=INFO -v -rs --cov --cov-report lcov

- name: Run pytests
shell: micromamba-shell {0}
run: |
pytest tests/test_extractor.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_simulator.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_utils.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_fitter.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_multispectra.py --log-cli-level=INFO --cov --cov-append --cov-report lcov

- name: Run doctests and coverage
shell: micromamba-shell {0}
run: |
pytest spectractor \
--ignore=spectractor/astrometry.py \
--ignore=spectractor/parameters.py \
--ignore=spectractor/fit/mcmc.py \
-v --cov --cov-append --cov-report lcov \
--doctest-modules \
--doctest-continue-on-failure
continue-on-error: true

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ ls tests/data/*.fits
for i in spectractor/*.py
do
echo Testing $i...
coverage run -a --source=spectractor $i
coverage run -m pytest -a --source=spectractor $i
done

for i in spectractor/extractor/*.py
do
echo Testing $i...
coverage run -a --source=spectractor $i
coverage run -m pytest -a --source=spectractor $i
done

for i in spectractor/simulation/*.py
do
echo Testing $i...
coverage run -a --source=spectractor $i
coverage run -m pytest -a --source=spectractor $i
done

for i in spectractor/fit/*.py
do
echo Testing $i...
coverage run -a --source=spectractor $i
coverage run -m pytest -a --source=spectractor $i
done

20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,27 @@ Spectractor.egg-info/
build/
dist/
*libradtran/
outputs/
docs/_build
*_wcs/
*.bak
*.backup
*.h5
spectractor/version.py
.sconsign.dblite
config.log
tests/.tests/
*__pycache__/
*.pickle
*.cache/*
*.json
*.txt
*.ipynb
*.csv
*.ecsv
*.list
*.dat
*lcov
*bak*
*backup*
notebooks/*
tests/data/*
33 changes: 28 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
# golang: "1.17"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt
- method: pip
path: .
install:
- requirements: docs/requirements.txt
- method: pip
path: .
136 changes: 0 additions & 136 deletions .travis.yml

This file was deleted.

46 changes: 22 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![Build Status](https://travis-ci.org/LSSTDESC/Spectractor.svg?branch=master)](https://travis-ci.org/LSSTDESC/Spectractor)
[![Coverage Status](https://coveralls.io/repos/github/LSSTDESC/Spectractor/badge.svg?branch=master)](https://coveralls.io/github/LSSTDESC/Spectractor?branch=master)
[![Documentation Status](https://readthedocs.org/projects/spectractor/badge/?version=latest)](https://spectractor.readthedocs.io/en/latest/?badge=latest)
<a href="https://ascl.net/2104.004"><img src="https://img.shields.io/badge/ascl-2104.004-blue.svg?colorB=262255" alt="ascl:2104.004" /></a>

# Spectractor

Expand All @@ -17,21 +18,34 @@ Some submodules complete the structures with generic functions:
- `spectractor.logbook`: tools to read logbook `.csv` text files and get some metadata relative to the data images that are not contained in the header;
- `spectractor.tools`: contains generic functions shared by all the subpackages (fitting procedures, plotting functions, etc).


## Installation

Spectractor is written in Python 3.7. The dependencies are listed in the `requirements.txt` file. To install Spectractor, just run
Spectractor is written in Python 3.9. The mandatory dependencies are listed in the `requirements.txt` file. To install Spectractor, just run
```
pip install -r requirements.txt .
```
Be careful, Spectractor can perform fits using the MCMC library [emcee](https://emcee.readthedocs.io/en/stable/) with [mpi4py](https://mpi4py.readthedocs.io/en/stable/) and [h5py](https://www.h5py.org/). The latter might be better installed using `conda install ...` command to get their own dependencies (openmp and hdf5).

For the simulation of spectra, Spectractor needs the following external libraries:
- [libradtran](http://www.libradtran.org/doku.php) to simulate atmospheric transmission: it needs the installation of [netcdf](https://www.unidata.ucar.edu/software/netcdf/) and a python 2 environment (for the compilation only, not the usage); `uvpsec` executable must in the user `$PATH` or the user has to set an environmental variable `$LIBRADTRAN_DIR` pointing to the install directory.
- [pysynphot](https://pysynphot.readthedocs.io/en/latest/) to get the CALSPEC star spectra: the HST CALSPEC calibration spectra must be downloaded and the environment variable `$PYSYN_CDBS` must be created.
- [astrometry.net](https://astrometrynet.readthedocs.io/en/latest/) (optional): needed to create World Coordinate System files from the images; `solve-field` executable must in the user `$PATH` or the user has to set an environmental variable `$ASTROMETRYNET_DIR` pointing to the install directory. Version below or equal v0.78 should be used.
To simulate atmospheric transmission, Spectractor needs [libradtran](http://www.libradtran.org/doku.php) (optional). There are two ways to install this software:
- use the [Rubin observatory conda package](https://anaconda.org/conda-forge/rubin-libradtran)
```
conda install -c conda-forge rubin-libradtran
```
- compile it from [sources](http://www.libradtran.org/doku.php): it needs the installation of [netcdf](https://www.unidata.ucar.edu/software/netcdf/) and a python 2 environment (for the compilation only, not the usage); `uvpsec` executable must in the user `$PATH` or the user has to set an environmental variable `$LIBRADTRAN_DIR` pointing to the install directory.

To find accurate star centroids using astrometry, one can install [astrometry.net](https://astrometrynet.readthedocs.io/en/latest/) (optional). There are two ways to install this software:
- use the anaconda package
```
conda install -c conda-forge astrometry
```
and then download and move [index files](http://astrometry.net/doc/readme.html#getting-index-files) in the `$CONDA_PREFIX/data` folder.
- compile it from [sources](https://astrometrynet.readthedocs.io/en/latest/): it needs the installation of [netpbm](https://netpbm.sourceforge.net/) and [wcslib](https://www.atnf.csiro.au/people/mcalabre/WCS/wcslib/); `solve-field` executable must in the user `$PATH` or the user has to set an environmental variable `$ASTROMETRYNET_DIR` pointing to the install directory.

For faster matrix multiplications, if available for a given computer configuration, one can install [sparse_dot_mkl](https://anaconda.org/conda-forge/sparse_dot_mkl):
```
conda install -c conda-forge sparse_dot_mkl
```

Detailled command lines for the installation of Spectractor and the external dependencies can be found in the file `.travis.yml`.
Spectractor is able to perform parameter fits using the MCMC library [emcee](https://emcee.readthedocs.io/en/stable/) (optional) with [mpi4py](https://mpi4py.readthedocs.io/en/stable/) and [h5py](https://www.h5py.org/). The latter might be better installed using `conda install ...` command to get their own dependencies (openmp and hdf5).

## Basic extraction

Expand Down Expand Up @@ -80,19 +94,3 @@ This object is also returned by the `Spectractor` function.

A tutorial Jupyter notebook is available in the `notebooks` folder.

## Detailed description

### Dispersers

### Shot noise

### Rotation

### Background extraction

### Wavelength calibration
#### First geometrical calibration
#### Second calibration with line detection

### Second order subtraction

1 change: 1 addition & 0 deletions config
Loading
Loading