Skip to content

Commit

Permalink
Update install.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanCantatGaudin authored Mar 6, 2024
1 parent b1892d3 commit 0247c0d
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion 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,6 +25,28 @@ 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``.


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)
Optional: setting the data directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 0247c0d

Please sign in to comment.