GithubHelp home page GithubHelp logo

Comments (4)

astrorigin avatar astrorigin commented on May 30, 2024

Inspect the whole result:

jd_sunset = swe.rise_trans(jd_start=2457753.5, body=swe.SUN, lon=13.09,
... lat=80.27, rsmi=swe.CALC_SET | swe.BIT_DISC_CENTER)
jd_sunset
((-2,), (0.0, 2.695100435457e-312, 2.7874627029316465e-291, 1.818790777727e-311, 2.7874625367389016e-291, 9.766745e-317, 4.343725384106e-311, 5.2865984597206454e-303, 9.76668e-317, nan))

Function has returned (-2), object is circumpolar

By exchanging lon/lat you get:

jd_sunset = swe.rise_trans(jd_start=2457753.5, body=swe.SUN, lon=80.27,
... lat=13.09, rsmi=swe.CALC_SET | swe.BIT_DISC_CENTER)
jd_sunset
((0,), (2457754.015392543, 2.695100435457e-312, 2.7874627029316465e-291, 3.84528846805e-313, 2.7874625367389016e-291, 9.746423e-317, 4.343725384106e-311, 5.2865976774675737e-303, 9.7666284e-317, nan))

from pyswisseph.

vvasuki avatar vvasuki commented on May 30, 2024

Oh! I was beyond the arctic circle!
Sorry for the false alarm. πŸ™
Wouldn't it be better to raise an exception in such a case though?

from pyswisseph.

astrorigin avatar astrorigin commented on May 30, 2024

http://www.astro.com/swisseph/swephprg.htm#_Toc471829085

Conforming to the docs, an exception/error is raised if returned result is (-1) (internal - calc or ephemeris error)

In my opinion you could raise an exception on your side if you find returned result[0][0]==-2

And double-check your input variables

from pyswisseph.

vvasuki avatar vvasuki commented on May 30, 2024

OK, Thanks!

from pyswisseph.

Related Issues (20)

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.