mast-api
v1.1.9
Published
Wrapper for the MAST API to get space telescope data
Downloads
27
Maintainers
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)
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
- Start session
- Select option 1 for the
Mast.Name.Lookup
service - 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)
- 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
(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
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
- Enter filter query parameter name. (CAOM Field Descriptions has the list of the filters that I know of)
- Enter values for the specified parameter. (Press enter for every entry)
- Enter blank value when you have added all the values you want.
- Repeat process for more filters of leave blank to continue.
Select Download Targets
- When prompted, enter any value (leave blank to end session);
- 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
- Enter a name for the zip file
- WARNING: Double check the download file size. Download bundles can get very large.
- Check the data folder for your downloaded files.
Development
git clone https://[email protected]/MikeWestbrook/MAST/_git/MAST
npm install
- Transpile:
npm run build
to build oncenpm run watch
build when changes are saved
node dist/bin.js