Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 3.23 KB

File metadata and controls

70 lines (50 loc) · 3.23 KB

Astro Scripts

Various astronomy scripts

  1. Download DECalS Image Script: decal_image_download.py

    Downloading optical image from DeCALS servers (https://www.legacysurvey.org/decamls/)

    python decal_image_download.py <index> <ra> <dec> <name> <redshift> <fraction_size>

    • <redshift>: set value to 0 when you do not know the redshift
    • <fraction_size>: 1 = 2048px, 2 = 2048/2, 4 = 2048/4; (Increase to zoom in and reduce the file size)

    Example:
    Download jpeg: python decal_image_download.py 1 57.8554 -15.4054 test 0.2 4

    Download FITS file: python decal_image_download.py 1 57.8554 -15.4054 test 0.2 4 --fits

    1.1 Fixed the order of FITS images in order to open with ds9

    Requirements: Need to install aplpy for this code to work.

    python decal_image_download_fits_fixed.py <outfilename_from_first_step.fits>

  2. Download SDSS Catalog Data: download_SDSS_catalog_withSciServer.ipynb

  3. Download LS DR10 Photometry Script: ls_dr10_catalog_download.py

    • This script queries LS DR10 Tractor catalog via NOIRLab TAP service and extracts multi-band photometry (optical + WISE) within a sky region. Documentation: https://datalab.noirlab.edu/tap

    python ls_dr10_catalog_download.py --ra <ra> --dec <dec> --name <name> --radius <radius>

    Arguments

    • : Right Ascension of target center (in degrees)
    • : Declination of target center (in degrees)
    • : Label for output file name
    • : Search radius in degrees (default = 0.0166667 ≈ 1 arcmin)

    Output

    • CSV file containing:
      • Astrometry (RA, Dec)
      • Optical + WISE fluxes (dereddened)
      • Flux inverse variance
      • Galactic transmission factors
      • Morphology and quality flags

    Query sources around a cluster center: python ls_dr10_catalog_download.py --ra 150.11632 --dec 2.20583 --name clusterA --radius 0.02

    SED Photometry (LS DR10)

    For each band (g, r, i, z, w1, w2, …):

    • Use dereddened flux for SED
      • dered_flux = flux / mw_transmission
    • Flux error
      • sigma_flux = 1 / sqrt(flux_ivar)
      • sigma_dered_flux = sigma_flux / mw_transmission
    • Magnitude
      • mag = 22.5 - 2.5 * log10(dered_flux)
    • Magnitude error
      • mag_err = (2.5 / ln(10)) / (flux * sqrt(flux_ivar))