Hot answers tagged

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 ...
user avatar
  • 3,369
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 ...
user avatar
  • 28.3k
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 ...
user avatar
  • 118k
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/...
user avatar
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 ...
user avatar
  • 118k
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 ...
user avatar
  • 34.1k
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 ...
user avatar
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 ...
user avatar
  • 33.8k
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 ...
user avatar
  • 118k
8 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 ...
user avatar
  • 91.4k
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 ...
user avatar
  • 118k
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 ...
user avatar
  • 16.6k
6 votes

Accessing SDSS server SQL server via python

You can do it via the astroquery SDSS module; there is a function called query_sql.
user avatar
  • 4,744
5 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 ...
user avatar
  • 33.8k
5 votes
Accepted

How to get error out of astropy constants

While I'm not familiar with the package, a very quick look at the documentation suggests that you want In [90]: c.M_sun.uncertainty instead. I've just checked ...
user avatar
  • 2,692
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 ...
user avatar
  • 31.8k
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 ...
user avatar
  • 91.4k
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 ...
user avatar
  • 118k
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) ...
user avatar
  • 1,051
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 ...
user avatar
  • 28.3k
5 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 ...
user avatar
  • 483
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 ...
user avatar
  • 14.9k
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$ ...
user avatar
  • 118k
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 ...
user avatar
  • 34.1k
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 ...
user avatar
  • 2,692
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 ...
user avatar
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 ...
user avatar
  • 7,250
4 votes
Accepted

What objects can I search for using astropy.coordinates?

The astropy.coordinates packages has the SkyCoord.from_name() convenience method (docs link) uses the Sesame name resolver at ...
user avatar
  • 7,250
4 votes
Accepted

How to interpret skewness and kurtosis plots of galaxy snapshots?

To begin with, I would suggest also plotting the line-of-sight velocity and velocity dispersion maps for each inclination. In particular, you should see a clear anti-correlation between the velocity ...
user avatar
  • 14.9k

Only top scored, non community-wiki answers of a minimum length are eligible