Beispiel #1
0
# -----------------------------------------------------------------

# Parse arguments
parser = argparse.ArgumentParser(description="get image")
parser.add_argument("username", type=str, help="DustPedia archive username")
parser.add_argument("password", type=str, help="DustPedia archive password")
parser.add_argument("name",
                    type=str,
                    help="the image name [galaxyname_instrument_band.fits]")
arguments = parser.parse_args()

# -----------------------------------------------------------------

# Create the database
database = DustPediaDatabase()

# Login
database.login(arguments.username, arguments.password)

# -----------------------------------------------------------------

path = os.getcwd()

# CORRECT
if not arguments.name.endswith("fits"):
    arguments.name = arguments.name + ".fits"

galaxy_name = arguments.name.split("_")[0]

# Download
Beispiel #2
0
from core.sample import resolve_name

# -----------------------------------------------------------------

# Parse arguments
parser = argparse.ArgumentParser(description="get image")
parser.add_argument("username", type=str, help="DustPedia archive username")
parser.add_argument("password", type=str, help="DustPedia archive password")
parser.add_argument("galaxy", type=str, help="galaxy name")
arguments = parser.parse_args()

# -----------------------------------------------------------------

# Resolve the name
galaxy_name = resolve_name(arguments.galaxy)

# -----------------------------------------------------------------

# Create the database
database = DustPediaDatabase()

# Login
database.login(arguments.username, arguments.password)

# -----------------------------------------------------------------

urls = database.get_image_urls(galaxy_name)
for url in urls: print(url)

# -----------------------------------------------------------------
Beispiel #3
0
# Parse arguments
parser = argparse.ArgumentParser(description="get image")
parser.add_argument("username", type=str, help="DustPedia archive username")
parser.add_argument("password", type=str, help="DustPedia archive password")
parser.add_argument("galaxy", type=str, help="the name of the galaxy")
arguments = parser.parse_args()

# -----------------------------------------------------------------

# Resolve the name
galaxy_name = resolve_name(arguments.galaxy)

# -----------------------------------------------------------------

# Create the database
database = DustPediaDatabase()

# Login
database.login(arguments.username, arguments.password)

# -----------------------------------------------------------------

info = database.get_galaxy_info(galaxy_name)
print("")
for name in info.colnames:
    print(name + ": " + str(info[name][0]))
print("")

# -----------------------------------------------------------------
Beispiel #4
0
# -----------------------------------------------------------------

# Parse arguments
parser = argparse.ArgumentParser(description="show header")
parser.add_argument("username", type=str, help="DustPedia archive username")
parser.add_argument("password", type=str, help="DustPedia archive password")
parser.add_argument("name",
                    type=str,
                    help="the image name [galaxyname_instrument_band.fits]")
arguments = parser.parse_args()

# -----------------------------------------------------------------

# Create the database
database = DustPediaDatabase()

# Login
database.login(arguments.username, arguments.password)

# -----------------------------------------------------------------

path = os.getcwd()

# CORRECT
if not arguments.name.endswith("fits"):
    arguments.name = arguments.name + ".fits"

galaxy_name = arguments.name.split("_")[0]

# Download
Beispiel #5
0
parser = argparse.ArgumentParser(description="get image")
parser.add_argument("username", type=str, help="DustPedia archive username")
parser.add_argument("password", type=str, help="DustPedia archive password")
parser.add_argument("galaxy", type=str, help="the galaxy name")
parser.add_argument("instrument", type=str, nargs='?', choices=instruments, help="the instrument (optional)")
parser.add_argument("--errors", action="store_true", help="also get error maps")
arguments = parser.parse_args()

# -----------------------------------------------------------------

# Resolve the name
galaxy_name = resolve_name(arguments.galaxy)

# -----------------------------------------------------------------

# Create the database
database = DustPediaDatabase()

# Login
database.login(arguments.username, arguments.password)

# -----------------------------------------------------------------

path = os.getcwd()

# -----------------------------------------------------------------

database.download_images(galaxy_name, path, error_maps=arguments.errors, progress_bar=True, instrument=arguments.instrument)

# -----------------------------------------------------------------
Beispiel #6
0
        time.wait(10)
    else: subprocess.Popen(command)
    
# -----------------------------------------------------------------

# Parse arguments
parser = argparse.ArgumentParser(description="show cutouts")
parser.add_argument("username", type=str, help="DustPedia archive username")
parser.add_argument("password", type=str, help="DustPedia archive password")
parser.add_argument("galaxy", type=str, help="the galaxy name")
arguments = parser.parse_args()

# -----------------------------------------------------------------

# Create the database
database = DustPediaDatabase()

# Login
database.login(arguments.username, arguments.password)

# -----------------------------------------------------------------

path = os.getcwd()

# -----------------------------------------------------------------

# Resolve the name
galaxy_name = resolve_name(arguments.galaxy)

# -----------------------------------------------------------------
Beispiel #7
0
# -----------------------------------------------------------------

# Parse arguments
parser = argparse.ArgumentParser(description="show wcs")
parser.add_argument("username", type=str, help="DustPedia archive username")
parser.add_argument("password", type=str, help="DustPedia archive password")
parser.add_argument("name",
                    type=str,
                    help="the image name [galaxyname_instrument_band.fits]")
arguments = parser.parse_args()

# -----------------------------------------------------------------

# Create the database
database = DustPediaDatabase()

# Login
database.login(arguments.username, arguments.password)

# -----------------------------------------------------------------

path = os.getcwd()

# CORRECT
if not arguments.name.endswith("fits"):
    arguments.name = arguments.name + ".fits"

galaxy_name = arguments.name.split("_")[0]

# Download
Beispiel #8
0
# Ensure Python 3 functionality
from __future__ import absolute_import, division, print_function

# Import standard modules
import os
import argparse

# Import DustPedia API
from core.database import DustPediaDatabase

# -----------------------------------------------------------------

# Parse arguments
parser = argparse.ArgumentParser(description="get photometry")
parser.add_argument("username", type=str, help="DustPedia archive username")
parser.add_argument("password", type=str, help="DustPedia archive password")
arguments = parser.parse_args()

# -----------------------------------------------------------------

database = DustPediaDatabase()
database.login(arguments.username, arguments.password)

path = os.getcwd()

# Download
database.download_photometry(path)

# -----------------------------------------------------------------