<?xml version="1.0" encoding="utf-8"?>

<resource schema="dmubin">
	<meta name="title">Delta-mu Binaries</meta>
	<meta name="creationDate">2009-07-14T10:10:00Z</meta>
	<meta name="schema-rank">1000</meta>
	<meta name="description">A collection of binary stars with a difference
	in instantaneous proper motion as measured by HIPPARCOS and the long-term
	proper motion.
	</meta>
	<meta name="_longdoc" format="rst">
		A Δμ binary is an object that has a statistcally signifcant difference
		between instantaneous proper motion (as measured by HIPPARCOS) and a
		longer-term proper motion as indicated by longer-term observations.

		The HIPPARCOS proper motion is taken from the
		\RSTservicelink{//dc_tables/show/tableinfo/hipparcos.main}{HIPPARCOS catalogue}.

		The mean proper motion is usually either taken directly from a ground-based
		astrometric catalogue (after having applied appropriate systematic
		corrections), or a new mean proper motion (μ0) is calculated from the
		ground-based position(s) and the HIPPARCOS position. The following
		catalogues have been used for obtaining mean proper motions:

		* FK5_ (Veröff. Astron. Rechen-Inst. No. 32)
		* `FK5 extension`_
		* `FK5 supplement`_
		* Boss' General Catalogue, 1937
		* Tycho-2 proper motions, 2000
		
		The basic principles of the method are explained in the paper: Wielen, R.,
		Dettbarn, C., Jahreiß, H., Lenhardt, H., Schwan, H.: Indications on the
		binary nature of individual stars derived from a comparison of their
		HIPPARCOS proper motions with ground-based data (see source metadatum).

		The stars listed here are those investigated (ca. 90000)
		with one (or more) F-measures exceeding 3.44.

		We list many newly detected binaries, but also ones already known from
		other data, e.g. visual ones.  In many cases of already known binaries, the
		F values should be considered as qualitative 'flags' for binarity only,
		since the proper motions compared may not refer to the same 'reference
		point' (e.g., HIPPARCOS refers to component A, while the FK5 to the
		center-of-mass).
		
		.. _FK5: http://www.ari.uni-heidelberg.de/publikationen/vhd/vhd032/vhd032.htm
		.. _FK5 extension: http://www.ari.uni-heidelberg.de/publikationen/vhd/vhd033/vhd033.htm
		.. _FK5 supplement: http://www.ari.uni-heidelberg.de/publikationen/vhd/vhd034/vhd034.htm
	</meta>

	<meta name="creator">Wielen, R.; Dettbarn, C.; Jahrreiß, H.;
		Lenhardt, H.; Schwan, H.</meta>

	<meta name="subject">binary-stars</meta>
	<meta name="subject">proper-motions</meta>
	<meta name="subject">astrometric-binary-stars</meta>
	<meta name="subject">catalogs</meta>

	<meta name="source">1999A&amp;A...346..675W</meta>
	<meta name="_related" title="Legacy site">http://www.ari.uni-heidelberg.de/datenbanken/dmubin/</meta>
	
  <meta name="coverage.waveband">Optical</meta>

	<table onDisk="True" id="main" adql="True" mixin="//scs#q3cindex">
		<mixin>//scs#pgs-pos-index</mixin>
		<stc>
			Position ICRS Epoch J2000 "raj2000" "dej2000"
		</stc>
		<column name="hipno" type="integer" required="True"
			tablehead="HIP#"
			description="Catalog number in Hipparcos catalog"
			ucd="meta.id;meta.main" verbLevel="9"/>
		<column name="raj2000" type="double precision"
			tablehead="RA(2000)" ucd="pos.eq.ra;meta.main"
			description="Right ascension from Hipparcos" verbLevel="1"
			unit="deg"/>
		<column name="dej2000" type="double precision"
			tablehead="Dec(2000)" ucd="pos.eq.dec;meta.main"
			description="Declination from Hipparcos" verbLevel="1"
			unit="deg"/>
		<column name="comp" type="text" tablehead="Component"
			description="Component for resolved binaries"
			ucd="meta.code" verbLevel="15"/>
		<column name="mv" tablehead="m_V" description="Visual magnitude"
			ucd="phot.mag;em.opt.V" verbLevel="19" unit="mag"/>
		<column name="color" tablehead="B-V" ucd="phot.color;em.opt.B;em.opt.V"
			description="Color index B-V, Hipparcos V magnitude" verbLevel="22"
			unit="mag"/>
		<column name="parallax" tablehead="Parallax" ucd="pos.parallax.trig"
			description="Parallax from Hipparcos" verbLevel="22" unit="mas"/>
		<column name="ffh" tablehead="F_FH"
			description="F-Measure for proper motions FK5 vs. Hipparcos"
			ucd="stat.fit.goodness;pos.pm;arith.diff" note="F"
			verbLevel="15"/>
		<column name="f0f" tablehead="F_0F"
			description="F-measure for proper motions from FK5 vs. mu0F"
			ucd="stat.fit.goodness;pos.pm;arith.diff" note="F"
			verbLevel="15"/>
		<column name="f0h" tablehead="F_0H"
			description="F-measure for proper motions from Hipparcos vs. mu0F"
			ucd="stat.fit.goodness;pos.pm;arith.diff" note="F"
			verbLevel="15"/>
		<column name="f0gch" tablehead="F_0GCH"
			description="F-measure for proper motions from Hipparcos vs. mu0G"
			ucd="stat.fit.goodness;pos.pm;arith.diff" note="F"
			verbLevel="15"/>
		<column name="ft2h" tablehead="F_T2H"
			description="F-measure for proper motions from Hipparcos vs. Tycho-2"
			ucd="stat.fit.goodness;pos.pm;arith.diff" note="F"
			verbLevel="15"/>
		<column name="fmax" tablehead="F_max"  verbLevel="30"
			ucd="stat.fit.goodness;pos.pm;arith.diff"
			description="Maximum of F-measures reported" note="F"/>
		<column name="FK" type="text" tablehead="FK"
			description="FK Part the star was found in"
			ucd="meta.ref" verbLevel="25"/>
		<column name="GC" type="text" tablehead="GC"
			description="General Catalogue Number"
			ucd="meta.id.cross" verbLevel="25"/>
		<column name="T2" type="boolean" tablehead="T2" required="True"
			description="Object is in Tycho-2" verbLevel="25"
			ucd="meta.code" displayHint="type=checkmark"/>
		<column name="HD" type="integer"
			ucd="meta.id.cross"
			tablehead="HD" verbLevel="25"
			description="Star Identifier in the HD-Catalogue">
			<values nullLiteral="-1"/>
		</column>
		<column name="HR" type="integer"
			ucd="meta.id.cross"
			tablehead="HR" verbLevel="25"
			description="Star Identifier in the HR-Catalogue">
			<values nullLiteral="-1"/>
		</column>
		<column name="GC" type="integer" tablehead="GC" verbLevel="25"
			ucd="meta.id.cross"
			description="Star Identifier in the GC">
			<values nullLiteral="-1"/>
		</column>
		<column name="CNS4" type="text" tablehead="CNS4" verbLevel="25"
			ucd="meta.id.cross"
			description="Star Identifier in CNS4">
			<values nullLiteral="-1"/>
		</column>
		<column name="FKno" type="integer" tablehead="FK" verbLevel="25"
			ucd="meta.id.cross"
			description="Star Identifier in the FK">
			<values nullLiteral="-1"/>
		</column>
		<column name="star_name" type="text" tablehead="Name" verbLevel="25"
			description="Name of the star" ucd="meta.id" />
		<column name="CCDM" type="text"
			ucd="meta.id.cross"
			tablehead="CCDM"
			description="Star Identifier in the CCDM-Catalogue"
			verbLevel="25"/>

		<meta name="note" tag="F">
			For the expressions used to obtain the F-measures, see
			1999A&amp;A...346..675W ("Source" in the metadata).

			mu0F is a proper motion derived from the FK5 and Hipparcos positions,
			mu0G is a proper motion derived from the GC and Hipparcos positions.
		</meta>
	</table>

	<coverage>
		<updater spaceTable="main" mocOrder="4"/>
		<temporal>2000-01-01 2000-01-01</temporal>
		<spatial>2/5,11,15,23,49,52,54,57,63,66,76,78,80-82,89,103,118-119,121,124-126,134,138,147,149-150,152,154,157-160,163-164,168,172,180,184,186-187,189 3/5-7,10-11,13-18,25-27,29-30,34-35,37-38,41-43,49-52,55-56,59,64,66-67,69,71,74-76,79,85-88,91,99-100,102,104,111-112,114-115,117-118,121-125,129-132,138,141-142,147,149-151,153-155,157,159-160,162-163,167,169,172-173,175-176,181,183,185-186,188,190,192,194-195,201-204,206-207,214-215,220-222,224,226-227,233,236,239-240,244-245,247,250-251,258,260-262,269-270,272-273,275,277-278,281,283-284,286,288,290-293,295,297-298,300-301,308,310-311,316-318,332,334-336,338,340-342,344-345,348,351,353-354,360,362,365-369,374,376-377,379,382-385,387,389,391-393,396-397,400,402-403,405,407-409,411,416,426-427,432,436-438,440-442,444,447-449,452,454-456,458-459,461-466,468,470,480-481,483,490,492-493,495,508,510,512-513,515-517,519-520,522-524,526,530,533-535,540,543-544,547-549,559,561,565,567,570,572,574,577-582,584,586-587,592-594,605,607,612-614,620-621,623,625-627,644-645,649-651,660-661,665-668,670-671,676,678-682,684-686,692-693,695-696,702-705,707-709,711-713,716,718-719,724-726,728,733,740-742,752-753,761,763,765 4/0,2-3,5,7-10,12-13,15-17,19,33-34,37-38,48,50-51,76-78,96,98,113,115,125-127,129-130,132,135,144-145,147,157-162,192-193,195,213,215-217,219,228-229,231-234,260-262,272-274,280,282,288,290-291,293-295,308-309,311-313,315,320-322,325-327,329-333,335,337-339,356-357,359-360,362-363,384-385,387-390,395,404,406-407,413-415,422-423,425-426,428-429,431-433,435-436,438-442,452-454,464,466-467,477-478,480-482,504-505,507-509,511,513-515,532-533,535-536,538-539,541-544,546-550,556,559-562,572,574-578,580-582,584-585,587,592-593,595,608-610,624-626,632,634-635,644-645,656-657,659,661,664,666-667,673,680-682,684,686-687,696-697,699,708-710,712,714-716,718,720-722,728-729,731,737-739,748,750-751,756,758,764,766-767,772,774-775,801-803,820,822-823,849-851,853-855,892-894,900-901,903,928-929,931,937-940,942-943,948,950-954,964-965,967,969-974,984-985,987,992-994,996-998,1024-1025,1027-1028,1030-1031,1036-1038,1052-1053,1055,1072-1074,1084-1085,1087,1096-1097,1099,1104,1107,1117-1122,1128,1130-1131,1141-1143,1148-1149,1151,1157-1159,1177-1178,1184-1185,1187,1196-1197,1199,1208,1210-1214,1236,1238-1239,1276-1278,1332,1334-1335,1348-1350,1357-1359,1372,1374-1375,1384-1385,1387-1388,1390-1391,1396-1398,1400-1402,1409-1411,1421-1423,1445-1447,1452-1453,1455-1457,1459,1481-1486,1488,1490-1492,1500-1501,1503,1512-1513,1515,1520,1522-1524,1526-1527,1544-1546,1552-1554,1561-1563,1576-1577,1579,1581-1583,1592,1594-1596,1598-1599,1605-1606,1616-1618,1624,1626-1627,1640-1641,1668-1670,1672-1674,1679-1682,1685,1687-1689,1691,1693-1695,1697-1701,1703,1713-1718,1722-1726,1733-1734,1737-1739,1741-1743,1757-1759,1772,1774-1775,1780,1783-1786,1800-1802,1805-1807,1813-1815,1828-1830,1841,1843,1868,1870-1871,1877,1879,1884,1886-1887,1929-1931,1953-1957,1959,1964,1967,1976,1979,2036-2038,2045-2047,2056-2058,2072,2074-2075,2085-2087,2101-2103,2108-2109,2111-2112,2114-2115,2117-2119,2124-2125,2127,2129,2131,2164,2166-2168,2170-2171,2180-2182,2185,2187,2200,2203,2205,2207,2224-2225,2227-2230,2232-2234,2240-2241,2243,2248,2250-2254,2256-2258,2264-2265,2267,2273-2275,2277-2279,2284-2285,2292-2294,2300-2301,2303-2305,2307,2332-2334,2340-2341,2343,2380,2382-2383,2417-2419,2424-2425,2427,2460-2462,2488-2490,2496,2498-2499,2584,2586-2587,2589-2592,2594-2595,2648-2649,2651-2653,2655,2657-2659,2676,2678,2708,2710-2711,2732,2734-2735,2748-2750,2777-2779,2788-2790,2792-2794,2796-2797,2799,2801-2805,2807,2824-2825,2827,2840,2843,2857-2859,2861-2862,2869-2871,2908,2910-2911,2916-2918,2920-2921,2923-2926,2928,2936-2937,2939-2941,2943,2973-2975,3016-3018,3020-3021,3042-3043,3048-3049,3051,3056-3057,3059,3064-3065,3068-3070</spatial>
	</coverage>

	<data id="import">
		<sources pattern="data/ndmuhall.txt"/>
		<reGrammar fieldSep="\|">
			<names>i0, hipno, comp, mv, color, parallax,
				ffh, f0f, f0h, f0gch, ft2h,
				FK, GC, T2, i1, i2, i3, HD, HR, GC, CNS4, FKno, name, CCDM, i4</names>
		</reGrammar>

		<make table="main">
			<rowmaker id="build_dmubin" idmaps="*">
				<map dest="T2">bool(@T2.strip())</map>
			</rowmaker>

			<script type="preIndex" lang="SQL"
					name="Entering positions from Hipparcos">
				UPDATE \curtable
					SET raj2000=hip.ra, dej2000=hip.dec
					FROM hipparcos.main AS hip
					WHERE \curtable.hipno=hip.hipno
			</script>

			<script type="preIndex" lang="SQL"
				name="Adding max. F">

				CREATE OR REPLACE FUNCTION zeroIfNULL(f REAL
				) RETURNS REAL AS $$
				BEGIN
					IF (f IS NULL) THEN
						RETURN 0;
					ELSE
						RETURN f;
					END IF;
				END;
				$$ LANGUAGE plpgsql;

				UPDATE \curtable
				SET Fmax=p.Fmax
				FROM (
					SELECT hipno, max(f) AS fmax FROM (
						(SELECT hipno, zeroIfNULL(ffh) AS f FROM dmubin.main)
						UNION (SELECT hipno, zeroIfNULL(f0f) AS f FROM dmubin.main)
						UNION (SELECT hipno, zeroIfNULL(f0h) AS f FROM dmubin.main)
						UNION (SELECT hipno, zeroIfNULL(f0gch) AS f FROM dmubin.main)
						UNION (SELECT hipno, zeroIfNULL(ft2h) AS f FROM dmubin.main)
					) AS q
					GROUP BY hipno) as p
				WHERE p.hipno=\curtable.hipno;

				DROP FUNCTION zeroIfNULL(real);
			</script>
		</make>
	</data>

	<scsCore id="conecore" queriedTable="main">
		<condDesc original="//scs#humanInput" required="False"/>
		<condDesc original="//scs#protoInput"/>
		<condDesc buildFrom="fmax"/>
		<condDesc buildFrom="hipno"/>
	</scsCore>

	<service id="cone" core="conecore" allowed="form,scs.xml">
		<meta name="shortName">dmubin cone</meta>
		<outputTable verbLevel="20"/>
		<publish render="scs.xml" sets="ivo_managed"/>
		<publish render="form" sets="local,ivo_managed"/>
		<meta name="testQuery">
			<meta name="ra">315.5915125</meta>
			<meta name="dec">37.65440838</meta>
			<meta name="sr">0.01</meta>
		</meta>
	</service>

	<regSuite title="DaCHS regression">
		<regTest title="Table notes are rendered"
				url="/tablenote/dmubin.main/F">
			<code>
				self.assertHasStrings('name="note-F">Note F',
					"&lt;p>mu0F", "&amp;quot;")
			</code>
		</regTest>

		<regTest title="Table notes appear in VOTables">
			<url SR="5" DEC="10" RA="10">cone/scs.xml</url>
			<code>
				self.assertHasStrings(
					'&lt;FIELDref ref="f0h"', ' name="note-F">',
				'mu0G is a proper motion derived from the GC')
			</code>
		</regTest>
	</regSuite>

	<regSuite title="Data regression">
		<regTest title="dmubin service delivers credible data">
			<url parSet="form" fmax=">150">cone/form</url>
			<code>
				self.assertHasStrings("10529", "212.25")
			</code>
		</regTest>
	</regSuite>
</resource>
