Skip to content

Commit 5a2bc17

Browse files
authored
Merge pull request #2 from astronomy-commons/delucchi/test_data
Adds test data sets from delve and panstarrs.
2 parents ab58fc6 + 19953ca commit 5a2bc17

24 files changed

+336
-0
lines changed

tests/conftest.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from pathlib import Path
2+
3+
import pytest
4+
5+
TEST_DIR = Path(__file__).parent
6+
7+
8+
@pytest.fixture
9+
def test_data_dir():
10+
return Path(TEST_DIR) / "data"
11+
12+
13+
@pytest.fixture
14+
def m67_delve_dir(test_data_dir):
15+
return test_data_dir / "m67" / "delve_cone"
16+
17+
18+
@pytest.fixture
19+
def m67_ps1_dir(test_data_dir):
20+
return test_data_dir / "m67" / "ps1_cone"

tests/data/fetch_catalogs.ipynb

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "f850dffe",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"import lsdb"
11+
]
12+
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": null,
16+
"id": "47931d45",
17+
"metadata": {},
18+
"outputs": [],
19+
"source": [
20+
"full_delve = lsdb.read_hats('https://data.lsdb.io/hats/delve_dr2', columns=['QUICK_OBJECT_ID',\n",
21+
" 'RA',\n",
22+
" 'DEC',\n",
23+
" 'MAG_PSF_G',\n",
24+
" 'MAG_PSF_R',\n",
25+
" 'MAG_PSF_I',\n",
26+
" 'MAG_PSF_Z',\n",
27+
" 'MAGERR_PSF_G',\n",
28+
" 'MAGERR_PSF_R',\n",
29+
" 'MAGERR_PSF_I',\n",
30+
" 'MAGERR_PSF_Z',])"
31+
]
32+
},
33+
{
34+
"cell_type": "code",
35+
"execution_count": null,
36+
"id": "95fe1e5f",
37+
"metadata": {},
38+
"outputs": [],
39+
"source": [
40+
"full_delve.plot_pixels()"
41+
]
42+
},
43+
{
44+
"cell_type": "code",
45+
"execution_count": null,
46+
"id": "6608fc3f",
47+
"metadata": {},
48+
"outputs": [],
49+
"source": [
50+
"full_delve.all_columns"
51+
]
52+
},
53+
{
54+
"cell_type": "code",
55+
"execution_count": null,
56+
"id": "9e2cd312",
57+
"metadata": {},
58+
"outputs": [],
59+
"source": [
60+
"cone_delve = full_delve.cone_search(ra=8.8567, dec=11.8167, radius_arcsec=25*60)"
61+
]
62+
},
63+
{
64+
"cell_type": "code",
65+
"execution_count": null,
66+
"id": "0655f7f2",
67+
"metadata": {},
68+
"outputs": [],
69+
"source": [
70+
"cone_delve.plot_pixels()"
71+
]
72+
},
73+
{
74+
"cell_type": "code",
75+
"execution_count": null,
76+
"id": "2b5d731f",
77+
"metadata": {},
78+
"outputs": [],
79+
"source": [
80+
"cone_delve.to_hats(\"/home/delucchi/git/xmatch/lsdb-crossmatch/tests/data/m67/delve_cone\", overwrite=True)"
81+
]
82+
},
83+
{
84+
"cell_type": "code",
85+
"execution_count": null,
86+
"id": "40016e6d",
87+
"metadata": {},
88+
"outputs": [],
89+
"source": [
90+
"full_ps1 = lsdb.read_hats('s3://stpubdata/panstarrs/ps1/public/hats/otmo', margin_cache='s3://stpubdata/panstarrs/ps1/public/hats/otmo_10arcs',columns=['objName',\n",
91+
" 'objID',\n",
92+
" 'surveyID',\n",
93+
" 'qualityFlag',\n",
94+
" 'raMean',\n",
95+
" 'decMean',\n",
96+
" 'raMeanErr',\n",
97+
" 'decMeanErr',\n",
98+
" 'pmra',\n",
99+
" 'pmdec',\n",
100+
" 'pmraErr',\n",
101+
" 'pmdecErr',\n",
102+
" 'epochMean',\n",
103+
" 'gMeanPSFMag',\n",
104+
" 'gMeanPSFMagErr',\n",
105+
" 'gMeanPSFMagStd',\n",
106+
" 'gMeanPSFMagNpt',\n",
107+
" 'gMeanPSFMagMin',\n",
108+
" 'gMeanPSFMagMax',\n",
109+
" 'gFlags',\n",
110+
" 'rMeanPSFMag',\n",
111+
" 'rMeanPSFMagErr',\n",
112+
" 'rMeanPSFMagStd',\n",
113+
" 'rMeanPSFMagNpt',\n",
114+
" 'rMeanPSFMagMin',\n",
115+
" 'rMeanPSFMagMax',\n",
116+
" 'rFlags',\n",
117+
" 'iMeanPSFMag',\n",
118+
" 'iMeanPSFMagErr',\n",
119+
" 'iMeanPSFMagStd',\n",
120+
" 'iMeanPSFMagNpt',\n",
121+
" 'iMeanPSFMagMin',\n",
122+
" 'iMeanPSFMagMax',\n",
123+
" 'iFlags',\n",
124+
" 'zMeanPSFMag',\n",
125+
" 'zMeanPSFMagErr',\n",
126+
" 'zMeanPSFMagStd',\n",
127+
" 'zMeanPSFMagNpt',\n",
128+
" 'zMeanPSFMagMin',\n",
129+
" 'zMeanPSFMagMax',\n",
130+
" 'zFlags',\n",
131+
" 'yMeanPSFMag',\n",
132+
" 'yMeanPSFMagErr',\n",
133+
" 'yMeanPSFMagStd',\n",
134+
" 'yMeanPSFMagNpt',\n",
135+
" 'yMeanPSFMagMin',\n",
136+
" 'yMeanPSFMagMax',\n",
137+
" 'yFlags'])"
138+
]
139+
},
140+
{
141+
"cell_type": "code",
142+
"execution_count": null,
143+
"id": "cb239cfb",
144+
"metadata": {},
145+
"outputs": [],
146+
"source": [
147+
"full_ps1.plot_pixels()"
148+
]
149+
},
150+
{
151+
"cell_type": "code",
152+
"execution_count": null,
153+
"id": "6055e6de",
154+
"metadata": {},
155+
"outputs": [],
156+
"source": [
157+
"full_ps1.hc_structure.catalog_info"
158+
]
159+
},
160+
{
161+
"cell_type": "code",
162+
"execution_count": null,
163+
"id": "08a74b5d",
164+
"metadata": {},
165+
"outputs": [],
166+
"source": [
167+
"cone_ps1 = full_ps1.cone_search(ra=8.8567, dec=11.8167, radius_arcsec=25*60,fine=True)"
168+
]
169+
},
170+
{
171+
"cell_type": "code",
172+
"execution_count": null,
173+
"id": "94d9db03",
174+
"metadata": {},
175+
"outputs": [],
176+
"source": [
177+
"cone_ps1.plot_pixels()"
178+
]
179+
},
180+
{
181+
"cell_type": "code",
182+
"execution_count": null,
183+
"id": "2e8db5f9",
184+
"metadata": {},
185+
"outputs": [],
186+
"source": [
187+
"cone_ps1.to_hats(\"/home/delucchi/git/xmatch/lsdb-crossmatch/tests/data/m67/ps1_cone\")"
188+
]
189+
},
190+
{
191+
"cell_type": "code",
192+
"execution_count": null,
193+
"id": "3a9876e6",
194+
"metadata": {},
195+
"outputs": [],
196+
"source": []
197+
}
198+
],
199+
"metadata": {
200+
"kernelspec": {
201+
"display_name": "june",
202+
"language": "python",
203+
"name": "python3"
204+
},
205+
"language_info": {
206+
"codemirror_mode": {
207+
"name": "ipython",
208+
"version": 3
209+
},
210+
"file_extension": ".py",
211+
"mimetype": "text/x-python",
212+
"name": "python",
213+
"nbconvert_exporter": "python",
214+
"pygments_lexer": "ipython3",
215+
"version": "3.12.3"
216+
}
217+
},
218+
"nbformat": 4,
219+
"nbformat_minor": 5
220+
}
Binary file not shown.
Binary file not shown.
1.27 KB
Binary file not shown.
4.54 KB
Binary file not shown.
3.45 KB
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#HATS catalog
2+
obs_collection=delve_dr2
3+
dataproduct_type=object
4+
hats_nrows=18423
5+
hats_col_ra=RA
6+
hats_col_dec=DEC
7+
hats_npix_suffix=.parquet
8+
hats_skymap_order=8
9+
hats_cols_sort=QUICK_OBJECT_ID
10+
hats_max_rows=12011
11+
hats_order=7
12+
moc_sky_fraction=0.79289
13+
hats_builder=lsdb v0.6.1.dev16+g47e97927, hats v0.7.dev4+gf05fdf2a
14+
hats_creation_date=2025-02-18T13\:55UTC
15+
hats_estsize=875737696
16+
hats_release_date=2024-09-18
17+
hats_version=v0.1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Norder,Npix
2+
4,1221
3+
4,1232
6.01 MB
Binary file not shown.

0 commit comments

Comments
 (0)