Location of Derivatives #107
jenniferyee
started this conversation in
General
Replies: 2 comments 4 replies
-
Related question: right now, we calculate the gradient with respect to rho based on the whole light curve, even if the finite source method is only applied to some of the data. This seems problematic, but is related to the difficulty of accessing db0, db1, etc. from MagnificationCurve (or FitData), because they are read when the Lens Class is created. Related to the fact that Model and PointLens exists without a specific set of reference times, but MagnificationCurve does not. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When we implemented derivatives for calculating the chi2 gradient (e.g. dA_dparams), we put them in FitData and it led to a lot of recalculating of magnification curves and trajectories. I propose we move all the derivatives to be properties of MagnificationCurve and introduce lazy loading for a lot of parameters (e.g. a_pspl, b0), so they can be calculated just once.
@rpoleski
Beta Was this translation helpful? Give feedback.
All reactions