Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P11 develop debug #859

Merged
merged 22 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
12 changes: 3 additions & 9 deletions mxcubecore/HardwareObjects/DESY/P11Collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@

from mxcubecore.Command.Tango import DeviceProxy

import gevent
import time
import numpy as np
import logging
import os
import sys
import h5py

import triggerUtils

Expand Down Expand Up @@ -127,8 +120,7 @@ def data_collection_hook(self):
"P11Collect. - object initialization failed. COLLECTION not possible"
)

osc_pars["kappa"] = 0
osc_pars["kappa_phi"] = 0


self.diffr = HWR.beamline.diffractometer
detector = HWR.beamline.detector
Expand All @@ -144,6 +136,8 @@ def data_collection_hook(self):

osc_pars = self.current_dc_parameters["oscillation_sequence"][0]
file_info = self.current_dc_parameters["fileinfo"]
osc_pars["kappa"] = 0
osc_pars["kappa_phi"] = 0
Comment on lines +275 to +276
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have minikappa head on your diffarctometer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is just not to have none values, just in case. Does it make sense?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is OK if you would never use minikappa.


start_angle = osc_pars["start"]
nframes = osc_pars["number_of_images"]
Expand Down
16 changes: 16 additions & 0 deletions mxcubecore/HardwareObjects/DESY/P11SampleChanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,19 @@ def _update_selection(self):
s._set_loaded(False)

self._set_selected_sample(None)

def _set_loaded_sample(self, sample):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agruzinov, is defining this method solves the recurrence problem you've mentioned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it solves the "loading failed" problem.

previous_loaded = None

for smp in self.get_sample_list():
if smp.is_loaded():
previous_loaded = smp
break

for smp in self.get_sample_list():
if smp != sample:
smp._set_loaded(False)
else:
self.log.debug(f" Found sample {smp} is loaded")
self.log.debug(f" getting loaded {self.get_loaded_sample()}")
smp._set_loaded(True)
Loading