Releases: radis/radis
0.14
Description
The major release 0.14
after 0.13
, brings essential fixes to the interface, and the final implementations of the Google Summer of Code 2022 new features with gallery examples.
Main changes :
- non air mixtures automatically taken into account when using Hitran #495
- fitting modules examples #520
- Radis now uses a common API with Exojax to fetch databases
Pull Request Link: #532
What's Changed
Features:
- Implement all new fitting modules and accompanied gallery examples into RADIS by @TranHuuNhatHuy in #520
- add explicit warning/error message if line with 0-cm-1 broadening by @erwanp in #524
- Allow astropy units to be used in crop() by @TranHuuNhatHuy in #526
- Removing completed TODO in radis/lbl/calc.py by @mdrodelo in #527
- Add/common api by @erwanp in #480
- Non air diluent 2 by @Supriya1702 in #495
- number of trans files in H3O_p/Exomol error manually fixed by @HajimeKawahara in #531
Docs:
- Additional illustrative gallery examples for new fitting module by @TranHuuNhatHuy in #522
- Add some small docs/examples by @TranHuuNhatHuy in #518
New Contributors
- @mdrodelo made their first contribution in #527
- @HajimeKawahara made their first contribution in #531
Full Changelog: 0.13.1...0.14
0.13.1
Description
Intermediary version between 0.13 and 0.14, brings important fixes to the experimental GPU mode, many other interface fixes, as well as the first implementations of the Google Summer of Code 2022 new features.
Pull Request : #517
What's Changed
Features:
- Fetch hitran update by @Supriya1702 in #505 : you can now fetch non-air broadening parameters, as well as any other parameter available in the HITRAN database.
from radis.io.hitran import fetch_hitran
df = fetch_hitran("CO",["n_CO2","gamma_CO2"])
print(df)
print(df.columns)
Performance:
- Chunk size implementation for DIT Algorithm loops for Broadening by @sagarchotalia in #489 : allows to compute extreme amount of lines on limited RAM systems.
- update chunksize test to make it faster - and RT minor perf improvement by @erwanp in #503
Interface:
- Added warning and help improvement for get_population, update line survey, add example by @minouHub in #512
Fixes:
- Updated numpy<=1.22.3 and fixed linting by @anandxkumar in #490
- fix specutils i/o when dealing with wavelngths by @erwanp in #499
- Fix gpu by @dcmvdbekerom in #514 : GPU sliders now work in Radiance mode
- Fix HDF5/ api issues by @erwanp in #487
- Fixing the case when the chunksize is too small by @sagarchotalia in #500
Docs:
- update physics constants to NIST CODATA standards, update docs by @erwanp in #498
- Added the Radis Website Link by @sonikarajesh in #475
- Whitespaces fix by @Supriya1702 in #481
- Remove RTD special vaex handling by @erwanp in #502
- ✨ we now have a Youtube Video Channel
Refactor:
- DBManager Refactor and simplification of ExoMol MdBMol by @erwanp in #465 : first step before Common-API with Exojax.
- Refactor extra molecular parameters by @erwanp in #516 . Simplification of the
radis.config
file.
Full Changelog: 0.13.0...0.13.1
📣 Other News
- Extreme amounts of change and improvement in Radis-App, have a look . Web app : https://radis.app/ ; Source Code : https://github.com/suzil/radis-app
- We presented Radis at the ASA-HITRAN 2022 conference. The records from the conference are not available, but a rehearsal video is available in our new Youtube channel above. We discuss the history, goals, features, algorithms, latest changes and future of Radis.
0.13.0
Spring release 🌱
Pull request details : #472
🔬 (Physics) Features
- #462 adding GEISA database support by @TranHuuNhatHuy
s = calc_spectrum(1000 / u.cm, 10000 / u.cm,
molecule="CH4",
mole_fraction=1900e-9,
isotope='1,2,3',
wstep='auto',
pressure=1.01325 * u.bar,
Tgas=296 * u.K,
path_length=100 * u.cm,
databank='geisa', # GEISA-2020
verbose=False,
export_lines=True,
)
import matplotlib.pyplot as plt
plt.figure(figsize=(12,6))
s.plot("xsection", yscale='log', nfig='same')
s.line_survey()
GEISA database can be accessed as a Pandas DataFrame using fetch_geisa() :
from radis.io.geisa import fetch_geisa
df = fetch_geisa("H2O")
print(df)
wav int airbrd ... ierrT Tdpnself ierrU
0 0.052583 2.154000e-33 0.0923 ... 0.0 -0.99 -0.99
1 0.181997 2.486000e-35 0.0399 ... 0.0 -0.99 -0.99
2 0.184013 8.470000e-36 0.0399 ... 0.0 -0.99 -0.99
3 0.187637 5.255000e-29 0.0900 ... 0.0 -0.99 -0.99
4 0.363402 2.041100e-33 0.0800 ... 0.0 -0.99 -0.99
... ... ... ... ... ... ...
362217 25332.871900 8.100000e-28 0.1056 ... 0.0 -0.99 -0.99
362218 25333.215510 1.560000e-28 0.1078 ... 0.0 -0.99 -0.99
362219 25334.143900 4.750000e-28 0.0905 ... 0.0 -0.99 -0.99
362220 25335.071700 8.260000e-28 0.1102 ... 0.0 -0.99 -0.99
362221 25336.948790 7.170000e-29 0.1125 ... 0.0 -0.99 -0.99
[362222 rows x 31 columns]
⚙️User-interface
- #467 radiance & emisscoeff units are now consistent with waverange unit ; i.e. plotting in
cm-1
will yield a default radiance in ~mW/cm2/sr/cm-1
while plotting innm
will yield a default radiance in~mW/cm2/sr/nm
@AllanHOlesenBW (major refactor under the hood) - #448 normalize options
- #471 line-survey works for multiple molecules
from radis import calc_spectrum
import astropy.units as u
s4 = calc_spectrum(1950 / u.cm, 1980 / u.cm,
mole_fraction={'CH4':1900e-9, 'CO2':400e-6},
isotope='1,2,3',
pressure=1.01325 * u.bar,
Tgas=296 * u.K,
path_length=100 * u.cm,
databank='geisa',
verbose=False,
export_lines=True)
s4.line_survey(overlay='abscoeff', barwidth=0.001)
🏃 Performance improvement
- #464 : less RAM usage when generating ExoMol database files.
🐛 Bug fixes
📝 Documentation
- #453
- #462 new Gallery Example : compare CO in HITRAN and GEISA
Detail
- fix emisscoeff units conversion by @erwanp in #455
- Fixes Hitemp whitespace parsing by @erwanp in #458
- Set input field instead dropdown by @arunavabasu-03 in #459
- Exomol api update by @erwanp in #464
- Normalize() return norm factor and units option by @CorentinGrimaldi in #448
- Fix/ci env by @erwanp in #468
- update linesurvey & plot by @erwanp in #466
- Add GEISA database by @TranHuuNhatHuy in #462
- Updated references.rst by @sonikarajesh in #453
- Add consistent units by @erwanp in #467
- geisa docs & line-survey by @erwanp in #471
Full Changelog: 0.12.1...0.13.0
0.12.1
Fix of 0.12.0
Main physics change:
- the default lineshape optimization routine is changed ; the new one being more robust. It will improve accuracy for extremelly thin lineshapes. ( #421 and #422)
What's Changed
Features :
- Implement astropy unit conversion to rescale_path_length() by @TranHuuNhatHuy in #445
- update defaults (vaex as default HDF5 library, DIT weights=simple as default optimization routine) by @erwanp in #422
Fixes :
- Gpu widget bug fix by @dcmvdbekerom in #419
- fixes invalidindex error by @erwanp in #428
- Updated travis.yml for micromamba by @Supriya1702 in #426
- fix HCN import in ExoMol by @minouHub in #420
- fix lineshapes issues at low pressure of #421
- Adding SideButtons to the SideBar by @sonikarajesh in #433
- Added link to Spectra Database by @sagarchotalia in #435
- fix: lint errors by @gagan-aryan in #436
- Fixed inaccessible links in several documents by @TranHuuNhatHuy in #437
- Add some improvements in fetch_*() documentations by @TranHuuNhatHuy in #442
- Templates updated by @arunavabasu-03 in #438
- Fix syntax with truncation=None option by @Supriya1702 in #447
- fix Readthedocs build (attempt 1) by @erwanp in #449
New Contributors
- @Supriya1702 made their first contribution in #426
- @sonikarajesh made their first contribution in #433
- @sagarchotalia made their first contribution in #435
- @TranHuuNhatHuy made their first contribution in #437
- @arunavabasu-03 made their first contribution in #438
Full Changelog: 0.11.1...0.12.1
0.12.0
0.12.0
Christmas release 🎅 , adding GPU support as well as many new small features and improvements, and an important bug fix for HITRAN users.
See PR #415
Changes since 0.11.1 (November 2021) :
🔬 (Physics) Features
nothing new
⚙️User-interface
- #380 GPU widgets are released ! 🎉
gpu-sliders-CO2.mp4
- #414 : support for cross-sections
>>> s = radis.test_spectrum()
>>> s.plot("xsection")
COspectrum2502421670720 new quantities added: ['xsection']
- #413 automatically compute spectral array if possible ; no need to "update".
# will always work if possible :
s.take("abscoeff"/"emisscoeff"/"xsection"/"transmittance_noslit"/ etc.)
s.plot("abscoeff"/"emisscoeff"/"xsection"/"transmittance_noslit"/ etc.)
s.get("abscoeff"/"emisscoeff"/"xsection"/"transmittance_noslit"/ etc.)
- #412
- #409 custom user download , requested by @Springder
🏃 Performance improvement
- #380 unleashes the power of the GPU !
🐛 Bug fixes
📝 Documentation
🏁 CI / Dev / Tests
nothing new
🏗️ Refactor / change in architecture
nothing new
Full Changelog: 0.11.1...0.12.0
0.11.1
0.11.0
0.11.0
Last major release of 2021 with extreme performance improvements when computing large range spectra. And by large range, we mean full-range, i.e. 0 - 30,000 cm-1 !
See PR #400
Changes since 0.10.3 (September 2021) :
🔬 (Physics) Features
- #394 : ExoMol works for isotopes
- #394 : add isotopic abundance in ExoMol calculations [Important ! calculations other than main isotopologue were not valid for ExoMol in 0.10.3 ]
- #394 : add default molar_mass, abundances & full-isotope name for all 85 ExoMol species that are not present in HITRAN
- #394 : when not available abundances of molecules are computed from a simple model based on isotopic terrestrial abundance of elements (scripts are available in test_molecule_lists)
- #398 re-add broadening for ExoMol molecules
⚙️User-interface
- #394 : auto-fetch the full molecule & isotopes list from ExoMol website
- #394 simplify calc_spectrum waverange input : default is now to use
wmin, wmax
(unit-aware), instead ofwavenum_min, wavenum_max
orwavelength_min, wavelength_max
(old parameters still work) - 399 bridge to/from Specutils
spectrum = s.to_specutils()
...
from radis import Spectrum
Spectrum.from_specutils(spectrum)
- #399 option to return SpectrumFactory used in a calc_spectrum computation
s, sf = calc_spectrum(.... ,return_factory=True
sf.df1 # lines used
- #398 add fetch_hitran() which downloads all lines/isotopes of HITRAN database (Vaex compatible). It is included in
calc_spectrum
andSpectrumFactory.fetch_databank
by default.
calc_spectrum(..., databank=("hitran", "full")) # predownload full database & isotopes (once for all)
calc_spectrum(..., databank=("hitran", "range")) # download only the required the range & isotope
- #396
- #395
s = s/s2.max() # works with units
- #378 write/load Spectrum in HDF5 (the fastest way) with metadata
s.to_hdf5()
Spectrum.from_hdf5()
- #378 Spectrum to pandas
s.to_pandas()
- #369 new get_baseline functions
sb = s_exp.get_baseline(algorithm="als")
s_exp.plot()
sb.plot(nfig="same", lw=3)
🏃 Performance improvement
- ⭐ #398 make vaex the default memory-mapping-engine for radis (Spyder IDE-users: you may want to deactivate this until spyder-ide/spyder#16183 is fixed. There is a new key in the config file for that!)
- ⭐ #398 only load required columns by default (makes it 8-20x faster to load databases)
Example : full HITEMP-CO2 database (0 - 30,000 cm-1 loaded in 5s instead of 80 !)
- #394 download HITRAN full-range makes HITRAN calculations faster (no more download after the first time)
- ⭐ #386 #388 make it possible to compute full-range spectra : RADIS automatically switches to a sparse-wavenumber implementation of the DLM/DIT algorithm, based on a scarcity criterion
Ngridpoints/Nlines > 1
CO2/H2O full range, computed from HITRAN, for a 1-km homogeneous layer of atmosphere at 300 K, 1 bar
import astropy.units as u
from radis import calc_spectrum
calc_spectrum(
wmin=0.5 * u.um,
wmax=15 * u.um, # cm-1
mole_fraction={"CO2": 420e-6, "H2O": 0.02},
isotope="1,2,3",
pressure=1.01325, # bar
Tgas=300, # K
path_length=1e5, # 1 km in cm
verbose=2,
databank="hitran",
wstep="auto",
)
🐛 Bug fixes
- #393
- #391
- #381 , #385
- #356
- #338 (not fully fixed, but we know the problem. Spyder-IDE users do not use this mode)
📝 Documentation
🏁 CI / Dev / Tests
nothing new
🏗️ Refactor / change in architecture
- #392 : of how we compute partition functions
What's Changed
- Improved hdf5 manager : HDF5 write/load of Spectrum files & HITRAN files by @erwanp in #378
- fix line survey tool with new radisdb-hitemp format by @erwanp in #383
- Fixes: Issue/381 by @anandxkumar in #385
- Add/sparse waverange optim by @erwanp in #386
- Prepare support for NIST extension by @erwanp in #384
- doc improvements by @erwanp in #389
- Refactor - simplify Qgas by @erwanp in #392
- Exomol update by @erwanp in #394
- Fully-Sparse wavenumber arrays by @erwanp in #388
- Make line_survey more flexible for extenral codes by @erwanp in #396
- Fixes #356 by @anandxkumar in #397
- Improve SpecDatabase (bug correction and update) by @CorentinGrimaldi in #390
- Dimensioned Spectrum.max() function by @erwanp in #395
- Add specutils bridge by @erwanp in #399
- Make Vaex the default HDF5 engine, add Exomol hdf5 support by @erwanp in #398
- Fix of get_baseline() function of Spectrum class #368 by @BlehMaks in #369
- Updated convolve_with_slit with warnings if instrumental function has large near-zero wings by @gh4ag in #283
- 0.11.0 by @erwanp in #400
Full Changelog: 0.10.3...0.11.0
0.10.3
0.10.3
Minor update of 0.10 with a very important fix if you're combining equilibrium & non-equilibrium spectra with MergeSlabs
(see pull request : #375 )
Changes since 0.10.1 (August 2021) :
🔬 (Physics) Features
⚙️User-interface
Nothing new
🏃 Performance improvement
- #373 parallel download & parsing of CO2/H2O HITEMP files, activated by default, by @brendandrury
🐛 Bug fixes
- #370 , #371 by @CorentinGrimaldi (very important fix, if merging equilibrium and non-LTE spectra with MergeSlabs you should update)
- #362 by @Springder
- #358
📝 Documentation
🏁 CI / Dev / Tests
Nothing here
🏗️ Refactor / change in architecture
Not here neither
0.10.2
0.10.1
0.10.0
(see Pull request and code changes here)
4th release of RADIS in 2021, and the largest so far !
New physics with ExoMol support, by-default truncations to account for subLorentzian behaviors, custom abundances for non-terrestrial atmospheres. Major improvements in performances (reduced memory consumption, faster database loading, up to 10x faster small CPU spectra, large range spectra are 2-30x faster, 3500x faster nonequilibrium partition functions). A few handy features for post-processing (custom plotting themes, ruler tool) or for the calculations (automatic wavenumber grid, fitting methods, new profiler, new choice of truncation & effect of neighbour lines), and even a new method to automatically cite the papers that contributed to your calculation ! 🏃
And also, lot's of new Examples of what can be done with RADIS :
10 people contributed to this version, including the major works of @anandxkumar and @gagan-aryan on their OpenAstronomy GSOC-2021 projects. 👏
Changes since 0.9.29 (April 2021) :
🔬 (Physics) Features
- #319, #320 ExoMol Support
- #340, #343 Adds default line truncation at 50 cm-1 to account for sublorentzian behaviors in the far wings. Chi-factors will be implemented in the next version.
- #301 for non terrestrial atmospheres
Also notice that the HITRAN team has completed major additions to the database (see "Database Update" on the the HITRAN website), and these are available in RADIS with databank='hitran'
⚙️User-interface
- #251
cutoff=None
is valid and meanscutoff=0
- #250 Automatic wavenumber grid resolution with
wstep='auto'
(see Performance) - #281
- #291 a ruler to measure offsets or linewidths directly on RADIS
plot(show_ruler=True)
andplot_diff(show_ruler=True)
- RADIS updated to support Fitroom, a multi-dimensional fit environment. See the 1min-video
- #348 to have your own plotting themes, like
seaborn
- #336 fitting functions, see the the fitting Examples
- #343 : adds two independant parameters choice of
truncation
& effect ofneighbour_lines
(replaces the old parameterbroadening_max_width
- #345 :
s.cite()
to generate your Bibtex entry
🏃 Performance improvement
- #250 Automatic wavenumber grid resolution by @anandxkumar : makes sure you always have the right balance in between accuracy and performance. Will become the default mode in 0.9.31, try it before by setting
wstep='auto'
in calc_spectrum or SpectrumFactory . Feedback welcome ! - #233 #234 Fast Cython implementation of add_at in LDM method, by @dcmvdbekerom
- #252 in SpectrumFactory, do not load rovibrational energies (needed for nonequilibrium calculations) unless we actually need nonequilibrium calculations
- #286 : only downloads the HITEMP files you need, i.e., not the full wavenumber range.
- #287 : reduced memory usage and up to 2x faster linestrength calculations by @gagan-aryan
- #303 : about 20% faster to load .spec files
- #304 up to 10x faster to calculate very small spectra (~1 cm-1), by @minouHub
- #306 : up to x20 faster database loading with
vaex
engine - #309
- #316 500-3500x faster nonequilibrium partition functions
- #325 new profilers
- #323 : 2-30x faster spectra in LDM+Voigt
- #343 : LDM + Voigt becomes the default, making large range spectra 2-30x faster. See this benchmark by @anandxkumar
Note : some performance improvements are not activated by default in this version. See
partfunc="tabulation"
#316 ,wstep='auto'
#250 , orfetch_hitemp("OH", engine="vaex")
#306 . Try them !
🐛 Bug fixes
- #211 #264 do not parse local/global quanta if missing values : fixes problem with HITEMP H2O unlabelled lines
- #248 fix error when fetching hitran isotopes with no lines in the spectral range by @CorentinGrimaldi
- #260 slit shape was not saved in the Spectrum conditions, fix by @CorentinGrimaldi
- #257 fix reading of single path in config file entry by @CorentinGrimaldi
- #218 #219 #270 fix automatic correction of slit dispersion in apply_slit() by @CorentinGrimaldi
- #277
- #280 (STILL OPEN)
- #282 by @gh4ag
- #298
- #294
- #308
- #326
📝 Documentation
- #261 add documentation of radis.json
- #242 #256 improve error messages
- #263 #246 #235 #231 improve docs
- #230 links to source code in online docs, and clickable flow chart
- #265 #240 add default arguments automatically (still WIP)
- #293
- #315
- #331
🏁 CI / Dev / Tests
🏗️ Refactor / change in architecture
- Cython module architecture in #234
- #287 , #302
- #344 will prevent many user-problems with "convolved and non-convolved" quantities
- #347 by @MVAMULYA
- #321
And also:
- RADIS-Lab was updated with preconfigured HITEMP-H2O lines. Try it out, or share it : no install needed (will be updated in the coming days with RADIS 0.9.30 support).
- #125 One can now chat with the community directly from the RADIS website. Ask all your questions !
- @dcmvdbekerom gave a talk describing the DIT algorithm that powers RADIS. The 15-min video is available here.
- an automatically differentiated version of the DIT algorithm has been implemented in the Exojax code by @HajimeKawahara, to model exoplanets, brown drafts and generally for inverse problems in radiative transfer. Have a look !