Skip to content

Commit

Permalink
Merge branch 'main' of github.com:gaia-unlimited/gaiaunlimited into main
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanCantatGaudin committed Mar 6, 2024
2 parents 736f5ac + ce15c6f commit eb15f7c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Horizon 2020 research and innovation program under grant agreement No 101004110.
:caption: Contents:

install
notebooks/scanninglaw
notebooks/getting-started
notebooks/dr3-empirical-completeness
notebooks/dr3-rvs
notebooks/SubsampleSelectionFunction
notebooks/SubsampleSF_Tutorial
notebooks/scanninglaw
citation
api

Expand Down
29 changes: 27 additions & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Installation
Installation and quickstart
------------

The package is available through PyPI and Github.
Expand All @@ -25,7 +25,32 @@ Alternatively, clone the repository and install:
In case a local installation is not possible, the package can also be installed inside a Google Colab notebook by executing the command ``!pip install gaiaunlimited`` or ``%pip install gaiaunlimited``.

Setting the data directory

Plotting the Gaia DR3 selection function on the sky
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This code queries a precomputed all-sky map and displays the completeness at magnitude 21:

.. code-block:: bash
from gaiaunlimited.selectionfunctions import DR3SelectionFunctionTCG
from gaiaunlimited.utils import get_healpix_centers
import numpy as np
import healpy as hp
mapHpx7 = DR3SelectionFunctionTCG()
coords_of_centers = get_healpix_centers(5)
gmag = np.ones_like(coords_of_centers) * 21.
completeness = mapHpx7.query(coords_of_centers,gmag)
hp.mollview(completeness,coord=['Celestial','Galactic'],
title='Gaia DR3 selection function at G=21',
min=0,max=1)
.. image:: notebooks/_static/dr3_tcg_g21.png
:width: 600


Optional: setting the data directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Gaiaunlimited downloads and caches large binary data files. To set the data directory to store these files,
Expand Down
Binary file added docs/notebooks/_static/dr3_tcg_g21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit eb15f7c

Please sign in to comment.