Giter Club home page Giter Club logo

Comments (7)

abatten avatar abatten commented on July 17, 2024 1

What I am going to do is use obs_freq_central by default and have a keyword use_bandwidth in the function call for calc_luminosity() and calc_energy() that will allow for the option of using obs_bandwidth.

from fruitbat.

abatten avatar abatten commented on July 17, 2024

@telegraphic The error when using units on obs_bandwidth is because it add units to bandwidth by default similar to DM and fluence. So when specifying units when instantiating the class Frb will lead to a value of 31.25 MHz**2 when doing internal calculations. Hence the units are non-convertible. I think adding a check to the setters in the class Frb to see if the correct units are already assigned would resolve this issue. I'll open this as an issue for enhancement.

As for the average luminosity, I have a beta version of a calc_luminosity() function already developed but not released yet, however I found various differing definitions in the literature so I wasn't sure exactly which one to implement. Do know the preferred reference for calculating luminosity, if so I can add it relatively quickly.

from fruitbat.

telegraphic avatar telegraphic commented on July 17, 2024

I've just been dividing energy by width ;)

Wael just reminded me that in the Zhang (2018) paper they picked up that central observing frequency nu should be used instead of obs_bandwidth to estimate isotropic energy (I'm checking some of his calculations against fruitbat!):

The (1+z) factor was misused in the expression of E in some previous papers. The central frequency νc, rather than the bandwidth B, should be used in these calculations.

It's this equation:
Screen Shot 2019-04-01 at 6 16 26 pm

from fruitbat.

abatten avatar abatten commented on July 17, 2024

So are you suggesting that both calc_energy() and calc_luminosity() should use a new parameter obs_freq_central instead of obs_bandwidth? This should be a pretty quick change.

from fruitbat.

telegraphic avatar telegraphic commented on July 17, 2024

Yes, that's my understanding, they suggest that obs_freq_central is more appropriate. (I wouldn't be suprised if the argument continued though, as some pulses may be inherently band-limited, and others may be much wider band than the bandwidth of the receiver).

from fruitbat.

abatten avatar abatten commented on July 17, 2024

The pull request #16 updating to version 0.2.1 has the luminosity function and passing units updates.

You can use the calc_luminosity() function with either obs_freq_central or obs_bandwidth. The same goes for calc_energy() however it now uses obs_freq_central by default.

I also made it possible to pass values with astropy units when calling Frb() and it will use those units instead of the predefined units I gave them unless the units aren't convertible.

If this works as you expect let me know and I can close this issue.

from fruitbat.

abatten avatar abatten commented on July 17, 2024

I'm closing this issue based on talking to you in person, the issue seems resolved.

from fruitbat.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.