MCPcopy Create free account
hub / github.com/NanoComp/meep / retrieve_gap

Method retrieve_gap

python/solver.py:565–572  ·  view source on GitHub ↗
(self, lower_band)

Source from the content-addressed store, hash-verified

563 # minimum of the upper band. (The gap is computed from the
564 # band-range-data of the previous run.)
565 def retrieve_gap(self, lower_band):
566 if lower_band + 1 > len(self.band_range_data):
567 raise ValueError("retrieve-gap called for higher band than was calculated")
568
569 f1 = self.band_range_data[lower_band - 1][1][0]
570 f2 = self.band_range_data[lower_band][0][0]
571
572 return (f2 - f1) / (0.005 * (f1 + f2))
573
574 # Split a list L into num more-or-less equal pieces, returning the piece
575 # given by index (in 0..num-1), along with the index in L of the first

Callers 2

first_tm_gapMethod · 0.80
first_tm_gapFunction · 0.80

Calls

no outgoing calls

Tested by 1

first_tm_gapMethod · 0.64