Skip to content

Commit

Permalink
test pdfstream in kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
XPD Operator committed May 23, 2024
1 parent 2cc9752 commit 70680e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/kafka_consumer_iterate_RM.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
# sys.path.insert(0, "/home/xf28id2/src/blop/blop")
# from bloptools.bayesian import Agent, DOF, Objective

from blop import Agent, DOF, Objective
# from blop import Agent, DOF, Objective

# agent_data_path = '/home/xf28id2/data_post_dilute_0418'
# agent_data_path = '/home/xf28id2/data_ZnI2_60mM'
Expand Down
18 changes: 12 additions & 6 deletions scripts/updated_pipeline_pdffit2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@

try:
from diffpy.Structure import loadStructure
except ImportError:
warn("diffpy.Structure import failed")
try:
from diffpy.srreal.pdfcalculator import PDFCalculator
except ImportError:
warn("diffpy.srreal import failed")
try:
from diffpy.srfit.pdf import PDFContribution
from diffpy.srfit.fitbase import FitRecipe, FitResults
from diffpy.srfit.structure import constrainAsSpaceGroup
except ImportError:
warn("Diffpy import failed")
warn("diffpy.srfit import failed")

try:
from pyobjcryst import loadCrystal
Expand All @@ -28,7 +34,7 @@
try:
from diffpy.pdffit2 import PdfFit
except ImportError:
warn("pyobjcryst import failed")
warn("diffpy.pdffit2 import failed")

from monty.json import MSONable
import numpy as np
Expand Down Expand Up @@ -636,8 +642,8 @@ def refine_selected_(self, top_n=5, metric="pearsonr"):
if __name__ == "__main__":
#Old Code
refinery = Refinery(
mystery_path="/Users/chenghunglin/Documents/Git_BNL/Local-Structure-Modeling/mysteries/Mystery_23_04_06.dat",
results_path="/Users/chenghunglin/Documents/Git_BNL/Local-Structure-Modeling/results_PbS_chemsys_search", # add this line
mystery_path="/home/xf28id2/Documents/ChengHung/pdffit2_example/CsPbBr3/CsPbBr3.gr",
results_path="/home/xf28id2/Documents/ChengHung/pdffit2_example/results_CsPbBr_chemsys_search", # add this line
criteria={"elements":
{#["Pb","Se"],
#"$in": ["Cs"],
Expand All @@ -651,7 +657,7 @@ def refine_selected_(self, top_n=5, metric="pearsonr"):
"qmax": 18.0,
"rmin": 2.0,
"rmax": 60.0,
"qdamp": 0.06,
"qbroad": 0.06
"qdamp": 0.031,
"qbroad": 0.032
},
)

0 comments on commit 70680e8

Please sign in to comment.