HASP Data Diagnostic Notebook#


This notebook will walk you through how to examine the input spectra for the HASP coadd code and determine what was and was not included in the co-added data product output.#

Learning Goals#

By the end of this tutorial, you will:

  • Understand the reasons an input spectrum may be rejected from a co-added data product

  • Learn how to examine output logs from coadd and header keywords from COS and STIS data products to determine which datasets were rejected

  • Know how to plot co-added spectra and the constituent datasets

  • Be able to re-run coadd with the default rejection criteria turned off to create custom co-additions

Table of Contents#

0. Introduction

1. Example 1: Two COS datasets rejected for different reasons

- 1.1 Obtaining Data Products

- 1.2 Examining Output Logs

- 1.3 Plotting Constituent Spectra

- 1.4 Running coadd

2. Example 2: A STIS dataset with POSTARG offsets

- 2.1 Obtaining Data Products

- 2.2 Examining Output Logs

- 2.3 Running coadd

3. Example 3: A STIS dataset with rejected flux

- 3.1 Obtaining Data Products

- 3.2 Examining Output Logs

- 3.3 Running coadd

0. Introduction#

The Hubble Advanced Spectral Products (HASP) coadd code is a script that co-adds spectra of the same target within a program. This software is able to co-add data taken with the spectrographs onboard the Hubble Space Telescope (HST); the Space Telescope Imaging Spectrograph (STIS) and the Cosmic Origins Spectrograph (COS). The Hubble Spectroscopic Legacy Archive (HSLA) uses this script to co-add these instruments’ data from The Mikulski Archive for Space Telescopes (MAST) to create high-quality spectra with a broad wavelength coverage (whenever possible from the ultraviolet to the near-infrared) that is publicly available for the scientific community. The script first co-adds the observations for each grating for a given visit, then it combines all gratings for the observation set. Finally, it co-adds the spectra of each observation set in the program to produce a fully co-added spectra for each target in a program. Check out the COS 2024-1 ISR for more information about the HASP script and products.

The data fed into the coadd code from each program are selected via a MAST archive search query. This query performs some filtering at the same time and rejects certain bad quality datasets. Then, the coadd script itself performs another series of checks on the input spectra before computing the co-added data products. Lastly, while coadd is running, it will check the flux of the input data in each wavelength bin for a given mode against an initial coadd that includes all input data. If the median flux of an input spectrum is lower than a given threshold against the co-add, it will be removed. coadd will iterate until no more spectra are rejected.

There are several different reasons an exposure could be rejected before the co-addition is running. These fall into three categories. First, the data in a given program may have quality issues that lead to its removal. Second, there are some observation configurations that coadd is not equipped to handle. Last, the target itself may pose an issue, such as for moving targets, or the target flux may be intrinsically variable, making the coadd flux filter reject good spectra. Finer details of these rejection criteria are summarized below:

Reason

Modes Effected

Observing Issues

Guide star acquisition failures

Any

Observatory or detector failure events

Any

EXPFLAG (exposure data quality flag) header keyword is anything other than ‘NORMAL’

Any

EXPTIME (exposure time) is zero seconds

Any

Actual exposure time is less than 80% of the planned exposure time

Any

FGSLOCK (fine guidance system lock) is not ‘FINE’, i.e., guide star tracking was not locked

Any

SHUTTER is closed

COS

Observation Parameters

POSTARG1 != 0.0, i.e., there is a pointing offset

Any

POSTARG2 != 0.0 and P1_PURPS != ‘DITHER’, i.e., there is a pointing offset not in the disperson direction

STIS

PATTERN1 = STIS-PERP-TO-SLIT and P1_FRAME = POS-TARG, i.e., there is a cross-dispersion direction pointing pattern

STIS

P1_PURPS = MOSAIC, i.e., there is a mosaic pointing offset pattern

STIS

OPT_ELEM (grating) = PRISM

STIS

APERTURE = BOA (Bright Object Aperture)

COS

For the COS/NUV grating G230L, stripe C spectra are rejected due to vignetting

COS/NUV

Target Parameters

Moving targets (MTFLAG = True)

Any

Variable targets*

Any

Extended targets*

Any

*These are not rejected by default, but some exposures may be removed by the code’s flux checking routine.

The HSLA team chose to reject these cases after careful analysis, but understand there are always some exceptions to these rules that we do not handle. This custom co-addition notebook will show users how to find out why a dataset was rejected and how to produce their own co-adds in cases where the data are still valuable.

Please note that the format and text in the log file may change slightly as new code builds are released. This notebook will be updated in Spring 2024 to reflect any text changes in the logs.

Imports#

We will be using multiple libraries to retrieve and analyze data. We will use:

  • astroquery.mast Observations to download COS and STIS data

  • pathlib.Path to create product and data directories

  • matplotlib.pyplot to plot spectra

  • numpy to perform calculations and array manipulation

  • astropy.io fits to work with FITS files

  • astropy.table Table to work with FITS tables

  • glob to work with multiple files in our directories

  • os to interact with the operating system

  • shutil to perform directory and file operations

We recommend creating a HASP-specific conda environment when co-adding spectra. You can checkout our Setup.ipynb notebook to create such an environment. Alternatively, you can also download the required dependencies to run this notebook with the terminal command:

pip install -r requirements.txt

This will download the dependencies that are necessary to run this current notebook. Let’s import all of our packages that we will use in this notebook and print our conda environment by running the next cell:

import matplotlib.pyplot as plt
import numpy as np
from astropy.io import fits
from astropy.table import vstack
from astroquery.mast import Observations
import glob
import os
import shutil
from pathlib import Path

%matplotlib widget
plt.rcParams['figure.figsize'] = 10, 6
plt.style.use('seaborn-v0_8-colorblind')

print("Currently active conda environment:", os.environ.get("CONDA_PREFIX"))
Currently active conda environment: None

Please make sure the environment that contains the HASP script dependencies is activated or you download the dependencies listed in the requirements.txt file, otherwise you will NOT be able to run the co-add code.

We will define a function that will be utilized throughout the notebook when downloading MAST data using astroquery:

def consolidate_files(data_path):
    '''
    Consolidate all files to single directory; necessary for HASP script run.
    ---------------
    Input:
    str data_path : ./mastDownload/HST folders paths; files to be moved here
    ---------------
    Output:
    None. Files moved to data_path and data_path/products.
    The ./mastDownload/HST directory is deleted.
    '''
    # The path to all obs_id folders
    mast_path = f"{data_path}/mastDownload/HST/"
    try:
        # Check if mastDownload exists
        if not os.path.exists(mast_path):
            print(f"Directory {mast_path} doesn't exist.")
            return
        # Get a list of the obs_id paths in mastDownload
        obs_id_dirs = os.listdir(mast_path)
        # Iterate through each obs_id folder and move the files
        for obs_id in obs_id_dirs:
            obs_id_path = os.path.join(mast_path, obs_id)
            files = glob.glob(obs_id_path + "/*fits")
            for file in files:
                file_path = Path(file)
                new_path = data_path / file_path.name
                shutil.move(file, new_path)
        # Now we can remove the mastDownload directory
        if os.path.exists(mast_path):
            shutil.rmtree(f"{data_path}/mastDownload")
        # Now moving all coadd products to /data_path/products
        product_path = Path(f"{data_path}/products/")
        if not os.path.exists(product_path):
            print(f"Directory {product_path} doesn't exist.")
            return
        coadd_files = glob.glob(f"{data_path}/*cspec.fits")
        for file in coadd_files:
            file_path = Path(file)
            new_path = product_path / file_path.name
            shutil.move(file, new_path)
    except Exception as e:
        print(f"An error occurred: {e}")

Example 1: Two COS datasets rejected for different reasons#

1.1 Obtaining Data Products#

For this example, we will be looking at Program ID 12715, which observed four flux standard white dwarf stars with COS. We will use astroquery to download the calibrated and coadded datasets for this program. For a more in-depth tutorial on downloading this data, please check out the CoaddTutorial.ipynb notebook in this repository.

We will create a folder for the X1D and X1DSUM products, called ./12715, and a subfolder called products, which will store the coadded data. The log file for this coadd is currently not available for download on MAST, but is in this repository. It will be available for download in a future build. This log file is called HASP_12715.out

# Creating directories for our data and coadded products
datadir_ex1 = Path("./12715/")
productsdir_ex1 = Path("./12715/products/")

datadir_ex1.mkdir(exist_ok=True)
productsdir_ex1.mkdir(exist_ok=True)

Let’s download our datasets for this program by running the cell below:

# Querying and downloading calibrated products
query_ex1 = Observations.query_criteria(
    proposal_id=12715, 
    provenance_name="CALCOS"
)

prodlist_ex1 = Observations.get_product_list(
    query_ex1
)

prodlist_ex1 = Observations.filter_products(
    prodlist_ex1,
    project=["CALCOS"],
    productSubGroupDescription=["X1D", "X1DSUM"]
)

# Querying and downloading coadded products
query_ex1_coadds = Observations.query_criteria(
    proposal_id=12715, 
    provenance_name="HASP"
)

prodlist_ex1_coadds = Observations.get_product_list(
    query_ex1_coadds
)

prodlist_ex1_coadds = Observations.filter_products(
    prodlist_ex1_coadds, 
    productType="SCIENCE",
    productSubGroupDescription="CSPEC"
)

# Combining the two product lists
combined_ex1 = vstack([prodlist_ex1, prodlist_ex1_coadds])

# Downloading the products
Observations.download_products(
    combined_ex1,
    download_dir=str(datadir_ex1)
)

