Skip to content

Commit

Permalink
Expose parameters from GortObserver in observe_tile
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jul 18, 2023
1 parent 86de203 commit c9daa1c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/gort/gort.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ async def observe_tile(
dec: float | None = None,
use_scheduler: bool = False,
exposure_time: float = 900.0,
show_progress: bool = False,
min_skies: int = 1,
require_spec: bool = False,
):
"""Performs all the operations necessary to observe a tile.
Expand All @@ -461,6 +464,14 @@ async def observe_tile(
use_scheduler
Whether to use the scheduler to determine the ``tile_id`` or
select calibrators.
exposure_time
The lenght of the exposure in seconds.
show_progress
Displays a progress bar with the elapsed exposure time.
min_skies
Minimum number of skies required to consider acquisition successful.
require_spec
Whether to require the ``spec`` telescope to be guiding.
"""

Expand Down Expand Up @@ -492,12 +503,12 @@ async def observe_tile(
await observer.slew()

# Start guiding.
await observer.acquire()
await observer.acquire(min_skies=min_skies, require_spec=require_spec)

# Exposing
exposure = await observer.expose(
exposure_time=exposure_time,
show_progress=True,
show_progress=show_progress,
)

finally:
Expand Down
2 changes: 1 addition & 1 deletion src/gort/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def acquire(
min_skies
Minimum number of skies required to consider acquisition successful.
require_spec
Whether to requiere the ``spec`` telescope to be guiding.
Whether to require the ``spec`` telescope to be guiding.
Raises
------
Expand Down

0 comments on commit c9daa1c

Please sign in to comment.