[SciPy-User] Help optimizing an algorithm

Charles R Harris charlesr.harris@gmail....
Mon Feb 4 13:08:30 CST 2013


On Mon, Feb 4, 2013 at 9:19 AM, Chris Weisiger <cweisiger@msg.ucsf.edu>wrote:

> On Fri, Feb 1, 2013 at 7:47 PM, Charles R Harris <
> charlesr.harris@gmail.com> wrote:
>
>>
>> So the light source is held constant here and only the integration time
>> varied? Due to pipelining, it is possible that polynomial fits might be as
>> fast as the linear splines you are using. In any case, a polynomial fit to
>> the inverse function could be used to sample the output to input conversion
>> at equally spaced output values and the result stored. With proper scaling
>> you could then determine the table index and offset for the interpolation
>> using divmod.
>>
>>
> You're correct that we're just varying the exposure time while the light
> intensity is constant. I tried doing polynomial fits, but even upwards of
> 10th-degree polynomials still gave terrible fit qualities.
>

I gone higher than that without problems, although I do include more
exposure times. I've a routine that does this while combining several data
sets that use different backgrounds as a check on the consistency of the
exposure time numbers. If you would be interested I'll send it along. Or
you could send me some data and I run the fit is see what is looks like.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20130204/0bfa57fb/attachment.html 


More information about the SciPy-User mailing list