# Organizing the files 
consolidate_files(datadir_ex1)
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_gd71_g130m-g160m_lbui40_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_gd71_lbui/hst_12715_cos_gd71_g130m-g160m_lbui40_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_gd71_g130m-g160m_lbui41_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_gd71_lbui/hst_12715_cos_gd71_g130m-g160m_lbui41_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_gd71_g130m-g160m_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_gd71_lbui/hst_12715_cos_gd71_g130m-g160m_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_gd71_g130m_lbui40_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_gd71_lbui/hst_12715_cos_gd71_g130m_lbui40_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_gd71_g130m_lbui41_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_gd71_lbui/hst_12715_cos_gd71_g130m_lbui41_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_gd71_g130m_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_gd71_lbui/hst_12715_cos_gd71_g130m_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_gd71_g160m_lbui40_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_gd71_lbui/hst_12715_cos_gd71_g160m_lbui40_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_gd71_g160m_lbui41_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_gd71_lbui/hst_12715_cos_gd71_g160m_lbui41_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_gd71_g160m_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_gd71_lbui/hst_12715_cos_gd71_g160m_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui50_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0308-565_lbui/hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui50_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0308-565_lbui/hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0308-565_cg140l_lbui50_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0308-565_lbui/hst_12715_cos_wd0308-565_cg140l_lbui50_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0308-565_cg140l_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0308-565_lbui/hst_12715_cos_wd0308-565_cg140l_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0308-565_g130m_lbui50_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0308-565_lbui/hst_12715_cos_wd0308-565_g130m_lbui50_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0308-565_g130m_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0308-565_lbui/hst_12715_cos_wd0308-565_g130m_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0308-565_g160m_lbui50_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0308-565_lbui/hst_12715_cos_wd0308-565_g160m_lbui50_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0308-565_g160m_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0308-565_lbui/hst_12715_cos_wd0308-565_g160m_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui01_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui01_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui02_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui02_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui03_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui03_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui04_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui04_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui05_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui05_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui06_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui06_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui07_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui07_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui08_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui08_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui09_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui09_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui10_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui10_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui11_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui11_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui12_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui12_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui13_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui13_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui14_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui14_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l-g130m_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l-g130m_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui01_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui01_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui02_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui02_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui03_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui03_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui04_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui04_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui05_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui05_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui06_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui06_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui07_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui07_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui08_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui08_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui09_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui09_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui10_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui10_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui11_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui11_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui12_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui12_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui13_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui13_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui14_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui14_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_cg140l_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_cg140l_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui01_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui01_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui02_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui02_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui03_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui03_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui04_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui04_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui05_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui05_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui06_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui06_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui07_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui07_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui08_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui08_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui09_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui09_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui10_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui10_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui11_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui11_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui12_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui12_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui13_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui13_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui14_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui14_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd0947p857_g130m_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd0947p857_lbui/hst_12715_cos_wd0947p857_g130m_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui20_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui20_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui21_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui21_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui22_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui22_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui23_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui23_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui24_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui24_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui25_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui25_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui26_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui26_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui27_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui27_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui28_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui28_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui29_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui29_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_12715_cos_wd1057p719_g160m_lbui_cspec.fits to 12715/mastDownload/HST/hst_hasp_12715_cos_wd1057p719_lbui/hst_12715_cos_wd1057p719_g160m_lbui_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01010_x1dsum.fits to 12715/mastDownload/HST/lbui01010/lbui01010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01020_x1dsum.fits to 12715/mastDownload/HST/lbui01020/lbui01020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01030_x1dsum.fits to 12715/mastDownload/HST/lbui01030/lbui01030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01040_x1dsum.fits to 12715/mastDownload/HST/lbui01040/lbui01040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01050_x1dsum.fits to 12715/mastDownload/HST/lbui01050/lbui01050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01e7s_x1d.fits to 12715/mastDownload/HST/lbui01e7s/lbui01e7s_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01ebs_x1d.fits to 12715/mastDownload/HST/lbui01ebs/lbui01ebs_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01eds_x1d.fits to 12715/mastDownload/HST/lbui01eds/lbui01eds_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01efs_x1d.fits to 12715/mastDownload/HST/lbui01efs/lbui01efs_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui01ehs_x1d.fits to 12715/mastDownload/HST/lbui01ehs/lbui01ehs_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02010_x1dsum.fits to 12715/mastDownload/HST/lbui02010/lbui02010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02020_x1dsum.fits to 12715/mastDownload/HST/lbui02020/lbui02020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02030_x1dsum.fits to 12715/mastDownload/HST/lbui02030/lbui02030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02040_x1dsum.fits to 12715/mastDownload/HST/lbui02040/lbui02040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02050_x1dsum.fits to 12715/mastDownload/HST/lbui02050/lbui02050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02f1q_x1d.fits to 12715/mastDownload/HST/lbui02f1q/lbui02f1q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02f3q_x1d.fits to 12715/mastDownload/HST/lbui02f3q/lbui02f3q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02f5q_x1d.fits to 12715/mastDownload/HST/lbui02f5q/lbui02f5q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02f7q_x1d.fits to 12715/mastDownload/HST/lbui02f7q/lbui02f7q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui02f9q_x1d.fits to 12715/mastDownload/HST/lbui02f9q/lbui02f9q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03010_x1dsum.fits to 12715/mastDownload/HST/lbui03010/lbui03010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03020_x1dsum.fits to 12715/mastDownload/HST/lbui03020/lbui03020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03030_x1dsum.fits to 12715/mastDownload/HST/lbui03030/lbui03030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03040_x1dsum.fits to 12715/mastDownload/HST/lbui03040/lbui03040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03050_x1dsum.fits to 12715/mastDownload/HST/lbui03050/lbui03050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03m6q_x1d.fits to 12715/mastDownload/HST/lbui03m6q/lbui03m6q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03maq_x1d.fits to 12715/mastDownload/HST/lbui03maq/lbui03maq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03mkq_x1d.fits to 12715/mastDownload/HST/lbui03mkq/lbui03mkq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03mmq_x1d.fits to 12715/mastDownload/HST/lbui03mmq/lbui03mmq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui03mpq_x1d.fits to 12715/mastDownload/HST/lbui03mpq/lbui03mpq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04010_x1dsum.fits to 12715/mastDownload/HST/lbui04010/lbui04010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04020_x1dsum.fits to 12715/mastDownload/HST/lbui04020/lbui04020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04030_x1dsum.fits to 12715/mastDownload/HST/lbui04030/lbui04030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04040_x1dsum.fits to 12715/mastDownload/HST/lbui04040/lbui04040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04050_x1dsum.fits to 12715/mastDownload/HST/lbui04050/lbui04050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04m6q_x1d.fits to 12715/mastDownload/HST/lbui04m6q/lbui04m6q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04meq_x1d.fits to 12715/mastDownload/HST/lbui04meq/lbui04meq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04mhq_x1d.fits to 12715/mastDownload/HST/lbui04mhq/lbui04mhq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04mlq_x1d.fits to 12715/mastDownload/HST/lbui04mlq/lbui04mlq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui04mnq_x1d.fits to 12715/mastDownload/HST/lbui04mnq/lbui04mnq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05010_x1dsum.fits to 12715/mastDownload/HST/lbui05010/lbui05010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05020_x1dsum.fits to 12715/mastDownload/HST/lbui05020/lbui05020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05030_x1dsum.fits to 12715/mastDownload/HST/lbui05030/lbui05030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05040_x1dsum.fits to 12715/mastDownload/HST/lbui05040/lbui05040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05050_x1dsum.fits to 12715/mastDownload/HST/lbui05050/lbui05050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05aaq_x1d.fits to 12715/mastDownload/HST/lbui05aaq/lbui05aaq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05acq_x1d.fits to 12715/mastDownload/HST/lbui05acq/lbui05acq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05ajq_x1d.fits to 12715/mastDownload/HST/lbui05ajq/lbui05ajq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05amq_x1d.fits to 12715/mastDownload/HST/lbui05amq/lbui05amq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui05aoq_x1d.fits to 12715/mastDownload/HST/lbui05aoq/lbui05aoq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06010_x1dsum.fits to 12715/mastDownload/HST/lbui06010/lbui06010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06020_x1dsum.fits to 12715/mastDownload/HST/lbui06020/lbui06020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06030_x1dsum.fits to 12715/mastDownload/HST/lbui06030/lbui06030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06040_x1dsum.fits to 12715/mastDownload/HST/lbui06040/lbui06040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06050_x1dsum.fits to 12715/mastDownload/HST/lbui06050/lbui06050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06guq_x1d.fits to 12715/mastDownload/HST/lbui06guq/lbui06guq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06gyq_x1d.fits to 12715/mastDownload/HST/lbui06gyq/lbui06gyq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06h0q_x1d.fits to 12715/mastDownload/HST/lbui06h0q/lbui06h0q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06h2q_x1d.fits to 12715/mastDownload/HST/lbui06h2q/lbui06h2q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui06h4q_x1d.fits to 12715/mastDownload/HST/lbui06h4q/lbui06h4q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07010_x1dsum.fits to 12715/mastDownload/HST/lbui07010/lbui07010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07020_x1dsum.fits to 12715/mastDownload/HST/lbui07020/lbui07020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07030_x1dsum.fits to 12715/mastDownload/HST/lbui07030/lbui07030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07040_x1dsum.fits to 12715/mastDownload/HST/lbui07040/lbui07040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07050_x1dsum.fits to 12715/mastDownload/HST/lbui07050/lbui07050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07dkq_x1d.fits to 12715/mastDownload/HST/lbui07dkq/lbui07dkq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07dpq_x1d.fits to 12715/mastDownload/HST/lbui07dpq/lbui07dpq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07duq_x1d.fits to 12715/mastDownload/HST/lbui07duq/lbui07duq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07dwq_x1d.fits to 12715/mastDownload/HST/lbui07dwq/lbui07dwq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui07e2q_x1d.fits to 12715/mastDownload/HST/lbui07e2q/lbui07e2q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08010_x1dsum.fits to 12715/mastDownload/HST/lbui08010/lbui08010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08020_x1dsum.fits to 12715/mastDownload/HST/lbui08020/lbui08020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08030_x1dsum.fits to 12715/mastDownload/HST/lbui08030/lbui08030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08040_x1dsum.fits to 12715/mastDownload/HST/lbui08040/lbui08040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08050_x1dsum.fits to 12715/mastDownload/HST/lbui08050/lbui08050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08c6q_x1d.fits to 12715/mastDownload/HST/lbui08c6q/lbui08c6q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08coq_x1d.fits to 12715/mastDownload/HST/lbui08coq/lbui08coq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08ctq_x1d.fits to 12715/mastDownload/HST/lbui08ctq/lbui08ctq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08cvq_x1d.fits to 12715/mastDownload/HST/lbui08cvq/lbui08cvq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui08cxq_x1d.fits to 12715/mastDownload/HST/lbui08cxq/lbui08cxq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09010_x1dsum.fits to 12715/mastDownload/HST/lbui09010/lbui09010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09020_x1dsum.fits to 12715/mastDownload/HST/lbui09020/lbui09020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09030_x1dsum.fits to 12715/mastDownload/HST/lbui09030/lbui09030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09040_x1dsum.fits to 12715/mastDownload/HST/lbui09040/lbui09040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09050_x1dsum.fits to 12715/mastDownload/HST/lbui09050/lbui09050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09bgq_x1d.fits to 12715/mastDownload/HST/lbui09bgq/lbui09bgq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09bjq_x1d.fits to 12715/mastDownload/HST/lbui09bjq/lbui09bjq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09boq_x1d.fits to 12715/mastDownload/HST/lbui09boq/lbui09boq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09bqq_x1d.fits to 12715/mastDownload/HST/lbui09bqq/lbui09bqq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui09bsq_x1d.fits to 12715/mastDownload/HST/lbui09bsq/lbui09bsq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10010_x1dsum.fits to 12715/mastDownload/HST/lbui10010/lbui10010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10020_x1dsum.fits to 12715/mastDownload/HST/lbui10020/lbui10020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10030_x1dsum.fits to 12715/mastDownload/HST/lbui10030/lbui10030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10040_x1dsum.fits to 12715/mastDownload/HST/lbui10040/lbui10040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10050_x1dsum.fits to 12715/mastDownload/HST/lbui10050/lbui10050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10teq_x1d.fits to 12715/mastDownload/HST/lbui10teq/lbui10teq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10tgq_x1d.fits to 12715/mastDownload/HST/lbui10tgq/lbui10tgq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10tiq_x1d.fits to 12715/mastDownload/HST/lbui10tiq/lbui10tiq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10tkq_x1d.fits to 12715/mastDownload/HST/lbui10tkq/lbui10tkq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui10tmq_x1d.fits to 12715/mastDownload/HST/lbui10tmq/lbui10tmq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui11010_x1dsum.fits to 12715/mastDownload/HST/lbui11010/lbui11010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui11020_x1dsum.fits to 12715/mastDownload/HST/lbui11020/lbui11020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui11030_x1dsum.fits to 12715/mastDownload/HST/lbui11030/lbui11030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui11evq_x1d.fits to 12715/mastDownload/HST/lbui11evq/lbui11evq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui11f0q_x1d.fits to 12715/mastDownload/HST/lbui11f0q/lbui11f0q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui11f8q_x1d.fits to 12715/mastDownload/HST/lbui11f8q/lbui11f8q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui11faq_x1d.fits to 12715/mastDownload/HST/lbui11faq/lbui11faq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12010_x1dsum.fits to 12715/mastDownload/HST/lbui12010/lbui12010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12020_x1dsum.fits to 12715/mastDownload/HST/lbui12020/lbui12020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12030_x1dsum.fits to 12715/mastDownload/HST/lbui12030/lbui12030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12040_x1dsum.fits to 12715/mastDownload/HST/lbui12040/lbui12040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12050_x1dsum.fits to 12715/mastDownload/HST/lbui12050/lbui12050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12ycq_x1d.fits to 12715/mastDownload/HST/lbui12ycq/lbui12ycq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12ygq_x1d.fits to 12715/mastDownload/HST/lbui12ygq/lbui12ygq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12yiq_x1d.fits to 12715/mastDownload/HST/lbui12yiq/lbui12yiq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12ykq_x1d.fits to 12715/mastDownload/HST/lbui12ykq/lbui12ykq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui12ymq_x1d.fits to 12715/mastDownload/HST/lbui12ymq/lbui12ymq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13010_x1dsum.fits to 12715/mastDownload/HST/lbui13010/lbui13010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13020_x1dsum.fits to 12715/mastDownload/HST/lbui13020/lbui13020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13030_x1dsum.fits to 12715/mastDownload/HST/lbui13030/lbui13030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13040_x1dsum.fits to 12715/mastDownload/HST/lbui13040/lbui13040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13050_x1dsum.fits to 12715/mastDownload/HST/lbui13050/lbui13050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13jhq_x1d.fits to 12715/mastDownload/HST/lbui13jhq/lbui13jhq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13jmq_x1d.fits to 12715/mastDownload/HST/lbui13jmq/lbui13jmq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13joq_x1d.fits to 12715/mastDownload/HST/lbui13joq/lbui13joq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13jqq_x1d.fits to 12715/mastDownload/HST/lbui13jqq/lbui13jqq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui13jsq_x1d.fits to 12715/mastDownload/HST/lbui13jsq/lbui13jsq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14010_x1dsum.fits to 12715/mastDownload/HST/lbui14010/lbui14010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14020_x1dsum.fits to 12715/mastDownload/HST/lbui14020/lbui14020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14030_x1dsum.fits to 12715/mastDownload/HST/lbui14030/lbui14030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14040_x1dsum.fits to 12715/mastDownload/HST/lbui14040/lbui14040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14050_x1dsum.fits to 12715/mastDownload/HST/lbui14050/lbui14050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14hiq_x1d.fits to 12715/mastDownload/HST/lbui14hiq/lbui14hiq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14ibq_x1d.fits to 12715/mastDownload/HST/lbui14ibq/lbui14ibq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14idq_x1d.fits to 12715/mastDownload/HST/lbui14idq/lbui14idq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14igq_x1d.fits to 12715/mastDownload/HST/lbui14igq/lbui14igq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui14iiq_x1d.fits to 12715/mastDownload/HST/lbui14iiq/lbui14iiq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui20010_x1dsum.fits to 12715/mastDownload/HST/lbui20010/lbui20010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui20020_x1dsum.fits to 12715/mastDownload/HST/lbui20020/lbui20020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui20030_x1dsum.fits to 12715/mastDownload/HST/lbui20030/lbui20030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui20loq_x1d.fits to 12715/mastDownload/HST/lbui20loq/lbui20loq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui20lqq_x1d.fits to 12715/mastDownload/HST/lbui20lqq/lbui20lqq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui20lsq_x1d.fits to 12715/mastDownload/HST/lbui20lsq/lbui20lsq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui21010_x1dsum.fits to 12715/mastDownload/HST/lbui21010/lbui21010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui21020_x1dsum.fits to 12715/mastDownload/HST/lbui21020/lbui21020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui21030_x1dsum.fits to 12715/mastDownload/HST/lbui21030/lbui21030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui21fjq_x1d.fits to 12715/mastDownload/HST/lbui21fjq/lbui21fjq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui21fmq_x1d.fits to 12715/mastDownload/HST/lbui21fmq/lbui21fmq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui21fqq_x1d.fits to 12715/mastDownload/HST/lbui21fqq/lbui21fqq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui22010_x1dsum.fits to 12715/mastDownload/HST/lbui22010/lbui22010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui22020_x1dsum.fits to 12715/mastDownload/HST/lbui22020/lbui22020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui22030_x1dsum.fits to 12715/mastDownload/HST/lbui22030/lbui22030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui22lqq_x1d.fits to 12715/mastDownload/HST/lbui22lqq/lbui22lqq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui22lsq_x1d.fits to 12715/mastDownload/HST/lbui22lsq/lbui22lsq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui22luq_x1d.fits to 12715/mastDownload/HST/lbui22luq/lbui22luq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui23010_x1dsum.fits to 12715/mastDownload/HST/lbui23010/lbui23010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui23020_x1dsum.fits to 12715/mastDownload/HST/lbui23020/lbui23020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui23030_x1dsum.fits to 12715/mastDownload/HST/lbui23030/lbui23030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui23v5q_x1d.fits to 12715/mastDownload/HST/lbui23v5q/lbui23v5q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui23v7q_x1d.fits to 12715/mastDownload/HST/lbui23v7q/lbui23v7q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui23v9q_x1d.fits to 12715/mastDownload/HST/lbui23v9q/lbui23v9q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui24010_x1dsum.fits to 12715/mastDownload/HST/lbui24010/lbui24010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui24020_x1dsum.fits to 12715/mastDownload/HST/lbui24020/lbui24020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui24030_x1dsum.fits to 12715/mastDownload/HST/lbui24030/lbui24030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui24eaq_x1d.fits to 12715/mastDownload/HST/lbui24eaq/lbui24eaq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui24ecq_x1d.fits to 12715/mastDownload/HST/lbui24ecq/lbui24ecq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui24eeq_x1d.fits to 12715/mastDownload/HST/lbui24eeq/lbui24eeq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui25010_x1dsum.fits to 12715/mastDownload/HST/lbui25010/lbui25010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui25020_x1dsum.fits to 12715/mastDownload/HST/lbui25020/lbui25020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui25030_x1dsum.fits to 12715/mastDownload/HST/lbui25030/lbui25030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui25asq_x1d.fits to 12715/mastDownload/HST/lbui25asq/lbui25asq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui25auq_x1d.fits to 12715/mastDownload/HST/lbui25auq/lbui25auq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui25b3q_x1d.fits to 12715/mastDownload/HST/lbui25b3q/lbui25b3q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui26010_x1dsum.fits to 12715/mastDownload/HST/lbui26010/lbui26010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui26020_x1dsum.fits to 12715/mastDownload/HST/lbui26020/lbui26020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui26030_x1dsum.fits to 12715/mastDownload/HST/lbui26030/lbui26030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui26e7q_x1d.fits to 12715/mastDownload/HST/lbui26e7q/lbui26e7q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui26ebq_x1d.fits to 12715/mastDownload/HST/lbui26ebq/lbui26ebq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui26edq_x1d.fits to 12715/mastDownload/HST/lbui26edq/lbui26edq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui27010_x1dsum.fits to 12715/mastDownload/HST/lbui27010/lbui27010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui27020_x1dsum.fits to 12715/mastDownload/HST/lbui27020/lbui27020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui27030_x1dsum.fits to 12715/mastDownload/HST/lbui27030/lbui27030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui27g1q_x1d.fits to 12715/mastDownload/HST/lbui27g1q/lbui27g1q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui27g3q_x1d.fits to 12715/mastDownload/HST/lbui27g3q/lbui27g3q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui27g6q_x1d.fits to 12715/mastDownload/HST/lbui27g6q/lbui27g6q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui28010_x1dsum.fits to 12715/mastDownload/HST/lbui28010/lbui28010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui28020_x1dsum.fits to 12715/mastDownload/HST/lbui28020/lbui28020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui28030_x1dsum.fits to 12715/mastDownload/HST/lbui28030/lbui28030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui28c0q_x1d.fits to 12715/mastDownload/HST/lbui28c0q/lbui28c0q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui28c2q_x1d.fits to 12715/mastDownload/HST/lbui28c2q/lbui28c2q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui28c4q_x1d.fits to 12715/mastDownload/HST/lbui28c4q/lbui28c4q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui29010_x1dsum.fits to 12715/mastDownload/HST/lbui29010/lbui29010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui29020_x1dsum.fits to 12715/mastDownload/HST/lbui29020/lbui29020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui29030_x1dsum.fits to 12715/mastDownload/HST/lbui29030/lbui29030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui29gmq_x1d.fits to 12715/mastDownload/HST/lbui29gmq/lbui29gmq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui29goq_x1d.fits to 12715/mastDownload/HST/lbui29goq/lbui29goq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui29gqq_x1d.fits to 12715/mastDownload/HST/lbui29gqq/lbui29gqq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui40010_x1dsum.fits to 12715/mastDownload/HST/lbui40010/lbui40010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui40020_x1dsum.fits to 12715/mastDownload/HST/lbui40020/lbui40020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui40030_x1dsum.fits to 12715/mastDownload/HST/lbui40030/lbui40030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui40040_x1dsum.fits to 12715/mastDownload/HST/lbui40040/lbui40040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui40nfq_x1d.fits to 12715/mastDownload/HST/lbui40nfq/lbui40nfq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui40nhq_x1d.fits to 12715/mastDownload/HST/lbui40nhq/lbui40nhq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui40njq_x1d.fits to 12715/mastDownload/HST/lbui40njq/lbui40njq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui40nlq_x1d.fits to 12715/mastDownload/HST/lbui40nlq/lbui40nlq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui41010_x1dsum.fits to 12715/mastDownload/HST/lbui41010/lbui41010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui41020_x1dsum.fits to 12715/mastDownload/HST/lbui41020/lbui41020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui41030_x1dsum.fits to 12715/mastDownload/HST/lbui41030/lbui41030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui41040_x1dsum.fits to 12715/mastDownload/HST/lbui41040/lbui41040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui41i2q_x1d.fits to 12715/mastDownload/HST/lbui41i2q/lbui41i2q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui41i4q_x1d.fits to 12715/mastDownload/HST/lbui41i4q/lbui41i4q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui41i6q_x1d.fits to 12715/mastDownload/HST/lbui41i6q/lbui41i6q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui41i8q_x1d.fits to 12715/mastDownload/HST/lbui41i8q/lbui41i8q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50010_x1dsum.fits to 12715/mastDownload/HST/lbui50010/lbui50010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50020_x1dsum.fits to 12715/mastDownload/HST/lbui50020/lbui50020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50030_x1dsum.fits to 12715/mastDownload/HST/lbui50030/lbui50030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50040_x1dsum.fits to 12715/mastDownload/HST/lbui50040/lbui50040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50050_x1dsum.fits to 12715/mastDownload/HST/lbui50050/lbui50050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50060_x1dsum.fits to 12715/mastDownload/HST/lbui50060/lbui50060_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50070_x1dsum.fits to 12715/mastDownload/HST/lbui50070/lbui50070_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50080_x1dsum.fits to 12715/mastDownload/HST/lbui50080/lbui50080_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50090_x1dsum.fits to 12715/mastDownload/HST/lbui50090/lbui50090_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50qnq_x1d.fits to 12715/mastDownload/HST/lbui50qnq/lbui50qnq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50qpq_x1d.fits to 12715/mastDownload/HST/lbui50qpq/lbui50qpq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50qrq_x1d.fits to 12715/mastDownload/HST/lbui50qrq/lbui50qrq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50qtq_x1d.fits to 12715/mastDownload/HST/lbui50qtq/lbui50qtq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50qvq_x1d.fits to 12715/mastDownload/HST/lbui50qvq/lbui50qvq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50qzq_x1d.fits to 12715/mastDownload/HST/lbui50qzq/lbui50qzq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50r1q_x1d.fits to 12715/mastDownload/HST/lbui50r1q/lbui50r1q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50r3q_x1d.fits to 12715/mastDownload/HST/lbui50r3q/lbui50r3q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui50r5q_x1d.fits to 12715/mastDownload/HST/lbui50r5q/lbui50r5q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51010_x1dsum.fits to 12715/mastDownload/HST/lbui51010/lbui51010_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51020_x1dsum.fits to 12715/mastDownload/HST/lbui51020/lbui51020_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51030_x1dsum.fits to 12715/mastDownload/HST/lbui51030/lbui51030_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51040_x1dsum.fits to 12715/mastDownload/HST/lbui51040/lbui51040_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51050_x1dsum.fits to 12715/mastDownload/HST/lbui51050/lbui51050_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51060_x1dsum.fits to 12715/mastDownload/HST/lbui51060/lbui51060_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51070_x1dsum.fits to 12715/mastDownload/HST/lbui51070/lbui51070_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51080_x1dsum.fits to 12715/mastDownload/HST/lbui51080/lbui51080_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51090_x1dsum.fits to 12715/mastDownload/HST/lbui51090/lbui51090_x1dsum.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51l6q_x1d.fits to 12715/mastDownload/HST/lbui51l6q/lbui51l6q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51lcq_x1d.fits to 12715/mastDownload/HST/lbui51lcq/lbui51lcq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51lrq_x1d.fits to 12715/mastDownload/HST/lbui51lrq/lbui51lrq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51ltq_x1d.fits to 12715/mastDownload/HST/lbui51ltq/lbui51ltq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51lvq_x1d.fits to 12715/mastDownload/HST/lbui51lvq/lbui51lvq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51m5q_x1d.fits to 12715/mastDownload/HST/lbui51m5q/lbui51m5q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51m7q_x1d.fits to 12715/mastDownload/HST/lbui51m7q/lbui51m7q_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51mbq_x1d.fits to 12715/mastDownload/HST/lbui51mbq/lbui51mbq_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/lbui51mdq_x1d.fits to 12715/mastDownload/HST/lbui51mdq/lbui51mdq_x1d.fits ...
 [Done]

Now we will use glob to make a list of every X1D file available in MAST for this PID. We will print out a table of some table information on the program:

allfiles = glob.glob(os.path.join(datadir_ex1, '*_x1d.fits'))
print('rootname  target  visit  grating')

for x1d in sorted(allfiles):
    hdr0 = fits.getheader(x1d, ext=0)
    print(hdr0['rootname'], hdr0['targname'],
          hdr0['obset_id'], hdr0['opt_elem'])

