[AstroPy] problems with astroplan
Eric L. N. Jensen
ejensen1 at swarthmore.edu
Mon Nov 7 14:36:50 EST 2016
Since you don’t specify a timezone on your start_time variable, I’m guessing that it is probably being interpreted as UTC, in which case your specified target isn’t up at KPNO.
You don’t show an import statement that would define your call to “Time” so I’m not 100% sure what routine it is and how it’s interpreting the specified time, but being sure about timezones is where I’d start troubleshooting this.
> On Nov 7, 2016, at 2:22 PM, Steven Boada <boada at physics.rutgers.edu> wrote:
> Hi list,
> I'm headed to KPNO and I'm trying out astroplan for the first time. But I'm getting some confusing output. Here's an example.
> from astroplan import Observer, FixedTarget
> from astropy.coordinates import SkyCoord
> # make telescope location
> kpno = Observer.at_site('KPNO')
> # make target coordinates
> coords = SkyCoord(131.1331774, 62.41165761, unit='deg', frame='icrs')
> # make all the targets
> target = [FixedTarget(name='test', coord=coords)]
> # make the observing time
> start_time = Time('2016-11-11 01:54:00')
> end_time = Time('2016-11-11 12:30:00')
> time_delta = end_time - start_time
> observable_time = start_time + time_delta * np.linspace(0,1,75)
> print(kpno.target_is_up(start_time, target))
> # should print True
> # now we try to do all the fancy scheduling
> # set our only constraint to be at night
> constraint = AtNightConstraint.twilight_civil()
> print(astroplan.is_observable(constraint, kpno, targets[:1], times=Time('2016-11-11')))
> # should print false.
> Looking up the airmass etc. on the web, the target is certainly visible from KPNO. I'm obviously missing something, but I can't seem to figure out what it is.
> Thanks for your help.
> Steven Boada
> Postdoctoral Researcher
> Rutgers University
> boada at physics.rutgers.edu
> AstroPy mailing list
> AstroPy at scipy.org
More information about the AstroPy