Skip to content

Commit

Permalink
Merge pull request #63 from simonsobs/new-pysmurf-controller-stuff
Browse files Browse the repository at this point in the history
PysmurfController: add bias_dets and zero_biases to LHS
  • Loading branch information
mhasself authored Aug 30, 2024
2 parents 18f0fa8 + 081c9ba commit fe0ed13
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 9 deletions.
27 changes: 18 additions & 9 deletions agent/pysmurf-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ processes:
stream:
data: {}
tasks:
abort: {}
all_off: {}
bias_dets: {}
overbias_tes: {}
run: {}
run_test_func: {}
set_biases: {}
take_bgmap: {}
take_bias_steps:
data: {
# Latest ocs should be able to handle nans.
'R': [1., 2., .NAN],
}
take_bias_waves: {}
take_iv: {}
take_noise: {}
uxm_relock: {}
uxm_setup:
data: {
'timestamps': [('setup_amps', 1651162263.0204525)],
Expand All @@ -33,12 +50,4 @@ tasks:
'band_medians': [12., 13., 14.],
}
}
uxm_relock: {}
take_bgmap: {}
take_iv: {}
take_bias_steps:
data: {
# Latest ocs should be able to handle nans.
'R': [1., 2., .NAN],
}
take_noise: {}
zero_biases: {}
1 change: 1 addition & 0 deletions src/assets/ocs-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ p.hanging_logmsg {
padding: 10px;
border: 2px solid black;
border-radius: 4px;
width: 100%;
}

.ocs_row > select {
Expand Down
70 changes: 70 additions & 0 deletions src/panels/PysmurfController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,46 @@
:disabled="accessLevel < 1"
@click="startOp('take_iv')">Start</button>
</div>

<div class="ocs_row">
<label class="ocs_double">
Bias by Rfrac target (bias_dets)
</label>
<button
:disabled="accessLevel < 1"
@click="startOp('bias_dets')">Start</button>
</div>
<div class="ocs_row">
<select v-model="op_control.bias_dets_arg" style="margin-left: 20px">
<option>range</option>
<option>median</option>
</select>
<input
v-if="op_control.bias_dets_arg=='range'"
type="text"
v-model.number="op_control.bias_dets_rfrac0"
/>
<input
v-if="op_control.bias_dets_arg=='range'"
type="text"
v-model.number="op_control.bias_dets_rfrac1"
/>
<input
v-if="op_control.bias_dets_arg=='median'"
class="ocs_double"
type="text"
v-model.number="op_control.bias_dets_rfrac"
/>
</div>

<div class="ocs_row">
<label class="ocs_double">
Set Biases to Zero (zero_biases)
</label>
<button
:disabled="accessLevel < 1"
@click="startOp('zero_biases')">Start</button>
</div>
<div class="ocs_row">
<label class="ocs_double">
Bias Steps (take_bias_steps)
Expand Down Expand Up @@ -180,6 +220,20 @@
v-model.number="ops.take_noise.params.duration" />
</OcsTask>

<OcsTask
:op_data="ops.bias_dets"
>
</OcsTask>

<OcsTask
:op_data="ops.zero_biases"
>
</OcsTask>

<OcsOpAutofill
:ops_parent="ops"
/>

</div>

</div>
Expand All @@ -204,6 +258,10 @@
take_bias_steps: {},
take_noise: {
params: {duration: 30}},
bias_dets: {
params: {rfrac: [0.3, 0.6]}},
zero_biases: {
params: {}},
run: {},
abort: {},
Expand All @@ -216,6 +274,10 @@
op_control: {
type: "Readout",
band: "all",
bias_dets_arg: "range",
bias_dets_rfrac: 0.4,
bias_dets_rfrac0: 0.3,
bias_dets_rfrac1: 0.6,
},
dataset: {
view: "all",
Expand All @@ -235,6 +297,14 @@
params.band = [this.op_control.band];
}
break;
case 'bias_dets':
if (this.op_control.bias_dets_arg == "range") {
params.rfrac = [this.op_control.bias_dets_rfrac0,
this.op_control.bias_dets_rfrac1];
} else {
params.rfrac = this.op_control.bias_dets_rfrac;
}
break;
}
// Get confirmation, then launch task.
Expand Down

0 comments on commit fe0ed13

Please sign in to comment.