Skip to content

Commit

Permalink
Update main script for configurable observer
Browse files Browse the repository at this point in the history
  • Loading branch information
HealthyPear committed Dec 16, 2024
1 parent f6d52c6 commit 2353a09
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/iact_estimator/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,18 @@ def main():
logger.info("All expected operations have been perfomed succesfully.")

target_source = FixedTarget.from_name(source_name)
observer = Observer.at_site("Roque de los Muchachos")

if config["observer"]["auto"]:
observer = Observer.at_site(config["observer"]["auto"])
else:
obs_cfg = config["observer"]["manual"]
observer = Observer(
timezone=obs_cfg["timezone"],
name=obs_cfg["name"],
latitude=u.Quantity(obs_cfg["latitude"]),
longitude=u.Quantity(obs_cfg["longitude"]),
elevation=u.Quantity(obs_cfg["elevation"]),
)
time = Time(config["observation_datetime"])

crab = FixedTarget.from_name("Crab")
Expand Down

0 comments on commit 2353a09

Please sign in to comment.