Skip to content

Commit

Permalink
Partial changes to callnexgen and use of run_program
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina committed Jul 18, 2024
1 parent 1ffed30 commit f421ce8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,9 @@ def main_fixed_target_plan(
logger.info("Opening fast shutter.")
yield from open_fast_shutter(zebra)

logger.info(f"Run PMAC with program number {prog_num}")
yield from bps.abs_set(pmac.pmac_string, f"&2b{prog_num}r", wait=True)
sleep(1.0)
# logger.info(f"Run PMAC with program number {prog_num}")
# yield from bps.abs_set(pmac.pmac_string, f"&2b{prog_num}r", wait=True)
# sleep(1.0)

# Kick off the StartOfCollect script
logger.debug("Notify DCID of the start of the collection.")
Expand All @@ -652,6 +652,9 @@ def main_fixed_target_plan(
parameters,
)

logger.info(f"Run PMAC with program number {prog_num}")
yield from bps.abs_set(pmac.run_program, prog_num, wait=True)
# TODO Not sure bit before will even work with this?
logger.info("Data Collection running")

timeout_time = (
Expand Down
2 changes: 2 additions & 0 deletions src/mx_bluesky/I24/serial/write_nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def call_nexgen(
wavelength = float(caget(pv.dcm_lambda))

if det_type == Eiger.name:
bit_depth = int(caget(pv.eiger_bitdepthrbv)) # noqa: F841
logger.debug(
f"Call to nexgen server with the following chip definition: \n{chip_prog_dict}"
)
Expand All @@ -90,6 +91,7 @@ def call_nexgen(
"transmission": transmission[0],
"visitpath": os.fspath(meta_h5.parent),
"wavelength": wavelength,
# TODO add bit_depth to payload
}
logger.info(f"Sending POST request to {url} with payload:")
logger.info(pprint.pformat(payload))
Expand Down

0 comments on commit f421ce8

Please sign in to comment.