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

Deploy blueapi #12

Closed
stan-dot opened this issue Jul 15, 2024 · 12 comments
Closed

Deploy blueapi #12

stan-dot opened this issue Jul 15, 2024 · 12 comments
Assignees
Labels
enhancement New feature or request python Pull requests that update Python code

Comments

@stan-dot
Copy link
Collaborator

No description provided.

@stan-dot stan-dot added enhancement New feature or request python Pull requests that update Python code labels Jul 15, 2024
@stan-dot stan-dot self-assigned this Jul 15, 2024
@stan-dot
Copy link
Collaborator Author

need to call the scan from api with a scanspec string that describes the grid trajectory.

need to supply the diode device

@stan-dot
Copy link
Collaborator Author

from @iain-hall 's notes:

Beamline script : /dls_sw/i18/scripts/beamlinestuff/I18Scans/Create_deg_Lookuptabledcm.py
Old version of beamline script in GDA : scripts/create_lookuptable_deg.py
Procedure is as follows :
Adjust undulator gap to using current lookup table for initial Bragg angle
Scan across desired range of Bragg angles, for each angle :
Scan undulator gap (current gap value ± small range) and measure on d7bdiode (Diode PV is BL18I-DI-PHDGN-07:B:DIODE:I)
Find undulator gap that gives peak d7bdiode value (fit gaussian curve, store peak position).
Fit quadratic curve to the set of Bragg angle - undulator gap values. These values are used to generate the lookup table of undulator gap vs. Bragg angle.
Scan is currently done by GDA using Jython; quadratic curve fit is done using IDL.
Undulator gap scans are are carried out at each harmonic.
Beamline staff manually update the lookup table - copy-pasting updated section (i.e. values for a range of bragg angles) into text file to replace old values.

@stan-dot
Copy link
Collaborator Author

stan-dot commented Aug 5, 2024

the deployment part is done

@stan-dot
Copy link
Collaborator Author

will need to re-do the deployment part for the new release

@stan-dot
Copy link
Collaborator Author

regardless of the lookup tables, which are more complicated, it should be possible to do this part on the Tuesday machine day.

@stan-dot stan-dot linked a pull request Sep 11, 2024 that will close this issue
@stan-dot
Copy link
Collaborator Author

update - the gridscan is not in relation to the table, but in relation to the dcm. possibly useful for the pinhole alignment?

@stan-dot
Copy link
Collaborator Author

24.09 testing update - the table device fails to load into the /devices blueapi endpoint

@stan-dot
Copy link
Collaborator Author

troubleshooting with dodal connect

@stan-dot
Copy link
Collaborator Author

 dodal connect i18
Attempting connection to i18 (using dodal.beamlines.i18)
5 devices connected:

        dcm
        diodad7bdiode
        hfm
        synchrotron
Traceback (most recent call last):
  File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/bin/dodal", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/scratch/xma12127/projects/forks/dodal/src/dodal/cli.py", line 71, in connect
    raise NotConnected(exceptions)
ophyd_async.core._utils.NotConnected: 
raster_stage: NotConnected:
    coros: NotConnected:
        x: NotConnected:
            motor_egu: NotConnected: ca://BL18I-MO-SIM-01:M1.EGU
            velocity: NotConnected: ca://BL18I-MO-SIM-01:M1.VELO
            user_readback: NotConnected: ca://BL18I-MO-SIM-01:M1.RBV
            user_setpoint: NotConnected: ca://BL18I-MO-SIM-01:M1.VAL
            max_velocity: NotConnected: ca://BL18I-MO-SIM-01:M1.VMAX
            acceleration_time: NotConnected: ca://BL18I-MO-SIM-01:M1.ACCL
            precision: NotConnected: ca://BL18I-MO-SIM-01:M1.PREC
            deadband: NotConnected: ca://BL18I-MO-SIM-01:M1.RDBD
            motor_done_move: NotConnected: ca://BL18I-MO-SIM-01:M1.DMOV
            low_limit_travel: NotConnected: ca://BL18I-MO-SIM-01:M1.LLM
            high_limit_travel: NotConnected: ca://BL18I-MO-SIM-01:M1.HLM
            motor_stop: NotConnected: ca://BL18I-MO-SIM-01:M1.STOP
        y: NotConnected:
            motor_egu: NotConnected: ca://BL18I-MO-SIM-01:M2.EGU
            velocity: NotConnected: ca://BL18I-MO-SIM-01:M2.VELO
            user_readback: NotConnected: ca://BL18I-MO-SIM-01:M2.RBV
            user_setpoint: NotConnected: ca://BL18I-MO-SIM-01:M2.VAL
            max_velocity: NotConnected: ca://BL18I-MO-SIM-01:M2.VMAX
            acceleration_time: NotConnected: ca://BL18I-MO-SIM-01:M2.ACCL
            precision: NotConnected: ca://BL18I-MO-SIM-01:M2.PREC
            deadband: NotConnected: ca://BL18I-MO-SIM-01:M2.RDBD
            motor_done_move: NotConnected: ca://BL18I-MO-SIM-01:M2.DMOV
            low_limit_travel: NotConnected: ca://BL18I-MO-SIM-01:M2.LLM
            high_limit_travel: NotConnected: ca://BL18I-MO-SIM-01:M2.HLM
            motor_stop: NotConnected: ca://BL18I-MO-SIM-01:M2.STOP
undulator: TypeError: Undulator.__init__() missing 1 required positional argument: 'id_gap_lookup_table_path'


@stan-dot
Copy link
Collaborator Author

table was simply missing the line for super().__init__(name=name)

@stan-dot
Copy link
Collaborator Author

everything is connecting now

@stan-dot stan-dot changed the title Deploy blueapi and run with a grid scan with a diode Deploy blueapi Nov 11, 2024
@stan-dot
Copy link
Collaborator Author

this can be considered done, the scope was too large and the testing time is scarce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant