abatten / fruitbat

A fast radio burst (FRB) redshift estimation package written in Python.
https://fruitbat.readthedocs.io
BSD 3-Clause "New" or "Revised" License
17 stars 5 forks source link

我在linux上安装fruitbat后计算Luminosity Distance等无法运行 #48

Closed astronmyphy closed 1 year ago

astronmyphy commented 2 years ago

2021-12-13 21-15-29屏幕截图

astronmyphy commented 2 years ago

Comoving Distance,Luminosity Distance也无法运行没有结果

abatten commented 2 years ago

Hi @610069895, thank you for submitting a bug report.

It seems to me that the function calc_luminosity_distance is missing something. To calculate the energy of an FRB, it will need a redshift (measured or estimated). Are you able to provide the full code that you have used to produce this error? I have tried to replicate something similar to yours but get the following:

In [1]: import fruitbat

In [2]: frb = fruitbat.Frb(1000)

In [3]: frb.fluence = 2.0

In [4]: frb.obs_freq_central = 1600

In [5]: frb.calc_redshift()
Out[5]: <Quantity 0.98344417>

In [6]: frb.calc_energy()
Out[6]: <Quantity 8.53026964e+40 erg>

I'm interested to see what parameters you have used for frb, and any functions you have run.

astronmyphy commented 2 years ago

我在linux上能计算红移,但是其他参数报错 ------------------ Original ------------------ From: "abatten/fruitbat" @.>; Date: Tue, Dec 14, 2021 10:40 AM @.>; Cc: "Zhang @.**@.>; Subject: Re: [abatten/fruitbat] 我在linux上安装fruitbat后计算Luminosity Distance等无法运行 (Issue #48)

Hi @610069895, thank you for submitting a bug report.

It seems to me that the function calc_luminosity_distance is missing something. To calculate the energy of an FRB, it will need a redshift (measured or estimated). Are you able to provide the full code that you have used to produce this error? I have tried to replicate something similar to yours but get the following: In [1]: import fruitbat In [2]: frb = fruitbat.Frb(1000) In [3]: frb.fluence = 2.0 In [4]: frb.obs_freq_central = 1600 In [5]: frb.calc_redshift() Out[5]: <Quantity 0.98344417> In [6]: frb.calc_energy() Out[6]: <Quantity 8.53026964e+40 erg>
I'm interested to see what parameters you have used for frb, and any functions you have run.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

abatten commented 2 years ago

If you can provide the rest of the code that you have used to get this output, that would be useful to help find the cause of this issue.

abatten commented 1 year ago

I'm going to close this because there have been no updates in over two years.