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

Healpix doc #2498

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
16 changes: 8 additions & 8 deletions app/routes/docs.notices.healpix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@ GCN strongly encourages the use of multi-order sky maps. These are a more comple

## Working with HEALPix Maps

HEALPix data is distrubuted in standard format with the file extension '''.fits.gz'''. These files are FITS image files and can be utilized with many common FITS tools. These files usually stored as HEALPix projection,
HEALPix data is distrubuted in standard format with the file extension ```.fits.gz```. These files are FITS image files and can be utilized with many common FITS tools. These files usually stored as HEALPix projection,
Vidushi-GitHub marked this conversation as resolved.
Show resolved Hide resolved

### Reading Sky Maps

Sky maps can be parsed using python; to start, import a handful of packages (note: while this documentation covers the use of '''astropy-healpix''', there are several packages that are ab)
'''
Sky maps can be parsed using python; to start, import a handful of packages (note: while this documentation covers the use of ```astropy-healpix```, there are several packages that are ab)
```
import astropy_healpix as ah
import numpy as np

from astropy import units as u
from astropy.table import QTable
'''
```

A given sky map can then be read in as
'''
```
skymap = QTable.read('skymap.multiofits)
'''
```

### Most Probable Sky Location

The index of the highest probability point can be found by doing the following
'''
```
hp_index = np.argmax(skymap['PROBDENSITY'])
uniq = skymap[hq_index]['UNIQ']

level, ipix = ah.uniq_to_level_ipix(uniq)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should introduce a UNIQ scheme a bit.

nside = ah.level_to_nside(level)

ra, dec = ah.healpix_to_lonlat(ipix, nside, order='nested')
'''
```

### Probability Density at a Known Position

Expand Down
Loading