Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
3b7583a
Added parallel CO2 chunk downloader with ThreadPoolExecutor
merintheres Nov 14, 2025
db74bb6
added per-chunk progress bars
merintheres Nov 20, 2025
ca2139e
Merge branch 'radis:develop' into fix/threaded-download
merintheres Dec 7, 2025
b1a008d
Enable per-chunk progress, clean up error handling
merintheres Dec 16, 2025
47acaf6
Added test for parallel CO₂ chunked download
merintheres Dec 16, 2025
9cf539b
Added explicit filename checks
merintheres Dec 17, 2025
7ac9184
Update test for CO₂ chunked download
merintheres Dec 18, 2025
1e9c646
Remove try-except block
merintheres Dec 21, 2025
404685b
added HITEMP tests to TRAVIS
minouHub Dec 22, 2025
9d9aa27
moved continue-on-error
minouHub Dec 22, 2025
7da1df7
removed error raised for testing purpose
minouHub Dec 22, 2025
d122854
correct indent
minouHub Dec 22, 2025
6ee47cc
added doc BEFORE building project
minouHub Dec 22, 2025
a690475
update regular publish file
minouHub Dec 22, 2025
b3019ff
renaming more explicit
minouHub Dec 22, 2025
c9d91fb
remove plot=True for compatibility with Windows CI
minouHub Dec 22, 2025
36043b6
Cap parallel download threads using CPU count
merintheres Dec 22, 2025
eb8aa58
remove more automatic plotting and adding an additional python versio…
minouHub Dec 22, 2025
6442863
put back one plot
minouHub Dec 22, 2025
129a914
Merge pull request #896 from radis/CI_HITRAN_credentials
minouHub Dec 22, 2025
a6e4c29
Merge branch 'radis:develop' into fix/threaded-download
merintheres Dec 22, 2025
4378d48
fix(geisa): derive branch and jl from locl
PavanendraBaahubali Dec 9, 2025
c33ac90
Apply pre-commit formatting (black, isort, line endings)
PavanendraBaahubali Dec 10, 2025
6cfde8e
test: add GEISA branch field tests (address review feedback)
PavanendraBaahubali Dec 18, 2025
2c633bb
Merge pull request #885 from merintheres/fix/threaded-download
minouHub Dec 26, 2025
a4f2e5d
add new HITRAN molecules
minouHub Dec 26, 2025
eaff7e5
Merge pull request #897 from radis/new_HITRAN_molecules
minouHub Dec 26, 2025
e9a0152
Update hitranapi.py
Leberwurscht Nov 20, 2025
9a46225
Update hitranapi.py
Leberwurscht Nov 29, 2025
c9c4baf
Merge pull request #886 from Leberwurscht/develop
minouHub Dec 27, 2025
ba5eaa0
feat: Standardize database progress output across all APIs
tanishadahale Dec 28, 2025
35d2ba4
Update author in database_progress.py
tanishadahale Dec 28, 2025
b65c326
style: Apply linting fixes (black, isort, flake8)
tanishadahale Dec 28, 2025
5350ac4
Add test to verify CPU and GPU spectra equivalence
PavanendraBaahubali Dec 30, 2025
ed29c9b
Merge branch 'develop' of https://github.com/radis/radis into fix/gei…
PavanendraBaahubali Dec 30, 2025
13f0b82
tests(gpu): refactor GEISA CPU/GPU test to reuse standard residual ch…
PavanendraBaahubali Jan 12, 2026
89237b5
Refactor: Remove parfuncfmt
Omiii-215 Jan 13, 2026
f8420d8
Refactor: Remove parfuncfmt from load_databank() API
Omiii-215 Jan 14, 2026
77ffa59
Fix: Remove parfuncfmt from global API and resolve ReadTheDocs build …
Omiii-215 Jan 14, 2026
5068f82
Address PR #899 review: Standardize database output, fix headers, sil…
tanishadahale Jan 17, 2026
d5cb3a4
update of CO2 spectrum in HITRAN
minouHub Jan 23, 2026
1a2041f
update doc accounting for PyPi not up to date
minouHub Jan 23, 2026
cbfacbb
Add automatic residual plotting to SpecDatabase.fit_spectrum (#377)
tanishadahale Jan 23, 2026
83964e6
Fix: Update non-regression test values for HITRAN2024
tanishadahale Jan 29, 2026
473b2fd
fix(arrays): remove numba signature for readonly arrays
tanishadahale Jan 30, 2026
db788e6
refactor: update checks
tanishadahale Jan 30, 2026
28532c4
fix(arrays): remove all explicit Numba signatures for readonly compat…
tanishadahale Jan 30, 2026
3993f08
fix(api): fix NIST ASD parsing TypeError for modern Pandas string types
tanishadahale Jan 30, 2026
0ffbaaf
remove unused import
minouHub Jan 31, 2026
b1ffe20
Merge pull request #910 from tanishadahale/hitran-update
minouHub Jan 31, 2026
9c0ee0c
solve conflicts
minouHub Jan 31, 2026
f954d89
Merge pull request #906 from radis/newHITRANCO
minouHub Jan 31, 2026
fbdc528
Fix: Address PR comments, restore warning, fix stale tests, and clean…
Omiii-215 Jan 31, 2026
5f5bad9
Merge branch 'upstream/develop' into fix/remove-parfuncfmt: Resolve t…
Omiii-215 Jan 31, 2026
83518a2
Fix: Implemented is_pytest check, reverted AttributeError, refactored…
Omiii-215 Feb 1, 2026
0431dbd
Fix: Restore verified test_calc reference values (reverting the rever…
Omiii-215 Feb 1, 2026
12af149
Merge pull request #903 from Omiii-215/fix/remove-parfuncfmt
minouHub Feb 2, 2026
e2c97c0
feat: add support for wildcards and lists in databank parameter of ca…
tanishadahale Feb 3, 2026
979b5f5
Merge branch 'radis:develop' into progress-bar
tanishadahale Feb 4, 2026
d6ee8ee
Fix linting issues (flake8)
tanishadahale Feb 4, 2026
ad2fdfe
Fix inline emphasis warning in fetch_exomol docstring
raza-khan0108 Feb 4, 2026
3b853cb
Sphinx deprecation warning in conf.py is now fixed
raza-khan0108 Feb 4, 2026
2f59ae3
Standardize cached database output and fix ExoMol header
tanishadahale Feb 5, 2026
fc30fab
Implement wildcard and list support for databank in calc_spectrum
tanishadahale Feb 5, 2026
2414657
Merge upstream/develop and resolve conflicts in radis/test/utils.py
tanishadahale Feb 5, 2026
cfe29d9
Merge upstream/develop into hitemp-wildcards-support
tanishadahale Feb 5, 2026
9a076f2
feat: improve wildcard and HITEMP support in calc_spectrum
tanishadahale Feb 5, 2026
ece146e
feat: updated progress bar implementation and tests (cleaned)
tanishadahale Feb 5, 2026
6b59b9d
fix: remove duplicate GEISA header in database download
tanishadahale Feb 7, 2026
9ac6d7d
Fix duplicate 'Download:' section header in database fetching
tanishadahale Feb 11, 2026
7e5300d
remove duplicate download section
tanishadahale Feb 11, 2026
ac28c9b
Merge pull request #899 from tanishadahale/progress-bar
minouHub Feb 12, 2026
1d66486
add comment
minouHub Feb 12, 2026
fd437ed
Merge branch 'develop' into fix/geisa-missing-branch-info
minouHub Feb 12, 2026
dd7b769
added warning
minouHub Feb 12, 2026
6c92483
linting
minouHub Feb 12, 2026
a38bfe3
Merge pull request #890 from PavanendraBaahubali/fix/geisa-missing-br…
minouHub Feb 12, 2026
3a2478e
Apply pre-commit linting fixes to all files
tanishadahale Feb 12, 2026
eb1152a
Apply pre-commit linting fixes to all files
tanishadahale Feb 12, 2026
5db8f34
Add noise to experimental spectrum to mimic real measurements
tanishadahale Feb 12, 2026
483969e
Add noise to experimental spectrum to mimic real measurements
tanishadahale Feb 12, 2026
d78c75f
Fix: Use correct method to add noise to spectrum
tanishadahale Feb 13, 2026
00c4042
Merge branch 'radis:develop' into 377
tanishadahale Feb 14, 2026
0dae813
Merge branch '377' into claude/address-pr-comment-JOBhw
tanishadahale Feb 14, 2026
da858f6
Fix: Use correct method to add noise to spectrum
tanishadahale Feb 14, 2026
b4fc7d7
Fix: Specify radiance_noslit when getting max to avoid ambiguity
tanishadahale Feb 15, 2026
dcb7d82
Fix: Specify radiance_noslit when getting max to avoid ambiguity
tanishadahale Feb 15, 2026
baeba7a
Apply PR suggestions from minouHub
tanishadahale Feb 15, 2026
3a22074
Apply PR suggestions
tanishadahale Feb 15, 2026
4d24276
Fix inconsistent spectral_points reporting (#613)
apoorvdarshan Feb 17, 2026
be3d042
Fix: Use take() to avoid ambiguity when adding noise to spectrum
tanishadahale Feb 17, 2026
e9225dd
Modernize DeprecationWarning usage for cached parameters
Feb 17, 2026
baf3153
Fix warning formatting (PEP8)
Feb 20, 2026
6fad593
Fix warning formatting (PEP8)
Feb 20, 2026
57e4c8f
Fix warning message consistency
Feb 20, 2026
2f159ed
Apply suggestion from @minouHub
tanishadahale Feb 20, 2026
094cb96
Use np.arange for less biased residual search in fit_spectrum example
tanishadahale Feb 20, 2026
3d67bfc
Merge pull request #920 from ashrinc/develop
minouHub Feb 20, 2026
070e3d2
Merge pull request #907 from tanishadahale/377
minouHub Feb 20, 2026
be14d4b
Merge pull request #918 from apoorvdarshan/fix/consistent-spectral-po…
minouHub Feb 20, 2026
3a317ff
Merge branch 'develop' into fix/679-doc-warnings
raza-khan0108 Feb 21, 2026
c2f0bd2
Fix: Warn when wildcard pattern matches no files instead of silent pass
tanishadahale Feb 21, 2026
efe15a3
fix(ci): restore codecov support and fix tests
Omiii-215 Feb 21, 2026
b7cb6e2
docs: remove deprecated LGTM badge and fix minor typo
archiristo Feb 23, 2026
924af61
Refactor README formatting and content structure
archiristo Feb 23, 2026
31909df
fix(phys): add validation for non-positive temperatures in planck fun…
Zeyadzahran Feb 22, 2026
7724173
Retry CI
tanishadahale Feb 23, 2026
9e209fa
Retry CI - Tkinter issue on Windows runner
tanishadahale Feb 23, 2026
0659fcc
test: add api mock tests and fix CI coverage config
Omiii-215 Feb 24, 2026
e9f0d46
fix(ci): set PYTHONPATH to resolve module without conftest.py
Omiii-215 Feb 24, 2026
d3e5872
Change wildcard pattern check from warning to error
tanishadahale Feb 24, 2026
f68aa39
Add test for wildcard path error
tanishadahale Feb 24, 2026
11e07c5
Merge pull request #934 from Zeyadzahran/fix-blackbody-validation
minouHub Feb 25, 2026
28597cd
Merge pull request #914 from tanishadahale/hitemp-wildcards-support
minouHub Feb 25, 2026
fe27e1f
Merge pull request #913 from raza-khan0108/fix/679-doc-warnings
minouHub Feb 25, 2026
71154a9
fix(ci): remove unused doctests and PYTHONPATH from CI config
Omiii-215 Feb 25, 2026
88b2920
chore: remove tracked conftest.py to prevent downstream conflicts
Omiii-215 Feb 25, 2026
4f3d34d
fix(ci): fix module resolution in Ubuntu 3.12 by running pytest as py…
Omiii-215 Feb 25, 2026
fc37bdf
fix(ci): remove mock api tests to fix Ubuntu 3.10 vaex CI crash and a…
Omiii-215 Feb 25, 2026
0df2256
fix(ci): Revert to pytest from python -m pytest as suggested by maint…
Omiii-215 Feb 25, 2026
cf8092e
Merge pull request #909 from Omiii-215/feat/785-restore-codecov
minouHub Feb 26, 2026
f346a3c
perf: optimize startup time by lazy loading heavy dependencies
Zeyadzahran Feb 24, 2026
71c6adb
fix: replace all bare except: with specific exception types
Zeyadzahran Feb 26, 2026
4a00da6
Refactor: switch from os.path to pathlib (partial) (#936)
tanishadahale Feb 27, 2026
db0c5de
Update radis/lbl/base.py
Zeyadzahran Mar 2, 2026
2981496
Add registration for partial HITEMP CO2 downloads
merintheres Mar 3, 2026
b416263
Fix partial HITEMP CO2 registration
merintheres Mar 3, 2026
a6740bb
Use wav_pairs to compute accurate bounds for registration
merintheres Mar 3, 2026
26eae8a
revert scipy.optimize to normal import
Zeyadzahran Mar 2, 2026
b69333f
Merge pull request #941 from Zeyadzahran/lazy-imports
minouHub Mar 4, 2026
8378918
Fix LineSurvey to respect lineinfo for unknown database formats
tanishadahale Mar 4, 2026
55a2539
Fix TODOs: add error/warning messages and fix bare except
tanishadahale Mar 4, 2026
c8779ac
Add per-file metadata structure for HITEMP CO2 partial download
merintheres Mar 4, 2026
856a65c
unit test for register_partial_hitemp_co2
merintheres Mar 4, 2026
b0eb285
Refactor CO2 partial registration and handle duplicate entries
merintheres Mar 5, 2026
44b64cd
Register CO2 chunks per-file during processing and add metadata helper
merintheres Mar 5, 2026
b0e115b
Move warn import to module level
tanishadahale Mar 5, 2026
0ead84b
Merge pull request #956 from tanishadahale/fix-todos-warnings
minouHub Mar 5, 2026
c434b58
Enhance HITEMP CO2 registration with detailed metadata and update tests
prathamhole14 Mar 5, 2026
98d2981
pre-commit newer version
prathamhole14 Mar 5, 2026
16c04e5
removed databank_name
prathamhole14 Mar 5, 2026
cad204c
Merge branch 'radis:develop' into fix-hitemp-co2-register
merintheres Mar 6, 2026
723f4e4
Add file-like object support to spectrum.store() (fixes #506) (#930)
tanishadahale Mar 6, 2026
1ee418c
ci: fix Travis coverage upload to radis/radis Codecov project
Zeyadzahran Mar 6, 2026
6984eaa
Improve LineSurvey hover labels: bold formatting and better spectrosc…
tanishadahale Mar 6, 2026
5cbbb4c
Merge pull request #960 from Zeyadzahran/fix-travis-codecov-upload
minouHub Mar 7, 2026
0f24c17
Merge pull request #954 from merintheres/fix-hitemp-co2-register
minouHub Mar 7, 2026
d598ea6
Merge pull request #935 from archiristo/develop
minouHub Mar 7, 2026
07d862a
Add display names, units, copy-to-clipboard, and remove (x,y) from Li…
tanishadahale Mar 7, 2026
e85f78e
Improve LineSurvey tooltip: wavenumber decimals, superscript units, c…
tanishadahale Mar 7, 2026
ba032f0
linting: black formatting for line_survey.py
tanishadahale Mar 7, 2026
dd38e3a
fix: replace raise DeprecationWarning with warnings.warn and NotImple…
Zeyadzahran Mar 8, 2026
75456cd
fix: replace all bare except: with specific exception type
Zeyadzahran Feb 27, 2026
37b7033
Merge branch 'develop' into fix-bare-except
Zeyadzahran Mar 9, 2026
191eb34
Merge pull request #949 from Zeyadzahran/fix-bare-except
minouHub Mar 12, 2026
4456bd4
Improve LineSurvey tooltip: superscript alignment, E'' as int, ExoMol…
tanishadahale Mar 12, 2026
888d116
Merge pull request #957 from tanishadahale/fix-linesurvey-columns
minouHub Mar 12, 2026
a368c44
refactor: deprecate optically_thin parameter
Zeyadzahran Mar 14, 2026
76fc962
perf: add copy=False to spectrum.get() in compare.py
Zeyadzahran Mar 15, 2026
ce20bc9
Fix temporary database downloads being written to working directory
merintheres Mar 16, 2026
a23824c
remove which & if conflict drop
Zeyadzahran Mar 18, 2026
79cc2c6
Add warning for out-of-range wavenumber requests
merintheres Mar 18, 2026
f35e5fe
clean up the code
Zeyadzahran Mar 18, 2026
5a1be71
Merge pull request #964 from Zeyadzahran/fix-raise-deprecationwarning
minouHub Mar 18, 2026
d90b386
Fix #440: improve error message for slit_dispersion wavespace mismatch
tanishadahale Mar 20, 2026
cb66000
Fix spurious HITEMP HTTPError when HEAD returns HTML (#940)
Flamki Mar 20, 2026
4749117
add 10 covarge tests for misc/arrays.py
Zeyadzahran Mar 22, 2026
7f5c5d8
add coverage for gascomp and code_profiler
Zeyadzahran Mar 22, 2026
d644d2f
add coverage for plot_tools.py and MergeSlabs intersect
Zeyadzahran Mar 22, 2026
df6f494
add coverage tests for lbl/base.py and fix assert_no_nan bug
Zeyadzahran Mar 22, 2026
6e1f2eb
Merge develop into increase-test-coverage
Zeyadzahran Mar 23, 2026
f59beb6
add coverage for vibrating_rotor, conventions, and degeneracies
Zeyadzahran Mar 23, 2026
47c92ef
add coverage for phys/convert.py air and safe division functions
Zeyadzahran Mar 23, 2026
4e44fef
refactor base & array tests to be more simple
Zeyadzahran Mar 24, 2026
9fef8b3
simplify test code
Zeyadzahran Mar 24, 2026
d2820ab
Merge pull request #977 from merintheres/temp-downloads
minouHub Mar 25, 2026
1bd59f7
Merge pull request #973 from Zeyadzahran/rm-opthin
minouHub Mar 25, 2026
5e387d5
install vaex-hdf5 from pip
minouHub Mar 26, 2026
9546965
add 3.13 in the list of tests (instead of 3.11)
minouHub Mar 26, 2026
b0e3499
move profiler out of conditions (#984)
merintheres Mar 27, 2026
74a58fc
add comment
minouHub Mar 27, 2026
49c85e1
update functions for py313
minouHub Mar 27, 2026
d6cee63
Merge branch 'radis:develop' into warn-range
merintheres Mar 28, 2026
524baf8
adaptation of drop_duplicates to python 3.13
minouHub Mar 28, 2026
5647c2a
new attempt for unified remove_duplicates
minouHub Mar 28, 2026
375a29d
use np.isclose for MergeSlabs boundary checks
Zeyadzahran Mar 28, 2026
7ee3f0a
attempt to remove some ValueError: invalid literal for int() with bas…
minouHub Mar 28, 2026
e5c028f
add some comments
Zeyadzahran Mar 28, 2026
0508c55
add hard-coded reference values for air conversions
Zeyadzahran Mar 28, 2026
cfb5579
Merge pull request #988 from radis/vaex_py313
minouHub Mar 29, 2026
c7edc1a
fix: simplify #440 to just English correction in error message
tanishadahale Mar 31, 2026
172e2c8
fix: convert README from RST to Markdown and fix PyPI deployment
tanishadahale Apr 3, 2026
b68bd44
fix(docs): update docs for sphinx/docutils compatibility and remove b…
tanishadahale Apr 5, 2026
68a7caa
Merge pull request #946 from tanishadahale/440
minouHub Apr 8, 2026
7985793
Merge remote-tracking branch 'upstream/develop' into increase-test-co…
Zeyadzahran Apr 8, 2026
39fefc7
remove assert
Zeyadzahran Apr 8, 2026
d744b8e
move __main__ to the end and add all tests
Zeyadzahran Apr 8, 2026
4992271
remove unnecessary test
Zeyadzahran Apr 9, 2026
016d192
Merge branch 'increase-test-coverage' of https://github.com/Zeyadzahr…
Zeyadzahran Apr 9, 2026
16bb573
metadata handling and improve warning stacklevel
merintheres Apr 12, 2026
4afc9a4
Merge branch 'radis:develop' into warn-range
merintheres Apr 12, 2026
84119fc
Merge pull request #975 from Zeyadzahran/get-copy-opt
minouHub Apr 16, 2026
83bad77
add sanity checks
minouHub Apr 19, 2026
3883ded
Merge pull request #980 from merintheres/warn-range
minouHub Apr 19, 2026
02a301f
Merge pull request #993 from radis/slit_bug
minouHub Apr 19, 2026
030510b
adding manual trigger of testPypi
minouHub Apr 19, 2026
cc65f58
removing deprecated file
minouHub Apr 19, 2026
c8df3e0
Merge pull request #987 from Zeyadzahran/increase-test-coverage
minouHub Apr 19, 2026
499b4cb
Merge pull request #991 from tanishadahale/fix-pypi-deployment
minouHub Apr 19, 2026
cf885bf
0.16.4 --> 0.17
minouHub Apr 19, 2026
d7948db
Merge remote-tracking branch 'origin/develop' into develop
minouHub Apr 19, 2026
34d7ee4
minor change to doc index
minouHub Apr 19, 2026
ce2a800
remove columns of different type in Python3.13
minouHub Apr 20, 2026
6642295
better handling of columns
minouHub Apr 20, 2026
0ddc70a
remove axis=1 for vaex
minouHub Apr 20, 2026
e457a8d
remove unnecessary reference
minouHub Apr 20, 2026
06ebf19
Merge pull request #992 from tanishadahale/fix/doc-build-warnings
minouHub Apr 20, 2026
cfd00eb
Merge pull request #995 from radis/parsing_py313
minouHub Apr 20, 2026
65ab2ea
fixed ierr bug
HajimeKawahara Apr 29, 2026
251b937
attempt to add libstdcxx-ng to resolve Vulkan fail
minouHub May 3, 2026
10a6b5b
Merge pull request #998 from radis/uncertainity_hitran
minouHub May 3, 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
Prev Previous commit
Next Next commit
added per-chunk progress bars
  • Loading branch information
merintheres committed Nov 20, 2025
commit db74bb681f2c0eb71cf32063064cbe6efe8aad7e
83 changes: 48 additions & 35 deletions radis/api/hitempapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,40 @@ def parse_one_CO2_block(
return df


def _download_single_chunk(
start_wavno, end_wavno, out_file, session, engine, verbose=True, position=0
):
"""Download and process a single CO2 chunk."""
try:
if engine == "vaex":
fcache = _fcache_file_name(out_file, engine)
fcache_str = str(fcache)
if os.path.exists(fcache_str.replace(".hdf5", ".h5")):
update_pytables_to_vaex(fcache_str.replace(".hdf5", ".h5"))

desc = f"Chunk {start_wavno:.0f}-{end_wavno:.0f} cm⁻¹"
with tqdm(
total=1, desc=desc, position=position, leave=True, disable=not verbose
) as pbar:
partial_download_co2_chunk(
start_wavno,
end_wavno,
session,
out_file,
verbose=False, # Suppress verbose to avoid cluttered output
)
pbar.update(1)
if verbose:
print(f"Completed chunk {start_wavno:.0f}-{end_wavno:.0f} cm⁻¹")
return True
except Exception as e:
if verbose:
print(
f" Error downloading chunk {start_wavno:.0f}-{end_wavno:.0f} cm⁻¹: {e}"
)
raise


def read_and_write_chunked_for_CO2(
load_wavenum_max,
load_wavenum_min,
Expand Down Expand Up @@ -696,37 +730,6 @@ def _append_dataframe(df_to_append):
f"- Download {len(files_to_download)} file(s) missing out of {len(wav_pairs)}."
)

def _download_single_chunk(start_wavno, end_wavno, out_file):
"""Download and process a single CO2 chunk."""
try:
if engine == "vaex":
fcache = _fcache_file_name(out_file, engine)
fcache_str = str(fcache)
if os.path.exists(fcache_str.replace(".hdf5", ".h5")):
update_pytables_to_vaex(fcache_str.replace(".hdf5", ".h5"))

if verbose:
print(f"→ Downloading chunk {start_wavno:.0f}-{end_wavno:.0f} cm⁻¹")

partial_download_co2_chunk(
start_wavno,
end_wavno,
session,
out_file,
verbose=False, # Suppress verbose to avoid cluttered output
)

if verbose:
print(f" Completed chunk {start_wavno:.0f}-{end_wavno:.0f} cm⁻¹")
return True

except Exception as e:
if verbose:
print(
f" Error downloading chunk {start_wavno:.0f}-{end_wavno:.0f} cm⁻¹: {e}"
)
raise

# Use parallel downloads for multiple chunks
if len(files_to_download) > 1:
if verbose:
Expand All @@ -736,16 +739,26 @@ def _download_single_chunk(start_wavno, end_wavno, out_file):

with ThreadPoolExecutor(max_workers=max_threads) as executor:
futures = [
executor.submit(_download_single_chunk, start, end, out_file)
for (start, end, out_file) in files_to_download
executor.submit(
_download_single_chunk,
start,
end,
out_file,
session,
engine,
verbose,
idx,
)
for idx, (start, end, out_file) in enumerate(files_to_download)
]

for future in as_completed(futures):
future.result()
else:
# Single chunk download - no threading overhead
start_wavno, end_wavno, out_file = files_to_download[0]
_download_single_chunk(start_wavno, end_wavno, out_file)
_download_single_chunk(
start_wavno, end_wavno, out_file, session, engine, verbose, 0
)

else:
if verbose:
Expand Down
Loading