Bandframework scottdevelv05 checking#202
Open
scottedwardpratt wants to merge 73 commits intomainfrom
Open
Conversation
Contributor
Author
|
Hi Oleh, Do you have access to a Linux machine where you can install software with the normal apt-get …. This means super user privileges I suppose.
If so, I would like to set up a zoom meeting with you to test out the new install scripts I wrote form Smooth Emulator. The Mac script installs all the software through homebrew, then compiles the Smooth Emulator stuff. It sets all the compilers in a way that should make all that pybind11 stuff consistent. Also, you don’t need to define any environment variable anymore (unless you want to add …/SmoothEmulator/bin to your path).
I was never able to get my Linux workstation working again after the Computer Group dismantled it. So, I need a Linux machine to test the Linux installation script, which assumes the User has apt-get installed.
You can download the latest version, then simply go to ../SmoothEmulator/software and enter either:
% INSTALL_MAC.sh
or
% INSTALL_LINUX_APT-GET.sh
Maybe you could just glance at the Linux script to see if it looks OK to you. I think the Mac script is working fine.
Are you around any days this week? I might try coming in and trying again to get the work station operational again.
Hope all is going well — Scott
To get the software.
% git clone https://github.com/bandframework/bandframework.git -b bandframework_scottdevelv05
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Scott Pratt ***@***.*** %
% FRIB +1-517-908-7460 %
% Michigan State University Office 2133 %
% East Lansing, MI 48824 http://nscl.msu.edu/directory/pratt.html %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
On Mar 20, 2026, at 12:25 AM, OlehSavchuk ***@***.***> wrote:
@OlehSavchuk approved this pull request.
Overall, the code is documented and cleanly written. There are some inconsistencies in function naming conventions: in most cases, each word is capitalized, but some functions use snake_case. Variable naming is slightly less consistent. The backend portion of the code contains relatively few comments, whereas the interface is better documented. The written guide included with the package explains most of the underlying mathematics and the user interface, and it provides clear instructions for setup, prerequisites, and execution.
The code is generally well structured and provides the main components needed for Bayesian inference workflows. It allows the user to define parameters and priors, including uniform and Gaussian options, and to build an emulator based on the SMOOTH™ parametrization. Emulator training is performed through inversion of a matrix whose dimension is set by the number of training points, using the Eigen library. The package also includes options for optimizing training-point placement beyond a standard Latin hypercube approach, as well as tuning emulator hyperparameters. Posterior sampling can be handled through a built-in MCMC chain.
In testing, the code compiles and runs successfully, performs inference on dummy data, and produces posterior plots. Visualization is carried out using standard Python libraries including NumPy, SciPy, and Matplotlib. The repository guide makes the workflow relatively easy to follow, and the pybind11 shared-library interface is a particularly useful feature, since it enables direct integration of the emulator into Python-based analysis pipelines.
________________________________
In software/SmoothEmulator/AnalysisTemplate/figs/posterior/posterior.py<https://urldefense.com/v3/__https://github.com/bandframework/bandframework/pull/202*discussion_r2879893078__;Iw!!HXCxUKc!0HgZHzu19syJstztfq_mSAbGrdmVci0MMYE6FVE0vSsUx0DHVMwjwTtHfLm7PcB7pTXbQ8xPQFnNKYK3NgqBHQk$>:
@@ -121,12 +125,24 @@
plt.ylim(-0.1,1.1)
plt.xlim(-ThetaMax,ThetaMax)
plt.plot(xarray,counts1d,linestyle='-',linewidth=3,color='r')
-
-# plt.show()
+
+outputfilename='posterior.pdf'
Why move it from line 15 where other files were defined?
________________________________
In software/SmoothEmulator/AnalysisTemplate/figs/posterior/posterior.py<https://urldefense.com/v3/__https://github.com/bandframework/bandframework/pull/202*discussion_r2879909223__;Iw!!HXCxUKc!0HgZHzu19syJstztfq_mSAbGrdmVci0MMYE6FVE0vSsUx0DHVMwjwTtHfLm7PcB7pTXbQ8xPQFnNKYK3Mbpp0lc$>:
@@ -121,12 +125,24 @@
plt.ylim(-0.1,1.1)
plt.xlim(-ThetaMax,ThetaMax)
plt.plot(xarray,counts1d,linestyle='-',linewidth=3,color='r')
Why not use plt.histogram to make histogram that can do binning itself. it does return bins and counts.
________________________________
In software/SmoothEmulator/AnalysisTemplate/figs/resolvingpower/RP.py<https://urldefense.com/v3/__https://github.com/bandframework/bandframework/pull/202*discussion_r2880373108__;Iw!!HXCxUKc!0HgZHzu19syJstztfq_mSAbGrdmVci0MMYE6FVE0vSsUx0DHVMwjwTtHfLm7PcB7pTXbQ8xPQFnNKYK36dkIXYE$>:
from pylab import *
# User will likely wish to adjust many of these
writetitle=True
topmargin=0.01 # increase if you want title
if writetitle:
- topmargin=0.07
-bottommargin=0.15 # adjust to fit x-axis labels
-leftmargin=0.36 # adjust to fit y-axis labels
-thetamax=3.5 # sets max display range of y axes
+ topmargin=0.04
+bottommargin=0.05 # adjust to fit x-axis labels
+leftmargin=0.15 # adjust to fit y-axis labels
+thetamax=2.5 # sets max display range of y axes
Just a comment but plt.tight_layout() before plt.show() automatically adjusts margins to take all the space and fit labels.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/bandframework/bandframework/pull/202?email_source=notifications&email_token=AB6P62TIWYSAYDNT2D47RA34RTB4XA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTGOBYGQ2DCMRUGY2KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L*pullrequestreview-3884412464__;Iw!!HXCxUKc!0HgZHzu19syJstztfq_mSAbGrdmVci0MMYE6FVE0vSsUx0DHVMwjwTtHfLm7PcB7pTXbQ8xPQFnNKYK3Ypil1wQ$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AB6P62TYSVYM47SKZI7IO2D4RTB4XAVCNFSM6AAAAACV3BQ5BSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTQOBUGQYTENBWGQ__;!!HXCxUKc!0HgZHzu19syJstztfq_mSAbGrdmVci0MMYE6FVE0vSsUx0DHVMwjwTtHfLm7PcB7pTXbQ8xPQFnNKYK3qpTT3D4$>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please pull and check out the code.
To clone this branch:
% git clone https://github.com/bandframework/bandframework.git -b bandframework_scottdevelv05
The User Manual is at ../bandframework/software/SmoothEmulator/doc/UserManual.pdf
I would recommend copying the SmoothEmulator/ directory to a new location and working from there.
The Manual has instructions for installation, testing, and a tutorial
The most likely difficulty you will have is due to requiring CMake, Eigen3, Python3/Matplotlib installed. Installing pybind11 is required only if you wish to call the emulator from within a Python script. Please call me at 517-402-3348 if you have any questions. Or text me at that number and we can set up a zoom meeting.