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
Print out the value of HG phase function at 30 deg phase angle:
4.75 VEGAmag
What did really happen?
The above code snippet will throw a UnitTypeError, stating that 'Quantity instances require normal units, not <class 'astropy.units.function.logarithmic.MagUnit'> instance.'
The fundamental reason is because astropy.modleing.Model evaluates model value by assembling the parameter value and unit into an astropy.units.Quantity. But a MagUnit type cannot make a Quantity, but a Magnitude type.
This issue is reported by astropy/astropy#13133, and is current being addressed with PR astropy/astropy#13158. Once this issue is fixed in astropy, sbpy should be updated accordingly or checked to make sure this issue is also resolved.
Provide information on your environment:
operating system and version: MacOSX 10.15.7
sbpy version: '0.2.3.dev223+g9eb0523'
astropy version: '5.0.4'
numpy version: '1.22.3'
The text was updated successfully, but these errors were encountered:
High-level problem description
When any model parameter is an
astropy.units.Magnitude
type, model evaluation fails.What did you do?
What did you expect?
Print out the value of HG phase function at 30 deg phase angle:
4.75 VEGAmag
What did really happen?
The above code snippet will throw a
UnitTypeError
, stating that 'Quantity instances require normal units, not <class 'astropy.units.function.logarithmic.MagUnit'> instance.'The fundamental reason is because
astropy.modleing.Model
evaluates model value by assembling the parameter value and unit into anastropy.units.Quantity
. But aMagUnit
type cannot make aQuantity
, but aMagnitude
type.This issue is reported by astropy/astropy#13133, and is current being addressed with PR astropy/astropy#13158. Once this issue is fixed in
astropy
,sbpy
should be updated accordingly or checked to make sure this issue is also resolved.Provide information on your environment:
operating system and version: MacOSX 10.15.7
sbpy version: '0.2.3.dev223+g9eb0523'
astropy version: '5.0.4'
numpy version: '1.22.3'
The text was updated successfully, but these errors were encountered: