Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update output from docs. Update path to hats catalogs. #445

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Getting Started with LSDB
============
==========================

Installation
--------------------------
Expand Down Expand Up @@ -70,7 +70,7 @@ Catalog, and specify which columns we want to use from it.

import lsdb
ztf = lsdb.read_hats(
'https://data.lsdb.io/unstable/ztf/ztf_dr14/',
'https://data.lsdb.io/hats/ztf/ztf_dr14/',
columns=["ra", "dec", "ps1_objid", "nobs_r", "mean_mag_r"],
)
>> ztf
Expand Down Expand Up @@ -133,9 +133,9 @@ get accurate results. This should be provided with the catalog by the catalog's
.. code-block:: python

gaia = lsdb.read_hats(
'https://data.lsdb.io/unstable/gaia_dr3/gaia/',
'https://data.lsdb.io/hats/gaia/gaia/',
columns=["ra", "dec", "phot_g_n_obs", "phot_g_mean_flux", "pm"],
margin_cache="https://data.lsdb.io/unstable/gaia_dr3/gaia_10arcs/",
margin_cache="https://data.lsdb.io/hats/gaia/gaia_10arcs/",
)

Once we've got our other catalog, we can crossmatch the two together!
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Using this Guide
:hidden:

Home page <self>
Installation <installation>
Getting Started <getting-started>
Tutorials <tutorials>
API Reference <autoapi/index>
Expand Down
1 change: 1 addition & 0 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ A more in-depth look into how LSDB works
:name: Advanced Topics

Topic: Import catalogs <tutorials/import_catalogs>
Topic: Accessing Remote Data <tutorials/remote_data>
Topic: Margins <tutorials/margins>
Topic: Performance Testing <tutorials/performance>

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/filtering_large_catalogs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"metadata": {},
"outputs": [],
"source": [
"surveys_path = \"https://data.lsdb.io/unstable/\""
"surveys_path = \"https://data.lsdb.io/hats/\""
]
},
{
Expand Down Expand Up @@ -384,7 +384,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "hipscatenv",
"display_name": "demo",
"language": "python",
"name": "python3"
},
Expand All @@ -398,7 +398,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/getting_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"metadata": {},
"outputs": [],
"source": [
"gaia_dr3 = lsdb.read_hats(\"https://data.lsdb.io/unstable/gaia_dr3/gaia/\")\n",
"gaia_dr3 = lsdb.read_hats(\"https://data.lsdb.io/hats/gaia/gaia/\")\n",
"gaia_dr3"
]
},
Expand Down Expand Up @@ -73,8 +73,8 @@
"outputs": [],
"source": [
"gaia_dr3 = lsdb.read_hats(\n",
" \"https://data.lsdb.io/unstable/gaia_dr3/gaia/\",\n",
" margin_cache=\"https://data.lsdb.io/unstable/gaia_dr3/gaia_10arcs/\",\n",
" \"https://data.lsdb.io/hats/gaia/gaia/\",\n",
" margin_cache=\"https://data.lsdb.io/hats/gaia/gaia_10arcs/\",\n",
" columns=[\n",
" \"source_id\",\n",
" \"ra\",\n",
Expand Down
55 changes: 21 additions & 34 deletions docs/tutorials/import_catalogs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"id": "529d9e23",
"metadata": {},
"source": [
"We will be importing `small_sky_order1` from a single CSV file:"
"We will be importing `small_sky` from a single CSV file.\n",
"\n",
"Let's define the input and output paths:"
]
},
{
Expand All @@ -52,37 +54,14 @@
}
},
"outputs": [],
"source": [
"catalog_name = \"small_sky_order1\"\n",
"test_data_dir = Path.cwd() / \"..\" / \"..\" / \"tests\" / \"data\""
]
},
{
"cell_type": "markdown",
"id": "8b37826f",
"metadata": {},
"source": [
"Let's define the input and output paths:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "59e857888ae9ea70",
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-10T15:14:55.958272Z",
"start_time": "2023-11-10T15:14:55.924340Z"
}
},
"outputs": [],
"source": [
"# Input paths\n",
"catalog_dir = test_data_dir / catalog_name\n",
"catalog_csv_path = catalog_dir / f\"{catalog_name}.csv\"\n",
"test_data_dir = Path.cwd() / \"..\" / \"..\" / \"tests\" / \"data\"\n",
"catalog_csv_path = test_data_dir / \"raw\" / \"small_sky\" / \"small_sky.csv\"\n",
"\n",
"# Temporary directory for the intermediate/output files\n",
"tmp_dir = tempfile.TemporaryDirectory()"
"tmp_dir = tempfile.TemporaryDirectory()\n",
"tmp_path = Path(tmp_dir.name)"
]
},
{
Expand Down Expand Up @@ -120,7 +99,7 @@
")\n",
"\n",
"# Save it to disk in HATS format\n",
"catalog.to_hats(f\"{tmp_dir.name}/from_dataframe\")"
"catalog.to_hats(tmp_path / \"from_dataframe\")"
]
},
{
Expand Down Expand Up @@ -196,7 +175,7 @@
" file_reader=\"csv\",\n",
" input_file_list=[catalog_csv_path],\n",
" output_artifact_name=\"from_import_pipeline\",\n",
" output_path=tmp_dir.name,\n",
" output_path=tmp_path,\n",
" resume=False,\n",
")\n",
"\n",
Expand Down Expand Up @@ -226,7 +205,7 @@
},
"outputs": [],
"source": [
"from_dataframe_catalog = lsdb.read_hats(f\"{tmp_dir.name}/from_dataframe\")\n",
"from_dataframe_catalog = lsdb.read_hats(tmp_path / \"from_dataframe\")\n",
"from_dataframe_catalog"
]
},
Expand All @@ -242,7 +221,7 @@
},
"outputs": [],
"source": [
"from_import_pipeline_catalog = lsdb.read_hats(f\"{tmp_dir.name}/from_import_pipeline\")\n",
"from_import_pipeline_catalog = lsdb.read_hats(tmp_path / \"from_import_pipeline\")\n",
"from_import_pipeline_catalog"
]
},
Expand Down Expand Up @@ -284,11 +263,19 @@
"source": [
"tmp_dir.cleanup()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "240241dc",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "demo",
"language": "python",
"name": "python3"
},
Expand All @@ -302,7 +289,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
Loading