mast-api

1.1.9 • Public • Published

[[TOC]]

Overview

Interfaces and REST API wrappers for the MAST API. Version 1 is inspired from this tutorial. Later versions will add more services and more intuitive interfaces.

Source Code

Source code and deployment pipelines are hosted in ADO (Azure DevOps)

Build Status

Release

Public releases can be found on npmjs

Usage

Install

Local

npm install mast-api

Global

npm install -g mast-api

Run

Begin by choosing the service you want to use.

npx mast

Select the service you want to use:

Select desired service:
1: Mast.Name.Lookup
2: Mast.Caom.Filtered.Position

Name Lookup

Mast.Name.Lookup: Resolves an object name into a position on the sky.

Usage

  1. Start session
  2. Select option 1 for the Mast.Name.Lookup service
  3. Enter the search query. i.e. 'sombrero' and inspect results:
    Enter name of target to resolve
    sombrero
    Lookup sombrero: 865.64ms
    {
      "ra": 189.99763,
      "decl": -11.62305,
      "radius": 0.0725
    }
    Search MAST for data? (Leave blank to skip)
    
  4. Choose:
    • Press enter to end session
    • Enter any value to search MAST database for observations of this target. See: Filtered Position Search

Filtered Position Search

Mast.Caom.Filtered.Position: Get MAST observations by performing a cone search as well as filtering based on column (as in Advanced Search).

Usage

  1. Start session

  2. (Skip this step if searching from a Name Lookup) Enter ra (right ascension), decl (declination), radius (search radius):

    ra:
    189.99763
    declination:
    -11.62305
    radius:
    0.0725
    
  3. Filter query:

     # This example searches all public data from the Hubble Space Telescope (HST)
     Enter filter query parameter name. (Leave blank to finish)
     dataRights
     Value (leave blank to finish)
     PUBLIC
     Value (leave blank to finish)
    
     Enter filter query parameter name. (Leave blank to finish)
     obs_collection
     Value (leave blank to finish)
     HST
    
    1. Enter filter query parameter name. (CAOM Field Descriptions has the list of the filters that I know of)
    2. Enter values for the specified parameter. (Press enter for every entry)
    3. Enter blank value when you have added all the values you want.
    4. Repeat process for more filters of leave blank to continue.
  4. Select Download Targets

    1. When prompted, enter any value (leave blank to end session);
    2. Each observation will be listed. Select the appropriate option for each entry.
      {
          ...
          "obs_collection": "HST",
          "target_name": "DARK",
          "s_ra": 190.0128823422,
          "s_dec": -11.54723792939,
          "t_min": 49425.11409054398,
          "t_max": 49425.13492387732,
          "t_exptime": 1800,
          "wavelength_region": "Optical",
          "obs_title": "WF/PC2 CYCLE 4 CAL: INTERNAL MONITOR 3: DARKS",
          "instrument_name": "WFPC2",
          "jpegURL": "mast:HST/product/u28u0n01t_c0f.jpg",
          "dataURL": "mast:HST/product/u28u0n01t_c0f.fits",
          "dataRights": "PUBLIC",
          "obsid": 24543382,
          "objID": 123980581,
          "objID1": 123980581,
          "distance": 190.92823360488165,
          ...
        }
        1:Download
        2:Skip
        3:Skip Remaining
      
    3. Enter a name for the zip file
      • WARNING: Double check the download file size. Download bundles can get very large.
    4. Check the data folder for your downloaded files.

Development

  1. git clone https://MikeWestbrook@dev.azure.com/MikeWestbrook/MAST/_git/MAST
  2. npm install
  3. Transpile:
    • npm run build to build once
    • npm run watch build when changes are saved
  4. node dist/bin.js

Package Sidebar

Install

npm i mast-api

Weekly Downloads

4

Version

1.1.9

License

MIT

Unpacked Size

43.5 kB

Total Files

8

Last publish

Collaborators

  • albinopython