Skip to content

Commit 7a2e931

Browse files
committed
power to zero test
1 parent 6d81d04 commit 7a2e931

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pyduino/spectra.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -242,18 +242,15 @@ def ask_oracle(self, X) -> np.ndarray:
242242
self.gotod()
243243
data0 = self.F_get()
244244
f0 = get_param(data0, self.density_param, reactors)
245-
f0 = np.array(list(f0.values())).astype(float)
246245

247246
self.F_set(self.payload)
248247
time.sleep(self.deltaT)
249248
data = self.F_get()
250249
f = get_param(data, self.density_param, reactors)
251-
f = np.array(list(f.values())).astype(float)
252250

253-
#alpha = (np.log(f) - np.log(f0))/self.deltaT #Growth Rate $f=f_0 exp(alpha T)$
254-
yield_rate = (f/f0 - 1)/self.deltaT #Yield rate (not growth rate)
251+
#yield_rate = np.array([(float(f[id])/float(f[id]) - 1)/self.deltaT/self.power[id] for id in reactors]).astype(float)
255252

256-
fitness = yield_rate/self.power
253+
fitness = np.array([self.power[id] for id in reactors]).astype(float)
257254

258255
y = np.append(y,fitness)
259256
return -y

0 commit comments

Comments
 (0)