telegraphic / pygdsm

Python interface to Global Diffuse Sky Models (GDSM) for the radio sky between 10 MHz - 5 THz
MIT License
30 stars 7 forks source link

Bug in masking entries below the horizon #3

Closed christophwelling closed 2 years ago

christophwelling commented 4 years ago

I think the GSMObserver does not mask entries below the horizon correctly. In line 68 of base_observer.py, self._phi is used to mask entries, but this should be self._theta.

telegraphic commented 4 years ago

Thanks @christophwelling, interesting! It's been a while since I looked at that code, will revisit it when I get a chance. (pull requests welcome of course).

christophwelling commented 4 years ago

I'll be happy do make a pull request. Can you please give me permission to push a new branch into the repo?

telegraphic commented 4 years ago

sure thing, invite waiting!

cdilullo commented 2 years ago

@telegraphic If this is still an open problem, I think I've come up with a solution which creates the horizon mask by computing the haversine distance between zenith and all points on the sky and then masking all points that are > 90 deg away. I'll submit a pull request if you can give me permission to push to the repo

telegraphic commented 2 years ago

Thanks @cdilullo, this looks to work and makes sense! Closing 🥇