LSST Applications g0265f82a02+ea6441928c,g0a0026dc87+8e80ff4080,g1e7d6db67d+e358f92434,g22560d942e+2a7d2c9fe3,g2ab4ef6978+d787989425,g2bbee38e9b+ea6441928c,g2cc88a2952+6e7209f757,g3273194fdb+f6908454ef,g337abbeb29+ea6441928c,g37c6e7c3d5+6e3ba3725e,g3c689f2686+5f6495f393,g44018dc512+ea6441928c,g47da3c6c86+cf3d0add18,g4c90b7bd52+fc57afb704,g58be5f913a+b83c51299d,g5b0a815229+07073039e0,g67924a670a+1363755795,g68a3911fdd+c3f02514e0,g6ae5381d9b+81bc2a20b4,g6f40f426a6+cf3d0add18,g93c4d6e787+f05803e3cf,g98ffbb4407+81bc2a20b4,g9ddcbc5298+7f7571301f,ga1e77700b3+1440987d3f,ga7ab7f6f60+8e80ff4080,gae46bcf261+ea6441928c,gb1c167292e+9a72208758,gb2715bf1a1+8e80ff4080,gc86a011abf+8e80ff4080,gcd84e84c5d+e5d5f31d34,gcf0d15dbbd+cf3d0add18,gdaeeff99f8+0d8dbea60f,gdb4ec4c597+ea6441928c,gf041782ebf+2691319615,w.2023.35
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