print("-----------------------------------")
print(f"N files from MAST = {len(allfiles)}")
rootname  target  visit  grating
lbui01e7s WD0947+857 01 G140L
lbui01ebs WD0947+857 01 G140L
lbui01eds WD0947+857 01 G130M
lbui01efs WD0947+857 01 G130M
lbui01ehs WD0947+857 01 G130M
lbui02f1q WD0947+857 02 G140L
lbui02f3q WD0947+857 02 G140L
lbui02f5q WD0947+857 02 G130M
lbui02f7q WD0947+857 02 G130M
lbui02f9q WD0947+857 02 G130M
lbui03m6q WD0947+857 03 G140L
lbui03maq WD0947+857 03 G140L
lbui03mkq WD0947+857 03 G130M
lbui03mmq WD0947+857 03 G130M
lbui03mpq WD0947+857 03 G130M
lbui04m6q WD0947+857 04 G140L
lbui04meq WD0947+857 04 G140L
lbui04mhq WD0947+857 04 G130M
lbui04mlq WD0947+857 04 G130M
lbui04mnq WD0947+857 04 G130M
lbui05aaq WD0947+857 05 G140L
lbui05acq WD0947+857 05 G140L
lbui05ajq WD0947+857 05 G130M
lbui05amq WD0947+857 05 G130M
lbui05aoq WD0947+857 05 G130M
lbui06guq WD0947+857 06 G140L
lbui06gyq WD0947+857 06 G140L
lbui06h0q WD0947+857 06 G130M
lbui06h2q WD0947+857 06 G130M
lbui06h4q WD0947+857 06 G130M
lbui07dkq WD0947+857 07 G140L
lbui07dpq WD0947+857 07 G140L
lbui07duq WD0947+857 07 G130M
lbui07dwq WD0947+857 07 G130M
lbui07e2q WD0947+857 07 G130M
lbui08c6q WD0947+857 08 G140L
lbui08coq WD0947+857 08 G140L
lbui08ctq WD0947+857 08 G130M
lbui08cvq WD0947+857 08 G130M
lbui08cxq WD0947+857 08 G130M
lbui09bgq WD0947+857 09 G140L
lbui09bjq WD0947+857 09 G140L
lbui09boq WD0947+857 09 G130M
lbui09bqq WD0947+857 09 G130M
lbui09bsq WD0947+857 09 G130M
lbui10teq WD0947+857 10 G140L
lbui10tgq WD0947+857 10 G140L
lbui10tiq WD0947+857 10 G130M
lbui10tkq WD0947+857 10 G130M
lbui10tmq WD0947+857 10 G130M
lbui11evq WD0947+857 11 G140L
lbui11f0q WD0947+857 11 G140L
lbui11f8q WD0947+857 11 G130M
lbui11faq WD0947+857 11 G130M
lbui12ycq WD0947+857 12 G140L
lbui12ygq WD0947+857 12 G140L
lbui12yiq WD0947+857 12 G130M
lbui12ykq WD0947+857 12 G130M
lbui12ymq WD0947+857 12 G130M
lbui13jhq WD0947+857 13 G140L
lbui13jmq WD0947+857 13 G140L
lbui13joq WD0947+857 13 G130M
lbui13jqq WD0947+857 13 G130M
lbui13jsq WD0947+857 13 G130M
lbui14hiq WD0947+857 14 G140L
lbui14ibq WD0947+857 14 G140L
lbui14idq WD0947+857 14 G130M
lbui14igq WD0947+857 14 G130M
lbui14iiq WD0947+857 14 G130M
lbui20loq WD1057+719 20 G160M
lbui20lqq WD1057+719 20 G160M
lbui20lsq WD1057+719 20 G160M
lbui21fjq WD1057+719 21 G160M
lbui21fmq WD1057+719 21 G160M
lbui21fqq WD1057+719 21 G160M
lbui22lqq WD1057+719 22 G160M
lbui22lsq WD1057+719 22 G160M
lbui22luq WD1057+719 22 G160M
lbui23v5q WD1057+719 23 G160M
lbui23v7q WD1057+719 23 G160M
lbui23v9q WD1057+719 23 G160M
lbui24eaq WD1057+719 24 G160M
lbui24ecq WD1057+719 24 G160M
lbui24eeq WD1057+719 24 G160M
lbui25asq WD1057+719 25 G160M
lbui25auq WD1057+719 25 G160M
lbui25b3q WD1057+719 25 G160M
lbui26e7q WD1057+719 26 G160M
lbui26ebq WD1057+719 26 G160M
lbui26edq WD1057+719 26 G160M
lbui27g1q WD1057+719 27 G160M
lbui27g3q WD1057+719 27 G160M
lbui27g6q WD1057+719 27 G160M
lbui28c0q WD1057+719 28 G160M
lbui28c2q WD1057+719 28 G160M
lbui28c4q WD1057+719 28 G160M
lbui29gmq WD1057+719 29 G160M
lbui29goq WD1057+719 29 G160M
lbui29gqq WD1057+719 29 G160M
lbui40nfq GD71 40 G130M
lbui40nhq GD71 40 G160M
lbui40njq GD71 40 G160M
lbui40nlq GD71 40 G160M
lbui41i2q GD71 41 G130M
lbui41i4q GD71 41 G160M
lbui41i6q GD71 41 G160M
lbui41i8q GD71 41 G160M
lbui50qnq WD0308-565 50 G130M
lbui50qpq WD0308-565 50 G130M
lbui50qrq WD0308-565 50 G130M
lbui50qtq WD0308-565 50 G130M
lbui50qvq WD0308-565 50 G160M
lbui50qzq WD0308-565 50 G160M
lbui50r1q WD0308-565 50 G160M
lbui50r3q WD0308-565 50 G140L
lbui50r5q WD0308-565 50 G140L
lbui51l6q WD0308-565 51 G130M
lbui51lcq WD0308-565 51 G130M
lbui51lrq WD0308-565 51 G130M
lbui51ltq WD0308-565 51 G130M
lbui51lvq WD0308-565 51 G160M
lbui51m5q WD0308-565 51 G160M
lbui51m7q WD0308-565 51 G160M
lbui51mbq WD0308-565 51 G140L
lbui51mdq WD0308-565 51 G140L
-----------------------------------
N files from MAST = 125

1.2 Examining Output Logs and Headers#

Now lets open the coadd output log to see which files were used in the coadd.

# Set up path to the coadd log file
logfile = './logfiles/HASP_12715.out'

with open(logfile, 'r') as f:
    for line in f:
        print(line.strip())
Program_id = BUI, Proposal_id=12715
First cut: 125
With obsnums: 125
with times: 125
wht pdq_summary removed: 124
Number removed = 1
dataset archive_class  ... member_type  exptime
0    lbui01e7s           CAL  ...         NaN  250.016
1    lbui01ebs           CAL  ...         NaN  250.016
2    lbui01efs           CAL  ...         NaN  416.032
3    lbui02f1q           CAL  ...         NaN  250.016
4    lbui02f3q           CAL  ...         NaN  250.048
..         ...           ...  ...         ...      ...
120  lbui51lvq           CAL  ...         NaN  290.016
121  lbui51m5q           CAL  ...         NaN  346.048
122  lbui51m7q           CAL  ...         NaN  400.000
123  lbui51mbq           CAL  ...         NaN  280.032
124  lbui51mdq           CAL  ...         NaN  280.000

