shbhuk / barycorrpy

Python version of Barycorr
GNU General Public License v3.0
37 stars 6 forks source link

Option to force static leapsecond file in package #30

Closed cbender closed 3 years ago

cbender commented 4 years ago

NEID-PRV requests that there be an arg option that forces barycorrpy to use a static leap-second file that is distributed with the repo. This allows us to distribute the code to AWS without requiring internet calls from there.

If the version distributed with the repo becomes stale down the road, we can revert to the internet served version.

shbhuk commented 4 years ago

Hey Chad, this should be do-able. See below -

You can set leap_update=False when exposure_meter_BC_vel() function is called. https://github.com/shbhuk/barycorrpy/wiki/11.-USNO-IERS-servers-are-down

shbhuk commented 4 years ago

That being said, once installed, the file only needs to be updated once every 6 months or so. So that would definitely be the safer option. This was the main reason for not using Astropy for leap seconds (since it is static, though they might be changing that in v4.0)

astrowright commented 4 years ago

Hi, Shubham.

Can we similarly prevent the code from updating IERS files?

On Fri, Dec 6, 2019 at 10:57 PM Shubham notifications@github.com wrote:

That being said, once installed, the file only needs to be updated once every 6 months or so. So that would definitely be the safer option. This was the main reason for not using Astropy for leap seconds (since it is static, though they might be changing that in v4.0)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/shbhuk/barycorrpy/issues/30?email_source=notifications&email_token=AASHFHPR4F6LZVVAWPWJHJLQXMNMBA5CNFSM4JXGYHG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGF5CTY#issuecomment-562811215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASHFHIVS63IQD65LBL5SQDQXMNMBANCNFSM4JXGYHGQ .

--


Jason T Wright Professor of Astronomy & Astrophysics Deputy Director, Center for Exoplanets and Habitable Worlds NEID Project Scientist http://neid.psu.edu/ he/him/his https://sites.psu.edu/astrowright/ https://sites.psu.edu/astrowright/ @Astro_Wright

http://twitter.com/Astro_Wright

cbender commented 4 years ago

The way NExScI will be running NEID data requires them to rebuild the entire software stack each day (via pip). So if barycorrpy has an option to point to the static file in ./data/ and that file is kept up to date, then they will always have the current version without having to make additional internet queries.

On Fri, Dec 6, 2019 at 9:08 PM astrowright notifications@github.com wrote:

Hi, Shubham.

Can we similarly prevent the code from updating IERS files?

On Fri, Dec 6, 2019 at 10:57 PM Shubham notifications@github.com wrote:

That being said, once installed, the file only needs to be updated once every 6 months or so. So that would definitely be the safer option. This was the main reason for not using Astropy for leap seconds (since it is static, though they might be changing that in v4.0)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/shbhuk/barycorrpy/issues/30?email_source=notifications&email_token=AASHFHPR4F6LZVVAWPWJHJLQXMNMBA5CNFSM4JXGYHG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGF5CTY#issuecomment-562811215 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AASHFHIVS63IQD65LBL5SQDQXMNMBANCNFSM4JXGYHGQ

.

--


Jason T Wright Professor of Astronomy & Astrophysics Deputy Director, Center for Exoplanets and Habitable Worlds NEID Project Scientist http://neid.psu.edu/ he/him/his https://sites.psu.edu/astrowright/ https://sites.psu.edu/astrowright/ @Astro_Wright

http://twitter.com/Astro_Wright

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shbhuk/barycorrpy/issues/30?email_source=notifications&email_token=AAM73JIN46YZHZIT675E7EDQXMOTXA5CNFSM4JXGYHG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGF5HMY#issuecomment-562811827, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM73JJQTEFTI6FUOGEYJXLQXMOTXANCNFSM4JXGYHGQ .

shbhuk commented 4 years ago

The leap second file on pip will be the one we upload with the latest version. In principle we could just update the pip version with the new leap second file, even though this is not standard practice.

For IERS, see below -

image https://docs.astropy.org/en/stable/utils/iers.html

There isn't currently a flag for this, but I could add this in v3.0 (which includes the solar and Sun in reflection barycentric correction)

shbhuk commented 4 years ago

Right, thinking more about this, the leap second update can be turned off as mentioned before by just having the call to barycorrpy have leap_update=False. We should test the IERS update and see how that works and if we need to turn that off.

I am not sure if by default the Astropy install includes the latest IERS table, if not, this would be an issue and cannot be turned off.

shbhuk commented 3 years ago

Closed with reference to - https://github.com/shbhuk/barycorrpy/issues/40