svc = rd.getById("dl")
basename = descriptor.accref.split("/")[-1].split(".")[0]
yield descriptor.makeLink(
svc.getURL("static")+"/jpegs/"+basename+".jpg",
description="Low-res photo with plate borders.",
contentType="image/jpeg",
contentLength=os.path.getsize(rd.getAbsPath("data/static"
"/jpegs/"+basename+".jpg")),
contentQualifier="#image")
yield descriptor.makeLink(
svc.getURL("static")+"/wedges/"+basename+"w.fits",
description="Greyscale wedge scanned with the data.",
semantics="#calibration",
contentType="image/fits",
contentLength=os.path.getsize(rd.getAbsPath("data/static"
"/wedges/"+basename+"w.fits")))
if "_ra" in outPars:
outPars["X_search_center"] = pgsphere.SPoint.fromDegrees(
outPars["_ra"], outPars["_dec"])
else:
outPars["X_search_center"] = None
if False:
yield
Low-res photo with plate borders.",
"kapteyn/q/dl/static/jpegs/POT015_000317.jpg",
"Greyscale wedge scanned with the data. ",
"kapteyn/q/dl/static/wedges/POT015_000317w.fits",
"#proc")
]]>
',
'kapteyn/q/dl/dlmeta?ID=ivo%3A//org.gavo.dc/~%3Fkapteyn/data/fits/POT015_000317.fits"',
'kapteyn/q/dl/static/jpegs/POT015_000317.jpg">',
'SA 87 ',
'>Dist.<')
# regrettably, the regression test dataset is off of the real one,
# so we have two distances (in arcmins)
self.assertTrue(re.search(b"(3|110) ", self.data),
"Can't find either version of the distance from the center")
]]>
self.assertHasStrings("JFIF")
self.assertHasStrings(b"NAXIS1 = 5",
b"OBJECT = 'SA 87 '",
b"\\x46\\xfc\\xbe\\x00\\x46\\xfa\\xfc\\x00")