Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for arguments that have existing units in Frb #15

Closed
abatten opened this issue Apr 1, 2019 · 1 comment
Closed

Check for arguments that have existing units in Frb #15

abatten opened this issue Apr 1, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@abatten
Copy link
Owner

abatten commented Apr 1, 2019

Add a check for to determine if the arguments passed in Frb have existing units. This check would be done in the setter functions of each variable. This would resolve issue #14.

@abatten abatten added the enhancement New feature or request label Apr 1, 2019
@abatten abatten self-assigned this Apr 1, 2019
abatten added a commit that referenced this issue Apr 2, 2019
* Added a `calc_luminosity()` function that takes a parameter
`use_bandwidth` to choose between bandwidth and central observing
frequency.
* Modified `calc_energy()` to now use `obs_freq_central` by default
instead of `obs_bandwidth`
* Added checks on units passed to Frb. If the units are incompatible it
will return an error, otherwise it with use the units specified rather
than the default.
* Added tests for new luminosity and energy functions.
* Added tests for correct and incorrect units in Frb.
@abatten
Copy link
Owner Author

abatten commented Apr 3, 2019

Version 0.2.1 #16 Now has the feature to pass units in Frb and will use those units by default.

example:

frb = fruitbat.Frb(1000, gl="13.4", gb="32.3", obs_bandwidth=400 * u.MHz)

There also check to ensure that the units are convertible to the expected units.

@abatten abatten closed this as completed Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant