Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# See COPYRIGHT file at the top of the source tree. 

2# 

3# This file is part of fgcmcal. 

4# 

5# Developed for the LSST Data Management System. 

6# This product includes software developed by the LSST Project 

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

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

9# for details of code ownership. 

10# 

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

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

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

14# (at your option) any later version. 

15# 

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

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

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

19# GNU General Public License for more details. 

20# 

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

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

23"""Class for running fgcmcal on a single tract using sourceTable_visit tables. 

24""" 

25 

26import lsst.pipe.base as pipeBase 

27 

28from .dataIds import TractCheckDataIdContainer 

29from .fgcmBuildStarsTable import FgcmBuildStarsTableTask 

30from .fgcmCalibrateTractBase import (FgcmCalibrateTractConfigBase, FgcmCalibrateTractRunner, 

31 FgcmCalibrateTractBaseTask) 

32 

33__all__ = ['FgcmCalibrateTractTableConfig', 'FgcmCalibrateTractTableTask'] 

34 

35 

36class FgcmCalibrateTractTableConfig(FgcmCalibrateTractConfigBase): 

37 """Config for FgcmCalibrateTractTable task""" 

38 def setDefaults(self): 

39 super().setDefaults() 

40 

41 # For the Table version of CalibrateTract, use the associated 

42 # Table version of the BuildStars task. 

43 self.fgcmBuildStars.retarget(FgcmBuildStarsTableTask) 

44 # For tract mode, we set a very high effective density cut. 

45 self.fgcmBuildStars.densityCutMaxPerPixel = 10000 

46 

47 

48class FgcmCalibrateTractTableTask(FgcmCalibrateTractBaseTask): 

49 """ 

50 Calibrate a single tract using fgcmcal, using sourceTable_visit 

51 input catalogs. 

52 """ 

53 ConfigClass = FgcmCalibrateTractTableConfig 

54 RunnerClass = FgcmCalibrateTractRunner 

55 _DefaultName = "fgcmCalibrateTract" 

56 

57 @classmethod 

58 def _makeArgumentParser(cls): 

59 parser = pipeBase.ArgumentParser(name=cls._DefaultName) 

60 parser.add_id_argument("--id", "sourceTable_visit", 

61 help="Data ID, e.g. --id visit=6789 tract=9617", 

62 ContainerClass=TractCheckDataIdContainer) 

63 

64 return parser