Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kif committed Dec 10, 2024
1 parent 8620311 commit d1c7cb8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/bm29/ispyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
__contact__ = "[email protected]"
__license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__date__ = "03/12/2024"
__date__ = "10/12/2024"
__status__ = "development"
version = "0.2.2"
version = "0.2.3"

import logging
logger = logging.getLogger("bm29.ispyb")
Expand Down Expand Up @@ -78,7 +78,7 @@ def __init__(self, url, login=None, passwd=None, gallery=None, pyarch=None,
self.gallery = os.path.abspath(gallery)
if not os.path.isdir(self.gallery):
try:
os.makedirs(self.gallery)
os.makedirs(self.gallery)
except Exception as err:
logger.warning(f"Unable to create dir {self.gallery}. {type(err)}: {err}")
else:
Expand All @@ -105,9 +105,12 @@ def send_icat(self, proposal=None, beamline=None, sample=None, dataset=None, pat
:param path: directory name where processed data are staying
:param raw: directory name of the raw data (not the processed ones)
:param data: dict with all data sent to ISpyB
"""
print(f"proposal:{proposal}, beamline:{beamline}, sample:{sample}, dataset:{dataset}, path:{path}, raw:{raw}, data:{data}, ")
tmp = self.gallery.strip("/").split("/")
idx_process = [i for i,j in enumerate(tmp) if j.lower().startswith("process")][-1]
print(tmp, idx_process)
assert idx_process>5
if proposal is None:
proposal = tmp[idx_process-5]
Expand Down

0 comments on commit d1c7cb8

Please sign in to comment.