@@ -6,14 +6,14 @@ import {
66 MenuItem ,
77 Select ,
88 Stack ,
9- TextField ,
109 Tooltip ,
1110} from "@mui/material" ;
1211import React from "react" ;
1312import { PumpProbeOptions } from "../components/FixedTarget/PumpProbeComponents" ;
1413import { MapView } from "../components/FixedTarget/FixedTargetMapComponents" ;
1514import { chipTypes , MapTypes , pumpProbeMode } from "../components/params" ;
1615import { AbortButton , RunPlanButton } from "../blueapi/BlueapiComponents" ;
16+ import { ParameterInput } from "../components/ParameterInputs" ;
1717
1818type ParametersProps = {
1919 subDir : string ;
@@ -91,78 +91,42 @@ function CollectionInput() {
9191 < Grid2 container spacing = { 2 } >
9292 < Grid2 size = { 4.5 } >
9393 < Stack direction = { "column" } spacing = { 1 } alignItems = { "center" } >
94- < Tooltip
95- title = "Location inside visit directory to save data"
96- placement = "left"
97- >
98- < TextField
99- size = "small"
100- label = "Sub-directory"
101- defaultValue = { subDir }
102- onChange = { ( e ) => setSubDir ( String ( e . target . value ) ) }
103- style = { { width : 180 } }
104- />
105- </ Tooltip >
106- < Tooltip
107- title = "Chip identifier, this will be used as filename"
108- placement = "left"
109- >
110- < TextField
111- size = "small"
112- label = "Chip Name"
113- defaultValue = { chipName }
114- onChange = { ( e ) => setChipName ( String ( e . target . value ) ) }
115- style = { { width : 180 } }
116- />
117- </ Tooltip >
118- < Tooltip
119- title = "How many consecutive times each window should be collected."
120- placement = "left"
121- >
122- < TextField
123- size = "small"
124- label = "Shots Per Aperture"
125- defaultValue = { shots }
126- onChange = { ( e ) => setShots ( Number ( e . target . value ) ) }
127- style = { { width : 180 } }
128- />
129- </ Tooltip >
130- < Tooltip
131- title = "Exposure time for each window, in seconds"
132- placement = "left"
133- >
134- < TextField
135- size = "small"
136- label = "Exposure Time (s)"
137- defaultValue = { expTime }
138- onChange = { ( e ) => setExpTime ( Number ( e . target . value ) ) }
139- style = { { width : 180 } }
140- />
141- </ Tooltip >
142- < Tooltip
143- title = "Request transmission for collection, expressed as a fraction"
144- placement = "left"
145- >
146- < TextField
147- size = "small"
148- label = "Transmission (fraction)"
149- defaultValue = { trans }
150- onChange = { ( e ) => setTrans ( Number ( e . target . value ) ) }
151- style = { { width : 180 } }
152- />
153- </ Tooltip >
154- < Tooltip
155- title = "Distance to move the detector y stage to, in millimeters"
156- placement = "left"
157- >
158- < TextField
159- size = "small"
160- label = "Detector Distance (mm)"
161- defaultValue = { detDist }
162- onChange = { ( e ) => setDetDist ( Number ( e . target . value ) ) }
163- style = { { width : 180 } }
164- />
165- </ Tooltip >
94+ < ParameterInput
95+ value = { subDir }
96+ onSet = { setSubDir }
97+ label = "Sub-directory"
98+ tooltip = "Location inside visit directory to save data"
99+ />
100+ < ParameterInput
101+ value = { chipName }
102+ onSet = { setChipName }
103+ label = "Chip Name"
104+ tooltip = "Chip identifier, this will be used as filename"
105+ />
106+ < ParameterInput
107+ value = { shots }
108+ onSet = { setShots }
109+ label = "Shots Per Aperture"
110+ tooltip = "How many consecutive times each window should be collected"
111+ />
112+ < ParameterInput
113+ value = { expTime }
114+ onSet = { setExpTime }
115+ label = "Exposure Time (s)"
116+ tooltip = "Exposure time for each window, in seconds"
117+ />
118+ < ParameterInput
119+ value = { trans }
120+ onSet = { setTrans }
121+ label = "Transmission (fraction)"
122+ tooltip = "Request transmission for collection, expressed as a fraction"
123+ />
124+ < ParameterInput
125+ value = { detDist }
126+ onSet = { setDetDist }
127+ label = "Detector Distance (mm)"
128+ tooltip = "Distance to move the detector y stage to, in millimeters"
129+ />
166130 </ Stack >
167131 </ Grid2 >
168132 < Grid2 size = { 3 } >
0 commit comments