LSST Applications g1653933729+a8ce1bb630,g1a997c3884+a8ce1bb630,g28da252d5a+d15de4ab0d,g2bbee38e9b+97aa061eef,g2bc492864f+97aa061eef,g2cdde0e794+3ad5f2bb52,g3156d2b45e+07302053f8,g347aa1857d+97aa061eef,g35bb328faa+a8ce1bb630,g3a166c0a6a+97aa061eef,g3e281a1b8c+693a468c5f,g4005a62e65+17cd334064,g414038480c+56e3b84a79,g41af890bb2+1c23cd8dc6,g4e1a3235cc+346d8468f1,g6249c6f860+0f10df03c7,g80478fca09+469ce5f220,g82479be7b0+90e3dadc5b,g858d7b2824+e7f795e3fb,g9125e01d80+a8ce1bb630,g923454667a+e7f795e3fb,ga5288a1d22+d13454dda5,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+97aa061eef,gcf0d15dbbd+874ca8ec09,gd6b7c0dfd1+d9d51876e5,gda3e153d99+e7f795e3fb,gda6a2b7d83+874ca8ec09,gdaeeff99f8+1711a396fd,gdd5a9049c5+40baf9de4f,ge2409df99d+634e70b004,ge33fd446bb+e7f795e3fb,ge79ae78c31+97aa061eef,gf0baf85859+5daf287408,gf5289d68f6+f8c5105d69,gfa443fc69c+1babd4a8ba,gfda6b12a05+3bcad770a9,w.2024.41
LSST Data Management Base Package
Loading...
Searching...
No Matches
Functions
test_centroid Namespace Reference

Functions

 test_CentroidValues ()
 
 test_Centroid ()
 

Function Documentation

◆ test_Centroid()

test_centroid.test_Centroid ( )

Definition at line 37 of file test_centroid.py.

37def test_Centroid():
38 values = g2d.CentroidValues(-1.0, 2.0)
39 cen1 = g2d.Centroid(values)
40 cen2 = g2d.Centroid(values)
41 cen3 = g2d.Centroid(-1.0, 2.0)
42
43 assert cen1 == cen2
44 assert not (cen1 != cen3)
45
46 cen1.x = cen1.y
47 assert cen2.x == cen1.x
48 assert cen1 != cen3
49
50 str_values = str(values)
51 assert str(cen1) == f"Centroid(data={str_values})"
52 assert repr(cen1) == f"lsst.gauss2d.Centroid(data=lsst.gauss2d.{str_values})"
A 2D coordinate representing the center of a plane figure.
Definition centroid.h:114
A CentroidData storing centroid values as shared_ptrs.
Definition centroid.h:74

◆ test_CentroidValues()

test_centroid.test_CentroidValues ( )

Definition at line 25 of file test_centroid.py.

25def test_CentroidValues():
26 values = g2d.CentroidValues()
27 assert values.xy == [0., 0.]
28
29 values.x, values.y = -2., 3.
30 assert values.xy == [-2., 3.]
31
32 str_values = "CentroidValues(x=-2.000000e+00, y=3.000000e+00)"
33 assert str(values) == str_values
34 assert repr(values) == f"lsst.gauss2d.{str_values}"
35
36