<?xml version="1.0"?>
<resource schema="gcpms">
	<meta name="creationDate">2011-08-09T14:00:00</meta>
	<meta name="title">Stellar Proper Motions in the Ogle II Galactic Bulge
		Fields</meta>

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

	<meta name="creator">Sumi, T.; Wu, X.; Udalski, A.; Szymański, M.;
	Kubiak, M.; Pietrzyński, G.; Soszyński, I.; Woźniak, P.; Żebruń, K.;
	Szewczyk, O.; Wyrzykowski, Ł.</meta>
	<meta name="description">A proper-motion catalogue of 5080236 stars in 49
		OGLE-II Galactic bulge (GB) fields, covering a range of -11°&lt;l&lt;11° and
		-6°&lt;b&lt;3°.  Some columns have been left out from the original source.</meta>
	<meta name="source">2004MNRAS.348.1439S</meta>
	<meta name="copyright">Column metadata has largely been taken from VizieR.</meta>
	<meta name="coverage.waveband">Optical</meta>

  <table id="data" onDisk="True" mixin="//scs#q3cindex" adql="True">
  	<mixin>//scs#pgs-pos-index</mixin>
  	<publish/>
		<column name="field" type="smallint" required="True"
			description="OGLE field number"
			tablehead="Field#"
			ucd="meta.id;obs.field"
			verbLevel="25"/>
    <column name="ogle" type="integer" required="True"
    	description="OGLE number"
			tablehead="Ogle#" ucd="meta.id;meta.main"
			verbLevel="1"/>
    <column name="npoint" type="smallint" required="True"
    	description="Number of data points"
			tablehead="Npoint"
			ucd="meta.number;stat.fit"
			verbLevel="19"/>
    <column description="Proper motion in right ascension (mu(RA)cos(DE)"
			name="pmra" tablehead="Pmra"
			ucd="pos.pm;pos.eq.ra" unit="deg/yr"
			verbLevel="1"/>
    <column description="rms uncertainty on pmRA"
			name="e_pmra" tablehead="E(pmra)"
			ucd="stat.error;pos.pm;pos.eq.ra" unit="deg/yr"
			verbLevel="15"/>
    <column description="Proper motion in declination (mu(DE))"
			name="pmde" tablehead="Pmde"
			ucd="pos.pm;pos.eq.dec" unit="deg/yr"
			verbLevel="1"/>
    <column description="rms uncertainty on pmDE"
			name="e_pmde" tablehead="E_pmde"
			ucd="stat.error;pos.pm;pos.eq.dec" unit="deg/yr"
			verbLevel="15"/>
    <column description="Differential refraction coefficient"
			name="drefc" tablehead="Refract." unit="deg"
			verbLevel="25"/>
    <column description="Standard deviation of data points in the fitting"
			name="sdev" tablehead="σ"
			ucd="stat.stdev;pos" unit="deg"
			verbLevel="25"/>
    <column description="I magnitude"
			name="imag" tablehead="I mag"
			ucd="phot.mag;em.opt.I" unit="mag"
			verbLevel="12"/>
    <column description="V-I colour index"
			name="v_i" tablehead="V-I"
			ucd="phot.color;em.opt.V;em.opt.I" unit="mag"
			verbLevel="12"/>
    <column description="Right ascension in decimal degrees (J2000)"
			name="raj2000" tablehead="Raj2000" type="double precision"
			ucd="pos.eq.ra;meta.main" unit="deg"
			verbLevel="1"/>
    <column description="Declination in decimal degrees (J2000)"
			name="dej2000" tablehead="Dej2000" type="double precision"
			ucd="pos.eq.dec;meta.main" unit="deg"
			verbLevel="1"/>
    <column description="x pixel coordinate in template image"
			name="xpos" tablehead="Xpos"
			ucd="pos.cartesian.x;instr.det" unit="pix"
			verbLevel="25"/>
    <column description="y pixel coordinate in template image"
			name="ypos" tablehead="Ypos"
			ucd="pos.cartesian.y;instr.det" unit="pix"
			verbLevel="25"/>
  </table>

	<coverage>
		<updater sourceTable="data" mocOrder="4"/>
		<temporal>2000-01-01 2000-01-01</temporal>
		<spatial>4/1794-1795,1798,1801,1803-1806,1816,2646-2647</spatial>
		<spectral>1.655e-19 2.838e-19</spectral>
	</coverage>

  <data id="import">
    <sources>
      <pattern>data/pm/*.pm.gz</pattern>
    </sources>
    <columnGrammar gunzip="True">
			<colDefs>
				ogle:1-6
				npoint: 8-10
				pmra_mas: 11-17
				e_pmra_mas: 18-23
				pmde_mas: 25-31
				e_pmde_mas: 32-37
				drefc_mas: 67-73
				sdev_mas: 75-80
				imag: 83-88
				v_i_null: 89-94
				raj2000: 97-105
				dej2000: 107-115
				xpos: 117-123
				ypos: 125-131
			</colDefs>
			<sourceFields>
				<code>
					return {"field":
						int(sourceToken.split("bul_sc")[-1].split(".pm.gz")[0])}
				</code>
			</sourceFields>
		</columnGrammar>
    <rowmaker id="makerows_data" idmaps="*">
			<LOOP listItems="pmra e_pmra pmde e_pmde drefc sdev">
				<events>
					<map dest="\item">float(@\item\+_mas)*DEG_MAS</map>
				</events>
			</LOOP>
			<map dest="v_i">parseWithNull(@v_i_null, float, "9.999")</map>
		</rowmaker>
    <make rowmaker="makerows_data" table="data"/>
  </data>
</resource>
