LSST Applications g04a91732dc+c316cf5b3a,g07dc498a13+fb7087bc2f,g1409bbee79+fb7087bc2f,g1a7e361dbc+fb7087bc2f,g1fd858c14a+aec6ef928c,g33399d78f5+40c06f64a8,g35bb328faa+e55fef2c71,g3bd4b5ce2c+2905670c8d,g3dabb73f91+bea4d5a39d,g424a4f6e28+abed75ca55,g53246c7159+e55fef2c71,g5477a8d5ce+dc8a1f68b0,g60b5630c4e+abed75ca55,g78460c75b0+8427c4cc8f,g786e29fd12+307f82e6af,g8534526c7b+8e1c6b434f,g89139ef638+fb7087bc2f,g8b49a6ea8e+abed75ca55,g8e3b232dfe+ae99801921,g9125e01d80+e55fef2c71,g989de1cb63+fb7087bc2f,g9f33ca652e+3c31457565,gaaedd4e678+fb7087bc2f,gabe3b4be73+9c0c3c7524,gb1101e3267+49fea2c512,gb58c049af0+28045f66fd,gca43fec769+e55fef2c71,gce7788e931+d1fd0c5240,gcf25f946ba+40c06f64a8,gd6cbbdb0b4+f6e5445f66,gdd9490a0bf+d85bd9e56f,gde0f65d7ad+d075e886b3,ge278dab8ac+b4c2c8faf7,geab183fbe5+abed75ca55,gec3dcf77f0+e7bc33f3ea,gecb8035dfe+1f480bec5e,gf58bf46354+e55fef2c71,gfe7187db8c+7aa4e308f2,w.2025.05
LSST Data Management Base Package
Loading...
Searching...
No Matches
_Box.py
Go to the documentation of this file.
2# Developed for the LSST Data Management System.
3# This product includes software developed by the LSST Project
4# (https://www.lsst.org).
5# See the COPYRIGHT file at the top-level directory of this distribution
6# for details of code ownership.
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 GNU General Public License
19# along with this program. If not, see <https://www.gnu.org/licenses/>.
20#
21
22__all__ = ["Box2I"]
23
24import numpy as np
25
26from lsst.utils import continueClass
27from ._geom import Box2I
28
29
30@continueClass # noqa: F811 (FIXME: remove for py 3.8+)
31class Box2I: # noqa: F811
32
33 def grid(self, dtype=np.int32):
34 """Return pair of arrays with the centers of all pixels in the box.
35
36 Parameters
37 ----------
38 dtype : convertible to `numpy.dtype`
39 The data type of the returned arrays.
40
41 Returns
42 -------
43 x : `numpy.ndarray`
44 Array with shape `(self.height, self.width)` containing x
45 coordinate values.
46 y : `numpy.ndarray`
47 Array with shape `(self.height, self.width)` containing x
48 coordinate values.
49 """
50 return np.meshgrid(self.x.arange(dtype=dtype), self.y.arange(dtype=dtype))
grid(self, dtype=np.int32)
Definition _Box.py:33