npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mast-api

v1.1.9

Published

Wrapper for the MAST API to get space telescope data

Downloads

28

Readme

[[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://[email protected]/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