Skip to content

Commit

Permalink
handle quantity as tuple in all instruments
Browse files Browse the repository at this point in the history
  • Loading branch information
wtbarnes committed Jul 19, 2023
1 parent 3ec6bc1 commit 20685f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions synthesizAR/instruments/hinode.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from synthesizAR.util import SpatialPair
from synthesizAR.instruments import InstrumentBase, ChannelBase
from synthesizAR.util.decorators import return_quantity_as_tuple

__all__ = ['InstrumentHinodeEIS', 'InstrumentHinodeXRT']

Expand Down Expand Up @@ -91,6 +92,7 @@ def get_header(self, channel, *args):
return header

@staticmethod
@return_quantity_as_tuple
def calculate_intensity_kernel(loop, channel, **kwargs):
K_T = np.interp(loop.electron_temperature,
channel.temperature,
Expand Down
2 changes: 2 additions & 0 deletions synthesizAR/instruments/physical.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class InstrumentLOSVelocity(InstrumentQuantityBase):
name = 'los_velocity'

@staticmethod
@return_quantity_as_tuple
def calculate_intensity_kernel(loop, *args, **kwargs):
observer = kwargs.get('observer')
if observer is None:
Expand All @@ -210,5 +211,6 @@ class InstrumentTemperature(InstrumentQuantityBase):
name = 'temperature'

@staticmethod
@return_quantity_as_tuple
def calculate_intensity_kernel(loop, *args, **kwargs):
return loop.electron_temperature
2 changes: 2 additions & 0 deletions synthesizAR/instruments/sdo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from scipy.interpolate import interp1d, interpn

from synthesizAR.instruments import InstrumentBase
from synthesizAR.util.decorators import return_quantity_as_tuple

__all__ = ['InstrumentSDOAIA', 'aia_kernel_quick']

Expand Down Expand Up @@ -78,6 +79,7 @@ def get_instrument_name(self, channel):
return f'{self.detector}_{channel.telescope_number}'

@staticmethod
@return_quantity_as_tuple
def calculate_intensity_kernel(loop, channel, **kwargs):
em_model = kwargs.get('emission_model', None)
if em_model:
Expand Down

0 comments on commit 20685f9

Please sign in to comment.