Coverage for config/calibrate.py: 88%

23 statements  

« prev     ^ index     » next       coverage.py v6.4.2, created at 2022-07-19 05:44 -0700

1import os.path 

2 

3from lsst.meas.astrom import MatchOptimisticBTask 

4 

5configDir = os.path.dirname(__file__) 

6 

7config.photoCal.colorterms.load(os.path.join(configDir, 'colorterms.py')) 

8 

9 

10config.photoRefObjLoader.filterMap = {'i2': 'i'} 

11 

12config.astrometry.wcsFitter.order = 3 

13if isinstance(config.astrometry.matcher, MatchOptimisticBTask): 13 ↛ 14line 13 didn't jump to line 14, because the condition on line 13 was never true

14 config.astrometry.matcher.maxMatchDistArcSec = 5 

15 config.astrometry.sourceSelector['matcher'].excludePixelFlags = False 

16 

17config.photoCal.applyColorTerms = True 

18 

19# this was the default prior to DM-11521. New default is 2000. 

20config.deblend.maxFootprintSize=0 

21 

22# Better astrometry matching 

23config.astrometry.matcher.numBrightStars = 150 

24 

25# ==================================== 

26# TODO DM-31063: below are things taken from obs_subaru that should be moved 

27# into a generic pipeline config once gen2 is gone. 

28config.measurement.plugins.names |= ["base_CircularApertureFlux"] 

29config.measurement.plugins["base_CircularApertureFlux"].radii = [3.0, 4.5, 6.0, 9.0, 12.0, 17.0, 25.0, 35.0, 50.0, 70.0] 

30# Use a large aperture to be independent of seeing in calibration 

31config.measurement.plugins["base_CircularApertureFlux"].maxSincRadius = 12.0 

32 

33import lsst.meas.extensions.photometryKron 

34config.measurement.plugins.names |= ["ext_photometryKron_KronFlux"] 

35 

36from lsst.utils import getPackageDir 

37config.measurement.load(os.path.join(getPackageDir("meas_extensions_shapeHSM"), "config", "enable.py")) 

38config.measurement.plugins["ext_shapeHSM_HsmShapeRegauss"].deblendNChild = "deblend_nChild" 

39# Enable debiased moments 

40config.measurement.plugins.names |= ["ext_shapeHSM_HsmPsfMomentsDebiased"] 

41 

42 

43config.measurement.plugins.names |= ["base_Jacobian", "base_FPPosition"] 

44config.measurement.plugins["base_Jacobian"].pixelScale = 0.187