<resource schema="ucdc" resdir=".">
	<meta name="creationDate">2024-08-16T07:32:04Z</meta>

	<meta name="title">Ultracool Dwarf Companion Catalogue UCDC</meta>
	<meta name="description">
		The Ultracool Dwarf Companion Catalogue consists of 278 multiple systems,
		32 of which are newly discovered, each with at least one spectroscopically
		confirmed Ultracool Dwarf, within a 100 pc volume-limited sample. This
		catalogue is compiled using the Gaia Catalogue of Nearby Stars for stellar
		primaries and the Gaia Ultracool Dwarf Sample for low-mass companions and
		includes 241 doubles, 33 triples, and 4 higher-order systems established
		from positional, proper motion, and parallax constraints.
	</meta>
	<meta name="subject">astrometric-binary-stars</meta>
	<meta name="subject">brown-dwarfs</meta>
	<meta name="subject">catalogs</meta>

	<meta name="creator">Baig, Sayan; Smart, R. L.; Jones, Hugh R.A.;
		Gagné, Jonathan; Pinfield, D.J.; Cheng, Gemma; Moranta, Leslie</meta>

	<meta name="source">https://arxiv.org/abs/2408.07024</meta>
	<meta name="contentLevel">Research</meta>
	<meta name="type">Catalog</meta>

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

	<FEED source="//procs#license-cc-by" what="UCDC"/>

	<STREAM id="upper-lower-error">
		<column name="\name"
			unit="\unit" ucd="\ucd"
			tablehead="\tablehead"
			description="\description"
			verbLevel="15"/>
		<column name="err_\name\+_lower"
			unit="\unit" ucd="stat.error;\ucd"
			tablehead="Err \tablehead ↓"
			description="Lower error in \shortdescription"
			verbLevel="25"/>
		<column name="err_\name\+upper"
			unit="\unit" ucd="stat.error;\ucd"
			tablehead="Err \tablehead ↑"
			description="Upper error in \shortdescription"
			verbLevel="25"/>
	</STREAM>

	<table id="main" onDisk="True" mixin="//scs#q3cindex" adql="True">
		<column name="sys_num" type="integer" required="True"
			ucd="meta.id;meta.main"
			tablehead="Cat. nr."
			description="Identifier of the system in the UCDC"
			verbLevel="1"/>
		<column name="num_comp" type="smallint"
			ucd="meta.number"
			tablehead="#comp"
			description="Total number of objects that make up the system"
			verbLevel="15">
			<values nullLiteral="-1"/>
		</column>
		<column name="short_name" type="text"
			ucd="meta.id"
			tablehead="Name"
			description="Short (and unique) name used in this catalogue"
			verbLevel="1"/>
		<column name="discovery_name" type="text"
			ucd="meta.id.cross"
			tablehead="Disc. Name"
			description="Known identifier from literature"
			verbLevel="15"/>
		<column name="bd_ref" type="text"
			ucd="meta.bib.bibcode"
			tablehead="Bin. Src"
			description="Binarity discovery bibcode"
			verbLevel="15" displayHint="type=bibcode"/>
		<column original="gaia/q3#dr3lite.source_id"
			ucd="meta.id.cross"
			description="Unique source identifier for Gaia DR3"
			verbLevel="1"/>
		<column name="fpp"
			ucd="stat.fit.goodness"
			tablehead="FPP"
			description="False-Positive Probability - Probability of the system being
				a False-Positive match"
			verbLevel="1"/>
		<column name="ang_sep"
			unit="arcsec" ucd="pos.angDistance"
			tablehead="Separation"
			description=" Angular Separation between companion and the ultracool
				dwarf"
			verbLevel="1"/>
		<column name="projected_sep"
			unit="AU" ucd="pos.distance"
			tablehead="Comp. Dist"
			description="Projected physical separation between companion and the
				ultracool dwarf"
			verbLevel="15"
			displayHint="sf=0"/>
		<column name="plx_diff"
			unit="mas" ucd="pos.parallax;arith.diff"
			tablehead="Δπ"
			description="Difference in Parallax between companion and the
				ultracool dwarf"
			verbLevel="15"
			displayHint="sf=2"/>
		<column name="pm_diff"
			unit="mas/a" ucd="pos.pm;arith.diff"
			tablehead="Δμ"
			description=" Proper Motion difference between companion and the
				ultracool dwarf, absolute value"
			verbLevel="15"
			displayHint="sf=2"/>
		<column name="pma_diff"
			unit="deg" ucd="pos.posAng;arith.diff"
			tablehead="Δ(PA)"
			description="Proper Motion difference between companion and the ultracool
				dwarf, position angle"
			verbLevel="15"
			displayHint="sf=2"/>
		<column name="ra" type="double precision"
			unit="deg"
			ucd="pos.eq.ra;meta.main"
			tablehead="RA"
			description="Right Ascension from epoch_ref"
			verbLevel="1"/>
		<column name="dec" type="double precision"
			unit="deg" ucd="pos.eq.dec;meta.main"
			tablehead="Dec"
			description="Declination from epoch-ref"
			verbLevel="1"/>
		<column name="epoch"
			unit="a" ucd="time.epoch"
			tablehead="Pos. epooch"
			description="Epoch of object position"
			verbLevel="15"/>
		<column name="epoch_ref" type="text"
			ucd="meta.bib.bibcode;pos"
			tablehead="Pos. Src."
			description="Bibcode for the source of the epoch position"
			verbLevel="15" displayHint="type=bibcode"/>

		<column name="parallax"
			unit="mas" ucd="pos.parallax"
			tablehead="π"
			description="Parallax taken from parallax_ref"
			verbLevel="5"
			displayHint="sf=2"/>
		<column name="parallax_err"
			unit="mas" ucd="stat.error;pos.parallax"
			tablehead="Err.π"
			description="Error in parallax"
			verbLevel="15"
			displayHint="sf=3"/>
		<column name="parallax_ref" type="text"
			ucd="meta.bib.bibcode;pos.parallax"
			tablehead="Src. π"
			description="Bibcode for the source of the parallax value"
			verbLevel="25"
			displayHint="type=bibcode"/>

		<column name="pmra"
			unit="mas/a"
			ucd="pos.pm;pos.eq.ra"
			tablehead="PM(RA)"
			description="Proper motion in Right Ascension from pm_ref"
			verbLevel="1"/>
		<column name="err_pmra"
			unit="mas/a"
			ucd="stat.error;pos.pm;pos.eq.ra"
			tablehead="Err. PM(RA)"
			description="Error in the proper motion in Right Ascension"
			verbLevel="15"/>

		<column name="pmdec"
			unit="mas/a"
			ucd="pos.pm;pos.eq.dec"
			tablehead="PM(Dec)"
			description="Proper motion in Declination from pm_ref"
			verbLevel="1"/>
		<column name="err_pmdec"
			unit="mas/a"
			ucd="stat.error;pos.pm;pos.eq.dec"
			tablehead="Err. PM(Dec)"
			description="Error in proper motion in Declination"
			verbLevel="1"/>
		<column name="pm_ref" type="text"
			ucd="meta.bib.bibcode;pos.pm"
			tablehead="Src. PM"
			description="Bibcode for the source of the proper motions"
			verbLevel="15" displayHint="type=bibcode"/>

		<column name="mag_g"
			unit="mag"
			ucd="phot.mag;em.opt.V"
			tablehead="m_G"
			description="G-band mean magnitude"
			verbLevel="1"
			displayHint="sf=3"/>
		<column name="err_mag_g"
			unit="mag"
			ucd="stat.error;phot.mag;em.opt.V"
			tablehead="Err. m_G"
			description="Error in G-band mean magnitude"
			verbLevel="15"
			displayHint="sf=3"/>
		<column name="mag_rp"
			unit="mag" ucd="phot.mag;em.opt.R"
			tablehead="m_RP"
			description=" RP mean magnitude"
			verbLevel="1"
			displayHint="sf=3"/>
		<column name="err_mag_rp"
			unit="mag" ucd="stat.error;phot.mag;em.opt.R"
			tablehead="Err. m_RP"
			description="Error in RP mean magnitude"
			verbLevel="1"
			displayHint="sf=3"/>
		<column name="mag_g_rp"
			unit="mag" ucd="phot.color;em.opt.V;em.opt.R"
			tablehead="G-RP"
			description="G-RP colour " verbLevel="1"
			displayHint="sf=3"/>
		<column name="mag_j"
			unit="mag" ucd="phot.mag;em.ir.j"
			tablehead="m_J"
			description="2MASS J-band mean magnitude"
			verbLevel="15"
			displayHint="sf=2"/>
		<column name="err_mag_j"
			unit="mag" ucd="stat.error;phot.mag;em.ir.j"
			tablehead="Err. m_J"
			description="Error in 2MASS J-band mean magnitude"
			verbLevel="25"
			displayHint="sf=2"/>
		<column name="mag_h"
			unit="mag" ucd="phot.mag;em.ir.h"
			tablehead="m_H"
			description="2MASS H-band mean magnitude"
			verbLevel="15"
			displayHint="sf=2"/>
		<column name="err_mag_h"
			unit="mag" ucd="phot.mag;em.ir.h"
			tablehead="Err. m_H"
			description="Error in 2MASS H-band mean magnitude"
			verbLevel="25"
			displayHint="sf=2"/>
		<column name="mag_k"
			unit="mag" ucd="phot.mag;em.ir.K"
			tablehead="m_K"
			description="2MASS K_s-band mean magnitude"
			verbLevel="15"
			displayHint="sf=2"/>
		<column name="err_mag_k"
			unit="mag" ucd="stat.error;phot.mag;em.ir.K"
			tablehead="Err. m_K"
			description="Error in 2MASS K_s-band mean magnitude"
			verbLevel="25"
			displayHint="sf=2"/>

		<column name="sptopt" type="text"
			ucd="src.sptype"
			tablehead="Spect. Opt."
			description="Optical Spectral Type from sptopt_ref"
			verbLevel="15"/>
		<column name="sptopt_ref" type="text"
			ucd="meta.bib.bibcode;src.sptype"
			tablehead="Src. Spectype Opt"
			description="Reference for the optical spectral type"
			verbLevel="15"
			displayHint="type=bibcode"/>
		<column name="sptnir" type="text"
			ucd="src.sptype"
			tablehead="Sepct. IR"
			description="Near Infrared Spectral Type from sptnir_ref"
			verbLevel="15"/>
		<column name="sptnir_ref" type="text"
			ucd="meta.bib.bibcode;src.sptype"
			tablehead="Src. Spectype IR"
			description="Reference for the near infrared spectral type"
			verbLevel="1"
			displayHint="type=bibcode"/>
		<column name="astrometric_n_obs_al" type="smallint"
			ucd="meta.number"
			tablehead="Gaia AL #Obs"
			description="Total number of observations in the along the Gaia scan (AL)
				direction"
			verbLevel="25">
			<values nullLiteral="-1"/>
		</column>
		<column name="phot_g_n_obs" type="smallint"
			ucd="meta.number"
			tablehead="Gaia G #Obs"
			description="Number of observations contributing to G photometry"
			verbLevel="25">
			<values nullLiteral="-1"/>
		</column>
		<column name="phot_rp_n_obs" type="smallint"
			ucd="meta.number" tablehead="Gaia RP #Obs"
			description="Number of observations contributing to RP photometry"
			verbLevel="25">
			<values nullLiteral="-1"/>
		</column>
		<column name="phot_rp_n_blended_transits" type="smallint"
			ucd="meta.number"
			tablehead="#RP blended"
			description="Number of RP blended transits"
			verbLevel="25">
			<values nullLiteral="-1"/>
		</column>

		<column name="ruwe"
			ucd="stat.error"
			tablehead="RUWE"
			description="Renormalised Unit Weight Error"
			verbLevel="15"/>
		<column name="luwe"
			ucd="stat.error"
			tablehead="LUWE"
			description="Local Unit Weight Error as per 2022MNRAS.513.5270P"
			verbLevel="15"/>
		<column name="ipd_gof_harmonic_amplitude"
			unit="deg" ucd="stat.value"
			tablehead="IPD GoF Ampl."
			description="Amplitude of the IPD GoF versus position angle of scan"
			verbLevel="15"/>
		<column name="ipd_frac_multi_peak" type="smallint"
			unit="%" ucd="stat.value"
			tablehead="#IPD multi-peak"
			description="Percent of successful-IPD windows with more than one peak"
			verbLevel="15">
			<values nullLiteral="-1"/>
		</column>
		<column name="rv"
			unit="km/s" ucd="phys.veloc;pos.heliocentric"
			tablehead="RV"
			description="Radial Velocity from rv_ref"
			verbLevel="1"
			displayHint="sf=1"/>
		<column name="err_rv"
			unit="km/s" ucd="stat.error;phys.veloc;pos.heliocentric"
			tablehead="Err. RV"
			description="Error in radial velocity"
			verbLevel="15"
			displayHint="sf=2"/>
		<column name="rv_ref" type="text"
			ucd="meta.bib.bibcode;phys.veloc;pos.heliocentric"
			tablehead="Src. RV"
			description="Bibcode of the source of rv"
			verbLevel="15"
			displayHint="type=bibcode"/>

		<column name="v_tan"
			unit="km/s"
			ucd="phys.veloc.transverse"
			tablehead="Tangential"
			description="Tangential Velocity"
			verbLevel="1"/>
		<FEED source="upper-lower-error"
			name="t_eff"
			unit="K" ucd="phys.temperature.effective"
			tablehead="T_eff"
			description="Effective temperature from t_eff_ref"
			shortdescription="effective temperature"
			displayHint="sf=0"/>
		<column name="err_t_eff_espucd"
			unit="K" ucd="stat.error;phys.temperature.effective"
			tablehead="Err. T_eff ESP"
			description="Error in T_eff from ESP-UCD"
			verbLevel="15"
			displayHint="sf=0"/>
		<column name="t_eff_ref" type="text"
			ucd="meta.bib" tablehead="Src. T_eff"
			description=" 1 = GSP-Phot, 2 = ESP-UCD"
			verbLevel="25"/>

		<FEED source="upper-lower-error"
			name="logg_gspphot"
			unit="log(cm/s**2)"
			ucd="phys.gravity"
			tablehead="logg"
			description="Surface gravity from GSP-Phot (DR3) (Median of MCMC values)"
			shortdescription="Surface gravity"/>

		<FEED source="upper-lower-error"
			name="mh_gspphot"
			unit=""
			ucd="phys.abund.Fe"
			tablehead="[Fe]"
			description="Iron abundance from GSP-Phot (DR3) (Median of MCMC values,
				log relative to solar)"
			shortdescription="Iron abundance"/>

		<FEED source="upper-lower-error"
			name="luminosity"
			unit="solLum"
			ucd="phys.luminosity"
			tablehead="L"
			description="Bolometric luminosity"
			shortdescription="Bolometric luminosity"/>

		<FEED source="upper-lower-error" name="mass"
			unit="solMass"
			ucd="phys.mass"
			tablehead="Mass"
			description="Mass of the object from mass_ref"
			shortdescription="object mass"/>
		<column name="mass_ref" type="text"
			ucd="meta.bib"
			tablehead="Src. Mass"
			description="Mass reference: 1 = gaia FLAME,
				2 = White Dwarf, 3 = BANYAN Sigma"
			verbLevel="25"/>

		<FEED source="upper-lower-error"
			name="age"
			unit="Gyr" ucd="time.age"
			tablehead="Age"
			description="Age of the object from age_ref"
			shortdescription="Age of the object"/>
		<column name="age_ref" type="text"
			ucd="meta.bib"
			tablehead="Src. Age"
			description="Age reference: 1 = gaia FLAME,
				2 = White Dwarf, 3 = BANYAN Sigma" verbLevel="25"/>
	</table>

	<coverage>
		<updater sourceTable="main"/>
		<spectral>3250[Angstrom] 1000[nm]</spectral>
	</coverage>

	<data id="import">
		<sources pattern="data/*.csv"/>

		<!-- the column labels from upstream are tedious, hence skip them -->
		<csvGrammar names="\colNames{main}" topIgnoredLines="1"/>

		<make table="main">
			<rowmaker idmaps="*">
				<map key="t_eff_ref">@t_eff_ref.strip() or None</map>
			</rowmaker>
		</make>
	</data>

	<service id="cone" allowed="form,scs.xml">
		<meta name="shortName">UCDC cone</meta>
		<meta name="testQuery">
			<meta name="ra">351.3962115</meta>
			<meta name="dec">46.13589856</meta>
			<meta name="sr">0.001</meta>
		</meta>

		<publish render="form" sets="ivo_managed, local"/>
		<publish render="scs.xml" sets="ivo_managed"/>

		<scsCore queriedTable="main">
			<FEED source="//scs#coreDescs"/>
			<condDesc buildFrom="discovery_name"/>
			<condDesc buildFrom="age"/>
			<condDesc buildFrom="mass"/>
		</scsCore>
	</service>

	<regSuite title="ucdc regression">
		<regTest title="ucdc SCS serves some data">
			<url RA="351.3962115"
					DEC="46.13589856" SR="0.001"
				>cone/scs.xml</url>
			<code>
				row = self.getFirstVOTableRow()
				self.assertEqual(row["pm_ref"], "2018A&amp;A...616A...1G")
				self.assertEqual(row["age"], None)
				self.assertEqual(row["short_name"], "J2325+4608B")
			</code>
		</regTest>

	</regSuite>
</resource>
