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

<resource schema="katkat" resdir="arigfh">
<!-- Note: katkat.data was taken form proj-data/s07/teleki, which seemd
to be the newest one.

Futhermore, in five cases file-ids were present in two records, which is
erroneous.	I've deleted the "less specific" one of each in the katkat.data
file.	Here's a list, with the deleted hdwl ref in parens.

031/2(008): (228.)	228.1
029/5: (501.) 578.
029/3: (501.) 578.
029/7: (501.) 578.
015/9: (505.) 576.

The following arigfh tar.gzs were invalid in the archiv.linux folder and
were deleted:

t2584p10.tar.gz (no "katalog" file)
-->

	<meta name="title">ARI Catalog of Catalogs</meta>
	<meta name="creationDate">2010-10-04T10:10:00Z</meta>
	<meta name="schema-rank">1000</meta>
	<meta name="doi">10.21938/8ndTne3ode_RC4dOw3oAsQ</meta>
	<meta name="description" format="rst">
	ARI katkat is a catalog of star catalogues
	in the spirit of G. Teleki's catalog of star catalogs
	(`1989BOBeo.140..131T`_ and references in there).	It contains
	2573 catalogs suitable for astrometric usage, starting with Flamsteed
	(1835) and ending in the 1970ies.	For almost all of them, there
	is a column description file (as PDF, and unfortunately sometimes in
	German) and the digitized content.

	.. _1989BOBeo.140..131T: http://ads.g-vo.org/abs/1989BOBeo.140..131T
	</meta>

	<meta name="_longdoc" format="rst"><![CDATA[
		The digitized content was partially used as an input to the
		ARIGFH project; for those catalogs processed in this context, the objects
		contained are given in one of the tables arigfh.identified or
		arigfh.unidentified.

		See also the \RSTservicelink{browse/arigfh/q}{ARIGFH resource info}.

		For the benefit for search engines (that will hopefully pick up the
		bibliographic information), here's a paged copy of katkat:

		* `Teleki 1 through 250`_
		* `Teleki 251 through 500`_
		* `Teleki 501 through 750`_
		* `Teleki 751 through 1000`_
		* `Teleki 1001 through 1250`_
		* `Teleki 1251 through 1500`_
		* `Teleki 1501 through 1750`_
		* `Teleki 1751 through 2000`_
		* `Teleki 2001 through 2250`_
		* `Teleki 2251 and up`_

		.. _Teleki 1 through 250: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%201%20and%20250
		.. _Teleki 251 through 500: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%20251%20and%20500
		.. _Teleki 501 through 750: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%20501%20and%20750
		.. _Teleki 751 through 1000: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%20751%20and%201000
		.. _Teleki 1001 through 1250: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%201001%20and%201250
		.. _Teleki 1251 through 1500: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%201251%20and%201500
		.. _Teleki 1501 through 1750: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%201501%20and%201750
		.. _Teleki 1751 through 2000: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%201751%20and%202000
		.. _Teleki 2001 through 2250: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%202001%20and%202250
		.. _Teleki 2251 and up: /__system__/adql/query/form?__nevow_form__=genForm&query=select%20*%20from%20katkat.katkat%20where%20teleki%20between%202251%20and%2010000
	]]></meta>

	<meta name="subject">history-of-astronomy</meta>
	<meta name="subject">catalogs</meta>

	<meta name="creator">Wielen, R.; Erbach, M.; Schwan, H.;
	Demleitner, M.; et al.</meta>

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

	<meta name="source">1989AGAb....2...33W</meta>

	<FEED source="//procs#license-cc-by" what="katkat.data"/>

	<meta name="!copyright" format="rst">
		\RSTccby{katkat data}
		
		The individual catalogs may have other
		licensing or copyright schemes, but in general a sound citation
		practice should be all right -- even more so since most of the
		individual authors are either dead or retired.
	</meta>

	<meta name="_intro">
		This service exposes a catalog of star catalogs.
		Use the source field to look for authors, title words, and such.
	</meta>

	<meta name="_related" title="ARIGFH">/arigfh/q/cone/form</meta>

	<table onDisk="True" id="katkat" adql="True" primary="fileid">
		<meta name="description">The "catalog of catalogs" lists catalogs
			containing stellar positions for the last centuries.	It also
			lets you access digitized table data.</meta>
		<publish/>

		<column name="fileid"
			type="text"
			tablehead="File id"
			description="ARI-internal file identifier"
			ucd="meta.id;meta.main"
			note="i"/>

		<column name="kkid"
			type="text"
			tablehead="ARIGFH id"
			description="ARIGFH identifier of the table"
			ucd="meta.id"
			note="i"/>

		<column name="teleki"
			type="integer"
			tablehead="Teleki"
			description="Teleki number of the catalog"
			ucd="meta.id"
			note="i">
			<values nullLiteral="-1"/>
		</column>

		<column name="hdwl"
			type="text"
			tablehead="HDWL"
			description="HDWL number of the catalog"
			ucd="meta.id"
			note="i"/>

		<column name="nrows"
			type="integer"
			tablehead="Rows"
			description="Number of rows (i.e., lines) in the catalog"
			ucd="meta.number">
			<values nullLiteral="-1"/>
		</column>

		<column name="nid"
			type="integer"
			tablehead="Id"
			description="Number of objects that could be matched with the
				 ARIGFH master"
			ucd="meta.number">
			<values nullLiteral="-1"/>
		</column>

		<column name="source"
			type="text"
			tablehead="Source"
			description="Bibliographical information for the catalog."
			ucd="meta.ref"/>

		<column name="remarks"
			type="text"
			tablehead="Remarks"
			description="Remarks, e.g., on the identification process or where
				to find media (typically not interesting outside ARI)."
			ucd="meta.note"/>

		<column name="minEpoch"
			tablehead="Ep. min"
			description="Earliest epoch of observation (approximate)"
			unit="yr"
			ucd="time.epoch;stat.min"/>

		<column name="maxEpoch"
			tablehead="Ep. max"
			description="Latest epoch of observation (approximate)"
			unit="yr"
			ucd="time.epoch;stat.max"/>

		<column name="katdata"
			type="text"
			tablehead="Data"
			description="Relative path to the data file (see table
				description to obtain the data if this is not a complete
				URL"
			displayHint="type=url">
			<fixup>___ and "\internallink{/arigfh/katkat/q/static/}"+str(___)</fixup>
		</column>

		<column name="katfields" type="text"
			tablehead="Fields"
			description="URL of a PDF containing the field description (see table
				description to obtain the data if this is not a complete URL"
			displayHint="type=url">
			<fixup>___ and "\internallink{/arigfh/katkat/q/static/}"+str(___)</fixup>
		</column>

		<column name="liesf" type="text"
			tablehead="Parser"
			description="Painful FORTRAN used to parse the raw text"
			displayHint="type=url"
			note="l">
			<fixup>___ and "\internallink{"+___+"}"</fixup>
		</column>
				
		<index columns="source" method="gin"
			>to_tsvector('english', source)</index>
		
		<meta name="note" tag="l"><![CDATA[
			For more information on the FORTRAN subroutines, see the
			`ARIGFH documentation </browse/arigfh/q>`_
		]]></meta>

	 	<meta name="note" tag="i"><![CDATA[
As always in bibliography, nomenclature is at least difficult.	For
the catalogs, we have no less than for sets of identifiers tied
together by katkat.

* HDWL: This is more or less a running number of catalogs included
	in the catalog list.  One HDWL major number roughly corresponds to
	a book or article, and every publication in katkat has an HDWL number.
	Some works contain multiple tables; in that case, the HDWL has
	the form major.minor; minor is a single digit.
* Teleki: This is a reference into a catalog of catalogs that was maintained
	by G. Teleki (Published in Publ. Astron. Opservatorije Beogr.) and then
	for a short while continued at ARI.	These are simply numbers, but not
	all publications listed here have a Teleki number.	All catalogs that
	went into identification have one, though.	Unfortunately, it is possible
	that there are multiple Teleki numbers to a single HDWL entry.	In that
	case, the Teleki number included is just one of them.
* File ID: This is a string containing slashes and parenteses, e.g.
	021/1(434).	These refer to input files, where the number after the
	slash is a running number counting up for a given bibliographical
	source.	Since a single source may give several tables, multiple file
	ids can refer to a single HDWL number.	Since we are primarily interested
	in the digitized tables, the file id is arigfh.katkat's primary key.
* teleki/catpv: These are strings of the form t<teleki>p<catpv>.	They
	were used for catalogs that were crossmatched with the master catalog.
	File IDs can correspond to multiple teleki/catpv combinations, when a
	single input was split into multiple outputs that could be treated
	together.	In katkat, the file has one of the teleki/catpv combinations
	only, again because we are mainly interested in the files.	catpv is a
	two-digit code consisting of "part" and "version".
		]]></meta>

	</table>

	<data id="import">
		<sources pattern="data/katkat.data"/>
		<customGrammar module="bin/katkatgrammar" id="grammar"/>

		<make table="katkat">
			<rowmaker idmaps="*"/>
		</make>
	</data>

	<service id="byhdw" allowed="qp">
		<meta name="description">
			This service gives all records pertaining to a given HDW number
			from katkat.  It is used as the target of the catalog links
			in the records shipped to ADS .
		</meta>
		<property name="queryField">hdwl</property>
		<dbCore queriedTable="katkat">
			<condDesc>
				<inputKey original="hdwl"/>
				<phraseMaker>
					<code>
						ik = inputKeys[0]
						destRE = "^%s\\.[0-9]*$"%inPars[ik.name]
						yield "%s ~ (%%(%s)s)"%(ik.name,
							base.getSQLKey("destRE", destRE, outPars))
					</code>
				</phraseMaker>
			</condDesc>
		</dbCore>
	</service>

	<service id="q" allowed="form,static">
		<meta name="shortName">katkat_web</meta>
		<publish render="form" sets="ivo_managed,local"/>
		<meta>
			date: 2023-11-08
			date.role: ExportRequested
		</meta>
		<property name="staticData">cats/katkat</property>
		<dbCore id="katcore" queriedTable="katkat">
			<condDesc>
				<inputKey original="source" description="Words from the catalog
					description, e.g., author names or title words."/>
				<phraseMaker>
					<code>
						yield ("to_tsvector('english', source)"
							" @@ plainto_tsquery('english', %%(%s)s)")%(
						base.getSQLKey("source", inPars["source"], outPars))
					</code>
				</phraseMaker>
			</condDesc>
			<condDesc buildFrom="teleki"/>
			<condDesc buildFrom="minEpoch"/>
			<condDesc buildFrom="maxEpoch"/>
			<condDesc buildFrom="hdwl"/>
		</dbCore>
		<outputTable autoCols="nid,kkid,hdwl,nrows,source,remarks,minEpoch,maxEpoch,
			katdata,katfields,liesf">
			<outputField name="idobjs" type="text"
				select="kkid"
				tablehead="Identified"
				description="Objects from this catalog identified in ARIGFH"
				displayHint="type=url"
				fixup='___ and ("\internallink{/arigfh/q/cone/form}"
					"?__nevow_form__=genForm&amp;catid="+urllib.parse.quote(___.lower()))'
			/>
			<outputField name="nidobjs" type="text"
				select="kkid"
				tablehead="Unidentified"
				description="Objects from this catalog not identified in ARIGFH"
				displayHint="type=url"
				fixup='___ and ("\internallink{/arigfh/q/nidweb/form}"
					"?__nevow_form__=genForm&amp;catid="+urllib.parse.quote(___.lower()))'
			/>

		</outputTable>
	</service>
</resource>
