From c39621d6186b4c47df3d2736592bc9684db5c756 Mon Sep 17 00:00:00 2001 From: Melissa DeLucchi <113376043+delucchi-cmu@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:09:34 -0500 Subject: [PATCH] Create new catalog type: map (#429) * Initial work on map type. * Use importer to create map type. --- src/hats/catalog/__init__.py | 1 + src/hats/catalog/catalog_type.py | 1 + src/hats/catalog/dataset/table_properties.py | 2 + src/hats/catalog/map/__init__.py | 0 src/hats/catalog/map/map_catalog.py | 7 +++ src/hats/loaders/read_hats.py | 4 +- tests/data/generate_data.ipynb | 47 +++++++++++++++++- .../dataset/Norder=1/Dir=0/Npix=0.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=12.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=16.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=20.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=24.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=28.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=32.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=36.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=4.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=40.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=44.parquet | Bin 0 -> 2881 bytes .../dataset/Norder=1/Dir=0/Npix=8.parquet | Bin 0 -> 2881 bytes .../data/square_map/dataset/_common_metadata | Bin 0 -> 1612 bytes tests/data/square_map/dataset/_metadata | Bin 0 -> 8773 bytes tests/data/square_map/partition_info.csv | 13 +++++ tests/data/square_map/point_map.fits | Bin 0 -> 8640 bytes tests/data/square_map/properties | 12 +++++ tests/hats/catalog/loaders/test_read_hats.py | 2 + 25 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 src/hats/catalog/map/__init__.py create mode 100644 src/hats/catalog/map/map_catalog.py create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=0.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=12.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=16.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=20.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=24.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=28.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=32.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=36.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=4.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=40.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=44.parquet create mode 100644 tests/data/square_map/dataset/Norder=1/Dir=0/Npix=8.parquet create mode 100644 tests/data/square_map/dataset/_common_metadata create mode 100644 tests/data/square_map/dataset/_metadata create mode 100644 tests/data/square_map/partition_info.csv create mode 100644 tests/data/square_map/point_map.fits create mode 100644 tests/data/square_map/properties diff --git a/src/hats/catalog/__init__.py b/src/hats/catalog/__init__.py index ee69f91f..5897d917 100644 --- a/src/hats/catalog/__init__.py +++ b/src/hats/catalog/__init__.py @@ -6,5 +6,6 @@ from .catalog_type import CatalogType from .dataset.dataset import Dataset from .dataset.table_properties import TableProperties +from .map.map_catalog import MapCatalog from .margin_cache.margin_catalog import MarginCatalog from .partition_info import PartitionInfo diff --git a/src/hats/catalog/catalog_type.py b/src/hats/catalog/catalog_type.py index 61ac8fb3..be36757a 100644 --- a/src/hats/catalog/catalog_type.py +++ b/src/hats/catalog/catalog_type.py @@ -9,6 +9,7 @@ class CatalogType(str, Enum): ASSOCIATION = "association" INDEX = "index" MARGIN = "margin" + MAP = "map" @classmethod def all_types(cls): diff --git a/src/hats/catalog/dataset/table_properties.py b/src/hats/catalog/dataset/table_properties.py index 94542eed..008f9500 100644 --- a/src/hats/catalog/dataset/table_properties.py +++ b/src/hats/catalog/dataset/table_properties.py @@ -25,6 +25,7 @@ ], CatalogType.INDEX: ["primary_catalog", "indexing_column", "extra_columns"], CatalogType.MARGIN: ["primary_catalog", "margin_threshold", "ra_column", "dec_column", "default_columns"], + CatalogType.MAP: ["default_columns"], } ## catalog_name, catalog_type, and total_rows are required for ALL types @@ -40,6 +41,7 @@ ], CatalogType.INDEX: ["primary_catalog", "indexing_column"], CatalogType.MARGIN: ["primary_catalog", "margin_threshold"], + CatalogType.MAP: [], } # All additional properties in the HATS recommendation. diff --git a/src/hats/catalog/map/__init__.py b/src/hats/catalog/map/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/hats/catalog/map/map_catalog.py b/src/hats/catalog/map/map_catalog.py new file mode 100644 index 00000000..32cb6f15 --- /dev/null +++ b/src/hats/catalog/map/map_catalog.py @@ -0,0 +1,7 @@ +from __future__ import annotations + +from hats.catalog.healpix_dataset.healpix_dataset import HealpixDataset + + +class MapCatalog(HealpixDataset): + """A HATS table to represent non-point-source data in a continuous map.""" diff --git a/src/hats/loaders/read_hats.py b/src/hats/loaders/read_hats.py index f071e2d2..532f35cb 100644 --- a/src/hats/loaders/read_hats.py +++ b/src/hats/loaders/read_hats.py @@ -9,7 +9,7 @@ from upath import UPath import hats.pixel_math.healpix_shim as hp -from hats.catalog import AssociationCatalog, Catalog, CatalogType, Dataset, MarginCatalog +from hats.catalog import AssociationCatalog, Catalog, CatalogType, Dataset, MapCatalog, MarginCatalog from hats.catalog.association_catalog.partition_join_info import PartitionJoinInfo from hats.catalog.dataset.table_properties import TableProperties from hats.catalog.index.index_catalog import IndexCatalog @@ -23,6 +23,7 @@ CatalogType.ASSOCIATION: AssociationCatalog, CatalogType.INDEX: IndexCatalog, CatalogType.MARGIN: MarginCatalog, + CatalogType.MAP: MapCatalog, } @@ -63,6 +64,7 @@ def _is_healpix_dataset(dataset_type): CatalogType.SOURCE, CatalogType.ASSOCIATION, CatalogType.MARGIN, + CatalogType.MAP, ) diff --git a/tests/data/generate_data.ipynb b/tests/data/generate_data.ipynb index 242e4bc7..3e1c9032 100644 --- a/tests/data/generate_data.ipynb +++ b/tests/data/generate_data.ipynb @@ -297,6 +297,49 @@ " runner.pipeline_with_client(args, client)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "from hats.pixel_math.spatial_index import healpix_to_spatial_index\n", + "\n", + "target_pixels = np.arange(0, 12)\n", + "\n", + "healpix_29 = healpix_to_spatial_index(0, target_pixels)\n", + "\n", + "square_vals = target_pixels * target_pixels\n", + "value_frame = pd.DataFrame({\"_healpix_29\": healpix_29, \"star_count\": square_vals})" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "with tempfile.TemporaryDirectory() as pipeline_tmp:\n", + " csv_file = Path(pipeline_tmp) / \"square_map.csv\"\n", + " value_frame.to_csv(csv_file, index=False)\n", + " args = ImportArguments(\n", + " constant_healpix_order=1,\n", + " catalog_type=\"map\",\n", + " use_healpix_29=True,\n", + " ra_column=None,\n", + " dec_column=None,\n", + " file_reader=\"csv\",\n", + " input_file_list=[csv_file],\n", + " output_artifact_name=\"square_map\",\n", + " output_path=\".\",\n", + " tmp_dir=pipeline_tmp,\n", + " )\n", + "\n", + " runner.pipeline_with_client(args, client)" + ] + }, { "cell_type": "code", "execution_count": null, @@ -317,7 +360,7 @@ ], "metadata": { "kernelspec": { - "display_name": "env", + "display_name": "demo", "language": "python", "name": "python3" }, @@ -331,7 +374,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=0.parquet b/tests/data/square_map/dataset/Norder=1/Dir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@j-OM38#UnBGnA?j_z({06F2PL=2W zedXUWpAu>15JKnh#qt8743b)?fKUtNT0|#F3-%FK=5OsUMqtKk5E6yhWrRiu4DgGC zfB%x7W8cr!Z(-$opWsREyQNb|iJp!hv^sA!C0>RjU0)Av>%qDI3R; z?QEx^6#9D6&eSHdC|i)zmD-T2t*5d{vnKg|fYCUtCyCt=Q(8?DYkL(@FTMn<$Wj$C zS-v{Aj&sP;lxniBRN6){kLws3%D8_CwU}OMme(yO>$TElJ)KQyuD`G0*tS-zT+Y=n zF^UBb_r-wt{~NZd-%H)80_LoT`vO?|s#5X*qe%MXN+QfXZBHjP8cx;I)AqGy;abhUm*+EIoH2*qgI-zN_I$MT*<=|D>ISZB<2;If6!;3iG=xbib;{Hc!Jt^jb7q`@DEQAI>bYzXnUx9 z44zrMM9xw^ATJ0>O=bjtUcA2QbM4=|QCFeZdPX9r#KM zXAJcp1b73akQAB&@gT15gM}piC4=ojKT0^<9KIY*RaoRU#s|ehDLRf92wZOvijQ~I m-s_<`c&c~1Pszg)4<3%V|D;4;!N2195B29miaLWo&wm3Fxl>pG literal 0 HcmV?d00001 diff --git a/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=24.parquet b/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=24.parquet new file mode 100644 index 0000000000000000000000000000000000000000..e98d36a6bdf0156d79775b542b2f77bf68e6e70c GIT binary patch literal 2881 zcmcgu&u`*J6gCcGy-5zyc5NAn1450phinQ2XTzR4CP2(4Bw@7}=vK%!4mh$6iy>g5 zmG)HiSoPG?o_pw_#~xQbR6X}l^{?o$z4p!6gdbs5t(xu=3^VV&dGC8~z8P_bDk(P1 zZm|!KS(>FDP!toReBoJ&eZX=%px15mO7# zOlP==>3pVLD&n{BtcZ1Yp!S=3cjye}YWR6g_;wAdxE<;}3079Yu$$AP2ycdPWlP7f zPdy4_Jx|6ZlyC3FSUPBRq}=Vdj6Oj)=H7&aUn0WWNNj2UN)W5~unNfZ?5P_@0G@@j ze|LY@wzWgkNApdH`z|E>!3f_o7|yCF{|<}CsX$irhnd>=n;AIHQ}WM^8LV&_=t#Qc z+sD69#Uc?}nSS z9RtfrsL>nEc)`J+$!OtuwJ+e)(UsWG~o`}!F?U!Xo2B=j69^M=nfz0sZL9E z`M>Gwgz2=5F+3yI(01I!)A$!(?!*)RvPo>ll9nv56OL*d;GUR!N)xd2!ZfT_^F2mC zZFAuD$X3%C>}T*MXK44l+iKews4aD%LKIs;YWHR+t#pAtY&KI@|AW}9ca#pd1^{p?fIxJ+kwu?_B6X<8O7>EzU;P@ zRMM4mrAsY6PHBqh>-JnzvkQa9b9octm;6`86c zCd-%S=5Y?0no>>Hl}e{o%;P$SEoJOpKrMz>n&oxM$$G7HQBP-6n&a?KX5wDU zphyhQd=J|Hg$Nlj)1e_p)Ofs?wQ5+Jp4TmlVWBy=)?cn2`a1L;Ae>3zWqEM53Y z3ug@V9|U*vPv1MwiP?t_IS{w0I$K|e}3+#J3fPE}asHpU0VLMb|q7YJN$5Q>lY n)c&iXF?g)^dXLG&5)U4Zxc{U?U&6oQ`49EiJ&HPmKhOUF`kGWX literal 0 HcmV?d00001 diff --git a/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=28.parquet b/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=28.parquet new file mode 100644 index 0000000000000000000000000000000000000000..61faf754480ca7197639c323b3a09c7e2f174048 GIT binary patch literal 2881 zcmcgu&u`*J6gCcG*(8T(yS6~$fRJMCA)5lh*|4XM2@tahNr)B$-3r;pfFs+mHUvzx z(w?dwtDbt=a}PcA*yE~)s^=c6{uMp8*S;B>pJ7#1P4@|gnfKnj_q{jYjJQCR6cc22 zn8&9K%}|dhDjcIci7^!Oh++3Yzr%!>P%ILjTIMsBda_0feh=d`jC3GCQ`|3s7!!>0 zRA?s}*=lw*+34%zW;)BzEY1EHVBZJ0BQE@J;z#!YG{w*q3_I{cQL9Cye5`kim|7y? z=?oV!ozJx^Mf@6^7qRIKWV@;MhSp%AhMzXLZ#JNcyP-aiU~Ls)W_x-R!R-L9Y~>gZ zsV70KkC1T%<+}$lhW1+>D);P`W)p;C_HBUsImEpS#a8yO1+k6~>wrwpo|-WN@GPDE z`-k(kZ5-e?GhH>Gz+6;pTa6xJkP) zP<=L25rA_YOGjhTS0Ck8aUX^C+0!04rI z4%|N3s#}A@4Bli7&AxkAZE6F#B@bjsV+{@C&0c(-cK-O?&AM#+k4Z^8Y)u~YY`}4w zFm%P1Z5Nl`cV*k|jWB>4&35#jg|(??`^o)e0?;P>)C}gbpeo)Iqrp(FwwmeT0?ynf=8G%y zh`G|Wk{+iNiT88|j;@%6LE}n11Y27!R=diH(ANq_?)jC7{Y_b_I*mehSeH@;jw2e` zUPCH4YSGBlCL%BDkkb;nkgKbvvPrEbcz%GfbzDypyUC}Nn!wi%D!f{J30RRXOMJ3? zeW{=3kgiD8WL>IsTg5!CW7v|$P8({`+|oR+RZiAxrFK1?O(~YQuVEU7QmnKWYM8W& z1sC_F1@ZqkY*nw9s#yihSr_*OusX6-aseYx`eX?_%w6R`B{jCps;j1r8%4*x7RO~b zGdjISI<9k}f9Xc8G?At3ki@tahi7_bB3enzD>#3@&p;Ca^W_|qB3H*F8IB2w2%jn! zKu}DlOOYsx*l9*ppHF#yB-cEmzPB;F;1?S4N>INSoh98OhO<~GI$#X>16j^_(pZxAXH@5}b< kp*DD`_WMuC!xHx&j=1-vL|?&QfyEE?=L3qmfIrWF1J8L?FaQ7m literal 0 HcmV?d00001 diff --git a/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=32.parquet b/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=32.parquet new file mode 100644 index 0000000000000000000000000000000000000000..fc36e5eabf631d32618a0768de4d5288a2b83302 GIT binary patch literal 2881 zcmcgu&u`*J6doMJvPllnc5Q*g0U^cOLpBA1vtdse6Ch?2k`OHhx)rjG1CDIN@*`lP zmG)HiSoPG?o_pw_#~xQbR6X}l^{?o$z4p!61c$I%RZaH^#xw7|dGCAA-;8{UD=9X} zZm^G!ScXN95DLeTD{&UFk63OC^c!r54aFkinPooX(32%v@Ov0%U}ORT2JycJVr(!f zpwLD%vexYAirF(J&2*M!IEMQvz`YOfdwlrc#E)(PXv8uIh7EWiv{=MG=!o1cVxQ^} ziiBq~Qp9XN*MghBh~I+qB31`OrQg)LBYWtp;pY|p+ZCwdZm16=SXxDxU7x**;CcW+ zELO0Ko&Y+?UW5X<@^?^G$&JF2Mg0=D!aUI5&HJQ9ceU?xkDOpYY5UxtW2pAJ(61b6CML z(2;h@#r4%1|NAP%wIs|kTv1a%k4|SxsGF^vFNK$a;o@G!g~HbSj*oZ)A)O22lsV|WB4%lW9TtL(XB|R zr`RoJ5c!+AP8fDepTIR@jx2kScpm@a%dL3AT{fvrU(nL!b;4FG9o!SXt26;SFAUvm zH9uf<(>8}rk8U;W;ckX(vPV|WxvRGHq0&-@3Z$_|ruk+oK2JNp{O)GGZTpW&X*>G5 zGVJyN$92Lq)V|VpNa;OC>G!*10^myT4~(u&w5ey?$?aqU&?dapK4W@2y}grogCgs= zQaO>IyXQ6XHvBo2b`E2F27e+iFwS7HjSCpJajs2uqIk2P`iZj z7=rvE;jD&|QYqn11wTtF?lQ<~?s%gK7JbWu-dQ>yLmYgneK z7AqIN8m6sc!6AKVLHz#>Th;BQW>o=m)**cXtOG?ZIe<~1eX>OX=8n3f(HdJ;)zQ-C zm1>Y)OOvvb86RC@gVgEkU%F8%O%*viqA@O|(Xo-4N_LX)3f{lhXP}8l_;Nx>k*kxD z4hNJ(luwmYASj{JnM9RE;&ek*k574FtkhhhzPj6Ti@bUZ)kw;cT literal 0 HcmV?d00001 diff --git a/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=36.parquet b/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=36.parquet new file mode 100644 index 0000000000000000000000000000000000000000..c8c5cba2b986f2c30fa3a7b0af38daa4f09cf7ce GIT binary patch literal 2881 zcmcgu&2Jh<6kpbeY-}H_G`j+c148jC2ge1>Iwq&iV!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Gujxe?H1afpEp8oo&AWCHOHU{V0mgNW1nf)`kN@D&%% z80tR=@CHaBDKrP-L0ruT3rYM-2HS&vlySH@e0iLzxX5jc4~m6SG#oDwxZWUCG|^X_ l*F$~qRO|Pjl7}S`JRAxCNr}CJf5r13>dyxhbq0T){|2-`P~ZRn literal 0 HcmV?d00001 diff --git a/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=40.parquet b/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=40.parquet new file mode 100644 index 0000000000000000000000000000000000000000..6f8c8f778a0f20866055314b52032a2c9753d359 GIT binary patch literal 2881 zcmcgu&2QpH6gOVPvPllnc5Q*g0U^c8A)5lh*|4XM2@tahNr)B$-3s|D;K(+t4FMCa zw5O`as;8dz+(QpN_PFYy>bZxie?^b&wQt5Ie1uh1HQgr|X5M@A-tWEn&4@Ep%P?VP zlX-H?&3pVLD&p7htcW#tAUkcfH?#+HHT?8|`{n^uaW~Wl60EEu%4|%JBD@j8l`S2^ zKD8aj`WP9PP`-PZVCbOLk!sJ;bcY}uvu{J(&k^ojB(b!AC5TmgSOsKy_S7vS0MEkN zzkf7q+k->HNAq=v{Wiq?9_7A^VmPa!{4=a=oC;(`f1*=c>~;o@^OXE!eFiIB1v-*0 z`MADZ=YCrwxK@N&g)46IR4n4EUEPwIHK5`ay})x{Ge;U=F1Q5ev&9~N|49^Xp6`a6 zw3PtWXSXT>aHeDFcq0DlqueU)qp+U457u(`$29I9*};AlVQDVP{t$UWQSqHvq%Yf= z?8g40Z&HS>>0@|C%%NqwsprYhzt~Bp{AHWi^d&7>-lS~V(!o77_mrk!=cS>WTKfY= zKW%&9^~qMl9_;7vCVOc0y}N2lAIO?KkRgpdG|e|V$ywUj<99dfqU}E>CGBu@dC+qJ z$4$yK6i0SETzcP=9j7#H6UWnM=lBK%aD&>bwDP!U| zqM7ftq>`(a&0J$5@}dDbZJ`Ufx@sn$)*FKF2N<=(W}4V7KBF`QzOh&1)$&WgiVRue z)77hULoxGx&S|KG6H{a&h89WduT+!w&=%2LGxj6CU+E$}e+ls%Qys9AMS&6?MWfqN~E zt6pw&e1!~L=Uo4?twv=cOZg#*aU~8*+QI@gOEmZ?P75S0e@QM2R8vN7PM;Kvh;|c2GHF}8$!aqDg=nxOJvgx7f zF?i(8&bi9l)drqz4hE_XRJo^x!Kj zoH5jY5a11vLQ-fB#Dlo14;GU6mkhQC{ixt@bNC84RcVpi7#|c1rKmVwAaK1ws93Tu mJFkcO;Hld0KP3-KGI%(W{*w}a1^bp;)&7 literal 0 HcmV?d00001 diff --git a/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=44.parquet b/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=44.parquet new file mode 100644 index 0000000000000000000000000000000000000000..3c64d2feda18b4a5045ebcffc9988c6f74a3de30 GIT binary patch literal 2881 zcmcgu&u`*J6gCcG*(8T(yS9wP0U^cO1DgWD*|4XM2@tahNr)B$-3r;pfFs+m7y>3* zX-`#;RZl(bxrZKl>~YmY)pHM3|B4>lYu}7b_z_lB)pVa=n0fEbd*6HW&4_bUNijiY zhk1O$&d6`{_&to#Fw%hlP4T}3qD(L% zP@$a&x7FwwJ8p1NfO;8{BR z_Ydc7+c+{jG+zhUZv*`AVg9=?hO;ipKf_AkR3K~m6Q0?)+Zi}6Qu2?jIjmqA=t#Qc z;reom|80}tS`%g+u81j6T*%S7x}`9iK*e2piRYeXfi%EeaPiM)mp%FZlQ7&o&kZ+e zHwvoHZdC-}T*uOpXynyLxmEl}VLg8ztmW^IY5YC1gZ(PR(tMcxA@rD{A_*?kSL~MJ zaDUM^al>xu6L?0EX@J+k`lUA3hTm6kG8AdNjT%{PhIJnj7PyPI{{_8*gyb_{f7*c$+j zo49GH17+ai()+G581%*%z_mVbjGm3Psb_o1y<{BF#{JX_#`Io#Z$JKq;zeDHF$$ z%xteA7aXlQff^UYWo#IE4~D*$WUY< zS-!e3PIAal$Ot5p3bIJ+uPT$Oj9jZ+6y&I zTg8Hl`_h8={~NZd*GtW+0_LoX`vO=UMJ~C3Q6PP?MFHlny04KMTUOQ8(&n{l;9g6U zvYQ#7TpJMxXu7C; z0-jmCMAk|^ATJ0>O=bjtUbxnPlbV+jAa!tD0u5gzbUKB2hcL+l=|RNVeZdPXJ@|@C zXAJcp`gnb$kQAB&@gT0|frTXAC4=pLKT0^<0=^thRaoXW#s|ehDH@LF3tVpyii`D? m!RwJee5&>PPszg)^B<0w_oPH#!N20g5B28*iaLis&wm4CJX#n4 literal 0 HcmV?d00001 diff --git a/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=8.parquet b/tests/data/square_map/dataset/Norder=1/Dir=0/Npix=8.parquet new file mode 100644 index 0000000000000000000000000000000000000000..214219102fb9915c793bd02d41d529d1b0f6fecb GIT binary patch literal 2881 zcmcgu&2QpH6gLiHy-5zyc5NAn144?mhinQ2XTzR4CP2(4Bq3T1bSvbqfFs+md<0Ci z(w?dwtDbt=a}PcA*yE~)s^=c6{uMp8*S;B>@DWy3)pVa=n0fEbd%ySQHzUqaCB=r> zE%xy-OS9A?ieh4vFAPhuk63O8^jmC%jl_6nYMISA>d6W%_&to%Fw&tAO$on*Vr)1n zQjx7FztL=)s@=85&2*NfIhy-1#Jvv*2LkhN;zxG?G{w>s3|sI+QOiYy1FUz8m|A#d zI>SXw=QHh65x<6KMXdJ+YOkqxhVEdlhM(4iZ`PoSyP-aiU}Y5yyE#3I@MZ{CwsZ{p z)RQpQ^JH8?`R+lCrGr*S%AKBJ_6Wi;_ckQ_91-3{VoUp1f>_0eRY0a^Pu(&C@GPAD z`-ii(tsPoEny*9Lw;|zoM);1wa8^b6XIRr+EBeDsZT#(Q3DzGQGg#p=(2;b>$Mxlg z@Y_1UwIa+aTv1!3_()%Gn~ut^0~NRF1)lqwInn@g!6i7KZSMH{PZ+p)z8h}Rb_`UX z-Kq${nU15QvFNLha;t=o!g}F8SS#Eg(}a6u2lrKkqXmZhA@Z1_qC0$~tGb5T=l`N_ z5|(S2V|YgFq2u-w&*Pteu@g`D%O@2mHAuyixHUd8iYh4b{U}&0t5WwAh|rY zVMlbN!;kb#cI;uJSk2VZ(r98+Qq0PJAuy5b~UGBo5kuxzUs7;RI)GU zN>^HXoYEB0*X{K!%_$5T7xF&XF4bbStsO~SvvA;@UdY(rQI%@HQOFMKO3KD@WINkw zD22XWv@^AdEXo$-bfq@rYU`q%mF#FSQ(#M)j()Qc|xE3#BYOqQ?C zt>YZBG^LuXE0wlU%;P$ShBEG7LM^6On&oxN$$G7HSx;wEn(OatIJT`7E0=RMOpIc| z!+kLz{{M!p>i1H2s(?A`;l2RYzN(Zwz$lVFxsnKTPutT;jfPY8^t64gS-98oxa?&{ z$5+V0bUbo>At4drQ{@Z@ zis^JN6J-%Q-BLB+Q(hdYHJ_-jufacweWVelHlCn1UZaPP@1p?O_gyQ2}wfA~x i4xZ}W?o;xx#Dj+;?msEfSMaZR{zLuwfTGUe&-35tbWv9T literal 0 HcmV?d00001 diff --git a/tests/data/square_map/dataset/_common_metadata b/tests/data/square_map/dataset/_common_metadata new file mode 100644 index 0000000000000000000000000000000000000000..71be47909c9a7b5480c2882595038cef733d0c20 GIT binary patch literal 1612 zcmcIlOK;mo5GGv12-2KdIFNxH1OmP}E+vbJnNyasL{qV4n?^`VZ6Pcll2%w!3?Gsx zBS3#p|6i}2S+cgApr@h(ak)D)JM+!#x701MT8H~bT$LIJnLiIBdiYX0+&|uH{5YA1 zlqYO6X=|0{WtP));xCIhmk#&9gD^dQef8(hFMg7w%I${>mL9(W)yGHG{t)6k z>0V1muZ~U{2MLV>nl=8~dyrWigd2#>izv?I56xeHKWWOO$;(7+WpVzlgPY2i$#R$-d4WsKU^`%~pqkpZn-r`|EPPur(w@>i+x zidfc-^PxKV#vdV%Fyk6TL=kqA zkTn4VyfH|(hci5FQsH0-Up zSk9c5l9}DX!fS6@o}*T}vy6FBKOf(l@4z;thCTN#^(5?{mpAt&`bX5UvvFT5Mox=k z9FuFyvD43dgLmAmshSLO#`+v`&Ha|9gsxus0mk5BqzHSYwmer?-7`z|jn9CUFzTqv zaB;`3x`cU-t&ALN9vD5WqX?W$HicTka`2Ql9x5YuFdenEmKRt1#u4Y9VNG{x*ak+w z#J&U&|9`_~SH1Kj8!&4n_64wJ)ESh3Q5AiPbrt5Ncjk*4gUBxZHeY!Rdu?upWoLc0 zAPno=>0f*74z|?M3K3&r7T2t^HDd*N1?OM)8EB#-Uv7{T-4TvrxDX@~e6ntVph%}X zQz#8|dZcR2r=Gf|Zbj5DEAUs)M_(hgaYE*}CZBN-{KE+$7dTi3FUjxXUhWgKIyfsot z3eACd5ZAB3LXzr|!S=cz0}Qu=uZyYr&$*5Gpjary$9T2C^#+j|&4i|3iZFlcC&^p! cVQJPMj%M{qIr{C5B<=pBj|Y-;3;!d30|Bbzm;e9( literal 0 HcmV?d00001 diff --git a/tests/data/square_map/dataset/_metadata b/tests/data/square_map/dataset/_metadata new file mode 100644 index 0000000000000000000000000000000000000000..fc7658086f6d5e36fc8e023fc33e68d05b21867e GIT binary patch literal 8773 zcmcJV&u`jh7{?7ojJ7#MTR}!*6GAP@fu%qo4V5a@kU&XO(ohvh)+w^V0Y|o>{0MQX zNm%*-Fkf;aHzregeApe%%&8C!!jy1hIPR(A zJF%UgK8t)R2+p)?o7(tJ0zwZ-DAa&;Xe=hi|A@a3KX*=lkh=?KJjmWflOAMONAmdP zOr6Gl49^s;y08)opnB}RheF?7 zr-h;mXeanC5c?sJ{yUQXF@iFDoRcND6K+!_|28w3l11jWn6WWQDOXIkJ z+VBiiga8#`fMTL9mfY`9)B`_IxNh13Wa7i92NV7QMGN&CD4K~6D10{*BUrgK?tP%X zaQl;&%X=nji4e8K5XD4YJc*Z?;795@c~fD9TwpB{<;BHEVd}C{KO$6@rQ)M%iF6bz zm)`MFweFd!WkS_5LlqNs@pJ)I)C50O%cKWbAs1MSM0s)HBUQ9i->IUh_^9IQ9T!!3 z@6YGA2vxTjs+cJE^<+%&QxzvvVTD{^EfVF$g@05rrTR@3lZuZjc<8n_F@lv#@A#;q zPjgrO)F%?EM20FR>f*`$UX`aN_^G;0dVm#jfwf4K7Z*NKMN9RaDw>LqDv@*)E0^B! zQAHo=u1XdCK%Zc!VxlgdE})8<;HN4_dVm#jfwf4K7Z*NKMN9RaDw>Lqss!mMRxZ8c zqH4|i(|VHJtC9>=Ow`4bJ5`JceySdl9$1|P3dx~7cfv4u(>S@L*1oFfA#>Ug3JO%%=DTg|R!Q{XnWNX-o9SM#fD zsn>$IBsH76?fcGGzT%t6U3=?SBuUzXU$i}zq=HoLOI1ngOO?JIE0@oW&rxuTj6a^k zFgk|KUd0}-OVV6|0eD4=RJPC7<*FK#bK`pAa zP4k+K?0#qaXg^=dDW-GYfuZY4t$D=MaMr6;E!3ADtnZt*meb3w(E`sU3-txOPUQBs z1s;obpUiR*w562FZv9alo2nx2#U%++S|KL8zP&h=2HL^;j~w`gEcgXpt|5`t2mcC4yZ3r zV15?ODbEqwNJs;8EImg%n?EEZX%p?5HQkaLJ210^4khEgd;l+Oc4}MM{%qER$1Egq z-ehq4q95C6ImTZFrK+B18~KA`p_DFKZ?VDK8#X~qF8=T0%kF6OrF~;bE^Zu2=av$G S0Uw>&AEA^Igs1QiB>w>foU literal 0 HcmV?d00001 diff --git a/tests/data/square_map/partition_info.csv b/tests/data/square_map/partition_info.csv new file mode 100644 index 00000000..798921b7 --- /dev/null +++ b/tests/data/square_map/partition_info.csv @@ -0,0 +1,13 @@ +Norder,Npix +1,0 +1,4 +1,8 +1,12 +1,16 +1,20 +1,24 +1,28 +1,32 +1,36 +1,40 +1,44 diff --git a/tests/data/square_map/point_map.fits b/tests/data/square_map/point_map.fits new file mode 100644 index 0000000000000000000000000000000000000000..3f1bd5f0b3c291a66c52132696bb535d8daaf968 GIT binary patch literal 8640 zcmeI0!EVDK42HKi;g;(*RoX5+5aP6~1R|hP@&G;b(jD4Kef&AJyOBnLYMLr@LBisX z{b3>-C!1CQV@nnpKC(8kR7&5K!u32^sv9wyb1B1PrJi$|8>aH z!=Foq?Rh+367Fv;ts6S@d)*JkgIv_V#rxdb!I;!l=ft|f^B7(xq>w&~pD8~>Y5g-CYfCvzQe?#C0dh`8c literal 0 HcmV?d00001 diff --git a/tests/data/square_map/properties b/tests/data/square_map/properties new file mode 100644 index 00000000..c28a0585 --- /dev/null +++ b/tests/data/square_map/properties @@ -0,0 +1,12 @@ +#HATS catalog +obs_collection=square_map +dataproduct_type=map +hats_nrows=12 +hats_max_rows=1000000 +hats_order=1 +moc_sky_fraction=0.25000 +hats_builder=hats-import v0.4.1 +hats_creation_date=2024-11-20T19\:32UTC +hats_estsize=52 +hats_release_date=2024-09-18 +hats_version=v0.1 diff --git a/tests/hats/catalog/loaders/test_read_hats.py b/tests/hats/catalog/loaders/test_read_hats.py index fd8511e3..ad37b683 100644 --- a/tests/hats/catalog/loaders/test_read_hats.py +++ b/tests/hats/catalog/loaders/test_read_hats.py @@ -8,6 +8,7 @@ def test_read_hats_branches( small_sky_source_object_index_dir, margin_catalog_path, small_sky_source_dir, + test_data_dir, ): read_hats(small_sky_dir) read_hats(small_sky_order1_dir) @@ -15,3 +16,4 @@ def test_read_hats_branches( read_hats(small_sky_source_object_index_dir) read_hats(margin_catalog_path) read_hats(small_sky_source_dir) + read_hats(test_data_dir / "square_map")