Skip to content

Fix numpy failure case in det_cal#1677

Merged
ykyohei merged 1 commit into
masterfrom
260623_det_cal
Jun 24, 2026
Merged

Fix numpy failure case in det_cal#1677
ykyohei merged 1 commit into
masterfrom
260623_det_cal

Conversation

@mmccrackan

Copy link
Copy Markdown
Contributor

Some obs_ids are silently failing on the LAT with the following error:

obs_1782017305_lati3_111: "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.12/site-packages/sotodlib/site_pipeline/update_det_cal.py\"\
  , line 629, in get_cal_resset\n    if not ridx:  # Channel doesn't exist in IV analysis\n\
  \           ^^^^\nValueError: The truth value of an empty array is ambiguous. Use\
  \ `array.size > 0` to check that an array is not empty.\n"

This just adds a fix so that it will continue and not fail as was done for update_smurf_caldbs in #1619.

@mmccrackan mmccrackan requested a review from ykyohei June 24, 2026 00:56

@ykyohei ykyohei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested update_det_cal for this obsevation at tiger3 and it didn't have any error and I'm bit confused.
Is it possible that this is due to race conditions of site pipeline..?

@mmccrackan

Copy link
Copy Markdown
Contributor Author

I tested update_det_cal for this obsevation at tiger3 and it didn't have any error and I'm bit confused. Is it possible that this is due to race conditions of site pipeline..?

Multiple update_det_cal flows aren't permitted to run at the same time nor can they run at the same time as update_obsdb or update_smurf_caldbs so I wouldn't have thought it was a race condition.

I see many more of these kinds of failures in the failed_obsid.yaml file as well.

@ykyohei ykyohei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I learned that this used to be just DeprecationWarning but from numpy 2.2.0 this leads to ValueError.
Thanks for flagging this!
https://numpy.org/devdocs/release/2.2.0-notes.html#expired-deprecations

@ykyohei ykyohei merged commit 591ddbd into master Jun 24, 2026
5 checks passed
@ykyohei ykyohei deleted the 260623_det_cal branch June 24, 2026 17:25
@mmccrackan

Copy link
Copy Markdown
Contributor Author

Okay I learned that this used to be just DeprecationWarning but from numpy 2.2.0 this leads to ValueError. Thanks for flagging this! https://numpy.org/devdocs/release/2.2.0-notes.html#expired-deprecations

Great, I am going to remove the obs_ids with this error from the failed_obs_ids file so they will re-run.

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.

2 participants