feat(flomni): fire the single-point acquisition warning on the off->on transition
Previously the tomo_acquire_at_angle()-vs-tomo_scan_projection() reminder only printed when tomo_parameters() happened to be called afterward -- easy to miss if you just flip single_point_instead_of_fermat_scan directly. Its setter now prints the same note immediately when the value transitions False->True. Gated on the transition (checked via the property's own getter before the write) so restoring an already-True value across consecutive queued jobs doesn't reprint it every time -- sim-verified: silent on False->False, True->True (repeat), and True->False; prints exactly once per False->True flip. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2184,6 +2184,18 @@ class Flomni(
|
||||
|
||||
@single_point_instead_of_fermat_scan.setter
|
||||
def single_point_instead_of_fermat_scan(self, val: bool):
|
||||
# Fire the reminder right at the moment it's switched on, not just
|
||||
# when tomo_parameters() happens to be called afterward. Gated on
|
||||
# the off->on transition (reading the property itself for the old
|
||||
# value, before the write below) so restoring the same True value
|
||||
# across consecutive queued jobs doesn't reprint it every time.
|
||||
if val and not self.single_point_instead_of_fermat_scan:
|
||||
print(
|
||||
"\x1b[93mNote: with single-point mode on, acquire a single projection "
|
||||
"(including inside a custom at_each_angle hook) with "
|
||||
"tomo_acquire_at_angle(angle), not tomo_scan_projection(angle) -- the "
|
||||
"latter always runs a full Fermat scan regardless of this setting.\x1b[0m"
|
||||
)
|
||||
self.client.set_global_var("single_point_instead_of_fermat_scan", val)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user