Skip to content

Update configurations and reduction interface function signature.#167

Merged
YooSunYoung merged 5 commits intoisolate-mcstasfrom
update-config
Dec 5, 2025
Merged

Update configurations and reduction interface function signature.#167
YooSunYoung merged 5 commits intoisolate-mcstasfrom
update-config

Conversation

@YooSunYoung
Copy link
Copy Markdown
Member

  • Add tof simulation seed to the configuration.
  • Use configuration object instead of passing individual argument.

Comment on lines 193 to 198
def reduction(
*,
input_file: list[pathlib.Path] | pathlib.Path,
output_file: pathlib.Path,
chunk_size: int = 1_000,
detector_ids: list[int | str],
compression: Compression = Compression.BITSHUFFLE_LZ4,
config: ReductionConfig,
logger: logging.Logger | None = None,
min_toa: sc.Variable | int = 0,
max_toa: sc.Variable | int = int((1 / 14) * 1_000), # Default for ESS NMX
toa_bin_edges: sc.Variable | int = 250,
fast_axis: Literal['x', 'y'] | None = None, # 'x', 'y', or None to auto-detect
display: Callable | None = None, # For Jupyter notebook display
display: Callable | None = None,
) -> sc.DataGroup:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the only important part.
The rest of the function will be updated in the later PR.

Comment thread src/ess/nmx/nexus.py
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This file will be completely re-written in the later PR so no need to take a close look...

@YooSunYoung YooSunYoung merged commit 88c5963 into isolate-mcstas Dec 5, 2025
4 checks passed
@YooSunYoung YooSunYoung deleted the update-config branch December 5, 2025 12:10
@github-project-automation github-project-automation Bot moved this from In progress to Done in Development Board Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants