Commit a3ce63db authored by Sogo Mineo's avatar Sogo Mineo
Browse files

add pdr3/

parent 2d414471
Download PSF images of coadd images from the website of HSC data release.
python >= 3.7
### Download images of all bands at a location
python3 --ra=222.222 --dec=44.444 --name="psf-{tract}-{patch[0]},{patch[1]}-{filter}"
Note that `{filter}` must appear in `--name`.
Otherwise, the five images of the five bands will be written
to a single file over and over.
Also, if you do not specify `--tract` and `--patch`,
you should include `{tract}` and `{patch}` in `--name`
so as to know (tract, patch).
### Use coordinate list
You can feed a coordinate list that is in nearly the same format as
There are a few differences:
- There must not appear comments
except for the mandatory one at the first line.
- You can use "all" as a value of "filter" field.
- The default value of `centered` is True.
It is permissible for the coordinate list to contain only coordinates.
For example:
#? ra dec
222.222 44.444
222.223 44.445
222.224 44.446
In this case, you have to specify other fields via the command line:
python3 \
--centered=False \
--name="psf_{tract}_{patch[0]}_{patch[1]}_{ra}_{dec}_{filter}" \
--list=coordlist.txt # <- the name of the above list
It is more efficient to use a list like the example above
than to use a for-loop to call the script iteratively.
### Stop asking a password
To stop the script asking your password, put the password
into an environment variable. (Default: `HSC_SSP_CAS_PASSWORD`)
Then, run the script with `--user` option:
python3 \
--ra=222.222 --dec=44.444 \
--name="psf-{tract}-{patch[0]},{patch[1]}-{filter}" \
If you are using your own personal laptop or desktop,
you may pass your password through `--password` option.
But you must never do so
if there are other persons using the same computer.
Remember that other persons can see your command lines
with, for example, `top` command.
(If it is GNU's `top`, press `C` key to see others' command lines).
Usage as a python module
Here is an example:
import downloadPsf
psfreq = downloadPsf.PsfRequest.create(
images =
# Multiple images (of various filters) are returned.
# We look into the first one of them.
metadata, data = images[0]
# `data` is just the binary data of a FITS file.
# You can use, for example, `astropy` to decode it.
import io
hdus =
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment