\now
\commonmeta
%one of survey, pointed, theory, custom, artificial)%
%one of archival, cutout, filtered, mosaic, projection, spectralExtraction, catalogExtraction%
spectrum
MAXREC=1
//products#table
//ssap#plainlocation
//ssap#simpleCoverage
%add further custom columns if necessary here%
make_view
previews
"\\schema.main"
\\fullDLURL{"sdl"}
%typical size of an SDM VOTable in bytes%
"\\rdId#sdl"
"application/x-votable+xml"
\\standardPreviewPath
"image/png"
%use getWCSAxis(@header_, 1) for IRAF FITSes (delete otherwise)%
%where to get the RA from%
%where to get the Dec from%
%the aperture (a constant estimate may just do it)%
sdl
ssa_pubDID
//ssap#view
//obscore#publishSSAPMIXC
//ssap#sdm-instance
%a few words what a spectrum represents%
# we receive a pubDID in self.sourceToken["ssa_pubDID"];
# the physical accref is behind its "?", potentially URL-encoded.
sourcePath = urllib.decode(
self.sourceToken["ssa_pubDID"].split('?', 1)[-1])
% add code returning rowdicts from sourcePath %
# this could be something like
# colNames = ["spectral", "flux"]
# with open(sourcePath) as f:
# for ln in f:
# yield dict(zip(colNames, [float(s) for s in ln.split()]))
# -- make sure any further the names match what you gave
# in the instance table def.
\\schema Datalink Service
"\\rdId#main"
"\\rdId#build_spectrum"
\\schema Web
accref, mime, ssa_targname,
ssa_aperture, ssa_dateObs, datalink
\\schema SSAP
full
auto%delete this line if you have no previews; else delete just this.%
ssa/ssap.xml
self.assertHasStrings(
"%some characteristic string returned by the query%",
"%another characteristic string returned by the query%")
sdl/dlmeta
self.assertHasStrings(
"%some characteristic string in the datalink meta%")
sdl/dlget
self.assertHasStrings(
"%some characteristic string in the datalink meta%")