Bug #1654

ctlike optimizer returns function value of fit without source in case TS computation is enabled

Added by Mayer Michael almost 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:02/01/2016
Priority:NormalDue date:
Assigned To:Mayer Michael% Done:

100%

Category:-
Target version:1.1.0
Duration:

Description

In case in the input model XML file we have tscalc="1" to signal that TS should be computed, the following code returns a misleading result:

like = ctlike(input_obs)
like.run()
print(like.opt().value())

The print statement will show the value of the latest optimisation. If the TS computation was enabled, this corresponds to the optimisation without the source of interest (also the other way round if TS was disabled the overall likelihood value is shown). The user might expect to retrieve the value of the overall fit in any case though.
I am not sure if this is really a bug, or more a feature :)


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen almost 9 years ago

I agree that the value of the overall optimisation should be returned. We therefore should do the optimisations for the TS computation with a copy of the optimiser, not the optimiser of the ctlike class. So, ctlike::reoptimize_lm(void) should work with a clone of the optimizer.

#2 Updated by Mayer Michael almost 9 years ago

  • Status changed from New to Pull request
  • Assigned To set to Mayer Michael

Good idea. Fix is available on branch 1654-ctlike-likelihood-value.

#3 Updated by Knödlseder Jürgen almost 9 years ago

  • Status changed from Pull request to Closed
  • Target version set to 1.1.0
  • % Done changed from 0 to 100

Merge into devel.

Also available in: Atom PDF