Skip to content

Commit

Permalink
Improve __repr__
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jul 14, 2023
1 parent 4cc2453 commit b49f46c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/gort/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def __init__(self, gort: Gort, tile: Tile, mask_positions_pattern: str = "P1-*")

self.guide_task: asyncio.Future | None = None

def __repr__(self):
return f"<GortObserver (tile_id={self.tile.tile_id})>"

async def slew(self):
"""Slew to the telescope fields."""

Expand Down
3 changes: 2 additions & 1 deletion src/gort/tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ def __init__(
def __repr__(self):
return (
"<Tile "
f"(science ra={self.sci_coords.ra:.6f}, dec={self.sci_coords.dec:.6f}; "
f"(tile_id={self.tile_id}, "
f"science ra={self.sci_coords.ra:.6f}, dec={self.sci_coords.dec:.6f}; "
f"n_skies={len(self.sky_coords)}; n_standards={len(self.spec_coords)})>"
)

Expand Down

0 comments on commit b49f46c

Please sign in to comment.