Coverage for python/lsst/source/injection/inject_exposure.py: 100%

14 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-04-20 12:10 +0000

1# This file is part of source_injection. 

2# 

3# Developed for the LSST Data Management System. 

4# This product includes software developed by the LSST Project 

5# (https://www.lsst.org). 

6# See the COPYRIGHT file at the top-level directory of this distribution 

7# for details of code ownership. 

8# 

9# This program is free software: you can redistribute it and/or modify 

10# it under the terms of the GNU General Public License as published by 

11# the Free Software Foundation, either version 3 of the License, or 

12# (at your option) any later version. 

13# 

14# This program is distributed in the hope that it will be useful, 

15# but WITHOUT ANY WARRANTY; without even the implied warranty of 

16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

17# GNU General Public License for more details. 

18# 

19# You should have received a copy of the GNU General Public License 

20# along with this program. If not, see <https://www.gnu.org/licenses/>. 

21 

22from __future__ import annotations 

23 

24__all__ = ["ExposureInjectConnections", "ExposureInjectConfig", "ExposureInjectTask"] 

25 

26from lsst.pipe.base.connectionTypes import Input, Output 

27 

28from .inject_visit import VisitInjectConfig, VisitInjectConnections, VisitInjectTask 

29 

30 

31class ExposureInjectConnections( # type: ignore [call-arg] 

32 VisitInjectConnections, 

33 dimensions=("instrument", "visit", "detector"), 

34): 

35 """Exposure-level connections for source injection tasks.""" 

36 

37 input_exposure = Input( 

38 doc="Exposure to inject synthetic sources into.", 

39 name="postISRCCD", 

40 storageClass="Exposure", 

41 dimensions=("instrument", "exposure", "detector"), 

42 ) 

43 output_exposure = Output( 

44 doc="Injected Exposure.", 

45 name="{injected_prefix}postISRCCD", 

46 storageClass="Exposure", 

47 dimensions=("instrument", "exposure", "detector"), 

48 ) 

49 output_catalog = Output( 

50 doc="Catalog of injected sources.", 

51 name="{injected_prefix}postISRCCD_catalog", 

52 storageClass="ArrowAstropy", 

53 dimensions=("instrument", "exposure", "detector"), 

54 ) 

55 

56 

57class ExposureInjectConfig( # type: ignore [call-arg] 

58 VisitInjectConfig, 

59 pipelineConnections=ExposureInjectConnections, 

60): 

61 """Exposure-level configuration for source injection tasks.""" 

62 

63 pass 

64 

65 

66class ExposureInjectTask(VisitInjectTask): 

67 """Exposure-level class for injecting sources into images.""" 

68 

69 _DefaultName = "exposureInjectTask" 

70 ConfigClass = ExposureInjectConfig 

71 

72 pass