We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 56e9c90 + e07916b commit e49b620Copy full SHA for e49b620
docs/conf.py
@@ -24,7 +24,12 @@
24
# -- General configuration ---------------------------------------------------
25
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
26
27
-extensions = ["sphinx.ext.mathjax", "sphinx.ext.napoleon", "sphinx.ext.viewcode"]
+extensions = [
28
+ "sphinx.ext.mathjax",
29
+ "sphinx.ext.napoleon",
30
+ "sphinx.ext.viewcode",
31
+ "sphinx_design",
32
+]
33
34
extensions.append("autoapi.extension")
35
extensions.append("nbsphinx")
docs/getting_started.rst
@@ -33,7 +33,7 @@ The latest release version of HATS is available to install with `pip <https://py
pyenv virtualenv 3.11 hats_env
pyenv local hats_env
36
- We recommend Python versions **>=3.9, <=3.12**.
+ We recommend Python versions **>=3.10, <=3.12**.
37
38
HATS can also be installed from source on `GitHub <https://github.com/astronomy-commons/hats>`_.
39
docs/index.rst
@@ -44,7 +44,8 @@ Getting Started
44
For the most part, we recommend accessing and processing HATS data using the `LSDB package
45
<https://github.com/astronomy-commons/lsdb>`_ framework. LSDB provides a variety of utility
46
functions as well as a lazy, distributed execution framework using Dask. However if you are are
47
-interested in using just the HATS package, you can find installation instructions at the :ref:`getting started page<getting_started>`
+interested in using just the HATS package, you can find installation instructions at the
48
+:doc:`getting started page</getting_started>`.
49
50
Acknowledgements
51
-------------------------------------------------------------------------------
docs/requirements.txt
@@ -8,3 +8,4 @@ sphinx
8
sphinx-autoapi
9
sphinx-copybutton
10
sphinx-book-theme
11
+sphinx-design
src/hats/io/parquet_metadata.py
@@ -276,5 +276,5 @@ def aggregate_column_statistics(
276
"max_value": stats_lists[1],
277
"null_count": stats_lists[2],
278
}
279
- )
+ ).set_index("column_names")
280
return frame
src/hats/pixel_math/healpix_shim.py
@@ -62,8 +62,8 @@ def radec2pix(order: int, ra: float, dec: float) -> np.ndarray[np.int64]:
62
if not is_order_valid(order):
63
raise ValueError("Invalid value for order")
64
65
- ra = Longitude(ra, unit="deg")
66
- dec = Latitude(dec, unit="deg")
+ ra = Longitude(np.asarray(ra, dtype=np.float64), unit="deg")
+ dec = Latitude(np.asarray(dec, dtype=np.float64), unit="deg")
67
68
return cdshealpix.lonlat_to_healpix(ra, dec, order).astype(np.int64)
69
tests/hats/pixel_math/test_healpix_shim.py
@@ -166,6 +166,22 @@ def test_radec2pix_lonlat():
166
assert np.all(pixels == expected_pixels)
167
168
169
+def test_radec2pix_lonlat_float32():
170
+ orders = [0, 1, 5, 10, 20, 29]
171
+ ras = np.arange(-180.0, 180.0, 10.0)
172
+ ras_f = ras.astype(np.float32)
173
+ decs = np.arange(-90.0, 90.0, 180 // len(ras))
174
+ decs_f = decs.astype(np.float32)
175
+ for order in orders:
176
+ expected_pixels = cdshealpix.lonlat_to_healpix(
177
+ Longitude(ras, unit="deg"), Latitude(decs, unit="deg"), order
178
+ )
179
+ # Verify that healpixshim can work with float32 versions
180
+ # Fixes https://github.com/astronomy-commons/hats-import/issues/458
181
+ pixels = hps.radec2pix(order, ras_f, decs_f)
182
+ assert np.all(pixels == expected_pixels)
183
+
184
185
def test_radec2pix_invalid():
186
orders = [0, 1, 5, 10, 20, 29]
187
invalid_orders = [-1000, -1, 30, 40]
0 commit comments