Skip to content

Commit 0aef5cc

Browse files
committed
Ruff
1 parent 99db2cc commit 0aef5cc

File tree

4 files changed

+30
-26
lines changed

4 files changed

+30
-26
lines changed

proseco/catalog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ def optimize_acqs_fids(self, initial_guide_cands=None, **kwargs):
447447

448448
# Only do these imports if it turns out we need optimization.
449449
from chandra_aca.star_probs import guide_count
450+
450451
from . import characteristics_acq as ACQ
451452

452453
no_fid_guides = get_guide_catalog(

proseco/fid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ def set_spoilers_score(self, fid):
485485

486486
# Run guide star fid_trap checks if guide candidates are available
487487
if self.guide_cands is not None:
488-
489488
fid_trap, _ = guide.check_fid_trap(self.guide_cands, [fid], dither)
490489
if np.any(fid_trap):
491490
fid["fid_trap_spoiler"] = True

proseco/guide.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def get_guide_catalog(obsid=0, initial_guide_cands=None, **kwargs):
151151
# for any previous run
152152
guides.cand_guides["stage"] = -1
153153
for stage_idx in range(len(GUIDE.stages)):
154-
guides.cand_guides[f"stat_{stage_idx+1}"] = 0
154+
guides.cand_guides[f"stat_{stage_idx + 1}"] = 0
155155

156156
# Refilter candidates for the current fid set if needed
157157
if guides.fids is not None and len(guides.fids) > 0:
@@ -776,7 +776,7 @@ def search_stage(self, stage):
776776

777777
# Adopt the SAUSAGE convention of a bit array for errors
778778
# Not all items will be checked for each star (allow short circuit)
779-
scol = f"stat_{stage["Stage"]}"
779+
scol = f"stat_{stage['Stage']}"
780780
cand_guides[scol] = 0
781781

782782
n_sigma = stage["SigErrMultiplier"]
@@ -936,7 +936,7 @@ def process_include_ids(self, cand_guides, stars):
936936
# Now compute imposter mags for these stars
937937
if len(new_stars) > 0:
938938
imp_mag, imp_row, imp_col = get_imposter_mags(
939-
new_stars, self.dark, self.dither
939+
new_stars, self.dark, self.dither
940940
)
941941
new_stars["imp_mag"] = imp_mag
942942
new_stars["imp_r"] = imp_row

proseco/tests/test_mon_full_cat.py

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -196,27 +196,31 @@ def test_mon_takes_guide():
196196

197197

198198
def test_obsid_30843():
199-
args = {'obsid': 30843.0,
200-
'raise_exc': True,
201-
'att': [-0.50655663, -0.04177606, 0.85826295, 0.07099192],
202-
'date': '2025:074:22:39:37.088',
203-
'detector': 'ACIS-S',
204-
'dither_acq': [15.9984, 15.9984],
205-
'dither_guide': [15.9984, 15.9984],
206-
'focus_offset': 0.0,
207-
'man_angle': 124.90441066524069,
208-
'n_acq': 8, 'n_fid': 3, 'n_guide': 5,
209-
'sim_offset': -2442.0,
210-
't_ccd_acq': -6.367734460876512,
211-
't_ccd_guide': -3.9378722816242115,
212-
'dyn_bgd_n_faint': 2,
213-
'dyn_bgd_dt_ccd': -4.0,
214-
'target_offset': [0., 0.],
215-
'target_name': 'WR 25',
216-
'duration': 39000.0,
217-
'man_angle_next': 157.2577020420281,
218-
'monitors': [[161.043292, -59.719753, 0., 8.8, 0.]]}
199+
args = {
200+
"obsid": 30843.0,
201+
"raise_exc": True,
202+
"att": [-0.50655663, -0.04177606, 0.85826295, 0.07099192],
203+
"date": "2025:074:22:39:37.088",
204+
"detector": "ACIS-S",
205+
"dither_acq": [15.9984, 15.9984],
206+
"dither_guide": [15.9984, 15.9984],
207+
"focus_offset": 0.0,
208+
"man_angle": 124.90441066524069,
209+
"n_acq": 8,
210+
"n_fid": 3,
211+
"n_guide": 5,
212+
"sim_offset": -2442.0,
213+
"t_ccd_acq": -6.367734460876512,
214+
"t_ccd_guide": -3.9378722816242115,
215+
"dyn_bgd_n_faint": 2,
216+
"dyn_bgd_dt_ccd": -4.0,
217+
"target_offset": [0.0, 0.0],
218+
"target_name": "WR 25",
219+
"duration": 39000.0,
220+
"man_angle_next": 157.2577020420281,
221+
"monitors": [[161.043292, -59.719753, 0.0, 8.8, 0.0]],
222+
}
219223
aca = get_aca_catalog(**args)
220224
mon_id = 1130642984
221-
assert mon_id in aca['id']
222-
assert mon_id in aca.mons['id']
225+
assert mon_id in aca["id"]
226+
assert mon_id in aca.mons["id"]

0 commit comments

Comments
 (0)