Skip to main content
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 ...
HDE 226868's user avatar
  • 36.6k
8 votes
Accepted

How can I calculate the uncertainties in magnitude like the CDS does?

That is because what is measured is a flux and the flux errors are in the DR2 catalogue. Since magnitudes are based on the logarithm of the flux, then there is no straightforward correspondence (...
ProfRob's user avatar
  • 153k
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 ...
ProfRob's user avatar
  • 153k
8 votes
Accepted

Right ascension - Gaia vs Simbad

1 hour = 15 degrees. 60 min = 1 hour and 60×60=3600 sec = 1hour. So to convert: (5 + 38/60 + 42.0/3600)*15 = 84.675 There is a small discrepancy, which is due to ...
James K's user avatar
  • 123k
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 ...
Mike G's user avatar
  • 18.7k
7 votes

How do I calculate the moment of the solstice?

Per @PM 2Ring's comment, I needed to use apparent RA/declination rather than GCRS (which is the default returned by astropy.coordinates.get_body). In astropy, this ...
Roy Smart's user avatar
  • 1,592
7 votes
Accepted

Visualizing difference in astropy's cylindrical representation

The two frames have different axes. In the galactic frame, the Z axis is perpendicular to the galactic equator. ICRS and its predecessor FK5 are equatorial, with Z axis perpendicular to Earth's ...
Mike G's user avatar
  • 18.7k
5 votes
Accepted

L2 point ephemeris (celestial mechanics)

Bad news, this type of SPK file has a different sort of interpolation that is not supported by the jplephem package (Hermite interpolation vs Chebyshev polynomials)...
astrosnapper's user avatar
  • 8,357
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 ...
ProfRob's user avatar
  • 153k
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) ...
Astroturf's user avatar
  • 1,111
5 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 ...
astrosnapper's user avatar
  • 8,357
5 votes
Accepted

How to Determine Absolute Magnitude of a Galaxy using HST FITS Image

This was already answered by a post I initially ignored as I thought it didn't pertain to my problem. It literally answers everything, if you have found yourself in a similar boat to me, read the ...
Ataaamic's user avatar
  • 161
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 ...
Nitesh Menon's user avatar
4 votes

How is CASA different from SAO DS9?

CASA is very specifically designed for analysis of data from radio telescopes and in particular interferometers, notably, ALMA and the VLA. This means it has a very large suite of radio- and ...
HDE 226868's user avatar
  • 36.6k
4 votes

Position of Hamal (alpha Arietis) between 1582 and 1588

Here is my attempt using Astropy. Spoiler alert: my answer differs from Tycho's by about 6 arcminutes. That seems rather large, so there is probably an issue with my approach, but it also may be due ...
Roy Smart's user avatar
  • 1,592
3 votes

SDSS - getting separate u, g, r, i, z frames from SWARP tool and astropy

What they did was the following: for each individual filter, they assembled overlapping frames into a combined, single-filter image. E.g., they combined several g-band images into a single g-band ...
Peter Erwin's user avatar
  • 17.1k
3 votes

How to plot celestial equator in galactic coordinates? Why does my plot appear "backwards"?

Ok, community helped me to figure out that I faced the “mapping from the inside” issue (explained here). I'll use this answer to show my final code. ...
Michael Belvedersky's user avatar
3 votes
Accepted

How do I plot orbit planets and satellites?

One keyword to search for is "spice kernel". SPICE stands for Spacecraft Planet Instrument C-matrix Event. That is a type of data format in which orbital data are commonly provided by ESA, ...
planetmaker's user avatar
  • 19.6k
3 votes

How can I calculate the uncertainties in magnitude like the CDS does?

For Gaia EDR3: Note (G1): Note on magnitude errors: They are obtained with a simple propagation of errors with the formulas ...
Lu_astro's user avatar
3 votes

Convert dates to julian day number in astropy?

The accepted string formats for date-hms are: ...
James K's user avatar
  • 123k
3 votes

Covariance matrix not calculated when fitting gaussians?

You must explicitly request uncertainties. fitter = fitting.LevMarLSQfitter(calc_uncertainties=True) Read the docs: https://docs.astropy.org/en/stable/api/astropy....
Ed Behn's user avatar
  • 131
3 votes
Accepted

Get orbital period of exoplanet from light curve using astropy.timeseries

I think you may be seeing the planet in the periodogram! But also another signal - higher harmonics of other periodic signals example - various periodic signals in our sun - with a characteristic ...
zephyr's user avatar
  • 148
3 votes
Accepted

Are 3D coordinate data from Sloan DSS-III available & easily accessible to non-pros?

BTW if anyone wants a quick and fast query to solution do the following: Go to https://skyserver.sdss.org/dr12/en/tools/search/sql.aspx. Paste a query like this: ...
kauii8's user avatar
  • 326
3 votes

Are 3D coordinate data from Sloan DSS-III available & easily accessible to non-pros?

SDSS DR12 Catalog Data looks like a good starting point, apparently pretty open to those willing and able to figure it out. Their SciServer Compute site hosts Jupyter notebooks to query CasJobs in SQL....
Mike G's user avatar
  • 18.7k
3 votes

Calculating the position of stars at a given point in time

The projected separation of Mizar and Alcor is 12 arcminutes. If they are both at a distance of 25 pc (suggested by the Hipparcos satellite), then this equates to a physical separation of at least 18,...
ProfRob's user avatar
  • 153k
3 votes

Can you get motion data using astropy.coordinates.get_body()?

"Proper motion" is the name used for the motion in the sky of stars. It is not a velocity. It is not measured in metres per second, but in arcseconds per year. If a star was moving directly ...
James K's user avatar
  • 123k
3 votes
Accepted

Determining when the sun shines on different sides of a building using astropy

The code below will give you the alt-az coordinates for any specified location for any specified time. From there, I think the easiest method to determine which side of the house it will hit is to ...
Greg Miller's user avatar
  • 5,922
3 votes

How do I get cross-verification data for Gaia DR3?

The right ascension and declination listed in the various Gaia data releases are the position at the reference epoch for that catalog and this is not J2000 and also varies for each Data Release (DR1 ...
astrosnapper's user avatar
  • 8,357
3 votes
Accepted

Astropy time: is it possible to use negative dates?

Yes. Use the format='fits' to the time function. FITS format: “[±Y]YYYY-MM-DD[THH:MM:SS[.sss]]”. ISOT but can give signed five-digit year (mostly for negative ...
James K's user avatar
  • 123k
2 votes

Fitting PSF to an image to get total flux (Python)

You can't really get a PSF for an extended object. The Point-Spread-Function is a parameter of your imaging system which describes the shape of the image of a putative point source. I don't have ...
Carl Witthoft's user avatar

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