LSST Applications g0265f82a02+2565ec44ba,g13f254ea0d+81bc2a20b4,g1bfaca5695+198b0f8f95,g1e7d6db67d+6c74b93b31,g2bbee38e9b+2565ec44ba,g2c44ac40b0+a272651890,g3273194fdb+f6908454ef,g337abbeb29+2565ec44ba,g3a3843c330+845d368b72,g3ddfee87b4+ef80074229,g41b076d227+0ffa813159,g44018dc512+2565ec44ba,g4500d70958+191bcb13e4,g47cf500ddd+b8d7f28886,g6ae5381d9b+81bc2a20b4,g6bb41cf53c+4b2cb913b0,g798d346303+d943d688ca,g858d7b2824+d943d688ca,g8fee9bba00+24b5170abb,g98ffbb4407+81bc2a20b4,g9ddcbc5298+7f7571301f,ga1e77700b3+951263b14e,ga883e5f241+ef80074229,gae46bcf261+2565ec44ba,gb700894bec+043dd62fcb,gbeb006f7da+0236ef8838,gc86a011abf+d943d688ca,gc9537b1561+081b210516,gcf0d15dbbd+ef80074229,gd162630629+22efd3ad40,gdaeeff99f8+0d8dbea60f,gdb4ec4c597+2565ec44ba,ge012fd4114+c03985e41f,gf041782ebf+1e6588183a,gfb315b4925+d943d688ca,w.2023.43
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
writeFootprintAsDefects(fd, foot)
Definition utils.py:27