[124 rows x 10 columns]
with exclude removed: 124
Number removed = 0
124
File ./lbui51l6q_x1d.fits removed from products because FGSLOCK = FINE/GYRO
File ./lbui51lcq_x1d.fits removed from products because FGSLOCK = FINE/GYRO
File ./lbui51lrq_x1d.fits removed from products because FGSLOCK = FINE/GYRO
File ./lbui51ltq_x1d.fits removed from products because FGSLOCK = FINE/GYRO
File ./lbui51lvq_x1d.fits removed from products because FGSLOCK = FINE/GYRO
File ./lbui51m5q_x1d.fits removed from products because FGSLOCK = FINE/GYRO
File ./lbui51m7q_x1d.fits removed from products because FGSLOCK = FINE/GYRO
File ./lbui51mbq_x1d.fits removed from products because FGSLOCK = FINE/GYRO
File ./lbui51mdq_x1d.fits removed from products because FGSLOCK = FINE/GYRO
Creating list of unique modes from these files:
./lbui01e7s_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '01')
./lbui01ebs_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '01')
./lbui01eds_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '01')
./lbui01efs_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '01')
./lbui01ehs_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '01')
./lbui02f1q_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '02')
./lbui02f3q_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '02')
./lbui02f5q_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '02')
./lbui02f7q_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '02')
./lbui02f9q_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '02')
./lbui03m6q_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '03')
./lbui03maq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '03')
./lbui03mkq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '03')
./lbui03mmq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '03')
./lbui03mpq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '03')
./lbui04m6q_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '04')
./lbui04meq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '04')
./lbui04mhq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '04')
./lbui04mlq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '04')
./lbui04mnq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '04')
./lbui05aaq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '05')
./lbui05acq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '05')
./lbui05ajq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '05')
./lbui05amq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '05')
./lbui05aoq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '05')
./lbui06guq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '06')
./lbui06gyq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '06')
./lbui06h0q_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '06')
./lbui06h2q_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '06')
./lbui06h4q_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '06')
./lbui07dkq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '07')
./lbui07dpq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '07')
./lbui07duq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '07')
./lbui07dwq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '07')
./lbui07e2q_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '07')
./lbui08c6q_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '08')
./lbui08coq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '08')
./lbui08ctq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '08')
./lbui08cvq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '08')
./lbui08cxq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '08')
./lbui09bgq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '09')
./lbui09bjq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '09')
./lbui09boq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '09')
./lbui09bqq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '09')
./lbui09bsq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '09')
./lbui10teq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '10')
./lbui10tgq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '10')
./lbui10tiq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '10')
./lbui10tkq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '10')
./lbui10tmq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '10')
./lbui11evq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '11')
./lbui11f0q_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '11')
./lbui11f8q_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '11')
./lbui12ycq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '12')
./lbui12ygq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '12')
./lbui12yiq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '12')
./lbui12ykq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '12')
./lbui12ymq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '12')
./lbui13jhq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '13')
./lbui13jmq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '13')
./lbui13joq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '13')
./lbui13jqq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '13')
./lbui13jsq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '13')
./lbui14hiq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '14')
./lbui14ibq_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '14')
./lbui14idq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '14')
./lbui14igq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '14')
./lbui14iiq_x1d.fits WD0947+857 COS FUV G130M PSA 12715 (12715, '14')
./lbui20loq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '20')
./lbui20lqq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '20')
./lbui20lsq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '20')
./lbui21fjq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '21')
./lbui21fmq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '21')
./lbui21fqq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '21')
./lbui22lqq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '22')
./lbui22lsq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '22')
./lbui22luq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '22')
./lbui23v5q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '23')
./lbui23v7q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '23')
./lbui23v9q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '23')
./lbui24eaq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '24')
./lbui24ecq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '24')
./lbui24eeq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '24')
./lbui25asq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '25')
./lbui25auq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '25')
./lbui25b3q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '25')
./lbui26e7q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '26')
./lbui26ebq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '26')
./lbui26edq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '26')
./lbui27g1q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '27')
./lbui27g3q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '27')
./lbui27g6q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '27')
./lbui28c0q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '28')
./lbui28c2q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '28')
./lbui28c4q_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '28')
./lbui29gmq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '29')
./lbui29goq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '29')
./lbui29gqq_x1d.fits WD1057+719 COS FUV G160M PSA 12715 (12715, '29')
./lbui40nfq_x1d.fits GD71 COS FUV G130M PSA 12715 (12715, '40')
./lbui40nhq_x1d.fits GD71 COS FUV G160M PSA 12715 (12715, '40')
./lbui40njq_x1d.fits GD71 COS FUV G160M PSA 12715 (12715, '40')
./lbui40nlq_x1d.fits GD71 COS FUV G160M PSA 12715 (12715, '40')
./lbui41i2q_x1d.fits GD71 COS FUV G130M PSA 12715 (12715, '41')
./lbui41i4q_x1d.fits GD71 COS FUV G160M PSA 12715 (12715, '41')
./lbui41i6q_x1d.fits GD71 COS FUV G160M PSA 12715 (12715, '41')
./lbui41i8q_x1d.fits GD71 COS FUV G160M PSA 12715 (12715, '41')
./lbui50qnq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '50')
./lbui50qpq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '50')
./lbui50qrq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '50')
./lbui50qtq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '50')
./lbui50qvq_x1d.fits WD0308-565 COS FUV G160M PSA 12715 (12715, '50')
./lbui50qzq_x1d.fits WD0308-565 COS FUV G160M PSA 12715 (12715, '50')
./lbui50r1q_x1d.fits WD0308-565 COS FUV G160M PSA 12715 (12715, '50')
./lbui50r3q_x1d.fits WD0308-565 COS FUV G140L PSA 12715 (12715, '50')
./lbui50r5q_x1d.fits WD0308-565 COS FUV G140L PSA 12715 (12715, '50')
Looping over visits
Processing product (12715, '01')
Targets in visit (12715, '01'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '01')
Processing grating COS/G140L
Importing files ['./lbui01e7s_x1d.fits', './lbui01ebs_x1d.fits']
Processing file ./lbui01e7s_x1d.fits
Processing file ./lbui01ebs_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui01_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui01eds_x1d.fits', './lbui01efs_x1d.fits', './lbui01ehs_x1d.fits']
Processing file ./lbui01eds_x1d.fits
Processing file ./lbui01efs_x1d.fits
Processing file ./lbui01ehs_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui01_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.5-1467.7)
COS/G140L 901-2150 (Actual: 34.1-2375.3)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.4986837207214
Abutting COS/G140L product to current result
With a transition wavelength of 1467.6540696724526
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui01_cspec.fits
Processing product (12715, '02')
Targets in visit (12715, '02'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '02')
Processing grating COS/G140L
Importing files ['./lbui02f1q_x1d.fits', './lbui02f3q_x1d.fits']
Processing file ./lbui02f1q_x1d.fits
Processing file ./lbui02f3q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui02_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui02f5q_x1d.fits', './lbui02f7q_x1d.fits', './lbui02f9q_x1d.fits']
Processing file ./lbui02f5q_x1d.fits
Processing file ./lbui02f7q_x1d.fits
Processing file ./lbui02f9q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui02_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.5-1467.7)
COS/G140L 901-2150 (Actual: 34.1-2375.4)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.498564183308
Abutting COS/G140L product to current result
With a transition wavelength of 1467.7203062809126
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui02_cspec.fits
Processing product (12715, '03')
Targets in visit (12715, '03'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '03')
Processing grating COS/G140L
Importing files ['./lbui03m6q_x1d.fits', './lbui03maq_x1d.fits']
Processing file ./lbui03m6q_x1d.fits
Processing file ./lbui03maq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui03_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui03mkq_x1d.fits', './lbui03mmq_x1d.fits', './lbui03mpq_x1d.fits']
Processing file ./lbui03mkq_x1d.fits
Processing file ./lbui03mmq_x1d.fits
Processing file ./lbui03mpq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui03_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.5-1467.7)
COS/G140L 901-2150 (Actual: 33.8-2375.0)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.5381151555819
Abutting COS/G140L product to current result
With a transition wavelength of 1467.6603166607663
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui03_cspec.fits
Processing product (12715, '04')
Targets in visit (12715, '04'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '04')
Processing grating COS/G140L
Importing files ['./lbui04m6q_x1d.fits', './lbui04meq_x1d.fits']
Processing file ./lbui04m6q_x1d.fits
Processing file ./lbui04meq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui04_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui04mhq_x1d.fits', './lbui04mlq_x1d.fits', './lbui04mnq_x1d.fits']
Processing file ./lbui04mhq_x1d.fits
Processing file ./lbui04mlq_x1d.fits
Processing file ./lbui04mnq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui04_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.5-1467.5)
COS/G140L 901-2150 (Actual: 35.1-2376.2)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.547851151969
Abutting COS/G140L product to current result
With a transition wavelength of 1467.483752226618
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui04_cspec.fits
Processing product (12715, '05')
Targets in visit (12715, '05'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '05')
Processing grating COS/G140L
Importing files ['./lbui05aaq_x1d.fits', './lbui05acq_x1d.fits']
Processing file ./lbui05aaq_x1d.fits
Processing file ./lbui05acq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui05_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui05ajq_x1d.fits', './lbui05amq_x1d.fits', './lbui05aoq_x1d.fits']
Processing file ./lbui05ajq_x1d.fits
Processing file ./lbui05amq_x1d.fits
Processing file ./lbui05aoq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui05_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.6-1467.5)
COS/G140L 901-2150 (Actual: 33.6-2374.6)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.5776692230786
Abutting COS/G140L product to current result
With a transition wavelength of 1467.5007700759393
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui05_cspec.fits
Processing product (12715, '06')
Targets in visit (12715, '06'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '06')
Processing grating COS/G140L
Importing files ['./lbui06guq_x1d.fits', './lbui06gyq_x1d.fits']
Processing file ./lbui06guq_x1d.fits
Processing file ./lbui06gyq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui06_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui06h0q_x1d.fits', './lbui06h2q_x1d.fits', './lbui06h4q_x1d.fits']
Processing file ./lbui06h0q_x1d.fits
Processing file ./lbui06h2q_x1d.fits
Processing file ./lbui06h4q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui06_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.6-1467.5)
COS/G140L 901-2150 (Actual: 33.5-2374.6)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.5576320156147
Abutting COS/G140L product to current result
With a transition wavelength of 1467.4780648367832
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui06_cspec.fits
Processing product (12715, '07')
Targets in visit (12715, '07'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '07')
Processing grating COS/G140L
Importing files ['./lbui07dkq_x1d.fits', './lbui07dpq_x1d.fits']
Processing file ./lbui07dkq_x1d.fits
Processing file ./lbui07dpq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui07_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui07duq_x1d.fits', './lbui07dwq_x1d.fits', './lbui07e2q_x1d.fits']
Processing file ./lbui07duq_x1d.fits
Processing file ./lbui07dwq_x1d.fits
Processing file ./lbui07e2q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui07_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.5-1467.5)
COS/G140L 901-2150 (Actual: 33.5-2374.6)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.4877684786334
Abutting COS/G140L product to current result
With a transition wavelength of 1467.5062159578852
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui07_cspec.fits
Processing product (12715, '08')
Targets in visit (12715, '08'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '08')
Processing grating COS/G140L
Importing files ['./lbui08c6q_x1d.fits', './lbui08coq_x1d.fits']
Processing file ./lbui08c6q_x1d.fits
Processing file ./lbui08coq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui08_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui08ctq_x1d.fits', './lbui08cvq_x1d.fits', './lbui08cxq_x1d.fits']
Processing file ./lbui08ctq_x1d.fits
Processing file ./lbui08cvq_x1d.fits
Processing file ./lbui08cxq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui08_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.4-1467.5)
COS/G140L 901-2150 (Actual: 34.0-2375.0)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.3880144897362
Abutting COS/G140L product to current result
With a transition wavelength of 1467.5351131098173
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui08_cspec.fits
Processing product (12715, '09')
Targets in visit (12715, '09'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '09')
Processing grating COS/G140L
Importing files ['./lbui09bgq_x1d.fits', './lbui09bjq_x1d.fits']
Processing file ./lbui09bgq_x1d.fits
Processing file ./lbui09bjq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui09_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui09boq_x1d.fits', './lbui09bqq_x1d.fits', './lbui09bsq_x1d.fits']
Processing file ./lbui09boq_x1d.fits
Processing file ./lbui09bqq_x1d.fits
Processing file ./lbui09bsq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui09_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.4-1467.4)
COS/G140L 901-2150 (Actual: 34.0-2375.1)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.4278962806502
Abutting COS/G140L product to current result
With a transition wavelength of 1467.4252356102202
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui09_cspec.fits
Processing product (12715, '10')
Targets in visit (12715, '10'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '10')
Processing grating COS/G140L
Importing files ['./lbui10teq_x1d.fits', './lbui10tgq_x1d.fits']
Processing file ./lbui10teq_x1d.fits
Processing file ./lbui10tgq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui10_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui10tiq_x1d.fits', './lbui10tkq_x1d.fits', './lbui10tmq_x1d.fits']
Processing file ./lbui10tiq_x1d.fits
Processing file ./lbui10tkq_x1d.fits
Processing file ./lbui10tmq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui10_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.4-1467.6)
COS/G140L 901-2150 (Actual: 34.1-2375.2)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.3581509565943
Abutting COS/G140L product to current result
With a transition wavelength of 1467.5965314841196
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui10_cspec.fits
Processing product (12715, '11')
Targets in visit (12715, '11'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '11')
Processing grating COS/G140L
Importing files ['./lbui11evq_x1d.fits', './lbui11f0q_x1d.fits']
Processing file ./lbui11evq_x1d.fits
Processing file ./lbui11f0q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui11_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui11f8q_x1d.fits']
Processing file ./lbui11f8q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui11_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1154.9-1448.6)
COS/G140L 901-2150 (Actual: 33.6-2374.6)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1154.9215608022505
Abutting COS/G140L product to current result
With a transition wavelength of 1448.5946580897958
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui11_cspec.fits
Processing product (12715, '12')
Targets in visit (12715, '12'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '12')
Processing grating COS/G140L
Importing files ['./lbui12ycq_x1d.fits', './lbui12ygq_x1d.fits']
Processing file ./lbui12ycq_x1d.fits
Processing file ./lbui12ygq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui12_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui12yiq_x1d.fits', './lbui12ykq_x1d.fits', './lbui12ymq_x1d.fits']
Processing file ./lbui12yiq_x1d.fits
Processing file ./lbui12ykq_x1d.fits
Processing file ./lbui12ymq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui12_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.6-1467.6)
COS/G140L 901-2150 (Actual: 33.2-2374.3)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.6077681833322
Abutting COS/G140L product to current result
With a transition wavelength of 1467.5560323745499
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui12_cspec.fits
Processing product (12715, '13')
Targets in visit (12715, '13'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '13')
Processing grating COS/G140L
Importing files ['./lbui13jhq_x1d.fits', './lbui13jmq_x1d.fits']
Processing file ./lbui13jhq_x1d.fits
Processing file ./lbui13jmq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui13_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui13joq_x1d.fits', './lbui13jqq_x1d.fits', './lbui13jsq_x1d.fits']
Processing file ./lbui13joq_x1d.fits
Processing file ./lbui13jqq_x1d.fits
Processing file ./lbui13jsq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui13_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.5-1467.6)
COS/G140L 901-2150 (Actual: 35.1-2376.2)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.5081962902377
Abutting COS/G140L product to current result
With a transition wavelength of 1467.6203809122367
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui13_cspec.fits
Processing product (12715, '14')
Targets in visit (12715, '14'): ['WD0947+857']
Processing target WD0947+857 in visit (12715, '14')
Processing grating COS/G140L
Importing files ['./lbui14hiq_x1d.fits', './lbui14ibq_x1d.fits']
Processing file ./lbui14hiq_x1d.fits
Processing file ./lbui14ibq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui14_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui14idq_x1d.fits', './lbui14igq_x1d.fits', './lbui14iiq_x1d.fits']
Processing file ./lbui14idq_x1d.fits
Processing file ./lbui14igq_x1d.fits
Processing file ./lbui14iiq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui14_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.6-1467.7)
COS/G140L 901-2150 (Actual: 33.2-2374.4)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.5980637373593
Abutting COS/G140L product to current result
With a transition wavelength of 1467.6836376445524
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui14_cspec.fits
Processing product (12715, '20')
Targets in visit (12715, '20'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '20')
Processing grating COS/G160M
Importing files ['./lbui20loq_x1d.fits', './lbui20lqq_x1d.fits', './lbui20lsq_x1d.fits']
Processing file ./lbui20loq_x1d.fits
Processing file ./lbui20lqq_x1d.fits
Processing file ./lbui20lsq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui20_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '21')
Targets in visit (12715, '21'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '21')
Processing grating COS/G160M
Importing files ['./lbui21fjq_x1d.fits', './lbui21fmq_x1d.fits', './lbui21fqq_x1d.fits']
Processing file ./lbui21fjq_x1d.fits
Processing file ./lbui21fmq_x1d.fits
Processing file ./lbui21fqq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui21_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '22')
Targets in visit (12715, '22'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '22')
Processing grating COS/G160M
Importing files ['./lbui22lqq_x1d.fits', './lbui22lsq_x1d.fits', './lbui22luq_x1d.fits']
Processing file ./lbui22lqq_x1d.fits
Processing file ./lbui22lsq_x1d.fits
Processing file ./lbui22luq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui22_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '23')
Targets in visit (12715, '23'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '23')
Processing grating COS/G160M
Importing files ['./lbui23v5q_x1d.fits', './lbui23v7q_x1d.fits', './lbui23v9q_x1d.fits']
Processing file ./lbui23v5q_x1d.fits
Processing file ./lbui23v7q_x1d.fits
Processing file ./lbui23v9q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui23_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '24')
Targets in visit (12715, '24'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '24')
Processing grating COS/G160M
Importing files ['./lbui24eaq_x1d.fits', './lbui24ecq_x1d.fits', './lbui24eeq_x1d.fits']
Processing file ./lbui24eaq_x1d.fits
Processing file ./lbui24ecq_x1d.fits
Processing file ./lbui24eeq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui24_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '25')
Targets in visit (12715, '25'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '25')
Processing grating COS/G160M
Importing files ['./lbui25asq_x1d.fits', './lbui25auq_x1d.fits', './lbui25b3q_x1d.fits']
Processing file ./lbui25asq_x1d.fits
Processing file ./lbui25auq_x1d.fits
Processing file ./lbui25b3q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui25_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '26')
Targets in visit (12715, '26'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '26')
Processing grating COS/G160M
Importing files ['./lbui26e7q_x1d.fits', './lbui26ebq_x1d.fits', './lbui26edq_x1d.fits']
Processing file ./lbui26e7q_x1d.fits
Processing file ./lbui26ebq_x1d.fits
Processing file ./lbui26edq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui26_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '27')
Targets in visit (12715, '27'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '27')
Processing grating COS/G160M
Importing files ['./lbui27g1q_x1d.fits', './lbui27g3q_x1d.fits', './lbui27g6q_x1d.fits']
Processing file ./lbui27g1q_x1d.fits
Processing file ./lbui27g3q_x1d.fits
Processing file ./lbui27g6q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui27_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '28')
Targets in visit (12715, '28'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '28')
Processing grating COS/G160M
Importing files ['./lbui28c0q_x1d.fits', './lbui28c2q_x1d.fits', './lbui28c4q_x1d.fits']
Processing file ./lbui28c0q_x1d.fits
Processing file ./lbui28c2q_x1d.fits
Processing file ./lbui28c4q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui28_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '29')
Targets in visit (12715, '29'): ['WD1057+719']
Processing target WD1057+719 in visit (12715, '29')
Processing grating COS/G160M
Importing files ['./lbui29gmq_x1d.fits', './lbui29goq_x1d.fits', './lbui29gqq_x1d.fits']
Processing file ./lbui29gmq_x1d.fits
Processing file ./lbui29goq_x1d.fits
Processing file ./lbui29gqq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui29_cspec.fits
No need to make abutted product as only 1 grating
Processing product (12715, '40')
Targets in visit (12715, '40'): ['GD71']
Processing target GD71 in visit (12715, '40')
Processing grating COS/G130M
Importing files ['./lbui40nfq_x1d.fits']
Processing file ./lbui40nfq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_gd71_g130m_lbui40_cspec.fits
Processing grating COS/G160M
Importing files ['./lbui40nhq_x1d.fits', './lbui40njq_x1d.fits', './lbui40nlq_x1d.fits']
Processing file ./lbui40nhq_x1d.fits
Processing file ./lbui40njq_x1d.fits
Processing file ./lbui40nlq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_gd71_g160m_lbui40_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 943.0-1081.3)
COS/G160M 1342-1800 (Actual: 1578.9-1795.6)
Transition wavelengths tweaked
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G130M
Truncating current grating at 1081.259722284377
Abutting COS/G160M product to current result
With a transition wavelength of 1578.8540484236873
Truncating current grating at 1795.6416959897065
Wrote products/hst_12715_cos_gd71_g130m-g160m_lbui40_cspec.fits
Processing product (12715, '41')
Targets in visit (12715, '41'): ['GD71']
Processing target GD71 in visit (12715, '41')
Processing grating COS/G130M
Importing files ['./lbui41i2q_x1d.fits']
Processing file ./lbui41i2q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_gd71_g130m_lbui41_cspec.fits
Processing grating COS/G160M
Importing files ['./lbui41i4q_x1d.fits', './lbui41i6q_x1d.fits', './lbui41i8q_x1d.fits']
Processing file ./lbui41i4q_x1d.fits
Processing file ./lbui41i6q_x1d.fits
Processing file ./lbui41i8q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_gd71_g160m_lbui41_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 943.0-1081.2)
COS/G160M 1342-1800 (Actual: 1578.9-1795.8)
Transition wavelengths tweaked
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G130M
Truncating current grating at 1081.228606175206
Abutting COS/G160M product to current result
With a transition wavelength of 1578.9028912144222
Truncating current grating at 1795.7865830504902
Wrote products/hst_12715_cos_gd71_g130m-g160m_lbui41_cspec.fits
Processing product (12715, '50')
Targets in visit (12715, '50'): ['WD0308-565']
Processing target WD0308-565 in visit (12715, '50')
Processing grating COS/G130M
Importing files ['./lbui50qnq_x1d.fits', './lbui50qpq_x1d.fits', './lbui50qrq_x1d.fits', './lbui50qtq_x1d.fits']
Processing file ./lbui50qnq_x1d.fits
Processing file ./lbui50qpq_x1d.fits
Processing file ./lbui50qrq_x1d.fits
Processing file ./lbui50qtq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0308-565_g130m_lbui50_cspec.fits
Processing grating COS/G160M
Importing files ['./lbui50qvq_x1d.fits', './lbui50qzq_x1d.fits', './lbui50r1q_x1d.fits']
Processing file ./lbui50qvq_x1d.fits
Processing file ./lbui50qzq_x1d.fits
Processing file ./lbui50r1q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0308-565_g160m_lbui50_cspec.fits
Processing grating COS/G140L
Importing files ['./lbui50r3q_x1d.fits', './lbui50r5q_x1d.fits']
Processing file ./lbui50r3q_x1d.fits
Processing file ./lbui50r5q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0308-565_cg140l_lbui50_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1068.7-1467.5)
COS/G160M 1342-1800 (Actual: 1387.8-1795.6)
COS/G140L 901-2150 (Actual: 53.7-2395.3)
Transition wavelengths tweaked
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1068.7117229613373
Abutting COS/G160M product to current result
With a transition wavelength of 1467.5089693384982
Abutting COS/G140L product to current result
With a transition wavelength of 1795.607693776611
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui50_cspec.fits
Looping over proposals
Processing product 12715
Targets in proposal 12715: ['WD0947+857', 'WD1057+719', 'GD71', 'WD0308-565']
Processing target WD0947+857 in proposal 12715
Processing grating COS/G140L
Importing files ['./lbui01e7s_x1d.fits', './lbui01ebs_x1d.fits', './lbui02f1q_x1d.fits', './lbui02f3q_x1d.fits', './lbui03m6q_x1d.fits', './lbui03maq_x1d.fits', './lbui04m6q_x1d.fits', './lbui04meq_x1d.fits', './lbui05aaq_x1d.fits', './lbui05acq_x1d.fits', './lbui06guq_x1d.fits', './lbui06gyq_x1d.fits', './lbui07dkq_x1d.fits', './lbui07dpq_x1d.fits', './lbui08c6q_x1d.fits', './lbui08coq_x1d.fits', './lbui09bgq_x1d.fits', './lbui09bjq_x1d.fits', './lbui10teq_x1d.fits', './lbui10tgq_x1d.fits', './lbui11evq_x1d.fits', './lbui11f0q_x1d.fits', './lbui12ycq_x1d.fits', './lbui12ygq_x1d.fits', './lbui13jhq_x1d.fits', './lbui13jmq_x1d.fits', './lbui14hiq_x1d.fits', './lbui14ibq_x1d.fits']
Processing file ./lbui01e7s_x1d.fits
Processing file ./lbui01ebs_x1d.fits
Processing file ./lbui02f1q_x1d.fits
Processing file ./lbui02f3q_x1d.fits
Processing file ./lbui03m6q_x1d.fits
Processing file ./lbui03maq_x1d.fits
Processing file ./lbui04m6q_x1d.fits
Processing file ./lbui04meq_x1d.fits
Processing file ./lbui05aaq_x1d.fits
Processing file ./lbui05acq_x1d.fits
Processing file ./lbui06guq_x1d.fits
Processing file ./lbui06gyq_x1d.fits
Processing file ./lbui07dkq_x1d.fits
Processing file ./lbui07dpq_x1d.fits
Processing file ./lbui08c6q_x1d.fits
Processing file ./lbui08coq_x1d.fits
Processing file ./lbui09bgq_x1d.fits
Processing file ./lbui09bjq_x1d.fits
Processing file ./lbui10teq_x1d.fits
Processing file ./lbui10tgq_x1d.fits
Processing file ./lbui11evq_x1d.fits
Processing file ./lbui11f0q_x1d.fits
Processing file ./lbui12ycq_x1d.fits
Processing file ./lbui12ygq_x1d.fits
Processing file ./lbui13jhq_x1d.fits
Processing file ./lbui13jmq_x1d.fits
Processing file ./lbui14hiq_x1d.fits
Processing file ./lbui14ibq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_cg140l_lbui_cspec.fits
Processing grating COS/G130M
Importing files ['./lbui01eds_x1d.fits', './lbui01efs_x1d.fits', './lbui01ehs_x1d.fits', './lbui02f5q_x1d.fits', './lbui02f7q_x1d.fits', './lbui02f9q_x1d.fits', './lbui03mkq_x1d.fits', './lbui03mmq_x1d.fits', './lbui03mpq_x1d.fits', './lbui04mhq_x1d.fits', './lbui04mlq_x1d.fits', './lbui04mnq_x1d.fits', './lbui05ajq_x1d.fits', './lbui05amq_x1d.fits', './lbui05aoq_x1d.fits', './lbui06h0q_x1d.fits', './lbui06h2q_x1d.fits', './lbui06h4q_x1d.fits', './lbui07duq_x1d.fits', './lbui07dwq_x1d.fits', './lbui07e2q_x1d.fits', './lbui08ctq_x1d.fits', './lbui08cvq_x1d.fits', './lbui08cxq_x1d.fits', './lbui09boq_x1d.fits', './lbui09bqq_x1d.fits', './lbui09bsq_x1d.fits', './lbui10tiq_x1d.fits', './lbui10tkq_x1d.fits', './lbui10tmq_x1d.fits', './lbui11f8q_x1d.fits', './lbui12yiq_x1d.fits', './lbui12ykq_x1d.fits', './lbui12ymq_x1d.fits', './lbui13joq_x1d.fits', './lbui13jqq_x1d.fits', './lbui13jsq_x1d.fits', './lbui14idq_x1d.fits', './lbui14igq_x1d.fits', './lbui14iiq_x1d.fits']
Processing file ./lbui01eds_x1d.fits
Processing file ./lbui01efs_x1d.fits
Processing file ./lbui01ehs_x1d.fits
Processing file ./lbui02f5q_x1d.fits
Processing file ./lbui02f7q_x1d.fits
Processing file ./lbui02f9q_x1d.fits
Processing file ./lbui03mkq_x1d.fits
Processing file ./lbui03mmq_x1d.fits
Processing file ./lbui03mpq_x1d.fits
Processing file ./lbui04mhq_x1d.fits
Processing file ./lbui04mlq_x1d.fits
Processing file ./lbui04mnq_x1d.fits
Processing file ./lbui05ajq_x1d.fits
Processing file ./lbui05amq_x1d.fits
Processing file ./lbui05aoq_x1d.fits
Processing file ./lbui06h0q_x1d.fits
Processing file ./lbui06h2q_x1d.fits
Processing file ./lbui06h4q_x1d.fits
Processing file ./lbui07duq_x1d.fits
Processing file ./lbui07dwq_x1d.fits
Processing file ./lbui07e2q_x1d.fits
Processing file ./lbui08ctq_x1d.fits
Processing file ./lbui08cvq_x1d.fits
Processing file ./lbui08cxq_x1d.fits
Processing file ./lbui09boq_x1d.fits
Processing file ./lbui09bqq_x1d.fits
Processing file ./lbui09bsq_x1d.fits
Processing file ./lbui10tiq_x1d.fits
Processing file ./lbui10tkq_x1d.fits
Processing file ./lbui10tmq_x1d.fits
Processing file ./lbui11f8q_x1d.fits
Processing file ./lbui12yiq_x1d.fits
Processing file ./lbui12ykq_x1d.fits
Processing file ./lbui12ymq_x1d.fits
Processing file ./lbui13joq_x1d.fits
Processing file ./lbui13jqq_x1d.fits
Processing file ./lbui13jsq_x1d.fits
Processing file ./lbui14idq_x1d.fits
Processing file ./lbui14igq_x1d.fits
Processing file ./lbui14iiq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0947+857_g130m_lbui_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1135.4-1467.7)
COS/G140L 901-2150 (Actual: 33.2-2376.2)
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1135.3590639704264
Abutting COS/G140L product to current result
With a transition wavelength of 1467.7238795476
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0947+857_cg140l-g130m_lbui_cspec.fits
Processing target WD1057+719 in proposal 12715
Processing grating COS/G160M
Importing files ['./lbui20loq_x1d.fits', './lbui20lqq_x1d.fits', './lbui20lsq_x1d.fits', './lbui21fjq_x1d.fits', './lbui21fmq_x1d.fits', './lbui21fqq_x1d.fits', './lbui22lqq_x1d.fits', './lbui22lsq_x1d.fits', './lbui22luq_x1d.fits', './lbui23v5q_x1d.fits', './lbui23v7q_x1d.fits', './lbui23v9q_x1d.fits', './lbui24eaq_x1d.fits', './lbui24ecq_x1d.fits', './lbui24eeq_x1d.fits', './lbui25asq_x1d.fits', './lbui25auq_x1d.fits', './lbui25b3q_x1d.fits', './lbui26e7q_x1d.fits', './lbui26ebq_x1d.fits', './lbui26edq_x1d.fits', './lbui27g1q_x1d.fits', './lbui27g3q_x1d.fits', './lbui27g6q_x1d.fits', './lbui28c0q_x1d.fits', './lbui28c2q_x1d.fits', './lbui28c4q_x1d.fits', './lbui29gmq_x1d.fits', './lbui29goq_x1d.fits', './lbui29gqq_x1d.fits']
Processing file ./lbui20loq_x1d.fits
Processing file ./lbui20lqq_x1d.fits
Processing file ./lbui20lsq_x1d.fits
Processing file ./lbui21fjq_x1d.fits
Processing file ./lbui21fmq_x1d.fits
Processing file ./lbui21fqq_x1d.fits
Processing file ./lbui22lqq_x1d.fits
Processing file ./lbui22lsq_x1d.fits
Processing file ./lbui22luq_x1d.fits
Processing file ./lbui23v5q_x1d.fits
Processing file ./lbui23v7q_x1d.fits
Processing file ./lbui23v9q_x1d.fits
Processing file ./lbui24eaq_x1d.fits
Processing file ./lbui24ecq_x1d.fits
Processing file ./lbui24eeq_x1d.fits
Processing file ./lbui25asq_x1d.fits
Processing file ./lbui25auq_x1d.fits
Processing file ./lbui25b3q_x1d.fits
Processing file ./lbui26e7q_x1d.fits
Processing file ./lbui26ebq_x1d.fits
Processing file ./lbui26edq_x1d.fits
Processing file ./lbui27g1q_x1d.fits
Processing file ./lbui27g3q_x1d.fits
Processing file ./lbui27g6q_x1d.fits
Processing file ./lbui28c0q_x1d.fits
Processing file ./lbui28c2q_x1d.fits
Processing file ./lbui28c4q_x1d.fits
Processing file ./lbui29gmq_x1d.fits
Processing file ./lbui29goq_x1d.fits
Processing file ./lbui29gqq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd1057+719_g160m_lbui_cspec.fits
No need to make abutted product as only 1 grating
Processing target GD71 in proposal 12715
Processing grating COS/G130M
Importing files ['./lbui40nfq_x1d.fits', './lbui41i2q_x1d.fits']
Processing file ./lbui40nfq_x1d.fits
Processing file ./lbui41i2q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_gd71_g130m_lbui_cspec.fits
Processing grating COS/G160M
Importing files ['./lbui40nhq_x1d.fits', './lbui40njq_x1d.fits', './lbui40nlq_x1d.fits', './lbui41i4q_x1d.fits', './lbui41i6q_x1d.fits', './lbui41i8q_x1d.fits']
Processing file ./lbui40nhq_x1d.fits
Processing file ./lbui40njq_x1d.fits
Processing file ./lbui40nlq_x1d.fits
Processing file ./lbui41i4q_x1d.fits
Processing file ./lbui41i6q_x1d.fits
Processing file ./lbui41i8q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_gd71_g160m_lbui_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 943.0-1081.3)
COS/G160M 1342-1800 (Actual: 1578.9-1795.8)
Transition wavelengths tweaked
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G130M
Truncating current grating at 1081.259722284377
Abutting COS/G160M product to current result
With a transition wavelength of 1578.8540484236873
Truncating current grating at 1795.7886789701456
Wrote products/hst_12715_cos_gd71_g130m-g160m_lbui_cspec.fits
Processing target WD0308-565 in proposal 12715
Processing grating COS/G130M
Importing files ['./lbui50qnq_x1d.fits', './lbui50qpq_x1d.fits', './lbui50qrq_x1d.fits', './lbui50qtq_x1d.fits']
Processing file ./lbui50qnq_x1d.fits
Processing file ./lbui50qpq_x1d.fits
Processing file ./lbui50qrq_x1d.fits
Processing file ./lbui50qtq_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0308-565_g130m_lbui_cspec.fits
Processing grating COS/G160M
Importing files ['./lbui50qvq_x1d.fits', './lbui50qzq_x1d.fits', './lbui50r1q_x1d.fits']
Processing file ./lbui50qvq_x1d.fits
Processing file ./lbui50qzq_x1d.fits
Processing file ./lbui50r1q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0308-565_g160m_lbui_cspec.fits
Processing grating COS/G140L
Importing files ['./lbui50r3q_x1d.fits', './lbui50r5q_x1d.fits']
Processing file ./lbui50r3q_x1d.fits
Processing file ./lbui50r5q_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
Wrote products/hst_12715_cos_wd0308-565_cg140l_lbui_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1068.7-1467.5)
COS/G160M 1342-1800 (Actual: 1387.8-1795.6)
COS/G140L 901-2150 (Actual: 53.7-2395.3)
Transition wavelengths tweaked
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1068.7117229613373
Abutting COS/G160M product to current result
With a transition wavelength of 1467.5089693384982
Abutting COS/G140L product to current result
With a transition wavelength of 1795.607693776611
Truncating current grating at 2150
Wrote products/hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui_cspec.fits

