<resource schema="ucac5">
	<meta name="title">The fifth U.S. Naval Observatory CCD Astrograph
		Catalog (UCAC5)</meta>
	<meta name="schema-rank">1000</meta>
	<meta name="creationDate">2017-02-27T08:28:00Z</meta>
	<meta name="description" format="plain">
		New astrometric reductions of the US Naval Observatory CCD Astrograph
		Catalog (UCAC) all-sky observations were performed from first principles
		using the TGAS stars in the 8 to 11 magnitude range as reference star
		catalog. Significant improvements in the astrometric solutions were
		obtained and the UCAC5 catalog of mean positions at a mean epoch near 2001
		was generated. By combining UCAC5 with Gaia DR1 data new proper motions on
		the Gaia coordinate system for over 107 million stars were obtained with
		typical accuracies of 1 to 2 mas/yr (R = 11 to 15 mag), and about 5 mas/yr
		at 16th mag. Proper motions of most TGAS stars are improved over their Gaia
		data and the precision level of TGAS proper motions is extended to many
		millions more, fainter stars.

		The database table uses actual NULLs for missing photometry, and all
		angular coordinates have been homogenised to degrees.
	</meta>

	<meta name="source">2017arXiv170205621Z</meta>

	<meta name="creator">	Zacharias, N.; Finch, C.; Frouard, J.</meta>
	<meta name="subject">surveys</meta>
	<meta name="subject">astrometry</meta>
	<meta name="subject">proper-motions</meta>

	<meta name="coverage.waveband">Optical</meta>

	<meta name="_longdoc" format="rst"><![CDATA[

On Catalog Construction
=======================

UCAC5 Positions
---------------

For the UCAC positions given here, no new pixel reductions were performed.
Instead, the object detection results (x,y,mag) of the UCAC4 data were used in
new “plate” reductions after matching with the TGAS stars.  New frame-by-frame
solutions were obtained with TGAS instead of Tycho-2 reference stars (as used
in UCAC4).  Thus these UCAC5 positions are automatically on the Gaia reference
system.  Systematic errors were re-visited and new field-distortion patterns
generated and applied separately for the northern and southern operations.  The
pixel-phase error corrections were improved as well.

No changes in the systematic error correction model as function of
magnitude were made.  These were obtained from earlier dedicated reductions
with 2MASS stars to allow complete coverage of the UCAC magnitude range.
The TGAS data only reaches to about magnitude 11.5 and is thus not suitable
for a re-evaluation of the systematic errors as a function of magnitude
(the UCAC limiting magnitude is about 16.5).

Nevertheless, residuals of the TGAS solutions were plotted as a function
of magnitude and systematic errors in the accessible magnitude range are
small (order 5 mas or less) for the global averages of all data.
Local sub-sets of the data show somewhat larger systematic errors in
the order of up to 10 mas, as expected from previous UCAC4 results.

A new catalog of UCAC mean positions from these reductions with TGAS
was constructed containing over 180 million entries covering all-sky.
These positions have mean epochs around 1998-2000 in the south, and
around 2001 to 2003 in the north.  Formal position errors are about
8 mas around magnitude 11, 20 mas at magnitude 14, and 60 mas at
magnitude 16 (see :bibcode:`2017arXiv170205621Z`).


UCAC5 with new proper motions
-----------------------------

The Gaia DR1 catalog supplemented by NOMAD proper motions as described
in Step 1 was propagated to epoch 2000, sorted by Dec and then matched
with the TGAS reduced UCAC mean positions as described in Step 2.
Again, a match was assumed if the position difference is less equal
to 1 arcsec in each coordinate.  This resulted in 107.7 million stars
in common between the UCAC and Gaia data.  New proper motions were
calculated for all those stars based only on the 2 epoch positions with
a mean epoch difference of about 14 years.

For several millions of stars up to about magnitude 14 the errors on
these new proper motions are on the same level as the TGAS proper
motions (1 to 2 mas/yr, see below).  This set of UCAC - Gaia matched
stars with new positions and proper motions is called UCAC5.

Formal errors on the new proper motions were calculated by root-square-sum
of a) formal position error of UCAC, b) formal position error of TGAS
(both at their respective mean epochs), and c) a systematic error
contribution of 10 mas at the UCAC epoch data. This RSS value was
then divided by the epoch difference to arrive at the proper motion
errors given in the UCAC5 data files.

