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

<resource schema="icecube">

	<!--
	!  ===========================
	!  Description of the Data Set
	!  ===========================
	!-->

	<meta name="title">IceCube-40 neutrino candidates</meta>
	<meta name="creationDate">2012-04-26T08:10:00Z</meta>
	<meta name="schema-rank">1000</meta>
	<meta name="description" format="plain">A list of neutrino candidate
		events recorded by the IceCube neutrino telescope operating in a
		40 string configuration between April 2008 and May 2009.</meta>
	<meta name="copyright">This data set has been provided by the IceCube
		collaboration. It is also available at
		http://icecube.wisc.edu/science/data/ic40.</meta>
	<meta name="source">R. Abbasi et al., Phys. Rev. D 84, 082001 (2011)</meta>
	<meta name="creator">The IceCube Collaboration</meta>

	<meta name="subject">neutrino-astronomy</meta>
	<meta name="subject">particle-astrophysics</meta>

	<meta name="_longdoc" format="rst"><![CDATA[
		This data set is a list of neutrino candidate events recorded by
		the IceCube Neutrino Observatory in the 40 string configuration
		which operated during April 2008 and May 2009. This list of
		candidate events was used to search for neutrinos from unresolved
		astrophysical sources.
		The events are consistent with a conventional atmospheric neutrino
		spectrum. Details of the analysis are outlined in
		http://arxiv.org/abs/1104.5187v4.

		Included are the right ascension and the declination in degrees,
		the estimated energy loss of the neutrino-induced muons propagating
		through the ice in GeV/m, the estimated muon energy at closest
		distance to the center of the IceCube detector in GeV, the number
		of triggered optical modules commonly referred to as the number of
		channels (NCh), and the Modified Julian Day (MJD).

		A repository of publicly available 40-string data is available at
		http://icecube.wisc.edu/science/IC40.
	]]></meta>

	<meta>
		coverage.waveband:Neutrino
		coverage.regionOfRegard: 1
	</meta>

	<!--
	!  ================
	!  Table Definition
	!  ================
	!-->

	<table id="nucand" onDisk="True" adql="True" primary="evid">
		<stc>
			Time TT TOPOCENTER "mjd"
			Position ICRS "nualpha" "nudelta"
		</stc>

		<meta name="description">
			Detection parameters of neutrino candidates recorded by the
			IceCube Neutrino Observatory. This table can be queried on web
			at http://dc.g-vo.org/icecube/q/web .
		</meta>
		<column name="evid" type="text"
			required="True"
			ucd="meta.id;meta.main"
			tablehead="Id"
			description="GAVO-local event id, IAU-format"
			verbLevel="1"/>
		<column name="nualpha"
			required="True"
			ucd="pos.eq.ra;meta.main"
			unit="deg"
			tablehead="RA"
			description="Neutrino arrival direction, RA"
			verbLevel="1"/>
		<column name="nudelta"
			required="True"
			ucd="pos.eq.dec;meta.main"
			unit="deg"
			tablehead="Dec"
			description="Neutrino arrival direction, Declination"
			verbLevel="1"/>
		<column name="muELoss"
			required="True"
			ucd="phys.absorption"
			unit="GeV/m"
			tablehead="Muon (dE/dX)"
			description="Estimated muon energy loss in ice"
			verbLevel="10"/>
		<column name="muE"
			required="True"
			ucd="phys.energy"
			unit="GeV"
			tablehead="Muon Energy"
			description="Estimated muon	energy at closest distance to
				the center of the IceCube detector"
			verbLevel="10"/>
		<column name="nch"
			required="True"
			type="smallint"
			ucd="meta.number"
			tablehead="Nch"
			description="Number of optical modules hit in an event"
			verbLevel="15"/>
		<column name="mjd"
			required="True"
			ucd="time.epoch;obs"
			tablehead="MJD"
			description="Observation time, Modified Julian Day"
			verbLevel="10"/>
	</table>

	<coverage>
		<updater sourceTable="nucand" mocOrder="4"/>
			<spatial>0/0-1,3 1/8-9,11,19,23,27,31 2/41-43,71,75,87,91,103,107,119,123 3/160-162,279,283,295,299,343,347,359,363,407,411,423,427,471,475,487,491 4/652-654,1109-1111,1113,1115,1125-1127,1129-1131,1173-1175,1177-1179,1189-1191,1193-1195,1365-1367,1371,1381,1383,1385-1387,1429-1431,1433,1435,1445-1447,1449,1451,1621,1623,1625-1627,1637-1639,1641-1643,1685-1687,1690-1691,1701-1703,1705-1707,1877-1879,1881,1883,1893-1895,1897-1899,1941-1943,1945,1947,1957-1959,1961,1963</spatial>
		<temporal>54562.4 54971.1</temporal>
	</coverage>

	<!--
	!  ==============================
	!  Input Parsing and Data Mapping
	!  ==============================
	!-->

	<data id="import_content">
		<sources pattern="data/*.txt"/>
		<reGrammar>
			<topIgnoredLines>20</topIgnoredLines>
			<names>nudelta, nualpha, muELoss, muE, nch, year, utcday,
				utcsec, mjd</names>
		</reGrammar>

		<make table="nucand">
			<rowmaker idmaps="*">
				<map dest="nualpha">float(@nualpha)*15.</map>
				<apply name="make_evid">
					<code>
						vars["evid"] = "J%s%s (%s)"%(
							utils.degToHms(float(@nualpha), sepChar='', secondFracs=0),
							utils.degToDms(float(@nudelta), sepChar='', secondFracs=0),
							int(float(@mjd)))
					</code>
				</apply>
			</rowmaker>
		</make>
	</data>


	<!--
	!  ===============
	!  Publishing Data
	!  ===============
	!-->


	<service id="cone" allowed="form,scs.xml">
		<meta name="shortName">icecube_scs</meta>
		<meta name="testQuery">
			<meta name="ra">97.5</meta>
			<meta name="dec">11.29</meta>
			<meta name="sr">1</meta>
		</meta>
		<publish render="form" sets="local,ivo_managed"/>
		<publish render="scs.xml" sets="ivo_managed"/>
		<scsCore queriedTable="nucand">
			<FEED source="//scs#coreDescs"/>
			<condDesc buildFrom="mjd"/>
		</scsCore>
	</service>

</resource>
