From 9919b753971315847abcd4def3e8d1a843709340 Mon Sep 17 00:00:00 2001 From: James Chiang Date: Thu, 13 Jun 2024 08:13:41 -0700 Subject: [PATCH] treat SSOs with zero length streaks as point sources --- skycatalogs/objects/sso_object.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skycatalogs/objects/sso_object.py b/skycatalogs/objects/sso_object.py index 041e9d46..b889f3cd 100644 --- a/skycatalogs/objects/sso_object.py +++ b/skycatalogs/objects/sso_object.py @@ -70,6 +70,10 @@ def get_gsobject_components(self, gsparams=None, rng=None, init_v = UnitVector3d(LonLat.fromDegrees(ra, dec)) final_v = UnitVector3d(LonLat.fromDegrees(ra_final, dec_final)) length = np.degrees(np.arccos(init_v.dot(final_v))) * 3600.0 + if length * trail_width == 0: + # Treat as a point source. + return {'this_object': galsim.DeltaFunction(gsparams=gsparams)} + gobj = galsim.Box(length, trail_width, gsparams=gsparams) # now rotate to direction of (ra_rate, dec_rate)