Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryYanH committed Oct 30, 2023
1 parent 7ece5a1 commit 4464731
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions AutoCkt/Server/autockt_server/opamps/tb.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def _get_best_crossing(yvec: numpy.array, val: float) -> Optional[int]:
Get the index of the "best" crossing of `yvec` across `val`.
Returns None if no sufficiently good crossing (no crossing at all?) is found.
FIXME @HarryYanH: what do you mean "best"?
the value which is closest to our threshold
"""

zero_crossings = numpy.where(numpy.diff(numpy.sign(yvec - val)))[0]
Expand All @@ -135,6 +136,7 @@ def extract_outputs(results: h.sim.SimResult) -> OpAmpOutput:
sig_out = ac_result.data["v(xtop.sig_out)"]

# FIXME: @HarryYanH: why are these all multiplied by 2?
# Because the amplitude of our AC signal is 0.5, *2 here means /0.5
gain = find_dc_gain(2 * sig_out)
ugbw = find_ugbw(ac_result.freq, 2 * sig_out)
phm = find_phm(ac_result.freq, 2 * sig_out)
Expand Down

0 comments on commit 4464731

Please sign in to comment.