juliaastro / astrobase.jl Goto Github PK
View Code? Open in Web Editor NEWInterfaces, types, and functions for space science packages
License: Mozilla Public License 2.0
Interfaces, types, and functions for space science packages
License: Mozilla Public License 2.0
Hi,
Awesome package, thanks for all of your work! I am slowly migrating some routines in Python over to Julia and was wondering if there was already a way to convert between HJD <-> BJD, similarly to the astropy snippet I found here? https://gist.github.com/StuartLittlefair/4ab7bb8cf21862e250be8cb25f72bb7a
from astropy.coordinates import SkyCoord, EarthLocation
from astropy import units as u
from astropy.time import Time
def helio_to_bary(coords, hjd, obs_name):
helio = Time(hjd, scale='utc', format='jd')
obs = EarthLocation.of_site(obs_name)
star = SkyCoord(coords, unit=(u.hour, u.deg))
ltt = helio.light_travel_time(star, 'heliocentric', location=obs)
guess = helio - ltt
# if we assume guess is correct - how far is heliocentric time away from true value?
delta = (guess + guess.light_travel_time(star, 'heliocentric', obs)).jd - helio.jd
# apply this correction
guess -= delta * u.d
ltt = guess.light_travel_time(star, 'barycentric', obs)
return guess.tdb + ltt
def bary_to_helio(coords, bjd, obs_name):
bary = Time(bjd, scale='tdb', format='jd')
obs = EarthLocation.of_site(obs_name)
star = SkyCoord(coords, unit=(u.hour, u.deg))
ltt = bary.light_travel_time(star, 'barycentric', location=obs)
guess = bary - ltt
delta = (guess + guess.light_travel_time(star, 'barycentric', obs)).jd - bary.jd
guess -= delta * u.d
ltt = guess.light_travel_time(star, 'heliocentric', obs)
return guess.utc + ltt
which for example would return something like this:
> helio_to_bary("1:12:43.2 +31:12:43", 2457681.00027, "CTIO")
<Time object: scale='tdb' format='jd' value=2457681.0010844585>
Sorry if this is the wrong place to ask this!
CC: @giordano
ERFA.jl
OverhaulSPICE.jl
to JuliaAstro
and complete wrapperJPLEphemeris.jl
to JuliaAstro
AstronomicalTime.jl
and re-export it from hereAstroDynBase.jl
and prune astrodynamics-specific functionalityJPLEphemeris.jl
, AstroLib.jl
etc.Comment and edit away 👍
AstroBase
currently uses its own unit types, and is limited to the set of units it implements. Is integrating Unitful
and UnitfulAstro
a desired feature? If so, I'd be interested in implementing this. But I wanted to check to see if that was a desired feature for AstroBase
first.
@prakharcode I would like to move to Julia 0.7 as soon as possible. Would that impede your work?
[Didn't know where else to create this issue]
I recently came across the astropy tutorials website.
Can we implement a similar thing in julia ?
With the language getting better and stable and an exponentially increasing user base it'd be nice to have a bunch of tutorials covering the basic aspects of the package, examples, devs' guide etc.
@nolta @giordano @timholy @kbarbary @helgee
Bodies
Constants
Coords
EarthAttitude
Ephemerides
Frames
Time
TwoBody
Util
@giordano It seems that the LTS was bumped to 1.6. So the initial release should probably support 1.0. Don't you think?
Util
Util
Astrometry
Util
mod2pi
Util
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
Astrometry
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
Util
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
AstroTime
Astrometry
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
Util
EarthAttitude
EarthAttitude
AstroTime
AstroTime
AstroTime
AstroTime
Ephemerides
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
Astrometry
Astrometry
Astrometry
EarthAttitude
EarthAttitude
Astrometry
Util
Util
Util
Util
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
Astrometry
Astrometry
Astrometry
Astrometry
EarthAttitude
Astrometry
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
Util
Util
Util
EarthAttitude
EarthAttitude
Ephemerides
EarthAttitude
EarthAttitude
EarthAttitude
Astrometry
Astrometry
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
a + b
EarthAttitude
EarthAttitude
Util
Astrometry
EarthAttitude
Astrometry
Util
Util
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
EarthAttitude
Util
Util
Util
Util
Util
EarthAttitude
Astrometry
Astrometry
Util
Util
I’m curious about moving the common observatory information into this repo from AstroLib. In addition, would it be crazy to try adding an “Instrument” abstract type with some common methods values like what observatory, aperture, resolution, fwhm, or similar properties? An example usage would be broadening synthetic spectra dependent on what instrument the data is from (via FWHM lookup).
AstroBase.jl, as is, already contains quite a few "derivative works", i.e. ports of BSD-licensed code, while AstroBase itself is MIT-licensed. That does not work because MIT is more permissive than BSD (see here). While the jury is still out on whether a port is actually a derivative work, I would much rather err on the side of caution and become compliant!
Since I expect the influx of more ports with various licenses, I would choose a license which is compatible with most others (excluding GPL of course 🤷♂). The Mozilla Public License v2 (MPLv2) fulfills these requirements: https://choosealicense.com/licenses/mpl-2.0/
Dear contributors,
Could you please indicate by commenting here whether you agree to a license change to MPLv2?
Cheers,
Helge
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.