LSST Applications g0265f82a02+24c11603bc,g159b3db504+6433217a5f,g1e7d6db67d+00b2507572,g22560d942e+bbb425c594,g2ab4ef6978+de601c1500,g2bbee38e9b+24c11603bc,g2cc88a2952+caea797f6a,g3273194fdb+f6908454ef,g337abbeb29+24c11603bc,g44018dc512+24c11603bc,g4500d70958+6b57fb2bd6,g4728e35f0d+f50b46dfc4,g47da3c6c86+7e7eadfc2e,g58be5f913a+227b03016d,g6ae5381d9b+81bc2a20b4,g7dc46dff8f+7e7eadfc2e,g91cdbf1c4d+9143174586,g93973518b8+b4fd231ff7,g98ffbb4407+81bc2a20b4,g9ddcbc5298+7f7571301f,ga1e77700b3+8a7d583dbe,ga7ab7f6f60+bab9e32880,ga7dcd9ce81+e271e629b2,gae46bcf261+24c11603bc,gb2715bf1a1+bab9e32880,gb957171fc7+91f703d445,gc86a011abf+bab9e32880,gcd84e84c5d+7df4b21b3f,gcf0d15dbbd+7e7eadfc2e,gd162630629+6f0a408586,gdaeeff99f8+0d8dbea60f,gdb4ec4c597+24c11603bc,gf041782ebf+48486314bd,gf36cf20d7f+bab9e32880,w.2023.37
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