Skip to content

Commit 7e415c8

Browse files
Add SPODI refinement tutorial and improve fitting controls (#227)
* Clarify unavailable correlation matrix warning * Add n_free_parameters to tutorial baselines * Update data index reference hash * Add YAlO3+Al2O3 SPODI tutorial * Update YAP tutorial fit parameters * Expose method-specific minimizer tolerances * Update YAP tutorial convergence setup * Warn about unsupported ionic atom symbols * Avoid hard-wrapped notebook output * Update PbSO4 tutorial charge example * Use faster convergence tolerance in tutorials * Refine YAP tutorial index description * Update tutorial baselines after convergence changes * Update Si model in LBCO tutorial * Add auto-install check to LBCO tutorial * Update LBCO Si tutorial baseline
1 parent 5e3ea2a commit 7e415c8

98 files changed

Lines changed: 3314 additions & 713 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/dev/package-structure/full.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@
103103
│ │ │ ├── 📄 lmfit_leastsq.py
104104
│ │ │ │ └── 🏷️ class LmfitLeastsqMinimizer
105105
│ │ │ └── 📄 lsq_base.py
106-
│ │ │ └── 🏷️ class LeastSquaresMinimizerBase
106+
│ │ │ ├── 🏷️ class LeastSquaresMinimizerBase
107+
│ │ │ ├── 🏷️ class ObjectiveParameterToleranceMinimizerBase
108+
│ │ │ ├── 🏷️ class GradientToleranceMinimizerBase
109+
│ │ │ ├── 🏷️ class PopulationToleranceMinimizerBase
110+
│ │ │ └── 🏷️ class TrustRegionToleranceMinimizerBase
107111
│ │ ├── 📁 sequential_fit
108112
│ │ │ ├── 📄 __init__.py
109113
│ │ │ ├── 📄 default.py
@@ -744,6 +748,7 @@
744748
│ │ └── 🏷️ class FigureEmbedMode
745749
│ ├── 📄 logging.py
746750
│ │ ├── 🏷️ class IconifiedRichHandler
751+
│ │ ├── 🏷️ class NotebookAwareConsole
747752
│ │ ├── 🏷️ class ConsoleManager
748753
│ │ ├── 🏷️ class LoggerConfig
749754
│ │ ├── 🏷️ class ExceptionHookManager

‎docs/docs/tutorials/bayesian-dream-lbco-hrpt.ipynb‎

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
"metadata": {},
468468
"outputs": [],
469469
"source": [
470-
"project.analysis.fit()"
470+
"project.analysis.minimizer.chi_square_change_tolerance = 1e-2"
471471
]
472472
},
473473
{
@@ -476,13 +476,23 @@
476476
"id": "37",
477477
"metadata": {},
478478
"outputs": [],
479+
"source": [
480+
"project.analysis.fit()"
481+
]
482+
},
483+
{
484+
"cell_type": "code",
485+
"execution_count": null,
486+
"id": "38",
487+
"metadata": {},
488+
"outputs": [],
479489
"source": [
480490
"project.display.fit.results()"
481491
]
482492
},
483493
{
484494
"cell_type": "markdown",
485-
"id": "38",
495+
"id": "39",
486496
"metadata": {},
487497
"source": [
488498
"The correlation plot shows how strongly the fitted parameters move\n",
@@ -494,7 +504,7 @@
494504
{
495505
"cell_type": "code",
496506
"execution_count": null,
497-
"id": "39",
507+
"id": "40",
498508
"metadata": {},
499509
"outputs": [],
500510
"source": [
@@ -504,7 +514,7 @@
504514
{
505515
"cell_type": "code",
506516
"execution_count": null,
507-
"id": "40",
517+
"id": "41",
508518
"metadata": {},
509519
"outputs": [],
510520
"source": [
@@ -513,7 +523,7 @@
513523
},
514524
{
515525
"cell_type": "markdown",
516-
"id": "41",
526+
"id": "42",
517527
"metadata": {},
518528
"source": [
519529
"## 🎲 Prepare Sampling\n",
@@ -535,7 +545,7 @@
535545
{
536546
"cell_type": "code",
537547
"execution_count": null,
538-
"id": "42",
548+
"id": "43",
539549
"metadata": {},
540550
"outputs": [],
541551
"source": [
@@ -544,7 +554,7 @@
544554
},
545555
{
546556
"cell_type": "markdown",
547-
"id": "43",
557+
"id": "44",
548558
"metadata": {},
549559
"source": [
550560
"Set fit bounds for all free parameters using the default multiplier of\n",
@@ -556,7 +566,7 @@
556566
{
557567
"cell_type": "code",
558568
"execution_count": null,
559-
"id": "44",
569+
"id": "45",
560570
"metadata": {},
561571
"outputs": [],
562572
"source": [
@@ -566,7 +576,7 @@
566576
},
567577
{
568578
"cell_type": "markdown",
569-
"id": "45",
579+
"id": "46",
570580
"metadata": {},
571581
"source": [
572582
"Displaying the free parameters again is a convenient way to confirm\n",
@@ -577,7 +587,7 @@
577587
{
578588
"cell_type": "code",
579589
"execution_count": null,
580-
"id": "46",
590+
"id": "47",
581591
"metadata": {},
582592
"outputs": [],
583593
"source": [
@@ -586,7 +596,7 @@
586596
},
587597
{
588598
"cell_type": "markdown",
589-
"id": "47",
599+
"id": "48",
590600
"metadata": {},
591601
"source": [
592602
"## 🎲 Run Sampling\n",
@@ -612,7 +622,7 @@
612622
{
613623
"cell_type": "code",
614624
"execution_count": null,
615-
"id": "48",
625+
"id": "49",
616626
"metadata": {},
617627
"outputs": [],
618628
"source": [
@@ -622,7 +632,7 @@
622632
{
623633
"cell_type": "code",
624634
"execution_count": null,
625-
"id": "49",
635+
"id": "50",
626636
"metadata": {},
627637
"outputs": [],
628638
"source": [
@@ -632,7 +642,7 @@
632642
{
633643
"cell_type": "code",
634644
"execution_count": null,
635-
"id": "50",
645+
"id": "51",
636646
"metadata": {},
637647
"outputs": [],
638648
"source": [
@@ -644,7 +654,7 @@
644654
{
645655
"cell_type": "code",
646656
"execution_count": null,
647-
"id": "51",
657+
"id": "52",
648658
"metadata": {},
649659
"outputs": [],
650660
"source": [
@@ -653,7 +663,7 @@
653663
},
654664
{
655665
"cell_type": "markdown",
656-
"id": "52",
666+
"id": "53",
657667
"metadata": {},
658668
"source": [
659669
"## 📊 Inspect Results\n",
@@ -666,7 +676,7 @@
666676
{
667677
"cell_type": "code",
668678
"execution_count": null,
669-
"id": "53",
679+
"id": "54",
670680
"metadata": {},
671681
"outputs": [],
672682
"source": [
@@ -675,7 +685,7 @@
675685
},
676686
{
677687
"cell_type": "markdown",
678-
"id": "54",
688+
"id": "55",
679689
"metadata": {},
680690
"source": [
681691
"The correlation and posterior-pair plots are complementary:\n",
@@ -692,7 +702,7 @@
692702
{
693703
"cell_type": "code",
694704
"execution_count": null,
695-
"id": "55",
705+
"id": "56",
696706
"metadata": {},
697707
"outputs": [],
698708
"source": [
@@ -702,7 +712,7 @@
702712
{
703713
"cell_type": "code",
704714
"execution_count": null,
705-
"id": "56",
715+
"id": "57",
706716
"metadata": {},
707717
"outputs": [],
708718
"source": [
@@ -711,7 +721,7 @@
711721
},
712722
{
713723
"cell_type": "markdown",
714-
"id": "57",
724+
"id": "58",
715725
"metadata": {},
716726
"source": [
717727
"The one-dimensional posterior distributions below make it easier to\n",
@@ -722,7 +732,7 @@
722732
{
723733
"cell_type": "code",
724734
"execution_count": null,
725-
"id": "58",
735+
"id": "59",
726736
"metadata": {},
727737
"outputs": [],
728738
"source": [
@@ -731,7 +741,7 @@
731741
},
732742
{
733743
"cell_type": "markdown",
734-
"id": "59",
744+
"id": "60",
735745
"metadata": {},
736746
"source": [
737747
"Finally, the posterior predictive plot propagates the sampled parameter\n",
@@ -743,7 +753,7 @@
743753
{
744754
"cell_type": "code",
745755
"execution_count": null,
746-
"id": "60",
756+
"id": "61",
747757
"metadata": {},
748758
"outputs": [],
749759
"source": [
@@ -752,7 +762,7 @@
752762
},
753763
{
754764
"cell_type": "markdown",
755-
"id": "61",
765+
"id": "62",
756766
"metadata": {},
757767
"source": [
758768
"A final zoomed measured-vs-calculated plot is useful for checking how\n",
@@ -763,7 +773,7 @@
763773
{
764774
"cell_type": "code",
765775
"execution_count": null,
766-
"id": "62",
776+
"id": "63",
767777
"metadata": {},
768778
"outputs": [],
769779
"source": [
@@ -772,7 +782,7 @@
772782
},
773783
{
774784
"cell_type": "markdown",
775-
"id": "63",
785+
"id": "64",
776786
"metadata": {},
777787
"source": [
778788
"## 💾 Save Project\n",
@@ -783,7 +793,7 @@
783793
{
784794
"cell_type": "code",
785795
"execution_count": null,
786-
"id": "64",
796+
"id": "65",
787797
"metadata": {},
788798
"outputs": [],
789799
"source": [

‎docs/docs/tutorials/bayesian-dream-lbco-hrpt.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@
222222
# %%
223223
project.analysis.minimizer.type = 'bumps (lm)'
224224

225+
# %%
226+
project.analysis.minimizer.chi_square_change_tolerance = 1e-2
227+
225228
# %%
226229
project.analysis.fit()
227230

0 commit comments

Comments
 (0)