[AstroPy] Bug in Table.view_in_browser(jsviewer=True) ?

Erik Bray embray at stsci.edu
Wed Aug 5 11:06:04 EDT 2015


On 08/05/2015 10:48 AM, Adam Ginsburg wrote:
> Hi Leonard,
>       This is something that can be solved within astropy.  There is an
> open issue that will probably solve this:
> https://github.com/astropy/astropy/issues/2966
> in case you want to try to tackle it based on Tom Robitaille's example.

Indeed, some of the columns you'll notice do sort correctly numerically, like 
the "z" column in your table.  It's just when columns contain non-numbers like 
NaN.

Looks like a reasonably easy pull request since Tom already showed how to 
approach it (just need to add a custom sort method to dataTable in the 
javascript), if anyone has been looking for a contribution to make to Astropy...

Erik

> On Wed, Aug 5, 2015 at 4:31 PM, Leonard Burtscher <burtscher at mpe.mpg.de> wrote:
>> Hi,
>>
>> The "show_in_browser" feature for Table is really great, especially when combined with jsviewer=True, e.g.
>>
>> http://www.mpe.mpg.de/~burtscher/APEX/table.html
>>
>> By clicking on the header row, one can sort by that column. However, numbers are not sorted correctly, with "9" being before "10" etc. (e.g. click on one of the "exptime" columns and look at the bottom of the table).
>>
>> Is that something that could be solved within astropy or is it a Javascript issue?
>>
>> -- Leo
>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at scipy.org
>> http://mail.scipy.org/mailman/listinfo/astropy
>
>
>




More information about the AstroPy mailing list