Skip to content

Commit

Permalink
Improve roll processing loud outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Jul 29, 2020
1 parent c3f147a commit c3d2c29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sparkles/roll_optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def get_roll_options(self, min_improvement=0.3, d_roll=None, method='uniq_ids',
"""

if self.loud:
print(' Exploring roll options')
print(f' Exploring roll options {method=}')

if self.roll_options is not None:
warnings.warn('roll_options already available, not re-computing')
Expand Down Expand Up @@ -344,7 +344,8 @@ def get_roll_options(self, min_improvement=0.3, d_roll=None, method='uniq_ids',

for roll_interval in roll_intervals:
if self.loud:
print(roll_interval)
print((' roll={roll:.2f} roll_min={roll_min:.2f} roll_max={roll_max:.2f} '
'add_ids={add_ids} drop_ids={drop_ids}').format(**roll_interval))
roll = roll_interval['roll']
att_targ_rolled = Quat([att_targ.ra, att_targ.dec, roll])
att_rolled = self._calc_aca_from_targ(att_targ_rolled, *self.target_offset)
Expand All @@ -369,7 +370,7 @@ def get_roll_options(self, min_improvement=0.3, d_roll=None, method='uniq_ids',

improvement = calc_improve_metric(n_stars, P2, n_stars_rolled, P2_rolled)
if self.loud:
print(roll, P2_rolled, n_stars_rolled, improvement)
print(f' {P2_rolled=:.2f} {n_stars_rolled=:.2f} {improvement=:.2f}')

if improvement > min_improvement:
acar = self.__class__(aca_rolled, obsid=self.obsid,
Expand Down

0 comments on commit c3d2c29

Please sign in to comment.