LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+bd2ed33bd6,g1470d8bcf6+de7501a2e0,g14a832a312+ff425fae3c,g2079a07aa2+86d27d4dc4,g2305ad1205+91a32aca49,g295015adf3+762506a1ad,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+c34e8be1fa,g487adcacf7+5fae3daba8,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ea1711114f,g5a732f18d5+53520f316c,g64a986408d+bd2ed33bd6,g858d7b2824+bd2ed33bd6,g8a8a8dda67+585e252eca,g99cad8db69+016a06b37a,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+ef4e3a5875,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+09e12c87ab,gc120e1dc64+bc2e06c061,gc28159a63d+0e5473021a,gcf0d15dbbd+c34e8be1fa,gdaeeff99f8+f9a426f77a,ge6526c86ff+508d0e0a30,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+8d59551888,gf1cff7945b+bd2ed33bd6,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.pipe.tasks.functors.LocalWcs Class Reference
Inheritance diagram for lsst.pipe.tasks.functors.LocalWcs:
lsst.pipe.tasks.functors.Functor lsst.pipe.tasks.functors.ComputePixelScale lsst.pipe.tasks.functors.ConvertPixelSqToArcsecondsSq lsst.pipe.tasks.functors.ConvertPixelToArcseconds

Public Member Functions

 __init__ (self, colCD_1_1, colCD_1_2, colCD_2_1, colCD_2_2, **kwargs)
 
 computeDeltaRaDec (self, x, y, cd11, cd12, cd21, cd22)
 
 computeSkySeparation (self, ra1, dec1, ra2, dec2)
 
 getSkySeparationFromPixel (self, x1, y1, x2, y2, cd11, cd12, cd21, cd22)
 

Public Attributes

 colCD_1_1
 
 colCD_1_2
 
 colCD_2_1
 
 colCD_2_2
 

Static Public Attributes

str name = "LocalWcsOperations"
 

Detailed Description

Computations using the stored localWcs.

Definition at line 1188 of file functors.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.pipe.tasks.functors.LocalWcs.__init__ ( self,
colCD_1_1,
colCD_1_2,
colCD_2_1,
colCD_2_2,
** kwargs )

Reimplemented from lsst.pipe.tasks.functors.Functor.

Reimplemented in lsst.pipe.tasks.functors.ConvertPixelToArcseconds, and lsst.pipe.tasks.functors.ConvertPixelSqToArcsecondsSq.

Definition at line 1192 of file functors.py.

1197 **kwargs):
1198 self.colCD_1_1 = colCD_1_1
1199 self.colCD_1_2 = colCD_1_2
1200 self.colCD_2_1 = colCD_2_1
1201 self.colCD_2_2 = colCD_2_2
1202 super().__init__(**kwargs)
1203

Member Function Documentation

◆ computeDeltaRaDec()

lsst.pipe.tasks.functors.LocalWcs.computeDeltaRaDec ( self,
x,
y,
cd11,
cd12,
cd21,
cd22 )
Compute the distance on the sphere from x2, y1 to x1, y1.

Parameters
----------
x : `~pandas.Series`
    X pixel coordinate.
y : `~pandas.Series`
    Y pixel coordinate.
cd11 : `~pandas.Series`
    [1, 1] element of the local Wcs affine transform.
cd11 : `~pandas.Series`
    [1, 1] element of the local Wcs affine transform.
cd12 : `~pandas.Series`
    [1, 2] element of the local Wcs affine transform.
cd21 : `~pandas.Series`
    [2, 1] element of the local Wcs affine transform.
cd22 : `~pandas.Series`
    [2, 2] element of the local Wcs affine transform.

Returns
-------
raDecTuple : tuple
    RA and dec conversion of x and y given the local Wcs.
    Returned units are in radians.

Definition at line 1204 of file functors.py.

1204 def computeDeltaRaDec(self, x, y, cd11, cd12, cd21, cd22):
1205 """Compute the distance on the sphere from x2, y1 to x1, y1.
1206
1207 Parameters
1208 ----------
1209 x : `~pandas.Series`
1210 X pixel coordinate.
1211 y : `~pandas.Series`
1212 Y pixel coordinate.
1213 cd11 : `~pandas.Series`
1214 [1, 1] element of the local Wcs affine transform.
1215 cd11 : `~pandas.Series`
1216 [1, 1] element of the local Wcs affine transform.
1217 cd12 : `~pandas.Series`
1218 [1, 2] element of the local Wcs affine transform.
1219 cd21 : `~pandas.Series`
1220 [2, 1] element of the local Wcs affine transform.
1221 cd22 : `~pandas.Series`
1222 [2, 2] element of the local Wcs affine transform.
1223
1224 Returns
1225 -------
1226 raDecTuple : tuple
1227 RA and dec conversion of x and y given the local Wcs.
1228 Returned units are in radians.
1229
1230 """
1231 return (x * cd11 + y * cd12, x * cd21 + y * cd22)
1232

◆ computeSkySeparation()

lsst.pipe.tasks.functors.LocalWcs.computeSkySeparation ( self,
ra1,
dec1,
ra2,
dec2 )
Compute the local pixel scale conversion.

