Skip to content

Commit

Permalink
Makes biasstep_rebias an action, and simple docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
jlashner committed Sep 2, 2023
1 parent 01fd395 commit 1327af0
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Contents

operations/setup
operations/bias_steps
operations/biasstep_rebias
operations/iv
operations/squid_curves
operations/complex_impedance
48 changes: 48 additions & 0 deletions docs/operations/biasstep_rebias.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Bias Step Rebias
================================

For various reasons, it may be beneficial to bias or rebias detectors into their
transition using bias-step functions instead of IVs, since
- bias steps can be much faster than IVs
- bias steps don't require overbiasing

Yuhan Wang has developed the bias-step rebiasing function to find a suitable
bias-point using just bias steps, which is described in greater detail in `his
spie proceeding <https://arxiv.org/abs/2107.13504>`_.

The general control flow is as follows:

1. Take initial bias steps bsa_0
will rebias if there are any bias lines where R0 is all nan
If >10% of dets are have Rfrac < 0.1, marks bg as overbias_needed
If >50% of dets have Rfrac > 0.9, marks bg as normal (and drop from normal needed)
2. Overbias overbias_needed bgs
runs overbias_dets on bgs that need overbiasing, and waits
For biaslines that have been overbiased, set the DC bias voltage to testbed_100mK_bias_voltage
Run bias steps
(no bias retry here)

Check warning on line 23 in docs/operations/biasstep_rebias.rst

View workflow job for this annotation

GitHub Actions / test

Unexpected indentation.
Check normal condition (above) and add updated bias lines to bg_detectors_normal array if they meet it

Check warning on line 24 in docs/operations/biasstep_rebias.rst

View workflow job for this annotation

GitHub Actions / test

Block quote ends without a blank line; unexpected unindent.
3. Drop from normal
For each normal bg, step voltage by 0.5(V_norm - V_SC) determined from IV
Run bias steps
update bsa_0 so it's always the last bias step ran

Check warning on line 28 in docs/operations/biasstep_rebias.rst

View workflow job for this annotation

GitHub Actions / test

Unexpected indentation.
These bias steps don't have a retry
Check normal condition. If any bgs are still normal, repeat.

Check warning on line 30 in docs/operations/biasstep_rebias.rst

View workflow job for this annotation

GitHub Actions / test

Block quote ends without a blank line; unexpected unindent.
After exiting loop, the resulting DC biases are initial_dc_biases
4. Find new bjas voltage and take bias steps:
vspread is diff between median normal and median SC voltages based on IV
New bias voltage is init +/- 0.15*vspread where +/- is determined by
whether or not the median Rfrac is > or < than 0.5
Take bias steps (bsa_1) and retry if needed
5. Determine new bias point for each channel:
v_estimate = (v0 (target - Rfrac_1) + v1 (Rfrac_0 - target)) / (Rfrac_0 - Rfrac_1)
vnew = median(v_estimate[bg]), or if all are nan, vnew = (v1 - v0) / 2
6. Set bias to vnew and retake bias steps bsa_2 (with retry if needed)
BG is successful if abs(Rfrac - target) < 0.05
7. Fine tuning unsuccessful bias groups
Step 0.15 vspread in the appropriate direction
Take bias steps (with retry)
v_estimate2 = (v0 (target - Rfrac_1) + v1 (Rfrac_0 - target)) / (Rfrac_0 - Rfrac_1)
with v0= prev estimate and v1 = prev estimate + delta

Check warning on line 46 in docs/operations/biasstep_rebias.rst

View workflow job for this annotation

GitHub Actions / test

Unexpected indentation.
Apply v_estimate2, retake bias steps.

Check warning on line 47 in docs/operations/biasstep_rebias.rst

View workflow job for this annotation

GitHub Actions / test

Block quote ends without a blank line; unexpected unindent.
8. Return final bias step and bias voltages
1 change: 1 addition & 0 deletions sodetlib/operations/bias_dets.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def bias_to_rfrac(S, cfg, rfrac=0.5, bias_groups=None, iva=None,

return biases

sdl.set_action()
def biasstep_rebias(
S, cfg, target_percentage_rn = 0.5, bias_groups=None,
show_plots=True, make_plots=True):
Expand Down

0 comments on commit 1327af0

Please sign in to comment.