Skip to content

Commit 53a04bc

Browse files
authored
Mention IVOA note, and update example directory. (#602)
1 parent 3338e0f commit 53a04bc

File tree

5 files changed

+80
-24
lines changed

5 files changed

+80
-24
lines changed

docs/citation.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ If you used Rubin Data Preview 1 (DP1) with HATS, please also consider citing th
5151
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
5252
}
5353
54+
To cite the HATS format (and not this software package in particular), we suggest the following:
55+
56+
.. code-block:: bash
57+
58+
@misc{ivoa:NOTE:2025:HATS,
59+
author = {Caplar,Neven and DeLucchi, Melissa and Jurić, Mario and Beebe,Wilson and Branton, Doug and Campos,Sandro and Jones, Derek and Malanchev,Konstantin and McGuire, Sean and Lynn, Olivia and Pineau, François-Xavier and Raen, Troy},
60+
title = {{HATS: A Standard for the Hierarchical Adaptive Tiling Scheme in the Virtual Observatory}},
61+
howpublished = {IVOA Note, Version 1.0},
62+
year = {2025},
63+
note = {Available at \url{https://www.ivoa.net/documents/Notes/HATS/}}
64+
}
5465
5566
Acknowledgements
5667
-------------------------------------------------------------------------------

docs/getting_started.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ The latest release version of HATS is available to install with
3939
pyenv virtualenv 3.11 hats_env
4040
pyenv local hats_env
4141
42-
We recommend Python versions **>=3.10, <=3.12**.
42+
We recommend Python versions **>=3.10, <=3.13**.
4343

4444
HATS can also be installed from source on `GitHub <https://github.com/astronomy-commons/hats>`__.
4545

46-
4746
LSDB
4847
----
4948

50-
For the most part, we recommend accessing and processing HATS data using the `LSDB package
51-
<https://github.com/astronomy-commons/lsdb>`__ framework. LSDB provides a variety of utility
52-
functions as well as a lazy, distributed execution framework using Dask.
49+
For the most part, we recommend accessing and processing HATS data using the
50+
`LSDB framework package <https://github.com/astronomy-commons/lsdb>`__.
51+
LSDB provides a variety of utility functions as well as a lazy,
52+
distributed execution framework using Dask.
5353

54-
For detail on LSDB, see the `readthedocs site <https://docs.lsdb.io/en/stable/>`__.
54+
For details on LSDB, see the `readthedocs site <https://docs.lsdb.io/en/stable/>`__.

docs/guide/directory_scheme.rst

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
HATS Directory Scheme
22
===============================================================================
33

4+
You can read in more detail about the parts of the HATS directory structure
5+
in the `IVOA Note <https://www.ivoa.net/documents/Notes/HATS/>`__.
6+
This page provides a summary of what you can expect inside a HATS-structured
7+
catalog.
8+
49
Partitioning Scheme
510
-------------------------------------------------------------------------------
611

@@ -33,22 +38,22 @@ structure:
3338

3439
.. code-block::
3540
:class: no-copybutton
36-
37-
__ /path/to/catalogs/<catalog_name>/
38-
|__ partition_info.csv
39-
|__ properties
40-
|__ dataset/
41-
|__ _common_metadata
42-
|__ _metadata
43-
|__ Norder=1/
44-
| |__ Dir=0/
45-
| |__ Npix=0.parquet
46-
| |__ Npix=1.parquet
47-
|__ Norder=J/
48-
|__ Dir=10000/
49-
|__ Npix=K.parquet
50-
|__ Npix=M.parquet
5141
42+
/path/to/catalogs/<catalog_name>/
43+
├── dataset
44+
│ ├── _common_metadata
45+
│ ├── _metadata
46+
│ ├── Norder=0
47+
│ │ └── Dir=0
48+
│ │ ├── Npix=0.parquet
49+
│ │ └── Npix=1.parquet
50+
│ └── Norder=J
51+
│ └── Dir=10000
52+
│ ├── Npix=K.parquet
53+
│ └── Npix=M.parquet
54+
├── hats.properties
55+
├── partition_info.csv
56+
└── skymap.fits
5257
5358
As you can notice, ``dataset/`` has the following heirarchy:
5459

@@ -60,3 +65,38 @@ As you can notice, ``dataset/`` has the following heirarchy:
6065
Note: instead of being a single Parquet file, this can be a directory containing
6166
one or more Parquet files, representing a single data partition, i.e., they should
6267
be read together as a single data unit.
68+
69+
Collections
70+
-------------------------------------------------------------------------------
71+
72+
HATS also makes use of supplemental tables for catalogs, and these are grouped into
73+
catalog Collections.
74+
75+
.. code-block::
76+
:class: no-copybutton
77+
78+
/path/to/catalogs/<catalog_name>/
79+
├── collection.properties
80+
├── primary_catalog
81+
│ ├── dataset
82+
| | └── ...
83+
│ ├── hats.properties
84+
│ ├── partition_info.csv
85+
│ └── skymap.fits
86+
├── id_index
87+
│ ├── dataset
88+
| | └── ...
89+
│ └── hats.properties
90+
└── margin_10arcs
91+
├── dataset
92+
| └── ...
93+
├── hats.properties
94+
└── partition_info.csv
95+
96+
The ``primary_catalog`` directory will be the same format as the catalog described above.
97+
Here we have additional supplemental tables:
98+
99+
* ``id_index`` - a secondary index to enable finding rows by non-spatial queries
100+
* ``margin_10arcs`` - a cache of rows that are within a limited angular threshold
101+
around the primary catalog data partition, useful for cross-matching to catalogs
102+
with slightly different astrometry.

docs/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ HATS is a directory structure and metadata for spatially arranging large catalog
55
This was originally motivated by a desire to perform spatial cross-matching between surveys
66
at large scale, but is applicable to a range of spatial analysis and algorithms.
77

8+
You can read in more detail about the parts of the HATS directory structure
9+
in the `IVOA Note <https://www.ivoa.net/documents/Notes/HATS/>`__. This library is simply
10+
one implementation of interacting with HATS-formatted datasets.
11+
812
We use healpix (`Hierarchical Equal Area isoLatitude Pixelization <https://healpix.jpl.nasa.gov/>`__)
913
for the spherical pixelation, and adaptively size the partitions based on the number of objects.
1014
Each partition will have roughly the same number of objects, instead of dividing into equal area.

src/hats/pixel_math/partition_stats.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,10 @@ def generate_incremental_alignment(
282282
one-dimensional numpy array of integer 3-tuples, where the value at each index corresponds
283283
to the destination pixel at order less than or equal to the mapping order.
284284
The tuple contains three integers:
285-
- order of the destination pixel
286-
- pixel number *at the above order*
287-
- the number of objects in the pixel
285+
286+
- order of the destination pixel
287+
- pixel number *at the above order*
288+
- the number of objects in the pixel
288289
"""
289290
_validate_alignment_arguments(histogram, highest_order, lowest_order, threshold)
290291

0 commit comments

Comments
 (0)