Skip to content

refactor: use a more flexible interface to utilize diffpy.srfit - #31

Draft
ycexiao wants to merge 8 commits into
diffpy:mainfrom
ycexiao:refinement
Draft

refactor: use a more flexible interface to utilize diffpy.srfit#31
ycexiao wants to merge 8 commits into
diffpy:mainfrom
ycexiao:refinement

Conversation

@ycexiao

@ycexiao ycexiao commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR address?

Use a more flexible interface to utilize diffpy.srfit

What should the reviewer(s) do?

)


def test_refinement_session():

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.

@sbillinge Could you please review the function signatures we have now? If there aren't any issues, I'll continue working on making the tests pass.

@sbillinge sbillinge 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.

this seems like a good start. It is a bit hard to know what else we will need until we start using it (or the agent does)


def test_refine_sine():
# C1: Refinement session without additional calculator or functions
session = RefinementSession()

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.

@sbillinge Please see this new interaction logic with ParametricModel.

I thought it couldn't be more straightforward and simpler. But if it could, could you please add some pseudo-code here so I can implement it?

ni_model.parameters["ni_model.s"].value = 1.0

session = RefinementSession()
session.solve(

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.

constraints have not been implemented, so value check is not added.

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