Enable extended target

This commit is contained in:
Lukas Klass 2020-07-20 16:28:23 +02:00
parent a55fff0d35
commit 0e5a3f26be
1 changed files with 4 additions and 1 deletions

View File

@ -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)