[AstroPy] Setting and rising of a fixed object in the sky

Javed Rana javed302 at gmail.com
Wed Aug 24 01:33:40 EDT 2016


Hi Tom,

The below code is where I am using astroplan-
Here it is setting and rising time computation for 400 objects. Please have
look on it and let me know if I can make it faster.


import numpy as np
import astropy.units as u
from astropy.time import Time
from astropy.coordinates import SkyCoord, EarthLocation
from astroplan import Observer

locate= EarthLocation(lat=19.*u.deg, lon=73.*u.deg)
observ = Observer(location=locate, name="IGO")
stars_ra= np.linspace(90., 160., 400)
stars_dec= np.linspace(-30., 30., 400)
stars_coord= SkyCoord(ra=stars_ra*u.deg, dec=stars_dec*u.deg)

stars_ris = [observ.target_rise_time(Time.now(), star_coord, 'next',
horizon=25.*u.deg) for star_coord in stars_coord]

stars_set= [observ.target_set_time(Time.now(), star_coord, 'next',
horizon=25.*u.deg) for star_coord in stars_coord]

Thanks in advance,
Javed



On Tue, Aug 23, 2016 at 10:21 PM Thomas Robitaille <
thomas.robitaille at gmail.com> wrote:

> Hi Javed,
>
> Could you show the code you have written to use Astroplan? There are
> ways to set up Astropy coordinates that are more efficient than
> others, so maybe we can make suggestions to make it run faster.
>
> Cheers,
> Tom
>
>
> On 23 August 2016 at 17:38, Javed Rana <javed302 at gmail.com> wrote:
> > Hi Adrian and Benjamin,
> > Thanks a lot. I have used the Astroplan and Pyephem both to calculate
> > setting time for an fixed object. Setting and rising computation in
> > Astroplan is little slow for very large number of fixed objects. Pyephem
> > does it fast, but for now I am not using ephem because there is another
> > module with the name as ephem. So what could be the better way?
> >
> > Thanks in advance,
> > Javed Rana
> >
> > On Tue, Aug 23, 2016 at 8:49 PM Benjamin Weiner <bjw at as.arizona.edu>
> wrote:
> >>
> >> Hi Javed and Adrian,
> >>
> >> Pyephem, http://rhodesmill.org/pyephem/
> >> is a fairly mature and widely used package for celestial computations
> with
> >> a lot of functionality, including rise and set for both fixed and moving
> >> objects (and much more).
> >>
> >> I gather that astroplan is intended to be more closely integrated with
> >> astropy, but it would be helpful to address in the astroplan docs what
> its
> >> intended scope is and to what degree it will be compatible with (or
> >> supplant) existing code.
> >>
> >> Ben
> >>
> >>
> >>>
> >>>
> >>> Message: 1
> >>> Date: Tue, 23 Aug 2016 11:14:19 +0000
> >>> From: Javed Rana <javed302 at gmail.com>
> >>> To: "astropy at scipy.org" <astropy at scipy.org>
> >>> Subject: [AstroPy] Setting and rising of a fixed object in the sky
> >>> Message-ID:
> >>>
> >>> <CAPSMbOizR_ivn-Xhmsny_AoJqkRuWKUYu=Qh0f+MYkVQ5OA2XA at mail.gmail.com>
> >>> Content-Type: text/plain; charset="utf-8"
> >>>
> >>>
> >>>
> >>> Hello,
> >>> Is there any module in astropy that can calculate setting or rising
> time
> >>> of
> >>> a fixed object on the sky?
> >>> Recently I have written a code to calculate the rising and setting time
> >>> for
> >>> any fixed object on the sky using other astropy modules. It might be
> >>> useful
> >>> for others. Is it possible to push it in astorpy?
> >>>
> >>> Thanks in advance,
> >>> Javed Rana
> >>
> >>
> >> --
> >> Benjamin Weiner
> >> Associate Astronomer, Steward Observatory
> >> bjw at as.arizona.edu
> >> http://mingus.as.arizona.edu/~bjw/
> >> _______________________________________________
> >> AstroPy mailing list
> >> AstroPy at scipy.org
> >> https://mail.scipy.org/mailman/listinfo/astropy
> >
> >
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy at scipy.org
> > https://mail.scipy.org/mailman/listinfo/astropy
> >
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20160824/ed51c656/attachment.html>


More information about the AstroPy mailing list