Skip to content

Commit

Permalink
observe_tile() accepts ra/dec
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jul 6, 2023
1 parent ffb02ed commit 0632815
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/gort/gort.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,20 +326,34 @@ def __init__(self, *args, verbosity: str | None = None, **kwargs):
if verbosity:
self.set_verbosity(verbosity)

async def observe_tile(self, tile_id: int | None = None, expose: bool = True):
async def observe_tile(
self,
tile_id: int | None = None,
ra: float | None = None,
dec: float | None = None,
expose: bool = True,
):
"""Performs all the operations necessary to observe a tile.
Parameters
----------
tile_id
The ``tile_id`` to observe. If not provided, observes the next tile
suggested by the scheduler.
ra,dec
The RA and Dec where to point the science telescopes. The other
telescopes are pointed to calibrators that fit the science pointing.
Cannot be used with ``tile_id``.
expose
Exposes the spectrographs. Otherwise only slews.
"""

tile_id_data = await self.telescopes.goto_tile_id(tile_id)
tile_id_data = await self.telescopes.goto_tile_id(
tile_id=tile_id,
ra=ra,
dec=dec,
)

tile_id = tile_id_data["tile_id"]
dither_pos = tile_id_data["dither_pos"]
Expand Down

0 comments on commit 0632815

Please sign in to comment.