Parameters
----------
ra1 : `~pandas.Series`
    Ra of the first coordinate in radians.
dec1 : `~pandas.Series`
    Dec of the first coordinate in radians.
ra2 : `~pandas.Series`
    Ra of the second coordinate in radians.
dec2 : `~pandas.Series`
    Dec of the second coordinate in radians.

Returns
-------
dist : `~pandas.Series`
    Distance on the sphere in radians.

Definition at line 1233 of file functors.py.

1233 def computeSkySeparation(self, ra1, dec1, ra2, dec2):
1234 """Compute the local pixel scale conversion.
1235
1236 Parameters
1237 ----------
1238 ra1 : `~pandas.Series`
1239 Ra of the first coordinate in radians.
1240 dec1 : `~pandas.Series`
1241 Dec of the first coordinate in radians.
1242 ra2 : `~pandas.Series`
1243 Ra of the second coordinate in radians.
1244 dec2 : `~pandas.Series`
1245 Dec of the second coordinate in radians.
1246
1247 Returns
1248 -------
1249 dist : `~pandas.Series`
1250 Distance on the sphere in radians.
1251 """
1252 deltaDec = dec2 - dec1
1253 deltaRa = ra2 - ra1
1254 return 2 * np.arcsin(
1255 np.sqrt(
1256 np.sin(deltaDec / 2) ** 2
1257 + np.cos(dec2) * np.cos(dec1) * np.sin(deltaRa / 2) ** 2))
1258

◆ getSkySeparationFromPixel()

lsst.pipe.tasks.functors.LocalWcs.getSkySeparationFromPixel ( self,
x1,
y1,
x2,
y2,
cd11,
cd12,
cd21,
cd22 )
Compute the distance on the sphere from x2, y1 to x1, y1.

Parameters
----------
x1 : `~pandas.Series`
    X pixel coordinate.
y1 : `~pandas.Series`
    Y pixel coordinate.
x2 : `~pandas.Series`
    X pixel coordinate.
y2 : `~pandas.Series`
    Y pixel coordinate.
cd11 : `~pandas.Series`
    [1, 1] element of the local Wcs affine transform.
cd11 : `~pandas.Series`
    [1, 1] element of the local Wcs affine transform.
cd12 : `~pandas.Series`
    [1, 2] element of the local Wcs affine transform.
cd21 : `~pandas.Series`
    [2, 1] element of the local Wcs affine transform.
cd22 : `~pandas.Series`
    [2, 2] element of the local Wcs affine transform.

Returns
-------
Distance : `~pandas.Series`
    Arcseconds per pixel at the location of the local WC.

Definition at line 1259 of file functors.py.

1259 def getSkySeparationFromPixel(self, x1, y1, x2, y2, cd11, cd12, cd21, cd22):
1260 """Compute the distance on the sphere from x2, y1 to x1, y1.
1261
1262 Parameters
1263 ----------
1264 x1 : `~pandas.Series`
1265 X pixel coordinate.
1266 y1 : `~pandas.Series`
1267 Y pixel coordinate.
1268 x2 : `~pandas.Series`
1269 X pixel coordinate.
1270 y2 : `~pandas.Series`
1271 Y pixel coordinate.
1272 cd11 : `~pandas.Series`
1273 [1, 1] element of the local Wcs affine transform.
1274 cd11 : `~pandas.Series`
1275 [1, 1] element of the local Wcs affine transform.
1276 cd12 : `~pandas.Series`
1277 [1, 2] element of the local Wcs affine transform.
1278 cd21 : `~pandas.Series`
1279 [2, 1] element of the local Wcs affine transform.
1280 cd22 : `~pandas.Series`
1281 [2, 2] element of the local Wcs affine transform.
1282
1283 Returns
1284 -------
1285 Distance : `~pandas.Series`
1286 Arcseconds per pixel at the location of the local WC.
1287 """
1288 ra1, dec1 = self.computeDeltaRaDec(x1, y1, cd11, cd12, cd21, cd22)
1289 ra2, dec2 = self.computeDeltaRaDec(x2, y2, cd11, cd12, cd21, cd22)
1290 # Great circle distance for small separations.
1291 return self.computeSkySeparation(ra1, dec1, ra2, dec2)
1292
1293

Member Data Documentation

◆ colCD_1_1

lsst.pipe.tasks.functors.LocalWcs.colCD_1_1

Definition at line 1198 of file functors.py.

◆ colCD_1_2

lsst.pipe.tasks.functors.LocalWcs.colCD_1_2

Definition at line 1199 of file functors.py.

◆ colCD_2_1

lsst.pipe.tasks.functors.LocalWcs.colCD_2_1

Definition at line 1200 of file functors.py.

◆ colCD_2_2

lsst.pipe.tasks.functors.LocalWcs.colCD_2_2

Definition at line 1201 of file functors.py.

◆ name

str lsst.pipe.tasks.functors.LocalWcs.name = "LocalWcsOperations"
static

The documentation for this class was generated from the following file: