<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi James,<div class=""><br class=""><div><div class=""><div class="">On Jan 21, 2016, at 12:13 AM, James Allen <<a href="mailto:j.allen@physics.usyd.edu.au" class="">j.allen@physics.usyd.edu.au</a>> wrote:</div><br class="Apple-interchange-newline"></div><blockquote type="cite" class=""><div dir="ltr" class=""><div class="">I'm having a problem with WCS() raising an exception for what looks to me like a perfectly valid FITS header. The issue appears to be that the header includes a PLATEID, which in this case is completely unrelated to the coordinates. When I delete that card from the header, WCS() works fine.</div></div></blockquote><br class=""></div></div><div>I looked for “plateid” in the Astropy sources. It does look like the keyword is interfering. I’ll leave it to you to poke around these hits further:</div><div><br class=""></div><div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Monaco; color: rgb(223, 223, 223); background-color: rgb(12, 32, 48);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #f0ee00" class="">%</span> grep -ri plateid *</div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Monaco; color: rgb(223, 223, 223); background-color: rgb(12, 32, 48);" class="">cextern/wcslib/C/flexed/wcspih.c:18348:<span class="Apple-tab-span" style="white-space:pre">     </span>  keyname = "PLATEID";</div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Monaco; color: rgb(223, 223, 223); background-color: rgb(12, 32, 48);" class="">cextern/wcslib/C/flexed/wcspih.c:20945:    sprintf(wcsp->wcsname, "DSS PLATEID %.4s", (char *)(dsstmp+13));</div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Monaco; color: rgb(223, 223, 223); background-color: rgb(12, 32, 48);" class="">cextern/wcslib/C/wcspih.l:1020:^PLATEID" " {</div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Monaco; color: rgb(223, 223, 223); background-color: rgb(12, 32, 48);" class="">cextern/wcslib/C/wcspih.l:1028:<span class="Apple-tab-span" style="white-space:pre">  </span>  keyname = "PLATEID";</div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Monaco; color: rgb(223, 223, 223); background-color: rgb(12, 32, 48);" class="">cextern/wcslib/C/wcspih.l:2290:    sprintf(wcsp->wcsname, "DSS PLATEID %.4s", (char *)(dsstmp+13));</div></div><div><br class=""></div><div>This is in wcspih.l:</div><div><br class=""></div><div><div>^PLATEID" " {</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>  /* DSS: plate identification. */</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>  valtype = STRING;</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>  distype = SEQUENT;</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>  vptr    = dsstmp+13;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>  dssflag = 2;</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>  distran = DSS;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>  keyname = "PLATEID";</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>  BEGIN(VALUE);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div class=""><br class=""></div><div class="">I’d consider this a bug - as the plate designer for SDSS, I don’t think it’s reasonable to assume that any field that begins with “PLATEID” indicates a DSS plate. It’s likely that deleting that specific keyword is your best workaround for the time being (not selecting the first N rows as you note). Someone else can suggest how best to propagate this issue.</div></div><div><br class=""></div><div>You know what the FITS format needs? The concept of a namespace.</div><div><br class=""></div>Cheers,<div class="">Demitri<br class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: 'Gill Sans'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div style="text-align: -webkit-auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: -webkit-auto; line-height: normal; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: -webkit-auto; line-height: normal; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">_________________________________________<br class="">Demitri Muna<br class=""><a href="http://muna.com" class="">http://muna.com</a></div><div style="text-align: -webkit-auto; line-height: normal; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class="">Department of Astronomy<br class="">Il Ohio State University<br class=""><br class=""></div><div style="text-align: -webkit-auto; line-height: normal; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">My Projects:</div><div style="text-align: -webkit-auto; line-height: normal; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><a href="http://nightlightapp.io" class="">http://nightlightapp.io</a><br class="">http://trillianverse.org</div><div style="text-align: -webkit-auto; line-height: normal; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><a href="http://scicoder.org" class="">http://scicoder.org</a><br class=""><br class=""></div></div></div></div></div></div></div></div></div>
</div>
<br class=""></div></body></html>