As stated in the introduction, files can be removed from the co-added products in three steps. First, some files are excluded via a MAST archive query before they are even fed into coadd. Everything in the log file above the line that says [124 rows x 10 columns] is output from this query. So, in this example, we can see that 124 of the 125 files from MAST were fed into the coadd script. The rest of the log file gives the output from coadd itself. Unlike the MAST query, the coadd script will print a note when a file is removed, giving both the filename and the reason. Typically, data with observing issues are removed by the MAST query, while observation or target parameter issues are removed in coadd. Looking through the log file, we can see 9 other files were removed by coadd in this program:

File ./lbui51l6q_x1d.fits removed from products because FGSLOCK = FINE/GYRO 
File ./lbui51lcq_x1d.fits removed from products because FGSLOCK = FINE/GYRO 
File ./lbui51lrq_x1d.fits removed from products because FGSLOCK = FINE/GYRO 
File ./lbui51ltq_x1d.fits removed from products because FGSLOCK = FINE/GYRO 
File ./lbui51lvq_x1d.fits removed from products because FGSLOCK = FINE/GYRO 
File ./lbui51m5q_x1d.fits removed from products because FGSLOCK = FINE/GYRO 
File ./lbui51m7q_x1d.fits removed from products because FGSLOCK = FINE/GYRO 
File ./lbui51mbq_x1d.fits removed from products because FGSLOCK = FINE/GYRO 
File ./lbui51mdq_x1d.fits removed from products because FGSLOCK = FINE/GYR0 

This program does not have any data that is removed by the coadd flux checker. If a dataset is removed, it will be printed with lines such as:

Using a maximum SNR of 20 in flux-based filtering \
Segment #1 from file ./lede16w8q_x1d.fits has scaled median = -54.04932196288165 \
Removing file ./lede16w8q_x1d.fits from product

Next, we will write a function to parse the output logs and return lists of the files that were rejected.

def find_rejects(logpath, pid, listofallfiles):
    """
    This function parses the coadd output log file to make a list of files that
    were input to the coadd script. The function uses the PID to find the lines
    that are listed like so in the log file:
        Creating list of unique modes from these files:
        ./lbui01e7s_x1d.fits WD0947+857 COS FUV G140L PSA 12715 (12715, '01')
        ...
        ./lbui50r5q_x1d.fits WD0308-565 COS FUV G140L PSA 12715 (12715, '50')
    Then, it compares that to the list of every file from the program that you
    download from MAST. The difference in the two lists are the rejected files.

    It looks through the log for files that were rejected by the flux checker.
    This searches for lines that are printed like so in the log file:
        Removing file ./lede16w8q_x1d.fits from product
    Because a file can be removed more than once in the creation of different
    level data products, the list returned will only include unique entries.

    Args:
        logname (string): Path to the coadd output log file
        pid (string): Proposal ID of the program
        listofallfiles (list of strings): list of every path+filename program

    Returns:
        prerejectedfiles (list of str): list of files rejected by MAST query
                                        or coadd before computations began
        fluxrejectedfiles (list of str): list of files rejected by flux checker
    """

    # Open output log and make a list of rootnames that were used in the coadd
    # Also search for rootnames that were rejected by the flux checker
    with open(logpath, 'r') as f:
        lines = f.readlines()
    coaddedfiles = []
    fluxrejectedfiles = []
    for line in lines:
        if ('./' in line.strip()) and (pid in line.strip()):
            coaddedfiles.append(line.split()[0].split('/')[1])
        if 'Removing file' in line.strip():
            fluxrejectedfiles.append(line.split()[2].split('/')[1])

    # Compare coadd list against list of all files in PID downloaded from MAST
    prerejectedfiles = []
    for filepath in listofallfiles:
        root = filepath.split('/')[-1]
        if root not in coaddedfiles:
            prerejectedfiles.append(root)

    return prerejectedfiles, np.unique(fluxrejectedfiles)
# Run find_rejects and print the output
listofprerejects, listoffluxrejects = find_rejects(logfile, '12715', allfiles)
print('Files removed before co-addition:')
[print(f"{file}") for file in sorted(listofprerejects)]
print(f'Files removed by flux checker: {sorted(listoffluxrejects)}')
print(f'Number of files removed before co-addition = {len(listofprerejects)}')
print(f'Number of files removed by flux checker = {len(listoffluxrejects)}')
Files removed before co-addition:
lbui11faq_x1d.fits
lbui51l6q_x1d.fits
lbui51lcq_x1d.fits
lbui51lrq_x1d.fits
lbui51ltq_x1d.fits
lbui51lvq_x1d.fits
lbui51m5q_x1d.fits
lbui51m7q_x1d.fits
lbui51mbq_x1d.fits
lbui51mdq_x1d.fits
Files removed by flux checker: []
Number of files removed before co-addition = 10
Number of files removed by flux checker = 0

We can see 10 files were removed before the co-addition computations were started, and none were removed during the run by the flux checker. We already knew the files in Visit 51 were removed by coadd (and why) by looking at the output log above. The file from Visit 11 (lbui11faq_x1d.fits) was removed by the MAST query, but we are not given a reason in the log. We can investigate the rejections from both visits further by inspecting the header keywords of the input spectra.

In the following cell, we make a function to read the file headers for each input spectrum. Most of the reasons for rejection that are listed in the Introduction section can be found either in the primary or first extension headers. This function can be used to inspect both COS and STIS extracted data, both x1d or sx1 files. Note that some keywords, such as those describing the offset patterns, are only included in STIS files.

There are a few other keywords not listed in the Introduction that are useful to assess as well. These include the quality comments (QUALCOM1, QUALCOM2, QUALCOM3), the file date (DATE), and calibration software version (CAL_VER).

The quality comments can hold information about the quality of a dataset. For example, they may have phrases like Guide star acquisition failed. Actual guide mode is gyro or COS internal shutter closed. No counts in exposure. If there is nothing to note for the dataset, the quality comments will be blank, but note that sometimes this can be inaccurate, as it relies on PIs to file problem reports. For STIS, these keys are in the x1d or sx1 file headers. For COS, they are located in the x1dsum files that CalCOS creates, which are the sum of FP-POS exposures for a given observing mode in each visit. While these keywords do exist in COS x1d files, they will only be populated with comments in the x1dsums. To find the x1dsum file for these observations, we can use the ASN_ID keyword from the x1ds.

The date the file was written and the version of the software used for calibration are useful for finding datasets that are archived “statically” in MAST, meaning they are always excluded from re-calibration because doing so will crash the latest versions of the calibration pipeline. There are only a handful of statically archived datasets for COS and STIS. The reasons they need to be designated as such are usually due to detector or spacecraft issues that need very specialized processing, and this is not always captured in the quality comments. Therefore, we do not recommend using these datasets in co-adds.

def readheaders(prerejectedfiles, datadir):
    """
    This function goes through a list of the pre-rejected files and prints the 
    x1d header information about data quality. Some of these quality comments 
    can describe issues that might have occured during the observation. 
    Args:
        prerejectedfiles (list of strings): list of rejected filenames
        datadir (str): path to x1d/sx1/x1dsum files
    """

    for badfile in sorted(prerejectedfiles):
        badfilepath = os.path.join(datadir, badfile)
        print(badfilepath)
        # Open the 0th and 1st ext. headers to get data quality info
        hdr0 = fits.getheader(badfilepath, ext=0)
        hdr1 = fits.getheader(badfilepath, ext=1)

        # Note that header keywords differ between COS and STIS
        ins = hdr0['INSTRUME']

        # print lots of keywords
        print(f"Exposure time = {hdr1['EXPTIME']}")
        # These keywords doesn't exist in STIS data
        if ins == 'COS':
            print(f"Planned exposure time = {hdr1['PLANTIME']}")
            print(f"Shutter = {hdr0['SHUTTER']}")
        print(f"Aperture used = {hdr0['APERTURE']}")
        print(f"Grating used = {hdr0['OPT_ELEM']}")
        print(f"Exposure flag = {hdr1['EXPFLAG']}")
        print(f"Fine guiding lock = {hdr1['FGSLOCK']}")
        print(f"POSTARG1 / POSTARG2 = {hdr0['POSTARG1']} / {hdr0['POSTARG2']}")
        # These keywords are not present in COS x1d data
        if ins == 'STIS':
            print(f"Offset pattern = {hdr0['PATTERN1']}")
            print(f"P1 frame = {hdr0['P1_FRAME']}")
            print(f"P1 purpose = {hdr0['P1_PURPS']}")
            print('Quality comments')
            print(f"    COM1 = {hdr0['QUALCOM1']}")
            print(f"    COM2 = {hdr0['QUALCOM2']}")
            print(f"    COM3 = {hdr0['QUALCOM3']}")
        # Find the x1dsum for the COS data to get the quality comments
        if ins == 'COS':
            asn_id = hdr0['ASN_ID']
            x1dsum = os.path.join(datadir, asn_id.lower() + '_x1dsum.fits')
            if os.path.isfile(x1dsum):
                print(f'Quality comments from {x1dsum}')
                print('    COM1 = ' + fits.getval(x1dsum, 'QUALCOM1', ext=0))
                print('    COM2 = ' + fits.getval(x1dsum, 'QUALCOM2', ext=0))
                print('    COM3 = ' + fits.getval(x1dsum, 'QUALCOM3', ext=0))
            else:
                print('Quality comments: No x1dsum available')
        if hdr0['MTFLAG'] != 'T':
            print('Moving target? No')
        else:
            print('Moving target? Yes')
        print(f"Date file was written = {hdr0['DATE']}")
        print(f"Version of calibration software = {hdr0['OPUS_VER']}")
        print('')
        print('')
readheaders(listofprerejects, datadir_ex1)
12715/lbui11faq_x1d.fits
Exposure time = 415.6800231933594
Planned exposure time = 416.0
Shutter = Open
Aperture used = PSA
Grating used = G130M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments: No x1dsum available
Moving target? No
Date file was written = 2012-05-02
Version of calibration software = OPUS 2012_1


12715/lbui51l6q_x1d.fits
Exposure time = 226.016
Planned exposure time = 226.0
Shutter = Open
Aperture used = PSA
Grating used = G130M
Exposure flag = NORMAL
Fine guiding lock = FINE/GYRO
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments from 12715/lbui51010_x1dsum.fits
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-01-20
Version of calibration software = HSTDP 2022_3


12715/lbui51lcq_x1d.fits
Exposure time = 244.0
Planned exposure time = 244.0
Shutter = Open
Aperture used = PSA
Grating used = G130M
Exposure flag = NORMAL
Fine guiding lock = FINE/GYRO
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments from 12715/lbui51020_x1dsum.fits
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-01-20
Version of calibration software = HSTDP 2022_3


12715/lbui51lrq_x1d.fits
Exposure time = 270.016
Planned exposure time = 270.0
Shutter = Open
Aperture used = PSA
Grating used = G130M
Exposure flag = NORMAL
Fine guiding lock = FINE/GYRO
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments from 12715/lbui51030_x1dsum.fits
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-01-20
Version of calibration software = HSTDP 2022_3


12715/lbui51ltq_x1d.fits
Exposure time = 312.032
Planned exposure time = 312.0
Shutter = Open
Aperture used = PSA
Grating used = G130M
Exposure flag = NORMAL
Fine guiding lock = FINE/GYRO
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments from 12715/lbui51040_x1dsum.fits
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-01-20
Version of calibration software = HSTDP 2022_3


12715/lbui51lvq_x1d.fits
Exposure time = 290.016
Planned exposure time = 290.0
Shutter = Open
Aperture used = PSA
Grating used = G160M
Exposure flag = NORMAL
Fine guiding lock = FINE/GYRO
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments from 12715/lbui51050_x1dsum.fits
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-01-20
Version of calibration software = HSTDP 2022_3


12715/lbui51m5q_x1d.fits
Exposure time = 346.048
Planned exposure time = 346.0
Shutter = Open
Aperture used = PSA
Grating used = G160M
Exposure flag = NORMAL
Fine guiding lock = FINE/GYRO
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments from 12715/lbui51060_x1dsum.fits
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-01-20
Version of calibration software = HSTDP 2022_3


12715/lbui51m7q_x1d.fits
Exposure time = 400.0
Planned exposure time = 400.0
Shutter = Open
Aperture used = PSA
Grating used = G160M
Exposure flag = NORMAL
Fine guiding lock = FINE/GYRO
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments from 12715/lbui51070_x1dsum.fits
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-01-20
Version of calibration software = HSTDP 2022_3


12715/lbui51mbq_x1d.fits
Exposure time = 280.032
Planned exposure time = 280.0
Shutter = Open
Aperture used = PSA
Grating used = G140L
Exposure flag = NORMAL
Fine guiding lock = FINE/GYRO
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments from 12715/lbui51080_x1dsum.fits
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-01-20
Version of calibration software = HSTDP 2022_3


12715/lbui51mdq_x1d.fits
Exposure time = 280.0
Planned exposure time = 280.0
Shutter = Open
Aperture used = PSA
Grating used = G140L
Exposure flag = NORMAL
Fine guiding lock = FINE/GYRO
POSTARG1 / POSTARG2 = 0.0 / 0.0
Quality comments from 12715/lbui51090_x1dsum.fits
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-01-20
Version of calibration software = HSTDP 2022_3

Inspecting the output from the header keywords printed above, we see there is no x1dsum to inspect for lbui11faq_x1d.fits. This is unusual for COS data! We can also see that the date the file was written was in 2012, and that the version of the calibration software used to calibrate this data was from 2012. All together, this indicates that this dataset is statically archived in MAST, and so we don’t recommend using it in a co-add. To see the latest versions of the calibration pipeline software, see the HST Data Processing (HSTDP) github page.

We can also see that the quality comments are all blank for the Visit 51 datasets. We know from the output log file that these data were rejected because some of the exposure was observed using gyro guiding, which is less accurate than fine guiding that tracks targets with guide stars. Because there are no quality comments listed to indicate a target acquisition failure, this data may still be useable, and we’ll explore that next. This data is of target WD0308-565, which was also observed in Visit 50 with the same observing setup. We can compare the fluxes of the two visits to see if Visit 51’s data is alright for co-addition.

1.3 Plotting Constituent and Co-added Spectra#

# Define a function to bin the data so it will plot more clearly
def downsample_1d(myarr, factor):
    """
    Downsample a 1D array by averaging over *factor* pixels.
    Crops right side if the shape is not a multiple of factor.
    Got this specific function from "Adam Ginsburg's python codes" on agpy

    myarr : numpy array
    factor : how much you want to rebin the array by
    """
    xs = myarr.shape[0]
    crarr = myarr[:xs-(xs % factor)]
    dsarr = crarr.reshape(-1, factor).mean(axis=1)
    return dsarr
filename = 'hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui50_cspec.fits'

# Set up a path to the visit 50 level co-added data product for this target
coaddfile = os.path.join(datadir_ex1, 'products', filename)
coadddata = fits.getdata(coaddfile)

# Proactively set sample factor to 6, which is size of COS resolution element
# For STIS, this is 2
samplefactor = 6

# The visit we want to plot
visit_to_plot = "51"

# Get the wavelength and flux data for the co-added file
wavelength = coadddata['wavelength'][0]
flux = coadddata['flux'][0]

# Set up the plot
plt.close()
plt.figure(1)

# Plot the constiuent spectra
for x1d in sorted(allfiles):
    # First check that the file is for the correct visit
    visit_id = fits.getval(x1d, 'obset_id', ext=0)
    if visit_id == visit_to_plot:
        x1ddata = fits.getdata(x1d)
        subwave = x1ddata['wavelength'][0]
        subflux = x1ddata['flux'][0]
        plt.plot(downsample_1d(subwave, samplefactor),
                 downsample_1d(subflux, samplefactor),
                 label=fits.getval(x1d, 'rootname', ext=0),
                 alpha=0.7)

# Overplot the co-add
plt.plot(downsample_1d(wavelength, samplefactor),
         downsample_1d(flux, samplefactor),
         c='black',
         label='visit 50 co-add',
         alpha=0.7)

# Format the plot by adding titles
targ = fits.getval(coaddfile, 'TARGNAME', ext=0)
pid = fits.getval(coaddfile, 'PROPOSID', ext=0)
ins = fits.getval(coaddfile, 'INSTRUME', ext=0)

plt.title(f'{targ} - {ins} - PID {pid}')
plt.xlabel(r'Wavelength [$\AA$]')
plt.ylabel(r'Flux [$erg\ s^{-1}\ cm^{-2}\ \AA^{-1}$]')
plt.legend()

# Show the plot below
plt.show()

Use the interactive features in the top left corner to zoom in on a region of continuum in the plot above. The zoom button looks like a square and allows you to select a rectangular region on the plot to enlarge. We see no systematic difference in the data from Visit 51 compared to the co-added data in Visit 50, so let’s add the Visit 51 data into the co-add.

1.4 Re-running coadd#

Now that we know which data we want to use in the custom co-add, we must create a new directory with all the data from Visits 50 and 51. We will feed coadd the data from this new directory from its wrapper script. Running coadd this way essentially skips the filtering that the MAST query applies, but coadd itself still has some internal data quality checks, as mentioned above, so we will need to turn those off. If there is data you still want coadd exclude that was filtered before, be sure to not put those in the data directory!

The following cell is the call to coadd via its wrapper. The -i parameter is the input directory you just made. -o is the directory that will contain the newly created co-added products. The -k turns off the data quality filtering. There is more information about this in our Setup.ipynb notebook.

# Set up the path to your new data directory
finaldatadir = os.path.join(datadir_ex1, 'newcoadddata')
os.makedirs(finaldatadir, exist_ok=True)

# Copy all the data from visits 50 and 51 into it
filestocopy = glob.glob(os.path.join(datadir_ex1, '*50*_x1d.fits'))\
            + glob.glob(os.path.join(datadir_ex1, '*51*_x1d.fits'))

[shutil.copy(file, finaldatadir) for file in filestocopy]

# Make an output directory
os.makedirs(os.path.join(datadir_ex1, 'newcoadddata', 'products'), exist_ok=True)

To call coadd, we use the ! to run from the command line. The directories here must be printed out in full - don’t use variable names:

!swrapper -i ./12715/newcoadddata -o ./12715/newcoadddata/products -k
HASP version 0.9.6
Ullyses version 4.0.0
Creating list of unique modes from these files:
./12715/newcoadddata/lbui50qnq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '50')
./12715/newcoadddata/lbui50qpq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '50')
./12715/newcoadddata/lbui50qrq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '50')
./12715/newcoadddata/lbui50qtq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '50')
./12715/newcoadddata/lbui50qvq_x1d.fits WD0308-565 COS FUV G160M PSA 12715 (12715, '50')
./12715/newcoadddata/lbui50qzq_x1d.fits WD0308-565 COS FUV G160M PSA 12715 (12715, '50')
./12715/newcoadddata/lbui50r1q_x1d.fits WD0308-565 COS FUV G160M PSA 12715 (12715, '50')
./12715/newcoadddata/lbui50r3q_x1d.fits WD0308-565 COS FUV G140L PSA 12715 (12715, '50')
./12715/newcoadddata/lbui50r5q_x1d.fits WD0308-565 COS FUV G140L PSA 12715 (12715, '50')
./12715/newcoadddata/lbui51l6q_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '51')
./12715/newcoadddata/lbui51lcq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '51')
./12715/newcoadddata/lbui51lrq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '51')
./12715/newcoadddata/lbui51ltq_x1d.fits WD0308-565 COS FUV G130M PSA 12715 (12715, '51')
./12715/newcoadddata/lbui51lvq_x1d.fits WD0308-565 COS FUV G160M PSA 12715 (12715, '51')
./12715/newcoadddata/lbui51m5q_x1d.fits WD0308-565 COS FUV G160M PSA 12715 (12715, '51')
./12715/newcoadddata/lbui51m7q_x1d.fits WD0308-565 COS FUV G160M PSA 12715 (12715, '51')
./12715/newcoadddata/lbui51mbq_x1d.fits WD0308-565 COS FUV G140L PSA 12715 (12715, '51')
./12715/newcoadddata/lbui51mdq_x1d.fits WD0308-565 COS FUV G140L PSA 12715 (12715, '51')
Looping over visits
Processing product (12715, '50')
Targets in visit (12715, '50'): ['WD0308-565']
Processing target WD0308-565 in visit (12715, '50')
Processing grating COS/G130M
Importing files ['./12715/newcoadddata/lbui50qnq_x1d.fits', './12715/newcoadddata/lbui50qpq_x1d.fits', './12715/newcoadddata/lbui50qrq_x1d.fits', './12715/newcoadddata/lbui50qtq_x1d.fits']
Processing file ./12715/newcoadddata/lbui50qnq_x1d.fits
Processing file ./12715/newcoadddata/lbui50qpq_x1d.fits
Processing file ./12715/newcoadddata/lbui50qrq_x1d.fits
Processing file ./12715/newcoadddata/lbui50qtq_x1d.fits
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ullyses/coadd.py:563: RuntimeWarning: invalid value encountered in divide
  thru_nans = segment.data['net'] / segment.data['flux']
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ullyses/coadd.py:238: RuntimeWarning: invalid value encountered in divide
  conversion = self.output_flux[nonzeros] / self.sumnetcounts[nonzeros]
Using a maximum SNR of 20.0 in flux-based filtering
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_g130m_lbui50_cspec.fits
Processing grating COS/G160M
Importing files ['./12715/newcoadddata/lbui50qvq_x1d.fits', './12715/newcoadddata/lbui50qzq_x1d.fits', './12715/newcoadddata/lbui50r1q_x1d.fits']
Processing file ./12715/newcoadddata/lbui50qvq_x1d.fits
Processing file ./12715/newcoadddata/lbui50qzq_x1d.fits
Processing file ./12715/newcoadddata/lbui50r1q_x1d.fits
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ullyses/coadd.py:563: RuntimeWarning: invalid value encountered in divide
  thru_nans = segment.data['net'] / segment.data['flux']
Using a maximum SNR of 20.0 in flux-based filtering
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_g160m_lbui50_cspec.fits
Processing grating COS/G140L
Importing files ['./12715/newcoadddata/lbui50r3q_x1d.fits', './12715/newcoadddata/lbui50r5q_x1d.fits']
Processing file ./12715/newcoadddata/lbui50r3q_x1d.fits
Processing file ./12715/newcoadddata/lbui50r5q_x1d.fits
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ullyses/coadd.py:238: RuntimeWarning: invalid value encountered in divide
  conversion = self.output_flux[nonzeros] / self.sumnetcounts[nonzeros]
Using a maximum SNR of 20.0 in flux-based filtering
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_cg140l_lbui50_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1068.7-1467.5)
COS/G160M 1342-1800 (Actual: 1387.8-1795.6)
COS/G140L 901-2150 (Actual: 53.7-2395.3)
Transition wavelengths tweaked
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1068.7117229613373
Abutting COS/G160M product to current result
With a transition wavelength of 1467.5089693384982
Abutting COS/G140L product to current result
With a transition wavelength of 1795.607693776611
Truncating current grating at 2150
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui50_cspec.fits
Processing product (12715, '51')
Targets in visit (12715, '51'): ['WD0308-565']
Processing target WD0308-565 in visit (12715, '51')
Processing grating COS/G130M
Importing files ['./12715/newcoadddata/lbui51l6q_x1d.fits', './12715/newcoadddata/lbui51lcq_x1d.fits', './12715/newcoadddata/lbui51lrq_x1d.fits', './12715/newcoadddata/lbui51ltq_x1d.fits']
Processing file ./12715/newcoadddata/lbui51l6q_x1d.fits
Processing file ./12715/newcoadddata/lbui51lcq_x1d.fits
Processing file ./12715/newcoadddata/lbui51lrq_x1d.fits
Processing file ./12715/newcoadddata/lbui51ltq_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_g130m_lbui51_cspec.fits
Processing grating COS/G160M
Importing files ['./12715/newcoadddata/lbui51lvq_x1d.fits', './12715/newcoadddata/lbui51m5q_x1d.fits', './12715/newcoadddata/lbui51m7q_x1d.fits']
Processing file ./12715/newcoadddata/lbui51lvq_x1d.fits
Processing file ./12715/newcoadddata/lbui51m5q_x1d.fits
Processing file ./12715/newcoadddata/lbui51m7q_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_g160m_lbui51_cspec.fits
Processing grating COS/G140L
Importing files ['./12715/newcoadddata/lbui51mbq_x1d.fits', './12715/newcoadddata/lbui51mdq_x1d.fits']
Processing file ./12715/newcoadddata/lbui51mbq_x1d.fits
Processing file ./12715/newcoadddata/lbui51mdq_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_cg140l_lbui51_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1068.7-1467.5)
COS/G160M 1342-1800 (Actual: 1387.8-1795.6)
COS/G140L 901-2150 (Actual: 55.0-2396.5)
Transition wavelengths tweaked
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1068.7214966781385
Abutting COS/G160M product to current result
With a transition wavelength of 1467.5312526490434
Abutting COS/G140L product to current result
With a transition wavelength of 1795.5753292486534
Truncating current grating at 2150
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui51_cspec.fits
Looping over proposals
Processing product 12715
Targets in proposal 12715: ['WD0308-565']
Processing target WD0308-565 in proposal 12715
Processing grating COS/G130M
Importing files ['./12715/newcoadddata/lbui50qnq_x1d.fits', './12715/newcoadddata/lbui50qpq_x1d.fits', './12715/newcoadddata/lbui50qrq_x1d.fits', './12715/newcoadddata/lbui50qtq_x1d.fits', './12715/newcoadddata/lbui51l6q_x1d.fits', './12715/newcoadddata/lbui51lcq_x1d.fits', './12715/newcoadddata/lbui51lrq_x1d.fits', './12715/newcoadddata/lbui51ltq_x1d.fits']
Processing file ./12715/newcoadddata/lbui50qnq_x1d.fits
Processing file ./12715/newcoadddata/lbui50qpq_x1d.fits
Processing file ./12715/newcoadddata/lbui50qrq_x1d.fits
Processing file ./12715/newcoadddata/lbui50qtq_x1d.fits
Processing file ./12715/newcoadddata/lbui51l6q_x1d.fits
Processing file ./12715/newcoadddata/lbui51lcq_x1d.fits
Processing file ./12715/newcoadddata/lbui51lrq_x1d.fits
Processing file ./12715/newcoadddata/lbui51ltq_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_g130m_lbui_cspec.fits
Processing grating COS/G160M
Importing files ['./12715/newcoadddata/lbui50qvq_x1d.fits', './12715/newcoadddata/lbui50qzq_x1d.fits', './12715/newcoadddata/lbui50r1q_x1d.fits', './12715/newcoadddata/lbui51lvq_x1d.fits', './12715/newcoadddata/lbui51m5q_x1d.fits', './12715/newcoadddata/lbui51m7q_x1d.fits']
Processing file ./12715/newcoadddata/lbui50qvq_x1d.fits
Processing file ./12715/newcoadddata/lbui50qzq_x1d.fits
Processing file ./12715/newcoadddata/lbui50r1q_x1d.fits
Processing file ./12715/newcoadddata/lbui51lvq_x1d.fits
Processing file ./12715/newcoadddata/lbui51m5q_x1d.fits
Processing file ./12715/newcoadddata/lbui51m7q_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_g160m_lbui_cspec.fits
Processing grating COS/G140L
Importing files ['./12715/newcoadddata/lbui50r3q_x1d.fits', './12715/newcoadddata/lbui50r5q_x1d.fits', './12715/newcoadddata/lbui51mbq_x1d.fits', './12715/newcoadddata/lbui51mdq_x1d.fits']
Processing file ./12715/newcoadddata/lbui50r3q_x1d.fits
Processing file ./12715/newcoadddata/lbui50r5q_x1d.fits
Processing file ./12715/newcoadddata/lbui51mbq_x1d.fits
Processing file ./12715/newcoadddata/lbui51mdq_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_cg140l_lbui_cspec.fits
Making a product from these gratings
COS/G130M 900-1470 (Actual: 1068.7-1467.5)
COS/G160M 1342-1800 (Actual: 1387.8-1795.6)
COS/G140L 901-2150 (Actual: 53.7-2396.4)
Transition wavelengths tweaked
Transition wavelengths tweaked
Starting at the short wavelength end with grating COS/G140L
Abutting COS/G130M product to current result
With a transition wavelength of 1068.7117229613373
Abutting COS/G160M product to current result
With a transition wavelength of 1467.5289166810705
Abutting COS/G140L product to current result
With a transition wavelength of 1795.607693776611
Truncating current grating at 2150
   Wrote ./12715/newcoadddata/products/hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui_cspec.fits

Replot the co-added data#

# Clear the older plot
plt.close()
plt.figure(2)

coadd_filename = 'hst_12715_cos_wd0308-565_cg140l-g130m-g160m_lbui_cspec.fits'

# Plot the old coadd
oldcoaddfile = os.path.join(datadir_ex1, 'products', coadd_filename)
oldcoadddata = fits.getdata(oldcoaddfile)
oldwavelength = oldcoadddata['wavelength'][0]
oldflux = oldcoadddata['flux'][0]

plt.plot(downsample_1d(oldwavelength, samplefactor),
         downsample_1d(oldflux, samplefactor),
         label='old coadd',
         color="red",
         alpha=0.7)

# Plot the new coadd
newcoaddfile = os.path.join(finaldatadir, 'products', coadd_filename)
newcoadddata = fits.getdata(newcoaddfile)
newwavelength = newcoadddata['wavelength'][0]
newflux = newcoadddata['flux'][0]

plt.plot(downsample_1d(newwavelength, samplefactor),
         downsample_1d(newflux, samplefactor),
         label='new coadd',
         color="blue",
         alpha=0.7)

targ = fits.getval(coaddfile, 'TARGNAME', ext=0)
pid = fits.getval(coaddfile, 'PROPOSID', ext=0)
ins = fits.getval(coaddfile, 'INSTRUME', ext=0)

plt.title(f'{targ} - {ins} - PID {pid}')
plt.xlabel(r'Wavelength [$\AA$]')
plt.ylabel(r'Flux [$erg\ s^{-1}\ cm^{-2}\ \AA^{-1}$]')
plt.legend()

# Show the plot below
plt.show()

Let’s also plot the signal-to-noise to see the improvement.

# Clear the older plot
plt.close()
plt.figure(3)

# Plot the old coadd SNR
oldsnr = oldcoadddata['snr'][0]
plt.plot(downsample_1d(oldwavelength, samplefactor),
         downsample_1d(oldsnr, samplefactor),
         label='old coadd',
         color="red",
         alpha=0.7)

# Plot the new coadd SNR
newsnr = newcoadddata['snr'][0]
plt.plot(downsample_1d(newwavelength, samplefactor),
         downsample_1d(newsnr, samplefactor),
         label='new coadd',
         color="blue",
         alpha=0.7)

plt.title(f'{targ} - {ins} - PID {pid}')
plt.xlabel(r'Wavelength [$\AA$]')
plt.ylabel(r'Signal-to-Noise')
plt.legend()

# Show the plot below
plt.show()

We can tell from the plot above that the SNR is much improved by adding the Visit 51 data into the co-add!

Example 2: A STIS dataset with POSTARG offsets#

2.1 Obtaining Data Products#

For the next example, we will look at Program ID 16655, a STIS program that observed the star Betelgeuse with the E230M grating centered on the target and at POSTARGs +/-0.25 mas and +/- 0.5 mas. Each visit in the programs contains the same spatial scan in the pattern +0.5 mas, -0.5 mas, centered, +0.25 mas, -0.25 mas. coadd will co-add the centered datasets in each visit, but will reject the other datasets with POSTARGs.

We will again use astroquery to download the dataproducts for this program. We will create a folder for the X1D products, called ./16655, and a subfolder called products, which will store the downloaded coadded data. The log file for this program is named HASP_16655.out.

# Creating directories for our data and coadded products
datadir_ex2 = Path("./16655/")
productsdir_ex2 = Path("./16655/products/")

datadir_ex2.mkdir(exist_ok=True)
productsdir_ex2.mkdir(exist_ok=True)
# Querying and downloading calibrated products
query_ex2 = Observations.query_criteria(
    proposal_id=16655, 
    provenance_name="CALSTIS",
    filters="E230M",
    target_name="HD39801"
)

prodlist_ex2 = Observations.get_product_list(
    query_ex2
)

prodlist_ex2 = Observations.filter_products(
    prodlist_ex2,
    project=["CALSTIS"],
    productSubGroupDescription=["X1D"]
)

# Querying and downloading coadded products
query_ex2_coadds = Observations.query_criteria(
    proposal_id=16655, 
    provenance_name="HASP",
    filters="E230M",
    target_name="HD39801"
)

prodlist_ex2_coadds = Observations.get_product_list(
    query_ex2_coadds
)

prodlist_ex2_coadds = Observations.filter_products(
    prodlist_ex2_coadds, 
    productType="SCIENCE",
    productSubGroupDescription="CSPEC"
)

# Combining the two product lists
combined_ex2 = vstack([prodlist_ex2, prodlist_ex2_coadds])

# Downloading the products
Observations.download_products(
    combined_ex2,
    download_dir=str(datadir_ex2)
)

# Organizing the files 
consolidate_files(datadir_ex2)

# Removing files not needed for example
files_to_remove = glob.glob(f"{datadir_ex2}/oen75*")

for file in files_to_remove:
    os.remove(file)

os.remove(f"{productsdir_ex2}/hst_16655_stis_hd39801_e230m_oen751_cspec.fits")
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16655_stis_hd39801_e230m_oen702_cspec.fits to 16655/mastDownload/HST/hst_hasp_16655_stis_hd39801_oen7/hst_16655_stis_hd39801_e230m_oen702_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16655_stis_hd39801_e230m_oen703_cspec.fits to 16655/mastDownload/HST/hst_hasp_16655_stis_hd39801_oen7/hst_16655_stis_hd39801_e230m_oen703_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16655_stis_hd39801_e230m_oen704_cspec.fits to 16655/mastDownload/HST/hst_hasp_16655_stis_hd39801_oen7/hst_16655_stis_hd39801_e230m_oen704_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16655_stis_hd39801_e230m_oen705_cspec.fits to 16655/mastDownload/HST/hst_hasp_16655_stis_hd39801_oen7/hst_16655_stis_hd39801_e230m_oen705_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16655_stis_hd39801_e230m_oen751_cspec.fits to 16655/mastDownload/HST/hst_hasp_16655_stis_hd39801_oen7/hst_16655_stis_hd39801_e230m_oen751_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16655_stis_hd39801_e230m_oen7_cspec.fits to 16655/mastDownload/HST/hst_hasp_16655_stis_hd39801_oen7/hst_16655_stis_hd39801_e230m_oen7_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen701030_x1d.fits to 16655/mastDownload/HST/oen701030/oen701030_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen701040_x1d.fits to 16655/mastDownload/HST/oen701040/oen701040_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen702010_x1d.fits to 16655/mastDownload/HST/oen702010/oen702010_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen702020_x1d.fits to 16655/mastDownload/HST/oen702020/oen702020_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen702030_x1d.fits to 16655/mastDownload/HST/oen702030/oen702030_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen702040_x1d.fits to 16655/mastDownload/HST/oen702040/oen702040_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen702050_x1d.fits to 16655/mastDownload/HST/oen702050/oen702050_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen703010_x1d.fits to 16655/mastDownload/HST/oen703010/oen703010_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen703020_x1d.fits to 16655/mastDownload/HST/oen703020/oen703020_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen703030_x1d.fits to 16655/mastDownload/HST/oen703030/oen703030_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen703040_x1d.fits to 16655/mastDownload/HST/oen703040/oen703040_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen703050_x1d.fits to 16655/mastDownload/HST/oen703050/oen703050_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen704010_x1d.fits to 16655/mastDownload/HST/oen704010/oen704010_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen704020_x1d.fits to 16655/mastDownload/HST/oen704020/oen704020_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen704030_x1d.fits to 16655/mastDownload/HST/oen704030/oen704030_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen704040_x1d.fits to 16655/mastDownload/HST/oen704040/oen704040_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen704050_x1d.fits to 16655/mastDownload/HST/oen704050/oen704050_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen705010_x1d.fits to 16655/mastDownload/HST/oen705010/oen705010_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen705020_x1d.fits to 16655/mastDownload/HST/oen705020/oen705020_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen705030_x1d.fits to 16655/mastDownload/HST/oen705030/oen705030_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen705040_x1d.fits to 16655/mastDownload/HST/oen705040/oen705040_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen705050_x1d.fits to 16655/mastDownload/HST/oen705050/oen705050_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen751010_x1d.fits to 16655/mastDownload/HST/oen751010/oen751010_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen751020_x1d.fits to 16655/mastDownload/HST/oen751020/oen751020_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen751030_x1d.fits to 16655/mastDownload/HST/oen751030/oen751030_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen751040_x1d.fits to 16655/mastDownload/HST/oen751040/oen751040_x1d.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/oen751050_x1d.fits to 16655/mastDownload/HST/oen751050/oen751050_x1d.fits ...
 [Done]

Now let’s print some table information from our datasets:

allfiles = glob.glob(os.path.join(datadir_ex2, '*_x1d.fits'))
print('rootname  target  visit  grating')

for x1d in sorted(allfiles):
    hdr0 = fits.getheader(x1d, ext=0)
    print(hdr0['rootname'], hdr0['targname'],
          hdr0['obset_id'], hdr0['opt_elem'])

print("-----------------------------------")
print(f'N files from MAST = {len(allfiles)}')
rootname  target  visit  grating
oen701030 HD39801 01 E230M
oen701040 HD39801 01 E230M
oen702010 HD39801 02 E230M
oen702020 HD39801 02 E230M
oen702030 HD39801 02 E230M
oen702040 HD39801 02 E230M
oen702050 HD39801 02 E230M
oen703010 HD39801 03 E230M
oen703020 HD39801 03 E230M
oen703030 HD39801 03 E230M
oen703040 HD39801 03 E230M
oen703050 HD39801 03 E230M
oen704010 HD39801 04 E230M
oen704020 HD39801 04 E230M
oen704030 HD39801 04 E230M
oen704040 HD39801 04 E230M
oen704050 HD39801 04 E230M
oen705010 HD39801 05 E230M
oen705020 HD39801 05 E230M
oen705030 HD39801 05 E230M
oen705040 HD39801 05 E230M
oen705050 HD39801 05 E230M
-----------------------------------
N files from MAST = 22

2.2 Examining Output Logs and Headers#

Let’s look at the log next.

# Set up path to the coadd log file
logfile = './logfiles/HASP_16655.out'

