# Implement line search

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
8
• Sprint:
AP S18-6, AP F18-1
• Team:

#### Description

Pierre Astier suggests that we should implement a line search in jointcal, to deal with the non-linearities in the photometric model (and because we may eventually have those in astrometry, as the astrometry model gets more complex). He suggested using Brent's method, which is available in GSL. It might be easier to just take the code directly from GSL, instead of writing an interface layer, given the way the nature of the jointcal models.

At the top of the outlier rejection loop in FitterBase.minimize(), this would look something like:

 Eigen::VectorXd delta = chol.solve(grad); scale = lineSearch(delta); offsetParams(delta*scale)); 

#### Activity

Hide
Tim Jenness added a comment -

If you take the code from GSL please ensure that a full license statement is made in the relevant file and README. It's important that we record when we integrate external GPL code. We can change the license of our own code, we can't change the license if we include external GPL code.

Show
Tim Jenness added a comment - If you take the code from GSL please ensure that a full license statement is made in the relevant file and README. It's important that we record when we integrate external GPL code. We can change the license of our own code, we can't change the license if we include external GPL code.
Hide
Jim Bosch added a comment -
Show
Jim Bosch added a comment - There's also https://www.boost.org/doc/libs/1_65_0/libs/math/doc/html/math_toolkit/roots/brent_minima.html
Hide
John Parejko added a comment -
Show
John Parejko added a comment - Jenkins run: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/28024/pipeline
Hide
John Parejko added a comment -

Pim Schellart [X] do you mind taking on this review (less than 100 lines changed)?

Show
John Parejko added a comment - Pim Schellart [X] do you mind taking on this review (less than 100 lines changed)?
Hide
Pim Schellart [X] (Inactive) added a comment -

Sorry for the delay. See suggestions on PR.

Show
Pim Schellart [X] (Inactive) added a comment - Sorry for the delay. See suggestions on PR.
Show
John Parejko added a comment - Post-cleanup and rebase jenkins run: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/28153/pipeline
Hide
John Parejko added a comment -

Thanks for the review. I dealt with, or responded to, all of your comments.

Merged and done.

Show
John Parejko added a comment - Thanks for the review. I dealt with, or responded to, all of your comments. Merged and done.

#### People

Assignee:
John Parejko
Reporter:
John Parejko
Reviewers:
Pim Schellart [X] (Inactive)
Watchers:
Dominique Boutigny, Jim Bosch, John Parejko, John Swinbank, Pierre Astier, Pim Schellart [X] (Inactive), Tim Jenness