Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# This file is part of astro_metadata_translator. 

2# 

3# Developed for the LSST Data Management System. 

4# This product includes software developed by the LSST Project 

5# (http://www.lsst.org). 

6# See the LICENSE file at the top-level directory of this distribution 

7# for details of code ownership. 

8# 

9# Use of this source code is governed by a 3-clause BSD-style 

10# license that can be found in the LICENSE file. 

11 

12"""Metadata translation code for Subaru telescope""" 

13 

14__all__ = ("SubaruTranslator", ) 

15 

16from astropy.coordinates import EarthLocation 

17 

18from ..translator import cache_translation 

19from .fits import FitsTranslator 

20 

21 

22class SubaruTranslator(FitsTranslator): 

23 """Metadata translator for Subaru telescope headers. 

24 """ 

25 

26 @cache_translation 

27 def to_location(self): 

28 """Returns the location of the Subaru telescope on Mauna Kea. 

29 

30 Hardcodes the location and does not look at any headers. 

31 

32 Returns 

33 ------- 

34 location : `astropy.coordinates.EarthLocation` 

35 An object representing the location of the telescope. 

36 """ 

37 return EarthLocation.from_geodetic(-155.476667, 19.825556, 4139.0) 

38 

39 @cache_translation 

40 def to_observation_counter(self): 

41 """Return the lifetime exposure number. 

42 

43 Returns 

44 ------- 

45 sequence : `int` 

46 The observation counter. 

47 """ 

48 return self.to_exposure_id()