LSST Applications g0265f82a02+3004013d9a,g0a0026dc87+80ebce256e,g1e7d6db67d+e358f92434,g22560d942e+2a7d2c9fe3,g286849a49d+0dd6615963,g2ab4ef6978+6c3f55bcf5,g2bbee38e9b+3004013d9a,g2cc88a2952+f710201f99,g3273194fdb+f6908454ef,g337abbeb29+3004013d9a,g3c689f2686+14f6a9f94b,g44018dc512+3004013d9a,g47da3c6c86+08259acb38,g4c90b7bd52+c030996298,g4f88e20838+1dfd82a85a,g58be5f913a+4ca07206de,g68a3911fdd+70a60bf42d,g6ae5381d9b+81bc2a20b4,g6f40f426a6+08259acb38,g7427b6cd24+07073039e0,g93973518b8+7d578a9d99,g98ffbb4407+81bc2a20b4,g9ddcbc5298+7f7571301f,ga1e77700b3+1440987d3f,ga7ab7f6f60+80ebce256e,gae46bcf261+3004013d9a,gb2715bf1a1+80ebce256e,gc86a011abf+80ebce256e,gcd84e84c5d+cc22486949,gcf0d15dbbd+08259acb38,gd162630629+910d1976a0,gdaeeff99f8+0d8dbea60f,gdb4ec4c597+3004013d9a,gf041782ebf+2691319615,w.2023.36
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