Giter Site home page Giter Site logo

astrobase.jl's People

Contributors

github-actions[bot] avatar helgee avatar juliatagbot avatar matzipan avatar prakharcode avatar timholy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

astrobase.jl's Issues

Convert between HJD <-> BJD?

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!

The Plan

CC: @giordano

  • Get validation setup in place
    • ERFA.jl Overhaul
    • Move SPICE.jl to JuliaAstro and complete wrapper
    • Migrate those to BinDeps2
  • Move JPLEphemeris.jl to JuliaAstro
  • Polish and publish AstronomicalTime.jl and re-export it from here
  • Import tree from AstroDynBase.jl and prune astrodynamics-specific functionality
  • Integrate with JPLEphemeris.jl, AstroLib.jl etc.
  • ...
  • Profit!

Comment and edit away 👍

Using Unitful.jl & UnitfulAstro.jl for unit handling

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.

Julia Astro tutorials

[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

Roadmap to release

  • Polish submodules
    • Bodies
    • Constants
    • Coords
      • Figure out interpolation situation
    • EarthAttitude
    • Ephemerides
    • Frames
    • Time
    • TwoBody
    • Util
  • Overhaul testing and improve coverage
  • Tag release 🎉

@giordano It seems that the LTS was bumped to 1.6. So the initial release should probably support 1.0. Don't you think?

Port useful ERFA functions

A

B

  • bi00 -> EarthAttitude
  • bp00 -> EarthAttitude
  • bp06 -> EarthAttitude
  • bpn2xy -> EarthAttitude

C

D

E

F

G

H

I

J

L

N

O

P

R

S

T

U

X

Z

  • zp -> unneeded
  • zpv -> unneeded
  • zr -> unneeded

Observatories

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).

Relicense under MPLv2

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

Contributors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.