with open(logfile, 'r') as f:
    for line in f:
        print(line.strip())
Program_id = EN7, Proposal_id=16655
First cut: 22
With obsnums: 88
with times: 22
wht pdq_summary removed: 20
Number removed = 2
dataset archive_class  ... member_type exptime
2   oen703010           CAL  ...     SCIENCE   567.0
3   oen703020           CAL  ...     SCIENCE   567.0
4   oen703050           CAL  ...     SCIENCE  2723.0
5   oen704010           CAL  ...     SCIENCE   567.0
6   oen704020           CAL  ...     SCIENCE   567.0
7   oen704030           CAL  ...     SCIENCE  2723.0
8   oen704040           CAL  ...     SCIENCE  2723.0
9   oen704050           CAL  ...     SCIENCE  2723.0
10  oen705010           CAL  ...     SCIENCE   567.0
11  oen705020           CAL  ...     SCIENCE   567.0
12  oen705030           CAL  ...     SCIENCE  2723.0
13  oen703040           CAL  ...     SCIENCE  2723.0
14  oen703030           CAL  ...     SCIENCE  2723.0
15  oen702030           CAL  ...     SCIENCE  2723.0
16  oen702020           CAL  ...     SCIENCE   567.0
17  oen702010           CAL  ...     SCIENCE   567.0
18  oen705050           CAL  ...     SCIENCE  2723.0
19  oen705040           CAL  ...     SCIENCE  2723.0
20  oen702050           CAL  ...     SCIENCE  2723.0
21  oen702040           CAL  ...     SCIENCE  2723.0

[20 rows x 10 columns]
with exclude removed: 20
Number removed = 0
20
File ./oen702010_x1d.fits removed from products because POSTARG1 = 0.05
File ./oen702020_x1d.fits removed from products because POSTARG1 = -0.05
File ./oen702040_x1d.fits removed from products because POSTARG1 = 0.025
File ./oen702050_x1d.fits removed from products because POSTARG1 = -0.025
File ./oen703010_x1d.fits removed from products because POSTARG1 = 0.05
File ./oen703020_x1d.fits removed from products because POSTARG1 = -0.05
File ./oen703040_x1d.fits removed from products because POSTARG1 = 0.025
File ./oen703050_x1d.fits removed from products because POSTARG1 = -0.025
File ./oen704010_x1d.fits removed from products because POSTARG1 = 0.05
File ./oen704020_x1d.fits removed from products because POSTARG1 = -0.05
File ./oen704040_x1d.fits removed from products because POSTARG1 = 0.025
File ./oen704050_x1d.fits removed from products because POSTARG1 = -0.025
File ./oen705010_x1d.fits removed from products because POSTARG1 = 0.05
File ./oen705020_x1d.fits removed from products because POSTARG1 = -0.05
File ./oen705040_x1d.fits removed from products because POSTARG1 = 0.025
File ./oen705050_x1d.fits removed from products because POSTARG1 = -0.025
Creating list of unique modes from these files:
./oen702030_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '02')
./oen703030_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '03')
./oen704030_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '04')
./oen705030_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '05')
Looping over visits
Processing product (16655, '02')
Targets in visit (16655, '02'): ['HD39801']
Processing target HD39801 in visit (16655, '02')
Processing grating STIS/E230M
Importing files ['./oen702030_x1d.fits']
Processing file ./oen702030_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
No good pixels for segment #0
Wrote products/hst_16655_stis_hd39801_e230m_oen702_cspec.fits
No need to make abutted product as only 1 grating
Processing product (16655, '03')
Targets in visit (16655, '03'): ['HD39801']
Processing target HD39801 in visit (16655, '03')
Processing grating STIS/E230M
Importing files ['./oen703030_x1d.fits']
Processing file ./oen703030_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
No good pixels for segment #0
Wrote products/hst_16655_stis_hd39801_e230m_oen703_cspec.fits
No need to make abutted product as only 1 grating
Processing product (16655, '04')
Targets in visit (16655, '04'): ['HD39801']
Processing target HD39801 in visit (16655, '04')
Processing grating STIS/E230M
Importing files ['./oen704030_x1d.fits']
Processing file ./oen704030_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
No good pixels for segment #0
Wrote products/hst_16655_stis_hd39801_e230m_oen704_cspec.fits
No need to make abutted product as only 1 grating
Processing product (16655, '05')
Targets in visit (16655, '05'): ['HD39801']
Processing target HD39801 in visit (16655, '05')
Processing grating STIS/E230M
Importing files ['./oen705030_x1d.fits']
Processing file ./oen705030_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
No good pixels for segment #0
Wrote products/hst_16655_stis_hd39801_e230m_oen705_cspec.fits
No need to make abutted product as only 1 grating
Looping over proposals
Processing product 16655
Targets in proposal 16655: ['HD39801']
Processing target HD39801 in proposal 16655
Processing grating STIS/E230M
Importing files ['./oen702030_x1d.fits', './oen703030_x1d.fits', './oen704030_x1d.fits', './oen705030_x1d.fits']
Processing file ./oen702030_x1d.fits
Processing file ./oen703030_x1d.fits
Processing file ./oen704030_x1d.fits
Processing file ./oen705030_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
No good pixels for segment #0
No good pixels for segment #24
No good pixels for segment #48
No good pixels for segment #72
Segment #1 from file ./oen702030_x1d.fits has scaled median = -106.20762286613461
Removing file ./oen702030_x1d.fits from product
Segment #2 from file ./oen702030_x1d.fits has scaled median = -107.27281264936741
File ./oen702030_x1d.fits already selected for removal from product
Segment #3 from file ./oen702030_x1d.fits has scaled median = -91.0847183739855
File ./oen702030_x1d.fits already selected for removal from product
Segment #4 from file ./oen702030_x1d.fits has scaled median = -88.55456036745053
File ./oen702030_x1d.fits already selected for removal from product
Segment #5 from file ./oen702030_x1d.fits has scaled median = -53.33897852052434
File ./oen702030_x1d.fits already selected for removal from product
Segment #1 from file ./oen703030_x1d.fits has scaled median = -306.0128379439877
Removing file ./oen703030_x1d.fits from product
Segment #2 from file ./oen703030_x1d.fits has scaled median = -280.2958573072604
File ./oen703030_x1d.fits already selected for removal from product
Segment #3 from file ./oen703030_x1d.fits has scaled median = -278.9275755871674
File ./oen703030_x1d.fits already selected for removal from product
Segment #4 from file ./oen703030_x1d.fits has scaled median = -290.2345470994798
File ./oen703030_x1d.fits already selected for removal from product
Segment #5 from file ./oen703030_x1d.fits has scaled median = -267.5398483764897
File ./oen703030_x1d.fits already selected for removal from product
Segment #6 from file ./oen703030_x1d.fits has scaled median = -267.6751361299455
File ./oen703030_x1d.fits already selected for removal from product
Segment #7 from file ./oen703030_x1d.fits has scaled median = -289.13521186186125
File ./oen703030_x1d.fits already selected for removal from product
Segment #8 from file ./oen703030_x1d.fits has scaled median = -266.57200779371556
File ./oen703030_x1d.fits already selected for removal from product
Segment #9 from file ./oen703030_x1d.fits has scaled median = -274.6343273835826
File ./oen703030_x1d.fits already selected for removal from product
Segment #10 from file ./oen703030_x1d.fits has scaled median = -275.1953132510794
File ./oen703030_x1d.fits already selected for removal from product
Segment #11 from file ./oen703030_x1d.fits has scaled median = -263.7081197232287
File ./oen703030_x1d.fits already selected for removal from product
Segment #12 from file ./oen703030_x1d.fits has scaled median = -212.6251138404683
File ./oen703030_x1d.fits already selected for removal from product
Segment #13 from file ./oen703030_x1d.fits has scaled median = -196.4153156217069
File ./oen703030_x1d.fits already selected for removal from product
Segment #14 from file ./oen703030_x1d.fits has scaled median = -170.90676286375003
File ./oen703030_x1d.fits already selected for removal from product
Segment #15 from file ./oen703030_x1d.fits has scaled median = -110.44496294542722
File ./oen703030_x1d.fits already selected for removal from product
Segment #16 from file ./oen703030_x1d.fits has scaled median = -104.79572967048243
File ./oen703030_x1d.fits already selected for removal from product
Segment #17 from file ./oen703030_x1d.fits has scaled median = -103.19308139734896
File ./oen703030_x1d.fits already selected for removal from product
Segment #18 from file ./oen703030_x1d.fits has scaled median = -63.47650103305084
File ./oen703030_x1d.fits already selected for removal from product
Importing files ['./oen704030_x1d.fits', './oen705030_x1d.fits']
Processing file ./oen704030_x1d.fits
Processing file ./oen705030_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
No good pixels for segment #0
No good pixels for segment #24
Segment #1 from file ./oen705030_x1d.fits has scaled median = -56.83339544154117
Removing file ./oen705030_x1d.fits from product
Importing files ['./oen704030_x1d.fits']
Processing file ./oen704030_x1d.fits
Using a maximum SNR of 20 in flux-based filtering
No good pixels for segment #0
Wrote products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
No need to make abutted product as only 1 grating

We can see that two files were removed by the MAST query and that many other files were removed from the co-add because of POSTARG offsets, as expected. There are also some files that were removed later by the flux checker. Let’s see which files, and how many were rejected next.

# Use the find_rejects function to make list of pre-rejected files
listofprerejects, listoffluxrejects = find_rejects(logfile, '16655', allfiles)
print(f'Files removed before co-addition: {sorted(listofprerejects)}')
print(f'Files removed by flux checker: {sorted(listoffluxrejects)}')
print(f'Number of files removed before co-addition = {len(listofprerejects)}')
print(f'Number of files removed by flux checker = {len(listoffluxrejects)}')
Files removed before co-addition: ['oen701030_x1d.fits', 'oen701040_x1d.fits', 'oen702010_x1d.fits', 'oen702020_x1d.fits', 'oen702040_x1d.fits', 'oen702050_x1d.fits', 'oen703010_x1d.fits', 'oen703020_x1d.fits', 'oen703040_x1d.fits', 'oen703050_x1d.fits', 'oen704010_x1d.fits', 'oen704020_x1d.fits', 'oen704040_x1d.fits', 'oen704050_x1d.fits', 'oen705010_x1d.fits', 'oen705020_x1d.fits', 'oen705040_x1d.fits', 'oen705050_x1d.fits']
Files removed by flux checker: ['oen702030_x1d.fits', 'oen703030_x1d.fits', 'oen705030_x1d.fits']
Number of files removed before co-addition = 18
Number of files removed by flux checker = 3

Next, look in the x1d headers to find the exposure information and quality comments.

readheaders(listofprerejects, datadir_ex2)
16655/oen701030_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.0 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = Guide star acquisition failed. Actual guide mode is gyro.
    COM2 = STIS aperture door shut throughout exposure.  No counts in exposure.
    COM3 = Actual exposure time significantly less than planned exposure.
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen701040_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.025 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = Guide star acquisition failed. Actual guide mode is gyro.
    COM2 = STIS aperture door shut throughout exposure.  No counts in exposure.
    COM3 = Actual exposure time significantly less than planned exposure.
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen702010_x1d.fits
Exposure time = 567.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.05 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen702020_x1d.fits
Exposure time = 567.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = -0.05 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen702040_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.025 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen702050_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = -0.025 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen703010_x1d.fits
Exposure time = 567.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.05 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen703020_x1d.fits
Exposure time = 567.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = -0.05 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen703040_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.025 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen703050_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = -0.025 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen704010_x1d.fits
Exposure time = 567.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.05 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen704020_x1d.fits
Exposure time = 567.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = -0.05 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen704040_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.025 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen704050_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = -0.025 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen705010_x1d.fits
Exposure time = 567.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.05 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen705020_x1d.fits
Exposure time = 567.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = -0.05 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen705040_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = 0.025 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3


16655/oen705050_x1d.fits
Exposure time = 2723.0
Aperture used = 0.1X0.03
Grating used = E230M
Exposure flag = NORMAL
Fine guiding lock = FINE
POSTARG1 / POSTARG2 = -0.025 / 0.0
Offset pattern = NONE
P1 frame = 
P1 purpose = 
Quality comments
    COM1 = 
    COM2 = 
    COM3 = 
Moving target? No
Date file was written = 2023-12-13
Version of calibration software = HSTDP 2023_3

Looking through this output, we can see there are two datasets from Visit 01 that had failed target acquisitions and were removed from the co-add. The quality comments tell us the aperture door was closed through the whole exposure, so no useful data was taken. The rest of the datasets were rejected because of the POSTARG offsets, as we already knew, and there are no other quality issues.

This leaves only four datasets that were included in the call to create the default versions of the data products: oen702030_x1d.fits, oen703030_x1d.fits, oen703030_x1d.fits, and oen705030_x1d.fits. However, the data in Visits 2, 3, and 5 were later removed by the flux checker. Since this program was designed to probe Betelgeuse’s recent flux variability, it makes sense that some of the fluxes may indeed be flagged for removal. In the custom co-add runs we perform next, we can set flags to ignore the POSTARG and flux filtering.

2.3 Running coadd#

The structure of the program is such that each visit observed Betelgeuse at many POSTARG positions using the same gratings. The spatial scanning pattern is uniform, and so a user may wish to create co-adds of the spectra observed at each pointing position across all the visits. To co-add these, we can follow the same steps as in Section 1.4, but set up five different directories for each pointing position. We’ll create the directories:

Directory

Contains Datasets

newcoadddata_p50

oen702010_x1d.fits, oen703010_x1d.fits, oen704010_x1d.fits, oen705010_x1d.fits

newcoadddata_p25

oen702040_x1d.fits, oen703040_x1d.fits, oen704040_x1d.fits, oen705040_x1d.fits

newcoadddata_p0.0

oen702030_x1d.fits, oen703030_x1d.fits, oen704030_x1d.fits, oen705030_x1d.fits

newcoadddata_p-25

oen702050_x1d.fits, oen703050_x1d.fits, oen704050_x1d.fits, oen705050_x1d.fits

newcoadddata_p-50

oen702020_x1d.fits, oen703020_x1d.fits, oen704020_x1d.fits, oen705020_x1d.fits

Note that we’ll still need to exclude the Visit 01 data that was rejected from the MAST query, as that step is bypassed when we run coadd from a local folder. Like in the first example, we add the flag -k to the call to turn off the POSTARG filtering. This time, we’ll also add -t -99999 to set the flux checking threshold. Setting this to a very large negative number will essentially override the flux filtering that coadd performs.

# Get a list of all files in the directory
allfiles = glob.glob(os.path.join(datadir_ex2, '*.fits'))

# Sort through all the files based on POSTARG value
postvals = ['-0.05', '-0.025', '0.0', '0.025', '0.05']
for val in postvals:
    # Make a list of files all with the same POSTARG values
    postarglist = []
    for myfile in allfiles:
        postarg = fits.getval(myfile, 'POSTARG1')
        visitid = fits.getval(myfile, 'OBSET_ID')
        if (str(postarg) == val) and (visitid != '01'):
            postarglist.append(myfile)

    # Make new directories for each list
    finaldatadir = os.path.join(datadir_ex2, f'newcoadddata_p{val}')
    os.makedirs(finaldatadir, exist_ok=True)

    # Copy this list into a new directory to coadd from
    for file in postarglist:
        print(f'Copying {file} to {finaldatadir}')
        shutil.copy(file, finaldatadir)

    # Create output directories for the new coadds
    productdir = os.path.join(datadir_ex2, f'newcoadddata_p{val}', 'products')
    os.makedirs(productdir, exist_ok=True)
Copying 16655/oen703020_x1d.fits to 16655/newcoadddata_p-0.05
Copying 16655/oen702020_x1d.fits to 16655/newcoadddata_p-0.05
Copying 16655/oen705020_x1d.fits to 16655/newcoadddata_p-0.05
Copying 16655/oen704020_x1d.fits to 16655/newcoadddata_p-0.05
Copying 16655/oen703050_x1d.fits to 16655/newcoadddata_p-0.025
Copying 16655/oen702050_x1d.fits to 16655/newcoadddata_p-0.025
Copying 16655/oen704050_x1d.fits to 16655/newcoadddata_p-0.025
Copying 16655/oen705050_x1d.fits to 16655/newcoadddata_p-0.025
Copying 16655/oen702030_x1d.fits to 16655/newcoadddata_p0.0
Copying 16655/oen704030_x1d.fits to 16655/newcoadddata_p0.0
Copying 16655/oen703030_x1d.fits to 16655/newcoadddata_p0.0
Copying 16655/oen705030_x1d.fits to 16655/newcoadddata_p0.0
Copying 16655/oen704040_x1d.fits to 16655/newcoadddata_p0.025
Copying 16655/oen705040_x1d.fits to 16655/newcoadddata_p0.025
Copying 16655/oen703040_x1d.fits to 16655/newcoadddata_p0.025
Copying 16655/oen702040_x1d.fits to 16655/newcoadddata_p0.025
Copying 16655/oen702010_x1d.fits to 16655/newcoadddata_p0.05
Copying 16655/oen703010_x1d.fits to 16655/newcoadddata_p0.05
Copying 16655/oen705010_x1d.fits to 16655/newcoadddata_p0.05
Copying 16655/oen704010_x1d.fits to 16655/newcoadddata_p0.05

Run coadd for all the new directories:

!swrapper -i ./16655/newcoadddata_p-0.05 -o ./16655/newcoadddata_p-0.05/products -k -t -999
!swrapper -i ./16655/newcoadddata_p-0.025 -o ./16655/newcoadddata_p-0.025/products -k -t -999
!swrapper -i ./16655/newcoadddata_p0.0 -o ./16655/newcoadddata_p0.0/products -k -t -999
!swrapper -i ./16655/newcoadddata_p0.025 -o ./16655/newcoadddata_p0.025/products -k -t -999
!swrapper -i ./16655/newcoadddata_p0.05 -o ./16655/newcoadddata_p0.05/products -k -t -999
HASP version 0.9.6
Ullyses version 4.0.0
Creating list of unique modes from these files:
./16655/newcoadddata_p-0.05/oen702020_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '02')
./16655/newcoadddata_p-0.05/oen703020_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '03')
./16655/newcoadddata_p-0.05/oen704020_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '04')
./16655/newcoadddata_p-0.05/oen705020_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '05')
Looping over visits
Processing product (16655, '02')
Targets in visit (16655, '02'): ['HD39801']
Processing target HD39801 in visit (16655, '02')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.05/oen702020_x1d.fits']
Processing file ./16655/newcoadddata_p-0.05/oen702020_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]
   Wrote ./16655/newcoadddata_p-0.05/products/hst_16655_stis_hd39801_e230m_oen702_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '03')
Targets in visit (16655, '03'): ['HD39801']
Processing target HD39801 in visit (16655, '03')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.05/oen703020_x1d.fits']
Processing file ./16655/newcoadddata_p-0.05/oen703020_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p-0.05/products/hst_16655_stis_hd39801_e230m_oen703_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '04')
Targets in visit (16655, '04'): ['HD39801']
Processing target HD39801 in visit (16655, '04')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.05/oen704020_x1d.fits']
Processing file ./16655/newcoadddata_p-0.05/oen704020_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p-0.05/products/hst_16655_stis_hd39801_e230m_oen704_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '05')
Targets in visit (16655, '05'): ['HD39801']
Processing target HD39801 in visit (16655, '05')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.05/oen705020_x1d.fits']
Processing file ./16655/newcoadddata_p-0.05/oen705020_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p-0.05/products/hst_16655_stis_hd39801_e230m_oen705_cspec.fits
No need to create abutted product as < 2 single grating products
Looping over proposals
Processing product 16655
Targets in proposal 16655: ['HD39801']
Processing target HD39801 in proposal 16655
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.05/oen702020_x1d.fits', './16655/newcoadddata_p-0.05/oen703020_x1d.fits', './16655/newcoadddata_p-0.05/oen704020_x1d.fits', './16655/newcoadddata_p-0.05/oen705020_x1d.fits']
Processing file ./16655/newcoadddata_p-0.05/oen702020_x1d.fits
Processing file ./16655/newcoadddata_p-0.05/oen703020_x1d.fits
Processing file ./16655/newcoadddata_p-0.05/oen704020_x1d.fits
Processing file ./16655/newcoadddata_p-0.05/oen705020_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
No good pixels for segment #24
No good pixels for segment #48
No good pixels for segment #72
   Wrote ./16655/newcoadddata_p-0.05/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
