PS1 Cat examples

library(panstarrs)
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
library(magrittr)

Example 1

Get MeanPSFMag in grizy filters from catalog for KQ Uma

1. Get coords for source

coords <- ps1_mast_resolve('KQ Uma')
coords
#> $ra
#> [1] 139.3343
#> 
#> $decl
#> [1] 68.63514

3. Or use crossmatch

df_cross <- ps1_crossmatch(ra = coords$ra, 
               dec = coords$decl,
               r_arcmin = 0.01,
               table = 'mean',
               release = 'dr2')
df_cross %>% select(matches('[grizy]MeanPSFMag$'))
#> # A tibble: 1 × 5
#>   gMeanPSFMag rMeanPSFMag iMeanPSFMag zMeanPSFMag yMeanPSFMag
#>         <dbl>       <dbl>       <dbl>       <dbl>       <dbl>
#> 1        15.0        14.6        14.2        14.3        14.3

Example 2

Cross-matching with PS1 catalog

ps1_crossmatch(ra = c(268.70342, 168.87258), 
              dec = c(71.54292, 60.75153),
              table= 'mean',
              release = 'dr2') %>% 
  arrange(`_searchID_`, dstArcSec) %>% 
  select(1:4,7)
#> # A tibble: 8 × 5
#>   `_ra_` `_dec_` `_searchID_` MatchID            dstArcSec
#>    <dbl>   <dbl>        <int> <chr>                  <dbl>
#> 1   269.    71.5            0 193852687043832438     1.25 
#> 2   269.    71.5            0 193852687032912825     1.72 
#> 3   269.    71.5            0 193852687025391786     1.83 
#> 4   269.    71.5            0 193852687053472181     2.23 
#> 5   269.    71.5            0 193852687052801597     2.91 
#> 6   269.    71.5            0 193852687059232498     2.97 
#> 7   169.    60.8            1 180901688728602532     0.470
#> 8   169.    60.8            1 180901688732442143     1.61