[AstroPy] Accessing a FITS table generates "ValueError: Inconsistent data column lengths: set([0, 27645])"
derek at astro.physik.uni-goettingen.de
Tue Apr 17 09:47:51 EDT 2018
On 17. Apr 2018, at 3:38 PM, Daniel Evans <d.f.evans at keele.ac.uk> wrote:
> > [...] column 12 has zero width, i.e. shape (0, nrow). If that’s actually allowed by the FITS standard
> From my non-expert reading of the standard, v4 Sect. 7.3.1, it looks to be explicitly permitted:
> "The repeat count r is the ASCII representation of a non-negative integer specifying the number of elements in field n. The default value of r is 1; the repeat count need not be present if it has the default value. A zero element count, indicating an empty field, is permitted."
> On 17 April 2018 at 13:52, Derek Homeier <derek at astro.physik.uni-goettingen.de> wrote:
> On 17. Apr 2018, at 12:53 PM, Jordan Alexander <jordan.alexander at aut.ac.nz> wrote:
> > First, thank you astropy for this outstanding package. It played an important role in the completion of my PhD; much respect :)
> > Using python 2.7.12 & astropy 2.0.5 and following Lia R. Corrales' useful tutorial,
> > http://www.astropy.org/astropy-tutorials/FITS-tables.html
> > I am trying to access data stored in a FITS table, which generates
> > ValueError: Inconsistent data column lengths: set([0, 27645])"
Jordan, then I’d also suggest to file an issue on https://github.com/astropy/astropy/issues
if you could provide an example file. I guess reading the HDU directly into a Table as
dat = Table.read('WS001H.0.bin0000.source0000.FITS’, hdu=8)
fails in the same way?
More information about the AstroPy