Making a product from these gratings
STIS/E230M 1606.7-3119.2 (Actual: 2277.7-3072.2)
Transition wavelengths tweaked
Starting at the short wavelength end with grating STIS/E230M
Truncating current grating at 3072.1598343329238
./16655/newcoadddata_p-0.05/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits already exists and overwrite=False, skipping write
   Wrote ./16655/newcoadddata_p-0.05/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
HASP version 0.9.6
Ullyses version 4.0.0
Creating list of unique modes from these files:
./16655/newcoadddata_p-0.025/oen702050_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '02')
./16655/newcoadddata_p-0.025/oen703050_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '03')
./16655/newcoadddata_p-0.025/oen704050_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '04')
./16655/newcoadddata_p-0.025/oen705050_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '05')
Looping over visits
Processing product (16655, '02')
Targets in visit (16655, '02'): ['HD39801']
Processing target HD39801 in visit (16655, '02')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.025/oen702050_x1d.fits']
Processing file ./16655/newcoadddata_p-0.025/oen702050_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]
   Wrote ./16655/newcoadddata_p-0.025/products/hst_16655_stis_hd39801_e230m_oen702_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '03')
Targets in visit (16655, '03'): ['HD39801']
Processing target HD39801 in visit (16655, '03')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.025/oen703050_x1d.fits']
Processing file ./16655/newcoadddata_p-0.025/oen703050_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p-0.025/products/hst_16655_stis_hd39801_e230m_oen703_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '04')
Targets in visit (16655, '04'): ['HD39801']
Processing target HD39801 in visit (16655, '04')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.025/oen704050_x1d.fits']
Processing file ./16655/newcoadddata_p-0.025/oen704050_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p-0.025/products/hst_16655_stis_hd39801_e230m_oen704_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '05')
Targets in visit (16655, '05'): ['HD39801']
Processing target HD39801 in visit (16655, '05')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.025/oen705050_x1d.fits']
Processing file ./16655/newcoadddata_p-0.025/oen705050_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p-0.025/products/hst_16655_stis_hd39801_e230m_oen705_cspec.fits
No need to create abutted product as < 2 single grating products
Looping over proposals
Processing product 16655
Targets in proposal 16655: ['HD39801']
Processing target HD39801 in proposal 16655
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p-0.025/oen702050_x1d.fits', './16655/newcoadddata_p-0.025/oen703050_x1d.fits', './16655/newcoadddata_p-0.025/oen704050_x1d.fits', './16655/newcoadddata_p-0.025/oen705050_x1d.fits']
Processing file ./16655/newcoadddata_p-0.025/oen702050_x1d.fits
Processing file ./16655/newcoadddata_p-0.025/oen703050_x1d.fits
Processing file ./16655/newcoadddata_p-0.025/oen704050_x1d.fits
Processing file ./16655/newcoadddata_p-0.025/oen705050_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
No good pixels for segment #24
No good pixels for segment #48
No good pixels for segment #72
   Wrote ./16655/newcoadddata_p-0.025/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
Making a product from these gratings
STIS/E230M 1606.7-3119.2 (Actual: 2277.8-3072.2)
Transition wavelengths tweaked
Starting at the short wavelength end with grating STIS/E230M
Truncating current grating at 3072.1575744024462
./16655/newcoadddata_p-0.025/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits already exists and overwrite=False, skipping write
   Wrote ./16655/newcoadddata_p-0.025/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
HASP version 0.9.6
Ullyses version 4.0.0
Creating list of unique modes from these files:
./16655/newcoadddata_p0.0/oen702030_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '02')
./16655/newcoadddata_p0.0/oen703030_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '03')
./16655/newcoadddata_p0.0/oen704030_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '04')
./16655/newcoadddata_p0.0/oen705030_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '05')
Looping over visits
Processing product (16655, '02')
Targets in visit (16655, '02'): ['HD39801']
Processing target HD39801 in visit (16655, '02')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.0/oen702030_x1d.fits']
Processing file ./16655/newcoadddata_p0.0/oen702030_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]
   Wrote ./16655/newcoadddata_p0.0/products/hst_16655_stis_hd39801_e230m_oen702_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '03')
Targets in visit (16655, '03'): ['HD39801']
Processing target HD39801 in visit (16655, '03')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.0/oen703030_x1d.fits']
Processing file ./16655/newcoadddata_p0.0/oen703030_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p0.0/products/hst_16655_stis_hd39801_e230m_oen703_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '04')
Targets in visit (16655, '04'): ['HD39801']
Processing target HD39801 in visit (16655, '04')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.0/oen704030_x1d.fits']
Processing file ./16655/newcoadddata_p0.0/oen704030_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p0.0/products/hst_16655_stis_hd39801_e230m_oen704_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '05')
Targets in visit (16655, '05'): ['HD39801']
Processing target HD39801 in visit (16655, '05')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.0/oen705030_x1d.fits']
Processing file ./16655/newcoadddata_p0.0/oen705030_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p0.0/products/hst_16655_stis_hd39801_e230m_oen705_cspec.fits
No need to create abutted product as < 2 single grating products
Looping over proposals
Processing product 16655
Targets in proposal 16655: ['HD39801']
Processing target HD39801 in proposal 16655
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.0/oen702030_x1d.fits', './16655/newcoadddata_p0.0/oen703030_x1d.fits', './16655/newcoadddata_p0.0/oen704030_x1d.fits', './16655/newcoadddata_p0.0/oen705030_x1d.fits']
Processing file ./16655/newcoadddata_p0.0/oen702030_x1d.fits
Processing file ./16655/newcoadddata_p0.0/oen703030_x1d.fits
Processing file ./16655/newcoadddata_p0.0/oen704030_x1d.fits
Processing file ./16655/newcoadddata_p0.0/oen705030_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
No good pixels for segment #24
No good pixels for segment #48
No good pixels for segment #72
   Wrote ./16655/newcoadddata_p0.0/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
Making a product from these gratings
STIS/E230M 1606.7-3119.2 (Actual: 2277.8-3072.2)
Transition wavelengths tweaked
Starting at the short wavelength end with grating STIS/E230M
Truncating current grating at 3072.1585387983027
./16655/newcoadddata_p0.0/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits already exists and overwrite=False, skipping write
   Wrote ./16655/newcoadddata_p0.0/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
HASP version 0.9.6
Ullyses version 4.0.0
Creating list of unique modes from these files:
./16655/newcoadddata_p0.025/oen702040_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '02')
./16655/newcoadddata_p0.025/oen703040_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '03')
./16655/newcoadddata_p0.025/oen704040_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '04')
./16655/newcoadddata_p0.025/oen705040_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '05')
Looping over visits
Processing product (16655, '02')
Targets in visit (16655, '02'): ['HD39801']
Processing target HD39801 in visit (16655, '02')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.025/oen702040_x1d.fits']
Processing file ./16655/newcoadddata_p0.025/oen702040_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]
   Wrote ./16655/newcoadddata_p0.025/products/hst_16655_stis_hd39801_e230m_oen702_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '03')
Targets in visit (16655, '03'): ['HD39801']
Processing target HD39801 in visit (16655, '03')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.025/oen703040_x1d.fits']
Processing file ./16655/newcoadddata_p0.025/oen703040_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p0.025/products/hst_16655_stis_hd39801_e230m_oen703_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '04')
Targets in visit (16655, '04'): ['HD39801']
Processing target HD39801 in visit (16655, '04')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.025/oen704040_x1d.fits']
Processing file ./16655/newcoadddata_p0.025/oen704040_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p0.025/products/hst_16655_stis_hd39801_e230m_oen704_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '05')
Targets in visit (16655, '05'): ['HD39801']
Processing target HD39801 in visit (16655, '05')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.025/oen705040_x1d.fits']
Processing file ./16655/newcoadddata_p0.025/oen705040_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p0.025/products/hst_16655_stis_hd39801_e230m_oen705_cspec.fits
No need to create abutted product as < 2 single grating products
Looping over proposals
Processing product 16655
Targets in proposal 16655: ['HD39801']
Processing target HD39801 in proposal 16655
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.025/oen702040_x1d.fits', './16655/newcoadddata_p0.025/oen703040_x1d.fits', './16655/newcoadddata_p0.025/oen704040_x1d.fits', './16655/newcoadddata_p0.025/oen705040_x1d.fits']
Processing file ./16655/newcoadddata_p0.025/oen702040_x1d.fits
Processing file ./16655/newcoadddata_p0.025/oen703040_x1d.fits
Processing file ./16655/newcoadddata_p0.025/oen704040_x1d.fits
Processing file ./16655/newcoadddata_p0.025/oen705040_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
No good pixels for segment #24
No good pixels for segment #48
No good pixels for segment #72
   Wrote ./16655/newcoadddata_p0.025/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
Making a product from these gratings
STIS/E230M 1606.7-3119.2 (Actual: 2277.8-3072.2)
Transition wavelengths tweaked
Starting at the short wavelength end with grating STIS/E230M
Truncating current grating at 3072.15772554094
./16655/newcoadddata_p0.025/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits already exists and overwrite=False, skipping write
   Wrote ./16655/newcoadddata_p0.025/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
HASP version 0.9.6
Ullyses version 4.0.0
Creating list of unique modes from these files:
./16655/newcoadddata_p0.05/oen702010_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '02')
./16655/newcoadddata_p0.05/oen703010_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '03')
./16655/newcoadddata_p0.05/oen704010_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '04')
./16655/newcoadddata_p0.05/oen705010_x1d.fits HD39801 STIS NUV-MAMA E230M 0.1X0.03 16655 (16655, '05')
Looping over visits
Processing product (16655, '02')
Targets in visit (16655, '02'): ['HD39801']
Processing target HD39801 in visit (16655, '02')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.05/oen702010_x1d.fits']
Processing file ./16655/newcoadddata_p0.05/oen702010_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]
   Wrote ./16655/newcoadddata_p0.05/products/hst_16655_stis_hd39801_e230m_oen702_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '03')
Targets in visit (16655, '03'): ['HD39801']
Processing target HD39801 in visit (16655, '03')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.05/oen703010_x1d.fits']
Processing file ./16655/newcoadddata_p0.05/oen703010_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p0.05/products/hst_16655_stis_hd39801_e230m_oen703_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '04')
Targets in visit (16655, '04'): ['HD39801']
Processing target HD39801 in visit (16655, '04')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.05/oen704010_x1d.fits']
Processing file ./16655/newcoadddata_p0.05/oen704010_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p0.05/products/hst_16655_stis_hd39801_e230m_oen704_cspec.fits
No need to create abutted product as < 2 single grating products
Processing product (16655, '05')
Targets in visit (16655, '05'): ['HD39801']
Processing target HD39801 in visit (16655, '05')
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.05/oen705010_x1d.fits']
Processing file ./16655/newcoadddata_p0.05/oen705010_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
   Wrote ./16655/newcoadddata_p0.05/products/hst_16655_stis_hd39801_e230m_oen705_cspec.fits
No need to create abutted product as < 2 single grating products
Looping over proposals
Processing product 16655
Targets in proposal 16655: ['HD39801']
Processing target HD39801 in proposal 16655
Processing grating STIS/E230M
Importing files ['./16655/newcoadddata_p0.05/oen702010_x1d.fits', './16655/newcoadddata_p0.05/oen703010_x1d.fits', './16655/newcoadddata_p0.05/oen704010_x1d.fits', './16655/newcoadddata_p0.05/oen705010_x1d.fits']
Processing file ./16655/newcoadddata_p0.05/oen702010_x1d.fits
Processing file ./16655/newcoadddata_p0.05/oen703010_x1d.fits
Processing file ./16655/newcoadddata_p0.05/oen704010_x1d.fits
Processing file ./16655/newcoadddata_p0.05/oen705010_x1d.fits
Using a maximum SNR of 20.0 in flux-based filtering
No good pixels for segment #0
No good pixels for segment #24
No good pixels for segment #48
No good pixels for segment #72
   Wrote ./16655/newcoadddata_p0.05/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits
Making a product from these gratings
STIS/E230M 1606.7-3119.2 (Actual: 2277.7-3072.2)
Transition wavelengths tweaked
Starting at the short wavelength end with grating STIS/E230M
Truncating current grating at 3072.210362810596
./16655/newcoadddata_p0.05/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits already exists and overwrite=False, skipping write
   Wrote ./16655/newcoadddata_p0.05/products/hst_16655_stis_hd39801_e230m_oen7_cspec.fits

Now that data products have been made for all the datasets, we can plot the results.

# Clear the older plot
plt.close()
plt.figure(4)

# Set sample factor to 2, which is size of STIS resolution element
samplefactor = 2

# Plot the coadds
for val in postvals:
    coadd_filename = 'hst_16655_stis_hd39801_e230m_oen7_cspec.fits'
    coaddfile = f"{datadir_ex2}/newcoadddata_p{val}/products/{coadd_filename}"
    label = f"{str(float(val) * 10)} mas"

    coadddata = fits.getdata(coaddfile)
    wavelength = coadddata['wavelength'][0]
    flux = coadddata['flux'][0]

    plt.plot(downsample_1d(wavelength, samplefactor),
             downsample_1d(flux, samplefactor),
             label=label,
             alpha=0.7)

    targ = fits.getval(coaddfile, 'TARGNAME', ext=0)
    pid = fits.getval(coaddfile, 'PROPOSID', ext=0)
    ins = fits.getval(coaddfile, 'INSTRUME', ext=0)

    plt.title(f'{targ} - {ins} - PID {pid}')
    plt.xlabel(r'Wavelength [$\AA$]')
    plt.ylabel(r'Flux [$erg\ s^{-1}\ cm^{-2}\ \AA^{-1}$]')
    plt.legend()

# Show the plot below
plt.show()
# Also plot the SNR
# Clear the older plot
plt.close()
plt.figure(5)

# Plot the coadds
for val in postvals:
    coadd_filename = 'hst_16655_stis_hd39801_e230m_oen7_cspec.fits'
    coaddfile = f"{datadir_ex2}/newcoadddata_p{val}/products/{coadd_filename}"
    label = f"{str(float(val) * 10)} mas"

    coadddata = fits.getdata(coaddfile)
    wavelength = coadddata['wavelength'][0]
    snr = coadddata['snr'][0]
    plt.plot(downsample_1d(wavelength, samplefactor),
             downsample_1d(snr, samplefactor),
             alpha=0.7,
             label=label)

    targ = fits.getval(coaddfile, 'TARGNAME', ext=0)
    pid = fits.getval(coaddfile, 'PROPOSID', ext=0)
    ins = fits.getval(coaddfile, 'INSTRUME', ext=0)

    plt.title(f'Betelgeuse - {ins} - PID {pid}')
    plt.ylim(0, 300)
    plt.xlabel(r'Wavelength [$\AA$]')
    plt.ylabel(r'Signal-to-Noise')
    plt.legend()

# Show the plot below
plt.show()

We can see from these plots that the flux and SNR decrease the further away from the center of the star you get.

Example 3: A STIS dataset with flux rejection#

3.1 Obtaining Data Products#

For the next example, we will at Program ID 16196, a COS and STIS program that observed MRK-817.

We will again use astroquery to download the dataproducts for this program. We will create a folder called ./16655 for the 1D extracted COS and STIS spectra (x1ds and sx1s) for all visits in this program, as well as the x1dsums for the COS data. We will also create a subfolder called products, which will store the downloaded coadded data. The log file for this program is named HASP_16196.out.

# Creating directories for our data and coadded products
datadir_ex3 = Path("./16196/")
productsdir_ex3 = Path("./16196/products/")

datadir_ex3.mkdir(exist_ok=True)
productsdir_ex3.mkdir(exist_ok=True)
# Querying and downloading calibrated products
query_ex3 = Observations.query_criteria(
    proposal_id=16196, 
    provenance_name=["CALSTIS", "CALCOS"],
    target_name="MRK-817"
)

prodlist_ex3 = Observations.get_product_list(
    query_ex3
)

prodlist_ex3 = Observations.filter_products(
    prodlist_ex3,
    project=["CALSTIS", "CALCOS"],
    productSubGroupDescription=["X1D", "X1DSUM", "SX1"]
)

# Querying and downloading coadded products
query_ex3_coadds = Observations.query_criteria(
    proposal_id=16196, 
    provenance_name="HASP",
    target_name="MRK-817"
)

prodlist_ex3_coadds = Observations.get_product_list(
    query_ex3_coadds
)

prodlist_ex3_coadds = Observations.filter_products(
    prodlist_ex3_coadds, 
    productType="SCIENCE",
    productSubGroupDescription="CSPEC"
)

# Combining the two product lists
combined_ex3 = vstack([prodlist_ex3, prodlist_ex3_coadds])

# Downloading the products
Observations.download_products(
    combined_ex3,
    download_dir=str(datadir_ex3)
)

# Organizing the files 
consolidate_files(datadir_ex3)
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos-stis_mrk-817_g130m-g160m-sg230l-g430l-g750l_lede_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos-stis_mrk-817_lede/hst_16196_cos-stis_mrk-817_g130m-g160m-sg230l-g430l-g750l_lede_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede01_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede01_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede02_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede02_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede03_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede03_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede04_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede04_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede05_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede05_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede06_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede06_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede07_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede07_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede08_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede08_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede09_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede09_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0a_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0a_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0b_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0b_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0c_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0c_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0d_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0d_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0i_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0i_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0j_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0j_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0k_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0k_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0l_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0l_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0m_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0m_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0n_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0n_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0o_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0o_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0p_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0p_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0q_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0q_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0r_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0r_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0t_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0t_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0u_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0u_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede0z_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede0z_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede10_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede10_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede11_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede11_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede12_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede12_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede14_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede14_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede15_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede15_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede16_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede16_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede17_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede17_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede18_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede18_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede19_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede19_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1b_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1b_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1c_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1c_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1e_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1e_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1g_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1g_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1h_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1h_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1i_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1i_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1m_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1m_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1n_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1n_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1o_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1o_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1p_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1p_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1q_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1q_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede1w_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede1w_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede20_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede20_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede21_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede21_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede22_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede22_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede23_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede23_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede24_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede24_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede25_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede25_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede26_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede26_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede27_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede27_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede28_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede28_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede29_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede29_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2a_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2a_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2b_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2b_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2c_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2c_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2d_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2d_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2e_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2e_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2f_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2f_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2g_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2g_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2h_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2h_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2i_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2i_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2j_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2j_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2k_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2k_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2l_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2l_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2m_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2m_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2n_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2n_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2u_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2u_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2y_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2y_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede2z_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede2z_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede30_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede30_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede31_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede31_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede32_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede32_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede33_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede33_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede34_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede34_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede35_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede35_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede36_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede36_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede37_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede37_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede38_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede38_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede39_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede39_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3a_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3a_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3b_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3b_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3c_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3c_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3d_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3d_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3e_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3e_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3f_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3f_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3g_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3g_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3h_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3h_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3i_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3i_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3l_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3l_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3m_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3m_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3n_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3n_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3p_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3p_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3q_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3q_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3r_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3r_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3s_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3s_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3u_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3u_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3v_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3v_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3w_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3w_cspec.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hasp/hst_16196_cos_mrk-817_g130m-g160m_lede3x_cspec.fits to 16196/mastDownload/HST/hst_hasp_16196_cos_mrk-817_lede/hst_16196_cos_mrk-817_g130m-g160m_lede3x_cspec.fits ...
<