LSSTApplications  11.0-24-g0a022a1,12.1-4-g110c6f4+31,15.0+14,15.0+9,15.0-1-g19261fa+6,15.0-1-g60afb23+14,15.0-1-g615e0bb+6,15.0-1-g6668b0b+5,15.0-1-g788a293+14,15.0-1-ga91101e+14,15.0-1-gae1598d+8,15.0-1-gd076f1f+13,15.0-1-gdf18595+2,15.0-1-gf4f1c34+8,15.0-2-g100d730+7,15.0-2-g18f3f21+8,15.0-2-g20c4630+2,15.0-2-g35685a8+9,15.0-2-g5dfaa72+2,15.0-2-gf38729e+8,15.0-23-g309a1dfe0,15.0-3-g150fc43+17,15.0-3-g6f085af+7,15.0-3-g707930d,15.0-3-g9103c06+8,15.0-3-ga03b4ca+20,15.0-3-gaec6799+5,15.0-4-g45f767a+8,15.0-4-g5589a47,15.0-4-g654b129+12,15.0-4-gff20472+17,15.0-5-g0db841d+1,15.0-5-g23e394c+1,15.0-6-g86eaddf,15.0-6-g9a9df217+9,15.0-8-g11095dd,15.0-8-g306a5613
LSSTDataManagementBasePackage
utils.py
Go to the documentation of this file.
1 #
2 # LSST Data Management System
3 # Copyright 2008, 2009, 2010 LSST Corporation.
4 #
5 # This product includes software developed by the
6 # LSST Project (http://www.lsst.org/).
7 #
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the LSST License Statement and
19 # the GNU General Public License along with this program. If not,
20 # see <http://www.lsstcorp.org/LegalNotices/>.
21 #
22 
23 from . import detectionLib as afwDetect
24 
25 
27  """Write foot as a set of Defects to fd"""
28 
29  bboxes = afwDetect.footprintToBBoxList(foot)
30  for bbox in bboxes:
31  print("""\
32 Defects: {
33  x0: %4d # Starting column
34  width: %4d # number of columns
35  y0: %4d # Starting row
36  height: %4d # number of rows
37 }""" % (bbox.getMinX(), bbox.getWidth(), bbox.getMinY(), bbox.getHeight()), file=fd)
std::vector< lsst::afw::geom::Box2I > footprintToBBoxList(Footprint const &footprint)
Return a list of BBoxs, whose union contains exactly the pixels in the footprint, neither more nor le...
Definition: Footprint.cc:351
def writeFootprintAsDefects(fd, foot)
Definition: utils.py:26