[AstroPy] reading fixed format tables
Matt Davis
mrdavis at stsci.edu
Mon Dec 5 15:43:36 EST 2011
It looks like numpy.genfromtxt can also do this, see the last example: http://docs.scipy.org/doc/numpy/reference/generated/numpy.genfromtxt.html
- Matt
On Dec 5, 2011, at 3:41 PM, Tom Aldcroft wrote:
> Asciitable of course :). See the second example here:
>
> http://cxc.harvard.edu/contrib/asciitable/fixed_width_gallery.html#fixedwidthnoheader
>
> You'll have to calculate the column start and stop indexes.
>
> - Tom
>
> On Mon, Dec 5, 2011 at 3:36 PM, Wolfgang Kerzendorf
> <wkerzendorf at gmail.com> wrote:
>> Hello,
>>
>> I'm looking for a fixed format table reader. Fixed format like in the
>> fortran definition(no spaces, just a prescribed formatting).
>>
>> e.g. FORMAT(F11.4,F7.3,F6.2,F12.3,F5.2,1X,A10,F12.3,F5.2,1X,A10,
>>
>> 3F6.2,A4,2I2,I3,F6.3,I3,F6.3,2I5,1X,A1,A1,1X,A1,A1,i1,A3.2I5,I6)
>>
>>
>> Does atpy do that? Is there any other package that does that or do I need to
>> role my own?
>>
>> Cheers
>> W
>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at scipy.org
>> http://mail.scipy.org/mailman/listinfo/astropy
>>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20111205/4f683221/attachment.html>
More information about the AstroPy
mailing list