Skip to content

Conversation

@dachengx
Copy link
Collaborator

@dachengx dachengx commented Jul 6, 2025

What is the problem / what does the code in this PR do

Before this PR, when running:

import fuse
run_id = '058169'
st = fuse.xenonnt_fuse_full_chain_simulation(corrections_run_id=run_id)
for data_type in ['microphysics_summary', 'drifted_electrons', 'extracted_electrons', 's2_photons_sum', 'photo_ionization_electrons']:
    st.make(run_id, data_type, save=data_type)

got error:

...
  File "/home/xudc/strax/strax/processors/post_office.py", line 204, in _read
    result = self._fetch_new(topic)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xudc/strax/strax/processors/post_office.py", line 261, in _fetch_new
    assert isinstance(msg, dict)
AssertionError

This PR fixes this.

The dependency tree looks like this

image

And s2_photons is not saved because its save_when is not ALWAYS. When data_type is photo_ionization_electrons, the msg in _fetch_new("s2_photons_sum") is loaded from storage but not calculated from a plugin. In this PR, we do not assign topic that has loaders to _multi_output_topics to prevent this error. Also, only call _ack_msg_produced when sub_msg_topic is in _multi_output_topics because if sub_msg_topic is not in _multi_output_topics, it already has a loader.

Can you briefly describe how it works?

Can you give a minimal working example (or illustrate with a figure)?

Please include the following if applicable:

  • Update the docstring(s)
  • Update the documentation
  • Tests to check the (new) code is working as desired.
  • Does it solve one of the open issues on github?

Please make sure that all automated tests have passed before asking for a review (you can save the PR as a draft otherwise).

@coveralls
Copy link

Coverage Status

coverage: 88.958% (+0.002%) from 88.956%
when pulling b86cc45 on loader_multi_output_topics
into 7817aff on master.

@dachengx dachengx marked this pull request as ready for review July 6, 2025 18:07
@dachengx dachengx merged commit 9460324 into master Jul 6, 2025
7 checks passed
@dachengx dachengx deleted the loader_multi_output_topics branch July 6, 2025 18:07
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.

3 participants