You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered the following issue while attempting to rescale a FluxPerAngle profile using the FluxPerAngle.rescale() method if it was previously initialized with a scale.
The code to recreate the issue is
defocus_profile = FluxPerAngle(550., LSST, LSSTSEEING, scale=old_scale)
defocus_profile.rescale(new_scale)
AttributeError Traceback (most recent call last)
<ipython-input-103-f51bc1bc45e7> in <module>
----> 1 defocus_profile.rescale(scale)
~/anaconda3/lib/python3.8/site-packages/lfd/analysis/profiles/convolutionobj.py in rescale(self, x, y, step)
129 # must be called before update so that scaleleft and scaleright
130 # remain unchanged from the original
--> 131 self.obj = self.f(newscale)
132 self.scale = newscale
133 self.update()
~/anaconda3/lib/python3.8/site-packages/lfd/analysis/profiles/defocusing.py in f(self, r, h, instrument, units)
77
78 if not all([h, Ro, Ri]):
---> 79 h = self.h
80 Ro = self.Ro
81 Ri = self.Ri
AttributeError: 'FluxPerAngle' object has no attribute 'h'
This is due to the fact that the assignment of h (as well as Ro and Ri) only occurs if scale=None during the object creation. See the following:
I have encountered the following issue while attempting to rescale a
FluxPerAngle
profile using theFluxPerAngle.rescale()
method if it was previously initialized with ascale
.The code to recreate the issue is
This is due to the fact that the assignment of
h
(as well asRo
andRi
) only occurs ifscale=None
during the object creation. See the following:The text was updated successfully, but these errors were encountered: