LSST Applications g009b5efdf7+33ab280be1,g0530b470b1+33ab280be1,g1011452fe8+91250f09a0,g131b30d954+f6e951a35a,g1e66b94187+2cf095541c,g235c05d50d+2ad591d120,g2526fcf3cb+d2c2366fef,g2959009a90+aa4442e4e2,g2adfe936b5+33ab280be1,g2aea266057+2cf095541c,g315bf1e6db+7b2debe010,g38189d092c+6a8a80267a,g3a7e09fba3+ffb1c1e880,g3f8e1907dc+353a89de06,g4230fac9de+97ce69b5ba,g42cc332696+2cf095541c,g498fc93c42+60bcca8553,g4e8ce4af8a+d61c1479ad,g51277c4d12+2cf095541c,g5ac366a304+b341ec95e4,g67c5445c93+33ab280be1,g790e439155+1a0c6145b4,g807e3ba568+a3e0d46ab3,g8479130295+f44088696a,g883b199ddb+60bcca8553,gb469cb74ca+b6fe304461,gb94f486bb8+f0f5c22f85,gca804b0f43+f0a1800e64,gcd7e190081+3988c89aec,gd4112516d0+33ab280be1,gd5d1ca8e18+f0a1800e64,gd630573b98+33ab280be1,ge25b0cbbcb+60bcca8553,gf74909da2e+ec4f45d297,v24.1.0.rc3
LSST Data Management Base Package
Loading...
Searching...
No Matches
utils.py
Go to the documentation of this file.
1# This file is part of afw.
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
22__all__ = ["writeFootprintAsDefects"]
23
24from . import footprintToBBoxList
25
26
28 """
29 Write foot as a set of Defects to fd
30
31 Given a detection footprint, convert it to a BBoxList and write the output to the file object fd.
32
33 Parameters
34 ----------
35 fd : `typing.TextIO`
37
38 See Also
39 --------
40 lsst.afw.detection.footprintToBBoxList
41 """
42
43 bboxes = footprintToBBoxList(foot)
44 for bbox in bboxes:
45 print("""\
46Defects: {
47 x0: %4d # Starting column
48 width: %4d # number of columns
49 y0: %4d # Starting row
50 height: %4d # number of rows
51}""" % (bbox.getMinX(), bbox.getWidth(), bbox.getMinY(), bbox.getHeight()), file=fd)
Class to describe the properties of a detected object from an image.
Definition: Footprint.h:63
def writeFootprintAsDefects(fd, foot)
Definition: utils.py:27