Skip to content

fix: clean miscellaneous errors.#38

Merged
sbillinge merged 3 commits intoPDF-bl:mainfrom
ycexiao:fix-miscellaneous
Feb 17, 2026
Merged

fix: clean miscellaneous errors.#38
sbillinge merged 3 commits intoPDF-bl:mainfrom
ycexiao:fix-miscellaneous

Conversation

@ycexiao
Copy link
Contributor

@ycexiao ycexiao commented Feb 16, 2026

What problem does this PR address?

Fix some errors encountered during testing the package at BNL.

including:

  1. reduced_chi2 not found in fitresults;
  2. Inconsistent variable naming conventions;
  3. Refinement takes too much time.

What should the reviewer(s) do?

…; inconsistent variables naming conventions; refinement takes too much time.
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 97.53086% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tests/helper.py 96.87% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ycexiao ycexiao marked this pull request as ready for review February 16, 2026 22:30
Copy link
Contributor Author

@ycexiao ycexiao left a comment

Choose a reason for hiding this comment

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

@sbillinge, it's ready for review.

filename_order_pattern=r"(\d+)K\.gr",
refinable_variable_names=[
"a_1",
"a_phase_1",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Explicit variable name.

for (key, step), values in self.intermediate_results.items():
if (self.iter_count % step) == 0:
if fitresults_dict is None:
fitresults_dict = self.save_results(mode="dict")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Time-consuming step. Recompute only when fitresults_dict is None.

from diffpy.structure.parsers import getParser


def make_cmi_recipe(cif_path, dat_path, variable_values={}):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use helpful funciton instead of diffpycmi_scripts.py

@sbillinge sbillinge merged commit 6f3f1d6 into PDF-bl:main Feb 17, 2026
6 checks passed
@ycexiao ycexiao deleted the fix-miscellaneous branch February 18, 2026 16:38
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.

2 participants