------------------------------------------------------------------------
PS1: star-galaxy separation and photo-z estimates
------------------------------------------------------------------------

PS1-STRM (Source Types and Redshifts with Machine learning).
2,902,054,648 objects (PS-1 3pi survey).  "The overwhelming fraction
of spectroscopic matches in our sample has come from SDSS DR14...
On our validation data set, for non-extrapolated sources, we achieve
an overall classification accuracy of 98.1 per cent for galaxies,
97.8 per cent for stars, and 96.6 per cent for quasars. The redshift
impurity defined as probability of the normalized absolute deviation,
abs(zphot-zspec)/(1+zspec) > 0.15 is 1.9%. The standard deviation
of the noramlized deviation is 0.0322 and the median of the absolute
normalized deviation is 0.016. ... The useful red-shift range of
the catalog is up to 0.6."

https://archive.stsci.edu/hlsp/ps1-strm
Beck+2021  https://ui.adsabs.harvard.edu/abs/2021MNRAS.500.1633B/abstract

Program "ps1STRM" does a cone search of STRM

# usage: ps1STRM [-r CONERADIUS] {-s} {-t} {-h} RA(deg) Dec(deg)
#  [ ] .. default action, { } explicit request for action
# -r CONERADIUS (in arcseconds) [10]
# -s show header
# -t end display of results with "%-------"
# -h help

# cone-search PS1 STRM catalog around RA(deg) Dec(deg0.
# return tab-separated ra dec type pGalaxy pStar pQSO zphot err_zphot
# type=galaxy,star,qso
# p=probabilities (galaxy,star,qso) 
# zphot=photometric redshift


------------------------------------------------------------------------
curl call 
------------------------------------------------------------------------

RA=59.117272549999996 #RA in degrees
DEC=-16.73212755      #Dec in degrees
RADIUS=0.0833         #search radius in degrees
OFILE=output.txt      #output file
WSID=                 #ID of user
PASSWORD=             #password of user

curl -X GET 'https://mastweb.stsci.edu/ps1casjobs/services/jobs.asmx/ExecuteQuickJob?qry=select+o.objID%2C+o.uniquePspsOBid%2C+o.raMean%2C+o.decMean%2C+%0Ao.class%2C+o.prob_Galaxy%2C+o.prob_Star%2C+o.prob_QSO%2C%0Ao.extrapolation_Class%2C+o.cellDistance_Class%2C+o.cellID_Class%2C+%0Ao.z_phot%2C+o.z_photErr%2C+o.z_phot0%2C+%0Ao.extrapolation_Photoz%2C+cellDistance_Photoz%2C+o.cellID_Photoz%0Afrom+fGetNearbyObjEq%28$RA%2C$DEC%2C$RADIUS%29+nb%0Ainner+join+catalogRecordRowStore+o+on+o.objID%3Dnb.objID%0A&context=HLSP_PS1_STRM&taskname=quickie&isSystem=False&wsid=$WSID&pw=$PASSWORD' --output $OFILE

The output is (apart from header, footer) is a line per source with 17
columns.

------------------------------------------------------------------------
Key words for curl call
	                <- items of interest are marked thus
------------------------------------------------------------------------
     1	[objID]
     2	[uniquePspsOBid]
     3	[raMean]        <- in degrees
     4	[decMean]       <- in degrees   
     5	[class]         <-  "STAR", "GALAXY", "QSO", "UNSURE"
     6	[prob_Galaxy]   <- probability GALAXY
     7	[prob_Star]     <-             STAR
     8	[prob_QSO]      <-             QSO
     9	[extrapolation_Class]
    10	[cellDistance_Class]
    11	[cellID_Class]
    12	[z_phot]
    13	[z_photErr]     <- use this ("standard deviation")
    14	[z_phot0]       <- use this 
    15	[extrapolation_Photoz]
    16	[cellDistance_Photoz]
    17	[cellID_Photoz]
------------------------------------------------------------------------