From 0e5a3f26be9b5bbd8907654e825753ad4fe994af Mon Sep 17 00:00:00 2001 From: LukasK13 Date: Mon, 20 Jul 2020 16:28:23 +0200 Subject: [PATCH] Enable extended target --- esbo_etc/classes/target/FileTarget.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esbo_etc/classes/target/FileTarget.py b/esbo_etc/classes/target/FileTarget.py index 8819529..f1b84c3 100644 --- a/esbo_etc/classes/target/FileTarget.py +++ b/esbo_etc/classes/target/FileTarget.py @@ -26,7 +26,10 @@ class FileTarget(ATarget): Wavelengths used for binning """ # Create spectral quantity from file - sfd = SpectralQty.fromFile(file, u.nm, u.W / (u.m ** 2 * u.nm)).rebin(wl_bins) + try: + sfd = SpectralQty.fromFile(file, u.nm, u.W / (u.m ** 2 * u.nm)).rebin(wl_bins) + except: + sfd = SpectralQty.fromFile(file, u.nm, u.W / (u.m ** 2 * u.nm * u.sr)).rebin(wl_bins) # Initialize the super class super().__init__(sfd, wl_bins)