Skip to content

[ESSDIFFRACTION] feat: add QDetector for optionally computing Q coordinate - #761

Merged
jokasimr merged 3 commits into
mainfrom
742
Sep 25, 2026
Merged

jokasimr merged 3 commits into
mainfrom
742

Conversation

@jokasimr

Copy link
Copy Markdown
Contributor

Fixes #742

@jokasimr jokasimr changed the title feat: add QDetector for optionally computing Q coordinate feat: add QDetector for optionally compute Q coordinate Sep 24, 2026
@jokasimr jokasimr changed the title feat: add QDetector for optionally compute Q coordinate feat: add QDetector to optionally compute Q coordinate Sep 24, 2026
@github-actions github-actions Bot added the essdiffraction Issues for essdiffraction. label Sep 24, 2026
@github-actions github-actions Bot changed the title feat: add QDetector to optionally compute Q coordinate [ESSDIFFRACTION] feat: add QDetector for optionally computing Q coordinate Sep 24, 2026


def test_powder_mcstas_analytical_workflow_computes_dspacing():
def test_powder_mcstas_analytical_workflow_computes_scattering_coordinates():

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was this test "replaced"?

@jokasimr jokasimr Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's not actually replaced. It still does the same as before, but also checks that Q is present in the data. It would probably be cleaner to make a separate test 👍


expected_q = 2 * np.pi / detector.coords['dspacing']
assert sc.allclose(result.coords['Q'], expected_q)
assert sc.identical(result.drop_coords('Q'), detector)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@jokasimr
jokasimr added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit e3a563c Sep 25, 2026
6 checks passed
@jokasimr
jokasimr deleted the 742 branch September 25, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

essdiffraction Issues for essdiffraction.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ESSDIFFRACTION, BEER] Add Q coordinate in Sciline workflow

2 participants