2020-04-08 09:56:04 +02:00
|
|
|
from abc import abstractmethod
|
2020-04-16 09:35:24 +02:00
|
|
|
from ..IRadiant import IRadiant
|
2020-04-08 09:56:04 +02:00
|
|
|
from ..SpectralQty import SpectralQty
|
2020-04-08 13:36:08 +02:00
|
|
|
import astropy.units as u
|
2020-04-16 09:35:24 +02:00
|
|
|
import numpy as np
|
2020-04-08 09:56:04 +02:00
|
|
|
|
|
|
|
|
2020-04-16 09:35:24 +02:00
|
|
|
class ATarget(IRadiant):
|
2020-04-08 09:56:04 +02:00
|
|
|
"""
|
|
|
|
Abstract super class for target models
|
|
|
|
"""
|
2020-04-08 18:16:12 +02:00
|
|
|
|
2020-04-08 09:56:04 +02:00
|
|
|
@abstractmethod
|
|
|
|
def __init__(self, sfd: SpectralQty):
|
|
|
|
"""
|
|
|
|
Initialize a new target
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
----------
|
|
|
|
sfd: SpectralQty
|
|
|
|
The spectral flux density of the target
|
|
|
|
"""
|
|
|
|
self._sfd = sfd
|
|
|
|
|
|
|
|
def calcNoise(self) -> SpectralQty:
|
|
|
|
"""
|
|
|
|
Calculate the spectral radiance of the target's noise
|
|
|
|
|
|
|
|
Returns
|
|
|
|
-------
|
|
|
|
noise : SpectralQty
|
|
|
|
The spectral radiance of the target's noise
|
|
|
|
"""
|
2020-04-16 09:35:24 +02:00
|
|
|
return SpectralQty(self._sfd.wl, np.repeat(0, len(self._sfd.wl)) << u.W / (u.m**2 * u.nm * u.sr))
|
2020-04-08 09:56:04 +02:00
|
|
|
|
|
|
|
def calcSignal(self) -> SpectralQty:
|
|
|
|
"""
|
|
|
|
Calculate the spectral flux density of the target's signal
|
|
|
|
|
|
|
|
Returns
|
|
|
|
-------
|
|
|
|
signal : SpectralQty
|
|
|
|
The spectral flux density of the target's signal
|
|
|
|
"""
|
2020-04-08 13:36:08 +02:00
|
|
|
return self._sfd
|