LSST Applications g0265f82a02+3873813d48,g043fd6e71d+b7c43489ec,g08227fae09+06fb179184,g177eaadcb2+aa04d7d644,g1e7d6db67d+0cbdeccc59,g2bbee38e9b+3873813d48,g337abbeb29+3873813d48,g33a09d4741+b982140b1f,g3ddfee87b4+b982140b1f,g41b076d227+8672027aa3,g44018dc512+3873813d48,g50ff169b8f+f6908454ef,g5f6f997623+81bc2a20b4,g7d743f24c3+08f1339770,g7dcc1e6542+6bed7c0053,g858d7b2824+06fb179184,g98ffbb4407+81bc2a20b4,g9ddcbc5298+7f7571301f,ga1e77700b3+495ad9f5da,gae46bcf261+3873813d48,gb700894bec+03f83dc79b,gbeb006f7da+980c57f97a,gc86a011abf+06fb179184,gcb20ee0ffd+2b4de42704,gcf0d15dbbd+b982140b1f,gd151e6f194+c3d45e18dd,gd162630629+9bd28918d9,gdaeeff99f8+0d8dbea60f,gdb4ec4c597+3873813d48,ge3564fa9f0+0fd4a7b906,gee10cc3b42+81bc2a20b4,gf041782ebf+f93289ef23,gf1cff7945b+06fb179184,gf748b16de2+7d973773ea,gfbd57f68c2+2de80636e3,w.2023.50
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