Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/cryoemservices/services/ctffind.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from cryoemservices.services.common_service import CommonService
from cryoemservices.util.models import MockRW
from cryoemservices.util.relion_service_options import RelionServiceOptions
from cryoemservices.util.spa_output_files import get_ice_ring_density


class CTFParameters(BaseModel):
Expand Down Expand Up @@ -253,6 +254,7 @@ def ctf_find(self, rw, header: dict, message: dict):
# Extract results for ispyb
astigmatism = self.defocus1 - self.defocus2
estimated_defocus = (self.defocus1 + self.defocus2) / 2
ice_ring_density = get_ice_ring_density(Path(ctf_params.output_image))

# Forward results to images service
self.log.info(f"Sending to images service {ctf_params.output_image}")
Expand Down Expand Up @@ -284,7 +286,8 @@ def ctf_find(self, rw, header: dict, message: dict):
"cc_value": str(self.cc_value),
"fft_theoretical_full_path": str(
Path(ctf_params.output_image).with_suffix(".jpeg")
), # path to output mrc (would be jpeg if we could convert in SW)
),
"ice_ring_density": ice_ring_density,
}
self.log.info(f"Sending to ispyb {ispyb_parameters}")

Expand Down Expand Up @@ -328,6 +331,7 @@ def ctf_find(self, rw, header: dict, message: dict):
"smartem",
{
"ctf_max_resolution_estimate": self.estimated_resolution,
"ice_ring_density": ice_ring_density,
"app_id": ctf_params.app_id,
"mc_uuid": ctf_params.mc_uuid,
"mc_path": ctf_params.input_image,
Expand Down
Loading