52
votes
Accepted
Why won't the Sun set for days at N66.2 which is below the arctic circle?
From the PyEphem Quick Reference Guide:
Rising and setting are sensitive to atmospheric refraction at the
horizon, and therefore to the observer’s temp and pressure; set the
pressure to zero to turn ...
22
votes
Why won't the Sun set for days at N66.2 which is below the arctic circle?
Correct me if I am wrong, but if we count sunsets by the center of the Sun apparently crossing the horizon then the Sun is supposed to set every day at latitudes under the arctic circle.
That is not ...
21
votes
Why does the Fourier transform of this CMB image have a hole in it?
Having now looked at the paper by Aiola et al. (2020), it emerges that for that map, they filtered the data to exclude low frequency multipoles with $|l|<150$, corresponding to about 1 degree. This ...
19
votes
Accepted
Why does the Fourier transform of this CMB image have a hole in it?
For that specific E-mode map we have applied a Wiener filter to highlight the high SN modes (those "rings").
I also further apply the following filter: $((1 + (kx/5)^{-4})^{-1}) * ((1 + (k/...
11
votes
Is a Hertz ratio to 65M ☉ proof that Betelgeuse had a core collapse in 1491 from a gravitational wave on January 14, 2020?
No, for several reasons.
The expected gravitational wave signature of a core collapse supernova looks nothing like that from a merging black hole binary system, so no sensible comparison can be done ...
11
votes
Accepted
Astropy units issue
In Astropy, u.G represents a Gauss, not the gravitational constant. That's why you get the "A" in one of the error messages; it represents an ampere. To ...
9
votes
Why won't the Sun set for days at N66.2 which is below the arctic circle?
Wikipedia's article on the Arctic Circle provides the explanation. Firstly, it says:
because the sun appears as a disk and not a point, part of the
midnight sun may be seen on the night of the ...
9
votes
Accepted
Convert from spectral type to RGB color?
Below is a model taken from Mitchel Charity's page,
What color are the stars?
Other points, if required, may be obtained by interpolation.
There are plenty of caveats with this and you should ...
8
votes
Accepted
How do I create a galaxy stellar mass function?
Your approach is completely correct, just note three things:
Logarithmic distribution
First, since the distribution of masses is logarithmic in nature (as is most other things), be sure to bin them ...
8
votes
Accepted
What does "additive fringing from the (multiplicative) twilights" mean?
The fringing pattern is caused by thin-film interference within the CCD. The signal received in a pixel will be proportional to the light falling on it, multiplied by a sensitivity, but then some ...
8
votes
Determining period of an exoplanet using radial velocity data
Fit a model of the RVs predicted from a Keplerian orbit to the data (a sine wave for a circular orbit). The period obtained is the period of the orbit. In terms of an initial guess for the period - ...
7
votes
Generate a uniform distribution on the sky
Random points on the surface of a sphere can be generated by allowing the azimuthal angle $\phi$ to take a uniformly distributed random value between 0 and $2\pi$. To convert this to RA in degrees you ...
7
votes
Accepted
How do I plot galactic coordinates using matplotlib and astropy in python?
This code reads coordinates as equatorial (ra, dec) and transforms them to galactic (l, b):
eq = SkyCoord(xarr[:], yarr[:], unit=u.deg)
gal = eq.galactic
The ...
7
votes
Open source code for the maths behind a heliostat?
I wrote the source you need some years ago:
https://jumpjack.wixsite.com/progetti/sorgenti-ipsun
The Arduino/Processing version was just a demo program to manually control a TENVIS camera by multiple ...
7
votes
Accessing SDSS server SQL server via python
You can do it via the astroquery SDSS module; there is a function called query_sql.
7
votes
Accepted
Different results for the same JPL Horizons query
The issue is with differences in how the defaults behave between the code and the website. In the code version of the API id=3 gives the Earth-Moon Barycenter (as ...
6
votes
Accepted
How can I convolve a template spectrum with a photometric filter response spectrum?
Your feeling is right: You shouldn't convolve the spectrum and the filter, you should only multiply so that flux outside the bandpass is suppressed. Subsequently you integrate the resulting function ...
5
votes
Accepted
Generate a uniform distribution on the sky
Heres more python than you can shake a telescope at. I just used @ProfRob's algorithm. This is just a python script, the real answer to the question is @ProfRob's answer and I've just scripted it. The ...
5
votes
Earth Orbit Simulator
There is no obvious astronomy error, but your use of math.pow is wrong
You write constgrav = math.pow(6.67,-11). That means $G = 6.67^{-11}$. You mean ...
5
votes
Get orbital period of exoplanet from light curve using astropy.timeseries
The second light curve you show has no obvious periodic behaviour and I cannot see any sign of a planetary transit. The period-finding algorithm appears to be working correctly.
The planet (if it ...
5
votes
What does "additive fringing from the (multiplicative) twilights" mean?
The visual appearance of fringing is caused by the CCD (thickness) being comparable to the size of the wavelength (thin-film interference). An everyday example (same physics except with more colors) ...
5
votes
Accepted
Cannot identify mistake in calculating orbital eccentricity vector; magnitude equals one instead of zero (with python code)
You are doing many things wrong.
You are computing the eccentricity of one body with respect to the center of mass. You need to compute the eccentricity of one body with respect to the other.
You ...
5
votes
Accepted
How to extract galaxy spectra for different radii in Python for spectra taken by long slit spectrograph?
I was wondering why the absorbtion lines of the template are broader
then those of the galaxy, since it actually should be the other way
arround.
You are correct that it should be the other way ...
5
votes
Using Einsteinpy to plot the precession of a star orbiting a black hole?
This is an interesting development, thanks for bringing it to our (my) attention. Unfortunately, the documentation is lagging the code.
The package is using natural, geometrised units, where $G=c=1$ ...
5
votes
Plotting scatter graphs with fits binary file?
It's generally best to use Astropy's Table/QTable functionality to manipulate the table data, rather than dealing with the FITS binary table directly. Building on ...
4
votes
Accepted
What is the 2D elliptical projection of the Celestial Sphere called, and how can I make one?
I want to say that's a Mollweide projection. I know that they're pretty common in astronomy; many images of the CMB use them. I was actually working with one recently. Given latitude $\varphi$ and ...
4
votes
Generate a uniform distribution on the sky
Supplemental answer for future readers here who are more interested in the "uniformness" than the "randomness" or "realism" of the distribution.
Here are two Stack ...
4
votes
Accepted
Python with image in fits format
I personally use Astropy, specifically astropy.io.fits, although I'm not a seasoned user of FITS files and I don't really know their layout. As an example snippet ...
4
votes
Converting an RGB image to fits (astropy)
I haven't done much astronomical image processing before, but as this question is unanswered I'll give it a shot - hopefully to some avail. If the problem is more specific, a code sample/image sample ...
4
votes
Propagate Earth trajectory for 1 Myr
The La2010 long-term ephemeris Laskar et al. (2011), which is based on the INPOP numerical ephemeris integrated for 1 Myr, is valid for 250 million years before the present day and a unknown distance ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
python × 170data-analysis × 35
astropy × 33
observational-astronomy × 25
galaxy × 23
spectra × 14
exoplanet × 13
astrophysics × 12
coordinate × 11
n-body-simulations × 10
light-curve × 10
orbital-mechanics × 9
mathematics × 9
amateur-observing × 8
cosmology × 8
fits-header × 8
fits × 7
spectroscopy × 6
planetary-transits × 6
sky-survey × 6
image-processing × 6
skyfield × 6
star × 5
the-sun × 5
distances × 5