How to work with catalogs

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(panstarrs)
library(dplyr)
library(data.table)

Example 1

Get MeanPSFMag in the grizy filters from PS1 catalog for the KQ Uma source.

1. Get coords for the source

coords <- ps1_mast_resolve('KQ Uma')
coords

2. Search sources in the circle around the KQ position

df_cone <- ps1_cone(
  coords$ra, 
  coords$decl,
  r_arcmin = 0.01, 
  table = 'mean',
  release = 'dr2'
)

# tidyverse approach
df_cone |>
  dplyr::select(dplyr::matches('[grizy]MeanPSFMag$'))

# or if you prefer data.table approach
df_cone[, .SD, .SDcols = grepl('[grizy]MeanPSFMag$', names(df_cone))]


Try the panstarrs package in your browser

Any scripts or data that you put into this service are public.

panstarrs documentation built on May 29, 2024, 3:10 a.m.