Skip to content

Commit

Permalink
fix unit conversion bug in MQModel
Browse files Browse the repository at this point in the history
  • Loading branch information
noahfranz13 committed Jul 12, 2024
1 parent dae55bf commit 29fe773
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/syncfit/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.1"
__version__ = "0.2.2"
3 changes: 2 additions & 1 deletion src/syncfit/models/mq_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def SED(nu, p, log_bG_sh, logMdot, log_epsilon_T, log_epsilon_e, log_epsilon_B,
f=f,ell_dec=ell_dec,radius_insteadof_time=False
) * u.erg / (u.s * u.Hz)

Fnu = (Lnu / (4*np.pi*lum_dist**2)).to(u.mJy) # mJy
lum_dist_cm = lum_dist*u.cm # give it units so the conversion works well
Fnu = (Lnu / (4*np.pi*(lum_dist_cm)**2)).to(u.mJy) # mJy

return Fnu.value

Expand Down

0 comments on commit 29fe773

Please sign in to comment.