<resource schema="k2c9vst">
	<meta name="title">Coordinated microlensing survey observations
		with Kepler K2/C9 using VST</meta>
	<meta name="description">
The Kepler satellite has observed the Galactic center in a
campaign lasting from April until the end of June 2016 (K2/C9). The main
objective of the 99 hours for the microlensing program 097.C-0261(A) using the
ESO VLT Survey Telescope (VST) was to monitor the superstamp (i.e., the
actually downloaded region of K2/C9) in service mode for improving the event
coverage and securing some color-information.
Due to weather conditions, the majority of images were taken in the red band.
These are part of the present release.

The exact pointing strategy was adjusted to
cover the superstamp with 6 pointings and to contain as many
microlensing events from earlier seasons as possible. In addition, a
two-point dither was requested to reduce the impact of bad pixels and
detector gaps. Consequently, some events were getting more coverage and
have been observed with different CCDs. The large footprint of roughly 1
square degree and the complementary weather conditions at Cerro Paranal
have lead to the coverage of 147 events (this resource's events table),
but ~60 of those were already at baseline.
	</meta>

	<meta name="creationDate">2017-04-05T08:00:00Z</meta>
	<meta name="schema-rank">100</meta>

	<meta name="subject">light-curves</meta>
	<meta name="subject">exoplanets</meta>
	<meta name="subject">gravitational-microlensing</meta>
	<meta name="subject">time-domain-astronomy</meta>

	<meta name="creator">Hundertmark, M.; Korhonen, H.; Jørgensen, U.;
		Street, R; Penny, M.; Tsapras, Y.; Dominik, M.; Kerins, E.; Cassan, A.;
		Snodgrass, C.; Bachelet, E.; Bramich, D.; Bozza, V.</meta>
	<meta name="instrument">VST</meta>
	<meta name="facility">ESO</meta>

	<meta name="ssap.dataSource">pointed</meta>
	<meta name="ssap.creationType">archival</meta>

	<meta name="source">http://archive.eso.org/wdb/wdb/eso/sched_rep_arc/query?progid=097.C-0261(A)</meta>
	<meta name="contentLevel">Research</meta>
	<meta name="type">Archive</meta>
	<meta name="productTypeServed">timeseries</meta>

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

	<macDef name="pubdidroot">ivo://org.gavo.dc/~?k2c9vst/data/</macDef>

	<table id="events" onDisk="True" adql="True" primary="event_id">
		<meta name="title">K2/C9 Microlensing Events</meta>

		<stc>
			Time UTC HELIOCENTER "t_0"
			Position ICRS Epoch J2000.0 "raj2000" "dej2000"
		</stc>

		<column name="event_id" type="text"
			ucd="meta.id;meta.main"
			tablehead="Event Name"
			description="Event name as specified by OGLE
				(http://ogle.astrouw.edu.pl/ogle4/ews/2015/ews.html)
				or MOA (http://www.phys.canterbury.ac.nz/moa/).  Some event ids
				actually reference the same object.  These have otherwise identical
				records."
			verbLevel="1"/>
		<column name="raj2000" type="double precision"
			unit="deg" ucd="pos.eq.ra;meta.main"
			tablehead="RA"
			description="Right ascension of the event source as reported by
				the OGLE or MOA"
			verbLevel="1"/>
		<column name="dej2000" type="double precision"
			unit="deg" ucd="pos.eq.dec;meta.main"
			tablehead="Dec"
			description="Right ascension of the event source as reported by
				the OGLE or MOA"
			verbLevel="1"/>
		<column name="t_alert" type="double precision"
			unit="d" ucd="time.release"
			tablehead="HJD Alert"
			description="HJD of alert release."
			verbLevel="15"/>
		<column name="t_0" type="double precision"
			unit="d" ucd="time.duration;stat.fit"
			tablehead="t_0"
			description="Time of largest magnification estimated from a fit
				assuming a gravitational lens event of pointlike source and lens."
			verbLevel="5"/>
		<column name="t_e" type="double precision"
			unit="d" ucd="time.duration"
			tablehead="t_e"
			description="Event timescale (Einstein time assuming a gravitational
				lens event of pointlike source and lens)."
			verbLevel="5"/>
		<column name="u_0"
			unit="" ucd="src.impactParam"
			tablehead="u_0"
			description="Impact parameter in units of Einstein radii."
			verbLevel="15"/>
		<column name="a_0"
			ucd="phot.flux;arith.ratio"
			tablehead="A_0"
			description="Maximum magnification."
			verbLevel="15"/>
		<column name="flags" type="smallint" required="True"
			ucd="meta.code"
			tablehead="flags"
			description="Bitmask for flags: bit 0 -- during campaign; bit 1: In
			footprint (i.e., Kepler data could be available);
			bit 2: In superstamp (i.e., Kepler data available)."
			verbLevel="15"/>
	</table>

	<coverage>
		<updater spaceTable="events"/>
		<spatial>5/7198,7216-7217,7220-7221,7226-7227,7266 6/28782-28783,28796,28798-28799,28823,28829,28854-28855,28860-28861,28863,28872-28873,28875-28877,28888-28889,28892-28893,28898,28902-28903,28920,28922-28923,29056,29058-29059,29205,29253,29255,29261</spatial>
		<temporal>56693 57663</temporal>
	</coverage>

	<data id="import_events" recreateAfter="import_points">
		<sources pattern="data/exofop*.csv"/>
		<csvGrammar>
			<mapKeys>
				t_e: t_E(d),
				t_0: t_0(HJD),
				t_alert: t_alert(HJD),
				u_0: u_0(E),
				a_0: A_0,
				ogle_name: Ogle Name,
				moa_name: MOA Name
			</mapKeys>

			<rowfilter name="expand_events">
				<doc>
					Each event needs a unique id; there are records that
					were detected both by MOA and by OGLE; we expand them to
					two different events.

					On the other hand, some events have no positions.  These
					we swallow.
				</doc>
				<code>
					if @RA=='00:00:00':
						return
					if @ogle_name:
						@event_id = @ogle_name
						yield row
					if @moa_name:
						@event_id = @moa_name
						yield row
				</code>
			</rowfilter>

		</csvGrammar>
		<make table="events">
			<rowmaker idmaps="*">
				<var key="flags">1*("Y"==vars["During Campaign"]
					)+2*("Y"==vars["In Footprint"]
					)+4*("Y"==vars["In Superstamp"])</var>
				<map key="raj2000">hmsToDeg(@RA, sepChar=":")</map>
				<map key="dej2000">dmsToDeg(@Dec, sepChar=":")</map>
			</rowmaker>
		</make>
	</data>

	<STREAM id="instancecolumns">
		<doc>
			The columns common to the photpoints table and the time series instance.
		</doc>

		<column name="image" type="text"
			ucd="meta.ref;meta.file"
			tablehead="Source"
			description="VST image this point was taken from.  The raw images are
			available at
			http://archive.eso.org/wdb/wdb/eso/eso_archive_main/query?prog_id=097.C-0261(A)"
			verbLevel="25"/>

		<column name="df" type="double precision"
			unit="adu" ucd="phot.flux"
			tablehead="Diff. Flux"
			description="Difference flux as defined by 2008MNRAS.386L..77B"
			verbLevel="1"/>
		<column name="e_df"
			unit="adu" ucd="stat.error;phot.flux"
			tablehead="Err. DF"
			description="Error in difference flux."
			verbLevel="15"/>
		<column name="rf" type="double precision"
			unit="adu" ucd="phot.flux"
			tablehead="Ref. Flux"
			description="Reference flux as defined by 2008MNRAS.386L..77B"
			verbLevel="1"/>
		<column name="e_rf"
			unit="adu" ucd="stat.error;phot.flux"
			tablehead="Err. RF"
			description="Error in reference Flux"
			verbLevel="15"/>

		<column name="e_phot"
			unit="mag" ucd="stat.error;phot.mag"
			tablehead="Err. m_r"
			description="Error in SDSS r-band instrumental magnitude."
			verbLevel="15"/>

		<column name="exp_time"
			unit="s" ucd="time.duration;obs.exposure"
			tablehead="Exp. Time"
			description="Exposure time."
			verbLevel="15"/>

		<column name="fwhm"
			unit="arcsec" ucd="phys.angSize;instr.det.psf"
			tablehead="FWHM"
			description="FWHM of the point spread function averaged over all
				stars on the subimage used."
			verbLevel="15"/>
		<column name="sky_background"
			unit="adu" ucd="instr.background"
			tablehead="Sky"
			description="Median sky background flux."
			verbLevel="15"/>
		<column name="phot_scale_factor"
			tablehead="Phot. SF"
			description="Scale factor according to 2008MNRAS.386L..77B; if
				small, photometry was obtained under suboptimal atmospheric
				transparency."
			verbLevel="15"/>
		<column name="chi2_px"
			ucd="stat.fit.chi2"
			tablehead="χ²/pixel"
			description="See 2008MNRAS.386L..77B, sect. 2.1"
			verbLevel="25"/>

		<column name="dx"
			unit="pixel" ucd="pos.cartesian.x;arith.diff"
			tablehead="Δx"
			description="Pixel offset of frame wrt. the reference frame, x direction"
			verbLevel="25"
			note="t"/>
		<column name="dy"
			unit="pixel" ucd="pos.cartesian.y;arith.diff"
			tablehead="Δy"
			description="Pixel offset of frame wrt. the reference frame, y direction"
			verbLevel="25"
			note="t"/>
		<column name="corr_coeff" type="real[4]"
			tablehead="Corr."
			description="Coefficients of correction polynomial for frame: TBD"
			verbLevel="25"
			note="t"/>

		<meta name="note" tag="t">
			These are the coefficients of the transformation polynoms of the
			reference frame to the transformed reference frame (for which the
			kernel is computed).  The transformation equations are::

				xct = c[0]*xc + c[1]*yc + dx
				yct = c[2]*xc + c[3]*yc + dy

			where c is given in corr_coeff, dx and dy are from the columns,
		</meta>
	</STREAM>


	<table id="photpoints" onDisk="True" mixin="//products#table" adql="True">
		<meta name="title">Photometric Points Obtained by K2/C9 followup</meta>
		<foreignKey source="event_id" inTable="events"/>
	
		<index columns="did"/>

		<column name="did" type="text"
			ucd="meta.id;meta.main"
			tablehead="Dataset ID"
			description="Local dataset identifier for the lightcurve this point
				belongs to."
			verbLevel="1"/>
		<column name="event_id" type="text"
			tablehead="Event"
			description="Associated Event"
			verbLevel="1"/>

		<column name="obs_time" type="double precision"
			unit="d" ucd="time.epoch"
			tablehead="Time"
			description="Time this photometry corresponds to."
			verbLevel="1"/>
		<column name="phot" type="double precision"
			unit="mag" ucd="phot.mag;em.opt.R"
			tablehead="m_r"
			description="SDSS r-band instrumental magnitude (warning: zeropoint
				may be off several mag)."
			verbLevel="1"/>


		<FEED source="instancecolumns"/>

	</table>

	<data id="import_points" auto="False" recreateAfter="import_ts">
		<sources pattern="data/*.t"/>
		<property key="previewDir">previews</property>

		<reGrammar topIgnoredLines="1" id="subparse">
			<names>
				image, obs_time, df, e_df, rf, e_rf,
				phot, e_phot, cal_mag, exp_time, fwhm,
				sky_background, airmass, phot_scale_factor, chi2_px, dx, dy,
				a, b, c, d
			</names>
		</reGrammar>

		<embeddedGrammar isDispatching="True">
			<iterator>
				<setup>
					<par key="subGrammar">rd.getById("subparse")</par>
				</setup>
				<code>
					accref = getInputsRelativePath(self.sourceToken)
					pubdid = getStandardPubDID(accref)

					yield "products", locals()
					event_id = accref.split("/")[-1].split("_")[0]
					for row in subGrammar.parse(self.sourceToken):
						row["event_id"] = event_id
						row["accref"] = accref
						yield "points", row
				</code>
			</iterator>
			<rowfilter procDef="//products#define">
				<bind key="accref">@accref</bind>
				<bind key="table">"\schema.photpoints"</bind>
				<bind key="mime">"application/votable+xml"</bind>
				<bind key="path">\fullDLURL{dl}</bind>
				<bind key="preview">\standardPreviewPath</bind>
				<bind key="preview_mime">"image/png"</bind>
			</rowfilter>
		</embeddedGrammar>

		<make table="photpoints" role="points">
			<rowmaker idmaps="*">
				<var key="did">\inputRelativePath.split("/")[-1]</var>
				<map key="corr_coeff">[float(v) for v in [@a, @b, @c, @d]]</map>
			</rowmaker>
		</make>
	</data>

	<table id="timeseries" onDisk="True" adql="True">
		<mixin
			fluxUnit="adu"
			spectralUCD=" "
			spectralUnit=" "
			>//ssap#mixc</mixin>
		<mixin
			t_min="t_min_mjd"
			t_max="t_max_mjd"
			calib_level="3"
			em_xel="1"
			t_xel="ssa_length"
			>//obscore#publishSSAPMIXC</mixin>

		<property name="forceStats">1</property>

		<index columns="ssa_location" method="GIST"/>
		<index columns="ssa_pubdid"/>
		<index columns="t_min_mjd"/>
		<index columns="t_max_mjd"/>

		<column name="t_min_mjd" type="double precision"
			unit="d" ucd="time.start;obs"
			utype="ts:time.start"
			tablehead="t_min"
			description="(Approximate) earliest timestamp in dataset."
			verbLevel="1" displayHint="type=humanDate"/>
		<column name="t_max_mjd" type="double precision"
			unit="d" ucd="time.end;obs"
			utype="ts:time.end"
			tablehead="t_max"
			description="(Approximate) latest timestamp in dataset."
			verbLevel="1" displayHint="type=humanDate"/>
		<column original="events.t_0" name="t_0" displayHint="type=humanDate">
			<values min="2457416.212" max="2459410.701"/>
		</column>

		<viewStatement>
			CREATE MATERIALIZED VIEW \curtable AS (
				SELECT \colNames FROM (
					SELECT
						'\schema/data/' || did as accref,
						CAST (NULL as text) as owner,
						CAST (NULL as date) as embargo,
						'application/x-votable+xml'::TEXT as mime,
						20000 as accsize,
						'K2C9 VST ' || did as ssa_dstitle,
						CAST (NULL as text) as ssa_creatordid,
						'\pubdidroot' || did as ssa_pubDID,
						CAST (NULL as timestamp) as ssa_cdate,
						NOW()::timestamp as ssa_pdate,
						'SDSS r'::text as ssa_bandpass,
						CAST (NULL as text) as ssa_cversion,
						event_id as ssa_targname,
						'LensingEv'::text as ssa_targclass,
						CAST (NULL as real) as ssa_redshift,
						spoint(RADIANS(raj2000), RADIANS(dej2000)) as ssa_targetpos,
						CAST (NULL as real) as ssa_snr,
						spoint(RADIANS(raj2000), RADIANS(dej2000)) as ssa_location,
						avg_aperture/3600. as ssa_aperture,
						t_0 as ssa_dateObs,
						(obs_end-obs_start)*3600*24 as ssa_timeExt,
						CAST (5.8e-7 as real) as ssa_specmid,
						CAST (1.5e-7 as real) as ssa_specext,
						CAST (5e-7 as real) as ssa_specstart,
						CAST (6.5e-7 as real) as ssa_specend,
						n_points as ssa_length,
						'timeseries'::text as ssa_dstype,
						'\metaString{publisher}'::TEXT as ssa_publisher,
						'Hundertmark, M.; et al'::TEXT as ssa_creator,
						'K2C9 VST'::TEXT as ssa_collection,
						'VST'::TEXT as ssa_instrument,
						'\metaString{ssap.dataSource}'::text as ssa_datasource,
						'\metaString{ssap.creationType}'::text as ssa_creationtype,
						'TBD'::TEXT as ssa_reference,
						avg_err as ssa_fluxStatError,
						CAST (NULL as real) as ssa_fluxSysError,
						CAST ('UNCALIBRATED' as text) as ssa_fluxcalib,
						CAST (NULL as real) as ssa_binsize,
						CAST (NULL as real) as ssa_spectStatError,
						CAST (NULL as real) as ssa_spectSysError,
						CAST ('UNCALIBRATED' as text) as ssa_speccalib,
						CAST (NULL as real) as ssa_specres,
						obs_start as t_min_mjd,
						obs_end as t_max_mjd,
						t_0 as t_0
					FROM
						\schema.events
						JOIN (
							SELECT
								did,
								event_id,
								min(obs_time)-2400000.5 as obs_start,
								max(obs_time)-2400000.5 as obs_end,
								count(*) as n_points,
								avg(e_df) as avg_err,
								avg(fwhm) as avg_aperture
							FROM \schema.photpoints
							GROUP BY did, event_id) as obses
						USING (event_id)
				) as col_defs
			)
		</viewStatement>
	</table>

	<data id="import_ts" auto="False">
		<make table="timeseries"/>
	</data>

	<table id="instance">
		<mixin
			effectiveWavelength="6.25e-7"
				filterIdentifier='"VST/OmegaCAM.r_SDSS"'
				longitude="@raj2000"
				latitude="@dej2000"
				phot_description="SDSS r-band instrumental magnitude (warning: zeropoint
					may be off several mag)."
				phot_ucd="phot.mag;em.opt.R"
				phot_unit="mag"
				pos_epoch="J2000.0"
				refframe="ICRS"
				refposition="BARYCENTER"
				time0="0"
				time_description="Heliocentric JD of observation"
				timescale="UTC"
		>//timeseries#phot-0</mixin>

		<dm>
			(ivoa:Measurement) {
				value: @df
				statError: @e_df
			}
		</dm>

		<dm>
			(ivoa:Measurement) {
				value: @phot
				statError: @e_phot
			}
		</dm>

		<dm>
			(ds:Dataset) {
				dataProductType: TIMESERIES
				title: @title
				curation:
					(ds:Curation) {
						calibLevel: 1
						publisher:
							(ds:Publisher) {
								name: "GAVO Data Center"
								publisherId: "ivo://org.gavo.dc"
							}
						publisherDID: @pubdid
					}
			}
		</dm>

		<dm>
			(ndcube:Cube) {
				independent_axes: [@obs_time]
				dependent_axes: [@df @phot]
			}
		</dm>

		<dm>
			(phot:PhotCal) {
				filterIdentifier: "VST/OmegaCAM.r_SDSS"
				effectiveWavelength: 6.25e-7
				value: @df
			}
		</dm>

		<param name="pubdid" type="text"
			ucd="meta.ref.url;meta.curation"
			description="Dataset identifier assigned by the publisher."/>
		<param name="title" type="text"
			ucd="meta.title;obs"
			description="Free-from title of the data set"/>
		<param name="raj2000" type="double precision"
			ucd="pos.eq.ra"
			description="RA of event location"/>
		<param name="dej2000" type="double precision"
			ucd="pos.eq.dec"
			description="Declination of event location"/>

		<FEED source="instancecolumns"/>
	</table>

	<data id="make_instance" auto="False">
		<embeddedGrammar>
			<!-- source token is an SSAP row -->
			<pargetter>
				<code>
					did = self.sourceToken["accref"].split("/")[-1]
					evpat = did.split("_")[0]+"%"
					td = rd.getById("events")
					row = td.doSimpleQuery(
						fragments="event_id like %(evpat)s",
						params=locals())[0]
					row["id"] = did
					return row
				</code>
			</pargetter>

			<iterator>
				<code>
					did = self.sourceToken["accref"].split("/")[-1]
					td = rd.getById("photpoints")
					return td.doSimpleQuery(fragments="did=%(did)s", params=locals())
				</code>
			</iterator>

		</embeddedGrammar>

		<make table="instance">
			<parmaker idmaps="pubdid,title,raj2000,dej2000">
				<map key="pubdid">"\pubdidroot?"+@id</map>
				<map key="title">"K2C9 VST "+@id</map>
			</parmaker>
			<rowmaker idmaps="*"/>
		</make>
	</data>

	<service id="dl" allowed="dlget,dlmeta">
		<meta name="title">K2/C9 VST datalink service</meta>
		<datalinkCore>
			<descriptorGenerator procDef="//soda#sdm_genDesc">
				<bind key="ssaTD">"k2c9vst/q#timeseries"</bind>
				<bind key="useAccref">False</bind>
				<bind key="contentQualifier">"#timeseries"</bind>
			</descriptorGenerator>

			<dataFunction>
				<code>
					from gavo import rsc

					descriptor.data = rsc.makeData(
						rd.getById("make_instance"), forceSource=descriptor.ssaRow)
				</code>
			</dataFunction>

			<dataFormatter>
				<code>
					from gavo.formats import votablewrite

					return ("application/x-votable+xml;version=1.5",
						votablewrite.getAsVOTable(descriptor.data, version=(1,5)))
				</code>
			</dataFormatter>
		</datalinkCore>
	</service>

	<service id="web" allowed="form">
		<meta name="title">K2C9 VST Time Series Browser Interface</meta>
		<dbCore queriedTable="timeseries">
			<condDesc>
				<inputKey original="ssa_targname" showItems="10"
						multiplicity="multiple">
					<values fromdb=
						"ssa_targname from \curtable order by ssa_targname"/>
				</inputKey>
			</condDesc>
			<condDesc buildFrom="ssa_location"/>
			<condDesc>
				<inputKey original="t_0" type="vexpr-date" unit=""/>
				<phraseMaker>
					<code>
						if inPars["t_0"]:
							from gavo.svcs import vizierexprs
							expr = vizierexprs.parseDateExpr(inPars["t_0"])
							newPars = {}
							fragment = expr.asSQL(inputKeys[0], newPars)
							for key, val in newPars.iteritems():
								outPars[key] = dateTimeToJdn(val)
							yield fragment
					</code>
				</phraseMaker>
			</condDesc>
		</dbCore>
		<outputTable>
			<autoCols>ssa_dstitle, t_0, t_min_mjd, t_max_mjd</autoCols>
			<column original="accref" tablehead="Time Series">
				<property name="anchorText">VOTable</property>
			</column>
		</outputTable>
	</service>

	<service id="ssa" allowed="ssap.xml">
		<meta name="shortName">k2c9vst ssap</meta>
		<meta name="ssap.complianceLevel">query</meta>

		<meta>
			ssap.dataSource: pointed
			ssap.testQuery: MAXREC=1
			ssap.creationType: archival
		</meta>

		<publish render="ssap.xml" sets="ivo_managed"/>
		<publish render="form" sets="local,ivo_managed"
			service="web"/>

		<ssapCore queriedTable="timeseries">
			<property name="previews">auto</property>
			<FEED source="//ssap#hcd_condDescs">
				<PRUNE id="timeCond"/>
			</FEED>
			<condDesc>
				<inputKey name="TIME" type="text" description="Time interval(s)
					of interest, in MJD." unit="d"
					multiplicity="single"
					std="True" utype="ts:time"/>
				<phraseMaker>
					<code>
						lit = inPars["TIME"]
						if lit is None:
							return
						ranges = pql.PQLFloatPar.fromLiteral(lit, 'TIME')
						if ranges is None: # null string
							return
						yield ranges.getSQLForInterval(
							"t_min_mjd", "t_max_mjd", outPars)
					</code>
				</phraseMaker>
			</condDesc>
		</ssapCore>
	</service>

	<regSuite title="k2c9vst time series">
		<regTest title="k2c9vst ssap discovery">
			<url REQUEST="queryData" TIME="57557/"
				POS="270.97629,-28.49302" SIZE="0.0001">ssa/ssap.xml</url>
			<code>
				rows = self.getVOTableRows()
				self.assertEqual(len(rows), 1)
				row = rows[0]

				self.assertAlmostEqual(row['ssa_dateObs']/2457545.952, 1)
				self.assertTrue(row["accref"].endswith(
						"/getproduct/k2c9vst/data/OGLE-2016-BLG-0979_VST_r_SDSS67.t"),
					"Bad accref")
			</code>
		</regTest>

		<regTest title="k2c9vst time series formatted">
			<url httpHonorRedirects="True"
				>/getproduct/k2c9vst/data/OGLE-2016-BLG-0979_VST_r_SDSS67.t</url>
			<code>
				self.assertXpath("//v:PARAM[@name='raj2000']", {
					"value": "270.97629166666667"
				})
				self.assertXpath("//v:PARAM[@name='title']", {
					"value": "K2C9 VST OGLE-2016-BLG-0979_VST_r_SDSS67.t",
					"ucd": "meta.title;obs"})

				rows = self.getVOTableRows()
				self.assertEqual(len(rows), 32)
				self.assertAlmostEqual(rows[0]["obs_time"], 2457490.82951368)
				self.assertAlmostEqual(rows[-1]["corr_coeff"][2],
					1.8290700551371053e-11)
			</code>
		</regTest>

		<regTest title="k2c9vst proper 404 for unknown time series">
			<url ID="ivo://ignored/~?k2c9/borken">dl/dlget</url>
			<code>
				self.assertHTTPStatus(404)
				self.assertHasStrings("No spectrum with this pubDID known here",
					"~?k2c9/borken")
			</code>
		</regTest>

		<regTest title="k2c9vst previews generated">
			<url
				>/getproduct/k2c9vst/data/OGLE-2016-BLG-0979_VST_r_SDSS67.t?preview=True
			</url>
			<code>
				self.assertHasStrings(b"\\x89PNG", b"\\x7e\\xbd\\xc0\\xd7\\xc0\\xb8")
			</code>
		</regTest>
	</regSuite>

</resource>
