Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions agent/pysmurf-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tasks:
all_off: {}
bias_dets: {}
overbias_tes: {}
restart_rssi: {}
run: {}
run_test_func: {}
set_biases: {}
Expand Down
5 changes: 4 additions & 1 deletion src/components/OcsProcess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="ocs_row">
<label class="important">{{ name }}</label>
<button
:disabled="accessLevel < 1"
:disabled="accessLevel < 1 || block_start"
@click="start">Start</button>
<button
:disabled="accessLevel < 1"
Expand Down Expand Up @@ -33,6 +33,9 @@
address: String,
op_data: Object,
op_name: String,
block_start: {
default: false,
},
show_status: {
default: true,
},
Expand Down
83 changes: 63 additions & 20 deletions src/panels/PysmurfController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,37 @@
v-model="op_control.type"
/>

<!-- Standard -->
<form v-on:submit.prevent
v-if="op_control.type == 'Standard'">

<div class="ocs_row">
<label class="ocs_double">
Restart RSSI (restart_rssi)
</label>
<button
:disabled="accessLevel < 1"
@click="startOp('restart_rssi')">Start</button>
</div>
<div class="ocs_row">
<label class="ocs_double">
Relock all bands (uxm_relock)
</label>
<button
:disabled="accessLevel < 1"
@click="startOp('uxm_relock')">Start</button>
</div>
<div class="ocs_row">
<label class="ocs_double">
Stop streaming (stream.stop)
</label>
<button
:disabled="accessLevel < 1"
@click="stopStream()">Stop</button>
</div>

</form>

<!-- Readout -->
<form v-on:submit.prevent
v-if="op_control.type == 'Readout'">
Expand All @@ -72,11 +103,11 @@

<div class="ocs_row">
<label class="ocs_double">
Full setup (uxm_setup)
Restart RSSI (restart_rssi)
</label>
<button
:disabled="accessLevel < 1"
@click="startOp('uxm_setup')">Start</button>
@click="startOp('restart_rssi')">Start</button>
</div>
<div class="ocs_row">
<label class="ocs_double">
Expand All @@ -86,6 +117,14 @@
:disabled="accessLevel < 1"
@click="startOp('uxm_relock')">Start</button>
</div>
<div class="ocs_row">
<label class="ocs_double">
Full setup (uxm_setup)
</label>
<button
:disabled="accessLevel < 1"
@click="startOp('uxm_setup')">Start</button>
</div>

</form>

Expand Down Expand Up @@ -166,12 +205,6 @@
</div>
</form>

<h2>Stream data</h2>
<OcsProcess
:op_data="ops.stream"
/>


</div>

</div>
Expand All @@ -181,25 +214,26 @@

<i>The controls below do not request confirmation before starting!</i>

<!-- Foreground processes -->
<!-- Common ops -->

<OcsProcess
:op_data="ops.stream"
:block_start="true"
/>
<OcsTask
:op_data="ops.uxm_relock"
/>
<OcsTask
:op_data="ops.restart_rssi"
/>

<!-- Background processes -->

<OcsProcess
:op_data="ops.check_state"
/>

<OcsTask
:op_data="ops.uxm_setup"
>
</OcsTask>
<OcsTask
:op_data="ops.uxm_relock"
>
</OcsTask>
/>
<OcsTask
:op_data="ops.take_bgmap"
>
Expand Down Expand Up @@ -253,6 +287,7 @@
// tasks
uxm_setup: {},
uxm_relock: {},
restart_rssi: {},
take_bgmap: {},
take_iv: {},
take_bias_steps: {},
Expand All @@ -269,10 +304,10 @@
check_state: {},
stream: {},
}),
op_types: ["Readout", "Detectors"],
op_types: ["Standard", "Readout", "Detectors"],
bands: ["all", 0, 1, 2, 3, 4, 5, 6, 7],
op_control: {
type: "Readout",
type: "Standard",
band: "all",
bias_dets_arg: "range",
bias_dets_rfrac: 0.4,
Expand All @@ -293,7 +328,8 @@
case 'uxm_setup':
case 'uxm_relock':
{
if (this.op_control.band != 'all')
if (this.op_control.type == "Readout"
&& this.op_control.band != 'all')
params.band = [this.op_control.band];
}
break;
Expand All @@ -313,6 +349,13 @@
'Are you sure you want to start this Task?',
() => window.ocs_bundle.ui_run_task(this.address, op_name, params));
},
stopStream() {
// Get confirmation, then stop the "stream" process.
window.ocs_bundle.ui_confirm(
"Stop frame data stream?",
"Are you sure you want to issue stream.stop?",
() => window.ocs_bundle.ui_stop_proc(this.address, "stream"));
},
stateVar(key) {
let data = this.ops.check_state.session.data;
let value = data[key];
Expand Down