Skip to content

Commit a125e4d

Browse files
Insert b-factor estimates into ispyb (#350)
Changes our bfactor calculation to linear, and turns on the inserts into ispyb using the program id
1 parent 15a47db commit a125e4d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/murfey/server/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,12 +2381,12 @@ def _save_bfactor(message: dict, _db=murfey_db, demo: bool = False):
23812381
if all(resolutions):
23822382
# Calculate b-factor and add to ispyb class table
23832383
bfactor_fitting = np.polyfit(
2384-
np.log(particle_counts), 1 / np.array(resolutions) ** 2, 2
2384+
np.log(particle_counts), 1 / np.array(resolutions) ** 2, 1
23852385
)
23862386
refined_class_uuid = message["refined_class_uuid"]
23872387

23882388
# Request an ispyb insert of the b-factor fitting parameters
2389-
if False and _transport_object:
2389+
if _transport_object:
23902390
_transport_object.send(
23912391
"ispyb_connector",
23922392
{
@@ -2398,9 +2398,9 @@ def _save_bfactor(message: dict, _db=murfey_db, demo: bool = False):
23982398
"buffer_command": {
23992399
"ispyb_command": "insert_particle_classification"
24002400
},
2401-
"bfactor_fit_intercept": str(bfactor_fitting[2]),
2402-
"bfactor_fit_linear": str(bfactor_fitting[1]),
2403-
"bfactor_fit_quadratic": str(bfactor_fitting[0]),
2401+
"program_id": message["program_id"],
2402+
"bfactor_fit_intercept": str(bfactor_fitting[1]),
2403+
"bfactor_fit_linear": str(bfactor_fitting[0]),
24042404
},
24052405
"content": {"dummy": "dummy"},
24062406
},

0 commit comments

Comments
 (0)