Skip to content

Update dependency on Ducc and Numba#502

Merged
ziotom78 merged 7 commits intomasterfrom
upgrade_packages
Mar 10, 2026
Merged

Update dependency on Ducc and Numba#502
ziotom78 merged 7 commits intomasterfrom
upgrade_packages

Conversation

@ziotom78
Copy link
Copy Markdown
Member

Originally, this PR aimed to introduce support for Python 3.14 as well as update some dependencies (Ducc, Numba, NumPy). However:

  • We still use Numpy 1.26
  • Numpy 1.26 is now more than 2 years old and causes a few tests to fail with Python 3.14, apparently because of issues in the C/Python interface
  • PySM3 still depends on Numpy 1.26, so we cannot upgrade to Numpy 2.4 yet

So for the moment we keep supporting Python 3.10–3.13. I have upgraded Ducc to 0.40 and Numba to 0.63.

In trying to circumvent the problems with Numpy 1.26 and Python 3.14, I managed to save some memory in the HWP code by modifying the API of compute_2f_for_one_sample.

The angle passed to `add_2f_for_one_detector` allocated a temporary
object that garbles memory with Numba 0.63. The new code does no longer
use `parallel=True`, but it avoids an allocation and works under Python
3.14 + Numba 0.63.
I added a few more comments and used more explicit IMo paths
So far PySM3 does not support NumPy 2, so we better wait
@ziotom78 ziotom78 requested a review from mj-gomes February 27, 2026 11:23
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 27, 2026

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  litebird_sim
  beam_synthesis.py
  hwp_diff_emiss.py 15, 22-23, 49
  hwp_harmonics.py 348-353
  input_sky.py
  maps_and_harmonics.py
Project Total  

This report was generated by python-coverage-comment-action

@ziotom78 ziotom78 merged commit 907a672 into master Mar 10, 2026
4 of 5 checks passed
@ziotom78 ziotom78 deleted the upgrade_packages branch March 10, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant