Skip to content

Commit 540900e

Browse files
committed
Start LSF effect
1 parent 18075ee commit 540900e

4 files changed

Lines changed: 64 additions & 1 deletion

File tree

scopesim/effects/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
from .rotation import *
2323

2424
from .metis_wcu import *
25-
25+
from .metis_ifu_simple import *
2626
# from . import effects_utils
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Effects for the METIS IFU_SMPL mode
4+
5+
Classes:
6+
-
7+
-
8+
"""
9+
10+
from ...utils import get_logger
11+
12+
logger = get_logger(__name__)
13+
14+
from .ifu_simple import LineSpreadFunction
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# -*- coding: utf-8 -*-
2+
"""Effects for the METIS ifu_cube mode"""
3+
4+
from typing import ClassVar
5+
6+
from ..effects import Effect
7+
from ...optics.fov import FieldOfView
8+
from ...utils import from_currsys, get_logger
9+
10+
logger = get_logger(__name__)
11+
12+
class LineSpreadFunction(Effect):
13+
"""
14+
Compute and apply line spread function to IFU cube
15+
"""
16+
z_order: ClassVar[tuple[int, ...]] = (660,)
17+
report_plot_include: ClassVar[bool] = True
18+
report_table_include: ClassVar[bool] = False
19+
20+
def __init__(self, **kwargs):
21+
super().__init__(**kwargs)
22+
params = {
23+
24+
}
25+
self.meta.update(params)
26+
self.meta.update(kwargs)
27+
self.meta = from_currsys(self.meta, self.cmds)
28+
29+
self.lsfwidth = None #self.get_width()
30+
self.kernel = None #self.get_kernel()
31+
32+
def apply_to(self, obj, **kwargs):
33+
"""Apply the LSF"""
34+
if not isinstance(obj, FieldOfView):
35+
return obj
36+
37+
lamc = from_currsys("!OBS.wavelen", self.cmds)
38+
print(">>>>>>>>> Central wavelength:", lamc)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# -*- coding: utf-8 -*-
2+
"""Tests for the METIS IFU_Simple mode"""
3+
4+
# pylint: disable=missing-class-docstring
5+
# pylint: disable=missing-function-docstring
6+
7+
from scopesim.effects.metis_ifu_simple import LineSpreadFunction
8+
9+
class TestLineSpreadFunction:
10+
def test_initialises_correctly(self):
11+
assert isinstance(LineSpreadFunction(), LineSpreadFunction)

0 commit comments

Comments
 (0)