diff --git a/python/lvmcam/actor/actor.py b/python/lvmcam/actor/actor.py index c53289c..1929229 100644 --- a/python/lvmcam/actor/actor.py +++ b/python/lvmcam/actor/actor.py @@ -12,6 +12,9 @@ from typing import Any +from astropy.coordinates import EarthLocation +from astropy.utils.iers import conf + from araviscam import BlackflyCamera, BlackflyCameraSystem from basecam import ImageNamer from basecam.actor import BaseCameraActor @@ -25,6 +28,10 @@ from lvmcam.models import CameraCards, GenicamCards, ScraperParamCards, WCSCards +conf.auto_download = False +conf.iers_degraded_accuracy = "ignore" + + CWD = pathlib.Path(__file__).parents[1] BASE_CAMERA_PARAMS = read_yaml_file(CWD / "etc/lvm.camera_param.agcam.yml") @@ -61,14 +68,18 @@ class LVMCamera(BlackflyCamera): fits_model = FITSModel([raw]) image_namer = ImageNamer(basename=basename, dirname=dirname) - async def expose(self, *args, **kwargs) -> Exposure: - ip = self.camera_params["ip"] - delay = int(ip[-1]) / 10 * 3 - await asyncio.sleep(delay) + # LCO + location = EarthLocation.from_geodetic( + lon=-70.70166667, + lat=-29.00333333, + height=2282.0, + ) - if self.name == "west": - await asyncio.sleep(0.5) + async def _expose_internal(self, exposure, **kwargs): + exposure.obstime.location = self.location + return await super()._expose_internal(exposure, **kwargs) + async def expose(self, *args, **kwargs) -> Exposure: return await super().expose(*args, **kwargs) return LVMCamera diff --git a/python/lvmcam/models/camera.py b/python/lvmcam/models/camera.py index 83b7513..d68c88a 100644 --- a/python/lvmcam/models/camera.py +++ b/python/lvmcam/models/camera.py @@ -22,6 +22,12 @@ value="{__exposure__.camera.telescope}", comment="Telescope that took the image", ), + Card( + "LST", + value="round(__exposure__.obstime.sidereal_time('mean').value, 6)", + comment="[hr] Mean local sidereal time", + evaluate=True, + ), Card( "INSTRUME", value="LVM",