IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#574 closed defect (fixed)

pmSubtractBias won't return a psSpline1D

Reported by: Paul Price Owned by: gusciora@…
Priority: high Milestone:
Component: detrend Version: 0.8.0
Severity: normal Keywords:
Cc:

Description

I tried calling pmSubtractBias with and without pre-allocating a psSpline1D as
the fitSpec, but couldn't get it to return a non-NULL fitSpec.

This might be related to the alterations made to the psSpline1D about a month ago.

Change History (6)

comment:1 by robert.desonia@…, 21 years ago

Owner: changed from robert.desonia@… to george.gusciora@…

comment:2 by robert.desonia@…, 21 years ago

Owner: changed from george.gusciora@… to gusciora@…

comment:3 by gusciora@…, 21 years ago

Resolution: fixed
Status: newclosed

This should be done.

comment:4 by Paul Price, 21 years ago

What was wrong? How was the bug fixed?

comment:5 by gusciora@…, 21 years ago

If pmSubtractBias() is called with fitSpec being an already allocated spline
then I wrote a routine which explictly copies the newly generated spline in
pmSubtractBias() to the fitSpec argument. I verified this works in the current
CVS tree, however if you check that out, there are still some memory leak problems.

Speaking of the memory stuff, when I create an entire FPA->chip->cell->readout
hierarchy, should I be able to free the whole thing with a simple psFree(FPA)?
Or must I free some of the sub trees as well?

comment:6 by Paul Price, 21 years ago

bug_group: tessalation?

Freeing the FPA should free all the dependent elements.

Shouldn't the fix to pmSubtractBias be as simple as:

pmSubtractBias(..., void fitSpec, pmFit fit, ...)
{

....
psSpline1D *spline = NULL; Spline to use in fitting overscan
if (fit == PM_FIT_SPLINE) {

if (fitSpec && *fitSpec) {

We're given a spline; use that.
spline = *fitSpec;

} else if (fitSpec && ! *fitSpec) {

We're given a pointer to NULL; create a spline to pass back
spline = psSpline1DAlloc();
*fitSpec = spline;

} else {

Told to use a spline, but the user doesn't want it back.
...

}

}
....

}

Note: See TracTickets for help on using tickets.