Learn R Programming

panstarrs

The goal of panstarrs package is to access PanSTARRS data archive.

Installation

You can install the released version of panstarrs with:

# devtools::install_github('uskovgs/PanSTARRS')
install.packages("panstarrs")

Example

 library(panstarrs)
 library(magrittr)
 library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
 coords <- ps1_mast_resolve('Antennae')
 
 ps1_image_color(ra = coords$ra, 
                 dec = coords$decl, 
                 format = 'png', 
                 size = 400) %>%
   magick::image_read()

 fits_image_url <- ps1_image_url(ra = coords$ra,
                                 dec = coords$decl,
                                 size = 1280,
                                 filter = "r",
                                 format = "fits")
 
 # fits_image <- FITSio::readFITS(fits_image_url)
 
 
 
 ps1_crossmatch(ra = c(268.70342, 168.87258), 
                dec = c(71.54292, 60.75153),
                release = 'dr2',
                table = 'mean') %>% 
   select(MatchRA, MatchDEC, dstArcSec, `_searchID_`, objName) %>% 
   arrange(`_searchID_`, dstArcSec)
#> # A tibble: 8 × 5
#>   MatchRA MatchDEC dstArcSec `_searchID_` objName              
#>     <dbl>    <dbl>     <dbl>        <int> <chr>                
#> 1    269.     71.5     1.25             0 PSO J268.7044+71.5430
#> 2    269.     71.5     1.72             0 PSO J268.7033+71.5434
#> 3    269.     71.5     1.83             0 PSO J268.7023+71.5425
#> 4    269.     71.5     2.23             0 PSO J268.7053+71.5428
#> 5    269.     71.5     2.91             0 PSO J268.7053+71.5424
#> 6    269.     71.5     2.97             0 PSO J268.7059+71.5431
#> 7    169.     60.8     0.470            1 PSO J168.8729+60.7515
#> 8    169.     60.8     1.61             1 PSO J168.8733+60.7512

Copy Link

Version

Install

install.packages('panstarrs')

Monthly Downloads

311

Version

0.2.3

License

MIT + file LICENSE

Maintainer

Grigory Uskov

Last Published

December 3rd, 2025

Functions in panstarrs (0.2.3)

ps1_metadata

Metadata from PS1
validate_radec

Check ra, dec params
ps1_search

Do a general search of the PS1 catalog (possibly without ra/dec/radius)
ps1_cone

Do a cone search of the PS1 catalog
get_metadata

Get preloaded metadata
ps1_image_list

Get list of images
ps1_image_gray

Get grayscale image at a sky position
ps1_mast_resolve

Get the RA and Dec for an object using the MAST name resolver
ps1_crossmatch

Do a cross-match with PS1 catalog
ps1_image_color

Get color image at a sky position
ps1_image_url

Get URL of images
ps1_mast_query

Perform a MAST query.
ps1_resolve

Get the RA and Dec for objects from PanSTARRS catalog.
convert_types

Convert types.
checklegal

Check legal