desihub / desihub/tutorials

legacy imaging stamps of galaxies

Open
#93 6 comments 0 reactions 1 assignee Claimed by @forero View on GitHub
Dominant language
Jupyter Notebook
Stars
61
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Write a notebook with examples on how to plot stamps of galaxies given a TARGETID.

Here is a recipe from @araichoor that should make it into a tutorial

> I guess you can easily get the (ra, dec) from the lss catalog, provided the id.
then it s a simple bash command, e.g.:
```
wget -O tmp.jpeg "http://legacysurvey.org/viewer/jpeg-cutout/?layer=ls-dr9&ra=0.23790&dec=0.05840&pixscale=0.1&size=300"
```

> and you can of course wrap that in python — and adjust the stamp properties, e.g.:

```
ra, dec = 0.2379, 0.0584
width_arcsec = 30
pixscale = 0.1
tmpfn = "tmp.jpeg"
size = int(width_arcsec / pixscale)
layer = "ls-dr9"
tmpstr = 'wget -O {} "http://legacysurvey.org/viewer/jpeg-cutout/?layer={}&ra={:.5f}&dec={:.5f}&pixscale={}&size={:.0f}"'.format(
tmpfn, layer, ra, dec, pixscale, size
)
subprocess.check_call(tmpstr, stderr=subprocess.DEVNULL, shell=True)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.