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

Make Mapping XAFS perspective prototype #31

Open
stan-dot opened this issue Dec 9, 2024 · 5 comments
Open

Make Mapping XAFS perspective prototype #31

stan-dot opened this issue Dec 9, 2024 · 5 comments
Assignees

Comments

@stan-dot
Copy link
Collaborator

stan-dot commented Dec 9, 2024

would it be possible to send scanspec definitions to Malcolm?

there is some old code to send notifcations to the server over rmq

@stan-dot
Copy link
Collaborator Author

stan-dot commented Dec 9, 2024

right now we have
in the mapping scans
gda gui parameters fill out forms with values -> the various ScanModel definitions with values are parsed inside gda server -> serialized into json -> sent to malcolm IOC where Python read it
I had a moment of clarity then
that if we want to get maximum testing time for a scanspec GUI
we could do
web gui for scanspec -> nodejs backend serializes into json and sends to -> blueapi service OR malcolm service
we'd get the benefit of running our scanspec gui for longer and more broadly

as we wouldn't need to depend on whether the blueapi is stable and whether X beamline has a cluster
this all hinges on the question - how hard is it to convert ScanSpec into malcolm json

@stan-dot
Copy link
Collaborator Author

Screenshot from 2024-12-10 10-49-44
Screenshot from 2024-12-10 10-49-52
![Screenshot from 2024-12-10 10-50-05](https://github.com/user-attachments/assets/6598df54
ScanManagementController.java.txt
-b0ec-4d48-8fbf-53a84e0eb207)
ScanRequestConverter.java.txt

* CompoundModel {
 *     models:  [ list of models]
 *     regions: [ list of regions]
 *     mutators: [ list of mutators ]
 * }
 * Region {
 *     roi: geometric roi
 *     scannables: [ list of scannable names]
 * }
 

where for example:

*     models : [
*         {type: SpiralModel
*          xAxisName: x
*          yAxisName: y
*          ...
*         }
*     ]
*     regions : [
*        {
*          roi : {type: CircularROI
*           centre: [0,1]
*           radius: 2
*          }
*          scannables: ["x", "y"]
*        }
*     ]
*     mutators : [
*        {
*           RandomOffsetMutator: {
*            seed: 10
*            axes: ["x"]
*            max_offset: {
*              "x":0.1
*            }
*           }
*        }
*     ]
* }

rectangle_grid_example.json

@stan-dot
Copy link
Collaborator Author

@stan-dot stan-dot self-assigned this Jan 13, 2025
@stan-dot
Copy link
Collaborator Author

we've got the code under RunScanForm.tsx https://github.com/DiamondLightSource/squid/blob/tmp_branch/apps/gda-scan-definition/app/run-scans/page.tsx

this is also good for rbac running the commands

@stan-dot
Copy link
Collaborator Author

should add a terminal for the familiar UX too https://github.com/xtermjs/xterm.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant