removed PtychoEngine unnecessary methods

This commit is contained in:
2026-07-30 20:56:58 +09:00
parent 02293389a1
commit 19f3cff188
3 changed files with 42 additions and 118 deletions
+3 -29
View File
@@ -10,35 +10,9 @@ class ExamplePtychoEngine(PtychoEngine):
def __init__(self, config):
super().__init__(config)
self._metric = 0.0
# run single ptychography job based on `config`
def run(self) -> None:
print("[ExamplePtychoEngine] Sleeping for 0.1 second.")
def run(self, run_id="") -> None:
print(f"[{run_id}] [ExamplePtychoEngine] Sleeping for 0.1 second.")
time.sleep(0.1)
# save outputs to self._output
def output(self) -> Any:
if self._output is None:
pass
return self._output
# return reconstructed object (numpy array)
def recon_object(self) -> Any:
if self._recon_object is None:
output = self.output()
pass
return self._recon_object
# return reconstructed probe (numpy array)
def recon_probe(self) -> Any:
if self._recon_probe is None:
output = self.output()
pass
return self._recon_probe
# return metric value for Bayesian optimization
def metric(self) -> float:
if self._metric is None:
output = self.output()
self._metric = random.uniform(0, 1)
return self._metric