astronomy

How to plot Gaia astrometry data to TESS images using Python?

白昼怎懂夜的黑 提交于 2019-11-29 08:52:50
问题 Long story short: I want to plot Gaia astrometry data to TESS imagery in Python. How is it possible? See below for elaborated version. I have 64x64 pixel TESS imagery of a star with Gaia ID 4687500098271761792 . Page 8 of the TESS Observatory Guide says 1 pixel is ~21 arcsec. Using the Gaia Archive, I search for this star (below top features , click Search .) and submit a query to see the stars within 1000 arcsec, roughly the radius we need. The name I use for the search is Gaia DR2

Local solar time function from UTC and longitude

泄露秘密 提交于 2019-11-29 04:04:34
I'm wondering if there is a python function/module that calculates the local time after midnight (or local solar time) given the UTC time and longitude? It doesn't need to take into account daylight saving time. Thanks in advance. Or if you want to go even shorter, you could use NOAA's low-accuracy equations : #!/usr/local/bin/python import sys from datetime import datetime, time, timedelta from math import pi, cos, sin def solar_time(dt, longit): return ha def main(): if len(sys.argv) != 4: print 'Usage: hour_angle.py [YYYY/MM/DD] [HH:MM:SS] [longitude]' sys.exit() else: dt = datetime

Extract historic leap seconds from tzdata

无人久伴 提交于 2019-11-29 01:16:50
Is there a way to extract the moment of historic leap seconds from the time-zone database that is distributed on most linux distributions? I am looking for a solution in python, but anything that works on the command line would be fine too. My use case is to convert between gps-time (which is basically the number of seconds since the first GPS-satellite was switched on in 1980) and UTC or local time. UTC is adjusted for leap-seconds every now and then, while gps-time increases linearly. This is equivalent to converting between UTC and TAI . TAI also ignores leap-seconds, so TAI and gps-time

Sunrise / set calculations

我的梦境 提交于 2019-11-28 22:02:13
I'm trying to calculate the sunset / rise times using python based on the link provided below. My results done through excel and python do not match the real values. Any ideas on what I could be doing wrong? My Excel sheet can be found under .. http://transpotools.com/sun_time.xls # Created on 2010-03-28 # @author: dassouki # @source: [http://williams.best.vwh.net/sunrise_sunset_algorithm.htm][2] # @summary: this is based on the Nautical Almanac Office, United States Naval # Observatory. import math, sys class TimeOfDay(object): def calculate_time(self, in_day, in_month, in_year, lat, long, is

How can I compute sunrise/sunset times? [closed]

北城以北 提交于 2019-11-28 17:55:26
I like to keep track of sunrise and sunset times. For the past couple of years I've been doing this with a small program written with a popular library for my favorite programming language. The last two months I've been keeping track of these times more regularly than usual, and I happened to notice that on the day of the equinox the sunrise time jumped eight minutes as compared to the day before! I knew this was impossible and compared with NOAA , finding out that my rise and set times had been off for several days and in fact seemed to be off by about a minute for most of the year. At this

Moon / Lunar Phase Algorithm

故事扮演 提交于 2019-11-28 15:44:18
Does anyone know an algorithm to either calculate the moon phase or age on a given date or find the dates for new/full moons in a given year? Googling tells me the answer is in some Astronomy book, but I don't really want to buy a whole book when I only need a single page. Update: I should have qualified my statement about googling a little better. I did find solutions that only worked over some subset of time (like the 1900's); and the trig based solutions that would be more computationally expensive than I'd like. S Lott in his Python book has several algorithms for calculating Easter on a

Calculate whether it is close to dawn/dusk based on sunrise/sunset?

喜你入骨 提交于 2019-11-28 14:39:20
Is it possible to calculate when dawn/dusk will be if I have the time for sunrise, sunset and the longitude and latitude of a particular location? Spektre there are some simplified equations for that but the real thing is this: solving Kepler's equation btw your question is very similar to this: time when the sun is X degrees below/above Horizon if you want easy solution then obtain sunrise calendar for your location it should look something like this: Just pick the closest latitude or generate the right diagram for your location. The picture was taken from here so there should be also the

Calculating dawn and sunset times using PyEphem

拥有回忆 提交于 2019-11-28 06:56:21
Is it possible to calculate Dawn, Dusk, and sunset times using PyEphem ? I've used PyEphem to produce day and night time, but I didn't find anything on sunset/dusk/dawn For dawn amd dusk , see pyephem documentation regarding twilight In a nutshell, dawn and dusk express the time when the center of the Sun is at a particular angle below the horizon; the angle used for this calculation varies for the definition of the "civilian", navigation (nautical) and astronomical twilights which use 6, 12 and 18 degrees respectively. In opposition the sunrise corresponds to the time when the edge of the Sun

Curve fitting with y points on repeated x positions (Galaxy Spiral arms)

余生颓废 提交于 2019-11-28 01:29:13
I currently have a MATLAB program which takes RGB images of traced spiral arms from galaxies and selects the biggest arm component and plots only that. I have tried using matlab's built in curve fitting tool with smoothing spline to fit it and I get the following result: I have tried using interp1 with parametric fitting to only get bad results. Is there a way to fit this type of curve at all? Spektre Your fail is due to that you handle your 2D curve as function which is not the case (you got more y values for the same x ) and that is why the fit fails on the right side (when you hit the non

How can I compute sunrise/sunset times? [closed]

旧巷老猫 提交于 2019-11-27 10:53:20
问题 I like to keep track of sunrise and sunset times. For the past couple of years I've been doing this with a small program written with a popular library for my favorite programming language. The last two months I've been keeping track of these times more regularly than usual, and I happened to notice that on the day of the equinox the sunrise time jumped eight minutes as compared to the day before! I knew this was impossible and compared with NOAA, finding out that my rise and set times had