Full source
-----------

The catalog source can be obtained at http://vo.ari.uni-heidelberg.de/ucac5.
]]></meta>

	<coverage>
		<temporal>2015-01-01 2015-01-01</temporal>
		<spatial>0/0-11</spatial>
		<spectral>8.277e-20 4.138e-19</spectral>
	</coverage>

	<table id="main" onDisk="True" adql="True" mixin="//scs#q3cindex">
		<stc>
			Position ICRS Epoch J2015.0 "ra" "dec"
					Error "ra_error" "dec_error"
				Velocity "pmra" "pmde" Error "sigpmr" "sigpmd"
		</stc>
		<stc>
			Position ICRS Epoch "epu" "ra_ucac" "de_ucac"
				Velocity "pmra" "pmde" Error "sigpmr" "sigpmd"
		</stc>

		<column name="source_id" type="bigint" required="True"
			ucd="meta.id;meta.main"
			tablehead="Source Id"
			description="Gaia source ID"
			verbLevel="1"/>
		<column name="ra" type="double precision"
			unit="deg" ucd="pos.eq.ra;meta.main"
			tablehead="RA"
			description="Gaia DR1 Right Ascension at epoch J2015.0"
			verbLevel="1" displayHint="sf=8"/>
		<column name="dec" type="double precision"
			unit="deg" ucd="pos.eq.dec;meta.main"
			tablehead="Dec"
			description="Gaia DR1 Declination at epoch J2015.0"
			verbLevel="1" displayHint="sf=8"/>
		<column name="ra_error"
			ucd="stat.error;pos.eq.ra" unit="deg"
			tablehead="Err. RA"
			description="Standard error of ra (with cos δ applied); from
				Gaia DR1."
			verbLevel="15"
			displayHint="sf=2,displayUnit=mas"/>
		<column name="dec_error"
			ucd="stat.error;pos.eq.dec" unit="deg"
			tablehead="Err. Dec"
			description="Standard error of dec; from Gaia DR1."
			verbLevel="15"
			displayHint="sf=2,displayUnit=mas"/>
		<column name="srcflags" type="smallint" required="True"
			ucd="meta.code"
			tablehead="Src flags"
			description="Source for the star:
			1 = TGAS,  2 = other UCAC-Gaia star, 3 = other NOMAD"
			verbLevel="25"/>
		<column name="nu1" type="smallint" required="True"
			ucd="meta.number"
			tablehead="#Img used"
			description="Number of images used for UCAC mean position"
			verbLevel="25"/>
		<column name="epu"
			unit="yr" ucd="time.epoch"
			tablehead="Epoch"
			description="Mean UCAC epoch (i.e. epoch for ra_ucac and de_ucac)"
			verbLevel="15"/>
		<column name="ra_ucac" type="double precision"
			unit="deg" ucd="pos.eq.ra"
			tablehead="UCAC RA"
			description="Mean UCAC RA at epoch epu on Gaia reference frame"
			verbLevel="15"
			displayHint="sf=7"/>
		<column name="de_ucac" type="double precision"
			unit="deg" ucd="pos.eq.dec"
			tablehead="UCAC DEC"
			description="mean UCAC Dec at epoch epu on Gaia reference frame"
			verbLevel="15"
			displayHint="sf=7"/>
		<column name="pmra"
			unit="deg/yr" ucd="pos.pm;pos.eq.ra"
			tablehead="PM RA"
			description="PM(RA), cos(δ) applied, computed from UCAC and Gaia DR1
			positions."
			verbLevel="5"
			displayHint="sf=1,displayUnit=mas/yr"/>
		<column name="pmde"
			unit="deg/yr" ucd="pos.pm;pos.eq.dec"
			tablehead="PM Dec"
			description="PM(Dec), computed from UCAC positions and Gaia
				DR1 positions."
			verbLevel="5"
			displayHint="sf=1,displayUnit=mas/yr"/>
		<column name="sigpmr"
			unit="deg/yr" ucd="stat.error;pos.pm;pos.eq.ra"
			tablehead="Err. PM(RA)"
			description="Standard error of proper motion in RA*cos(Dec)"
			verbLevel="15"
			displayHint="sf=1,displayUnit=mas/yr"/>
		<column name="sigpmd"
			unit="deg/yr" ucd="stat.error;pos.pm;pos.eq.dec"
			tablehead="Err. PM(Dec)"
			description="Standard error of proper motion in Dec"
			verbLevel="15"
			displayHint="sf=1,displayUnit=mas/yr"/>
		<column name="gmag"
			unit="mag" ucd="phot.mag;em.opt"
			tablehead="m_G"
			description="Gaia DR1 G magnitude"
			verbLevel="5"
			displayHint="sf=3"/>
		<column name="umag"
			unit="mag" ucd="phot.mag;em.opt.V"
			tablehead="m_V"
			description="Mean UCAC model magnitude (20 in the source is mapped to
			NULL)"
			verbLevel="5"
			displayHint="sf=3"/>
		<column name="rmag"
			unit="mag" ucd="phot.mag;em.opt.R"
			tablehead="m_R"
			description="NOMAD photographic R mag (0 and 30 in the source
				are mapped to NULL)"
			verbLevel="15"
			displayHint="sf=3"/>
		<column name="jmag"
			unit="mag" ucd="phot.mag;em.IR.J"
			tablehead="m_J"
			description="2MASS J magnitude (0 and 30 in the source
				are mapped to NULL)"
			verbLevel="15"
			displayHint="sf=3"/>
		<column name="hmag"
			unit="mag" ucd="phot.mag;em.IR.H"
			tablehead="m_H"
			description="2MASS H magnitude (0 and 30 in the source
				are mapped to NULL)"
			verbLevel="15"
			displayHint="sf=3"/>
		<column name="kmag"
			unit="mag" ucd="phot.mag;em.IR.K"
			tablehead="m_K"
			description="2MASS K_s magnitude (0 and 30 in the source are mapped
				to NULL)"
			verbLevel="15"
			displayHint="sf=3"/>
	</table>

	<data id="import">
		<sources pattern="data/z*"/>
		<directGrammar id="boost" cBooster="res/boosterfunc.c"
			type="bin" recordSize="52"/>
		<make table="main"/>
	</data>

	<service id="cone" allowed="scs.xml,form">
		<meta>
			shortName: UCAC 5
			testQuery.ra: 208.82855
			testQuery.dec: -59.70276
			testQuery.sr: 0.001
		</meta>
		<publish render="scs.xml" sets="ivo_managed"/>
		<publish render="form" sets="ivo_managed,local"/>
		<dbCore queriedTable="main">
			<FEED source="//scs#coreDescs"/>
			<condDesc buildFrom="gmag"/>
			<condDesc buildFrom="umag"/>
		</dbCore>
	</service>

	<regSuite title="UCAC5 regressions">
		<regTest title="UCAC5 cone yields credible values">
			<url RA="208.82855" DEC="-59.70275" SR="0.001" VERB="3"
				>cone/scs.xml</url>
			<code>
				row = self.getFirstVOTableRow()
				self.assertEqual(row["source_id"], '5867576683902312192')
				self.assertAlmostEqual(row["rmag"], 13.449999809265137)
				self.assertAlmostEqual(row["pmde"], -2.333330030523939e-06)
			</code>
		</regTest>
		<regTest title="UCAC5 epoch column properly annotated">
			<url REQUEST="doQuery" LANG="ADQL"
				QUERY="SELECT TOP 1 * FROM ucac5.main">/tap/sync</url>
			<code>
				for group in self.getXpath(
						"//v:GROUP[utype='stc:CatalogEntryLocation']"):
					if self.getXpath(
							"v:FIELDref[utype='stc:AstroCoords.Position2D.Value2.C1']",
							group)[0].get("ref")=="ra_ucac":
						# UCAC position annotation, epoch is in column
						self.assertEqual(
							self.getXpath(
								"v:FIELDref[utype='stc:AstroCoords.Position2D.Epoch']",
								group)[0].get("ref"), "epu")
					else:
						# Gaia position annotation, epoch is a literal
						self.assertEqual(
							self.getXpath(
								"v:PARAM[utype='stc:AstroCoords.Position2D.Epoch']",
								group)[0].get("value"), "2015.0")
						self.assertEqual(
							self.getXpath(
								"v:PARAM[utype='stc:AstroCoords.Position2D.Epoch.yearDef']",
								group)[0].get("value"), "J")
			</code>
		</regTest>
	</regSuite>

</resource>
