Skip to content

Commit

Permalink
Merge pull request #651 from radis/remove_python39_limit
Browse files Browse the repository at this point in the history
No upper version limit in RADIS install
  • Loading branch information
minouHub committed Apr 24, 2024
2 parents 3596f14 + 8cd5475 commit fd92ff7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- astropy
- plotly
dependencies:
- python=3.8 # Needed by vaex 4.17 - https://github.com/vaexio/vaex/issues/2397
- python
- astropy>=4.3.1 # Unit aware calculations
- astroquery>=0.4.6 # to fetch HITRAN databases
- beautifulsoup4>=4.10.0 # parse ExoMol website
Expand Down
12 changes: 9 additions & 3 deletions examples/2_Experimental_spectra/plot_fit_lineshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,18 @@
pressure=1, # bar
Tgas=T_ref,
mole_fraction=1,
path_length=4,
wstep=0.001,
databank="hitemp",
verbose=False,
)
w, A = s.get("absorbance") # extract the wavenumber and absorbance
noise_amplitude = 5e-3
noise_amplitude = 5e-2
rng1 = np.random.default_rng(
122807528840384100672342137672332424406
) # to make sure the fit provides the same output each time
noise = (
noise_amplitude * np.random.rand(np.size(A)) - noise_amplitude / 2
noise_amplitude * rng1.random(np.size(A)) - noise_amplitude / 2
) # simulates the noise of an experiment
s = Spectrum.from_array(
w,
Expand All @@ -62,7 +66,9 @@
list_models = [models.Voigt1D() for _ in range(3)]

verbose = False # verbose=True also recommended
gfit, y_err = s.fit_model(list_models, confidence=0.9545, plot=True, verbose=verbose)
gfit, y_err = s.fit_model(
list_models, confidence=0.9545, plot=True, verbose=verbose, debug=False
)
if verbose:
for mod in gfit:
print(mod)
Expand Down
2 changes: 1 addition & 1 deletion radis/test/spectrum/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def test_dimensioned_operations(*args, **kwargs):
assert u.Unit(s.units["radiance"]) == u.Unit(
"mW/cm2/sr/nm"
) # check units are valid
assert s.units["radiance"] == "mW / (cm2 nm sr)" # check units have been simplified
assert s.units["radiance"] == "mW / (nm sr cm2)" # check units have been simplified


@pytest.mark.fast
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Installed by "pip install -e .[dev]" as well as "conda env create --file environment.yml"
lxml # parser used for ExoMol website
hjson # Json with comments (for default_radis.json)
publib>=0.3.2 # Plotting styles for Matplotlib. Version, update to 0.4.0 needed for matplotlib==3.8. However, only 0.3.2 is compatible with python==3.8 (see #647)
publib>=0.4 # Plotting styles for Matplotlib. Version, update to 0.4.0 needed for matplotlib==3.8. However, only 0.3.2 is compatible with python==3.8 (see #647)
hitran-api # HAPI, used to access TIPS partition functions
peakutils
ruamel.yaml
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ def run_setup(with_binary):
],
packages=find_packages(),
install_requires=[],
python_requires="<3.9", # this limit is introduced by vaex, see https://github.com/radis/radis/pull/647
# do not add requirements here, add them directly in the requirements.txt file
# note EP : generate a requirement.txt by Mamba & pip freeze for Pypi deployment ? see https://stackoverflow.com/a/75239980/5622825
extras_require={
Expand Down

0 comments on commit fd92ff7

Please sign in to comment.