Skip to content

Conversation

@nvaytet
Copy link
Member

@nvaytet nvaytet commented Jan 30, 2026

In the nightly runs, we upload an artifact which contains a reduced CIF file from the Dream Geant4 simulation.
The data we used to save was:

  • from the endcap_forward detector (because the test was using a parametrized fixture and the last file that was written was from the endcap, overwriting files from previous banks)
  • using the 'small' data files used in unit tests.

As a result, there has very little or no signal, and looked nothing like a d-spacing spectrum:
Screenshot_20260130_093625

Here, we use the data files with more events, and use the mantle detector bank.
We also increase the number of bins from 200 to 2000, to get something that analysis hopefully can make better use of.
Screenshot_20260130_093719

This was discovered by @AndrewSazonov

@nvaytet nvaytet requested a review from jl-wynen January 30, 2026 08:43
@nvaytet nvaytet changed the title Produced better reduced data in nightly runs Produce better reduced data in nightly runs Jan 30, 2026
Comment on lines -307 to -308
def test_pipeline_save_data_to_disk(workflow, output_folder: Path):
workflow = powder.with_pixel_mask_filenames(workflow, [])
Copy link
Member

Choose a reason for hiding this comment

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

Is this the fixture you mentioned? If it leads to some unintentional test coupling/interaction it is worth investigating that better. What is the fixture scope? Should workflows from the fixture get copied instead of modified directly?

Copy link
Member

Choose a reason for hiding this comment

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

The problem is not coupling between tests. It is this parametrised fixture:

def params_for_det(request):
It means that all tests depending on workflow run once for each detector name. And they will override previous files. So only the file written in the last test to run will remain.
(Note that the workflow fixture is function-scoped. So there is no issue with coupling modifications from functions.)

IMHO, the change in this PR makes sense and makes the outcome predictable.

Copy link
Member

Choose a reason for hiding this comment

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

👍 ok I misunderstood, so it was just that they all write to the same filename!

Comment on lines -307 to -308
def test_pipeline_save_data_to_disk(workflow, output_folder: Path):
workflow = powder.with_pixel_mask_filenames(workflow, [])
Copy link
Member

Choose a reason for hiding this comment

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

The problem is not coupling between tests. It is this parametrised fixture:

def params_for_det(request):
It means that all tests depending on workflow run once for each detector name. And they will override previous files. So only the file written in the last test to run will remain.
(Note that the workflow fixture is function-scoped. So there is no issue with coupling modifications from functions.)

IMHO, the change in this PR makes sense and makes the outcome predictable.

Copy link
Member

Choose a reason for hiding this comment

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

The new test runs on all CI and locally, right? That means that we have to download the large files now. How about only running this test in nightly? Or if it's too risky with detecting broken tests too late, how about using a small file in regular CI and a large file in a nightly 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.

4 participants