Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ the released changes.
- Use VLBI astrometric measurements along with coordinate offset in the timing model
### Fixed
- Fix docstring of `make_fake_toas_uniform`
- Fixed bug where "include_bipm" flag was being ignored when loading Fermi TOAs with weights
### Removed
36 changes: 15 additions & 21 deletions src/pint/fermi_toas.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,25 +308,19 @@ def get_Fermi_TOAs(
else:
t = Time(mjds, format="mjd", scale=scale, location=location)
if weightcolumn is None:
return toa.get_TOAs_array(
t,
obs,
errors=errors,
include_bipm=include_bipm,
planets=planets,
ephem=ephem,
flags=[{"energy": str(e)} for e in energies.to_value(u.MeV)],
)
flags = [{"energy": str(e)} for e in energies.to_value(u.MeV)]
else:
return toa.get_TOAs_array(
t,
obs,
errors=errors,
include_bipm=False,
planets=planets,
ephem=ephem,
flags=[
{"energy": str(e), "weight": str(w)}
for e, w in zip(energies.to_value(u.MeV), weights)
],
)
flags = [
{"energy": str(e), "weight": str(w)}
for e, w in zip(energies.to_value(u.MeV), weights)
]

return toa.get_TOAs_array(
t,
obs,
errors=errors,
include_bipm=include_bipm,
planets=planets,
ephem=ephem,
flags=flags,
)
Loading