astronomy

Compute shadow length using PyEphem

两盒软妹~` 提交于 2020-01-11 02:11:26
问题 I am using PyEphem and want to calculate the length of a shadow (assume a stick of unit length is planted in the ground). The length will be given by cot(phi), where phi is the solar elevation angle (please correct me if I'm wrong). I'm not sure what field to use on the Sun? In the example below, I'm using the angle alt: import ephem, math o = ephem.Observer() o.lat, o.long = '37.0625', '-95.677068' sun = ephem.Sun() sunrise = o.previous_rising(sun, start=ephem.now()) noon = o.next_transit

Plotting a star chart efficiently

我的梦境 提交于 2020-01-06 03:53:11
问题 I'd like to visualize astronomical star catalogues that can contain hundreds of thousands of entries. The catalogues usually consist of simply a list of stars, with spherical coordinates and other data for each star. By spherical coordinates I mean right ascension (0-360 degrees or 0-24 hours) and declination (-90 degrees to +90 degrees). This corresponds to longitude and latitude, just on the celestial sphere instead of Earth's surface. I'd like to plot all the stars in the catalogue that

Calculating moon face rotation as a function of Earth coordinates

偶尔善良 提交于 2020-01-04 15:15:07
问题 I'm writing an Android app that shows moon phases for any date. Currently I am showing a generalized view from the northern hemisphere (sunlit part of the moon moves from right to left with 0º viewing rotation). However, this motion is reversed when viewing the moon from the southern hemisphere, and near the equator, something else happens entirely. Some of this information can be found on this webpage on moon phases. Instead of using just three simplified cases (northern, southern, and

Astronomy application

百般思念 提交于 2020-01-01 11:46:10
问题 I am trying to build an astronomy application where I should display the stars at and near zenith for a given latitude, longitude and time. I am aware of the basics of Positional astronomy, what is puzzling me is to create database out of huge set of data! My Queries are: Which catalogue to prerfer? Like Hipparcos catalogue or Henry Draper? What are its advantages and disadvantages? What fields are required? I have identified some, but what else should be added and why? Fields identified by

Sunrise / set calculations

亡梦爱人 提交于 2019-12-29 04:24:06
问题 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.

How to index observable coordinates in an astropy Table

不打扰是莪最后的温柔 提交于 2019-12-24 00:58:29
问题 I asked this question (How to sort through a list of observable coordinates?) yesterday about sorting a list of coordinates to remove certain values below a threshold, I got a great answer from @MSeifert but I have a table in which these coordinate values are matched up with other properties of the targets (e.g. apparent magnitude and Alt/Az coordinates), so what I am asking for now is a way to do this masking technique in an astropy.table rather than an astropy.coordinates.SkyCoord list from

Calculation star position in the sky, PyEphem

假如想象 提交于 2019-12-23 16:43:18
问题 I have difficulties with finding current coordinates (RA, DEC) for star in sky. In net I have found only this one tutorial, how to use ephem library: http://asimpleweblog.wordpress.com/2010/07/04/astrometry-in-python-with-pyephem/ As I understood I need to: create observer telescope = ephem.Observer() telescope.long = ephem.degrees('10') telescope.lat = ephem.degrees('60') telescope.elevation = 200 Create a body Object star here is trouble, I have only (RA,DEC) coordinates for star Calculate

R function for position of sun giving unexpected results

谁说胖子不能爱 提交于 2019-12-23 08:58:57
问题 I'd like to calculate the position of the sun given time, latitude, and longitude. I found this great question and answer here: Position of the sun given time of day, latitude and longitude. However, when I evaluate the function I get incorrect results. Given the quality of the answer, I'm almost certain there's something wrong on my end, but I'm asking this question as a record of trying to solve the problem. Here's the code for the function reprinted below for convenience:

Show where the sun is on the sky in real time - how?

前提是你 提交于 2019-12-21 21:08:09
问题 I am using a function from mourner/suncalc that allows me to get the current position of our sun. With getPosition() , I want to create an animation on a image or with pure CSS (scaleable to different screen resolutions and orientations, of course), where you can see where the sun is right now in real time on the page. A totally unnecessary function but a fun function :) The image below illustrates how I am thinking. Like I said, I'll be using the getPosition() function from mourner's

Stacking star PSFs from an Image; aligning sub-pixel centers

萝らか妹 提交于 2019-12-21 20:46:14
问题 I have an (1727,1853) size array (image), in which I have identified stars to model a point-spread function. Each index of the array corresponds to an image coordinate, however, the centroid of each star is given by a sub-pixel coordinate. I must do the following Make a 2D slice of each star. I have done this using numpy's array slicing. However, it slices by index, and I have sub-pixel centroid coordinates, thus any kind of slice I make will place the star off-center. After I make a 2D slice