[AstroPy] Linearity correction by polynomial fitting
James Turner
jturner at gemini.edu
Thu Apr 18 13:19:33 EDT 2013
> But I couldn't find anything for fitting a polynomial for every pixel along an
> axis of an ndarray.
> Is there a tool to do this? Without implementing a python loop to loop through
> each pixel and calculate coefficients?
I'm not sure if there is anything yet (could tell you how to do
it in IRAF), as I think fitting has been a bit of a missing area
in Python until some recent work-in-progress. But wouldn't it
help to use Cython? I was also wondering whether a Python loop
will really be that slow if you're doing something relatively
non-trivial like a fit, but it probably will be since the axis
you're fitting will be much shorter than the image size...
Cheers,
James.
> Worst case scenario, i think i will have to write a C routine to do polynomial
> fit and call it from python. But i would really love if a pure python
> alternative exists.
>
> Thanks
> -cheers
> joe
>
>
>
>
>
> --
> /---------------------------------------------------------------
> "GNU/Linux: because a PC is a terrible thing to waste" - GNU Generation
>
> ************************************************
> Joe Philip Ninan http://sites.google.com/site/jpninan/
> Research Scholar /________________\
> DAA, | Vadakeparambil |
> TIFR, | Pullad P.O. |
> Mumbai-05, India. | Kerala, India |
> Ph: +917738438212 | PIN:689548 |
> ------------------------------\_______________/--------------
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
More information about the AstroPy
mailing list