Skip to content

Commit

Permalink
Remove more awaits
Browse files Browse the repository at this point in the history
  • Loading branch information
elanaku committed Oct 14, 2024
1 parent 0cd6d9a commit adf19f7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/lsst/ts/externalscripts/base_take_twilight_flats.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def get_new_exptime(self, sky_counts, exp_time):

return self.config.target_sky_counts * exp_time / sky_counts

async def get_target_radec(self):
def get_target_radec(self):
"""
Returns the RADEC of the target area of the sky that's an azimuth
`distance_from_sun` away from the Sun, given `elevation`,
Expand All @@ -339,15 +339,15 @@ async def get_target_radec(self):
target ra dec
"""

az_sun, el_sun = await self.tcs.get_sun_azel()
az_sun, el_sun = self.tcs.get_sun_azel()

target_az = (az_sun + self.config.distance_from_sun) % 360

target_radec = await self.tcs.radec_from_azel(target_az, self.config.target_el)
target_radec = self.tcs.radec_from_azel(target_az, self.config.target_el)

return target_radec

async def get_target_az(self):
def get_target_az(self):
"""
Returns the AZ of the target area of the sky that's an azimuth
`distance_from_sun` away from the Sun, given `elevation`,
Expand All @@ -359,7 +359,7 @@ async def get_target_az(self):
The target azimuth in degrees
"""

az_sun, el_sun = await self.tcs.get_sun_azel()
az_sun, el_sun = self.tcs.get_sun_azel()

target_az = (az_sun + self.config.distance_from_sun) % 360

Expand Down Expand Up @@ -439,7 +439,7 @@ async def take_twilight_flats(self):

self.assert_sun_location()

target = await self.get_target_radec()
target = self.get_target_radec()

# get an empty field
search_area_degrees = 10
Expand All @@ -451,7 +451,7 @@ async def take_twilight_flats(self):

await self.track_radec_and_setup_instrument(ra, dec)
else:
az = await self.get_target_az()
az = self.get_target_az()

await self.slew_azel_and_setup_instrument(az, self.config.target_el)

Expand Down

0 comments on commit adf19f7

Please sign in to comment.