Questions tagged [astropy]

Questions related to Astropy, a community Python package for Astronomy

Filter by
Sorted by
Tagged with
1
vote
1answer
29 views

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

I am following this paper to extract the u,g,r,i,z image frames from the SDSS image fits files. I have the fits files downloaded (using the bulk data download option from SDSS) and tried to run the ...
2
votes
1answer
109 views

How to plot celestial equator in galactic coordinates? Why does my plot appear “backwards”? [duplicate]

I'm trying to plot celestial equator in galactic coordinates. Here is my code (based on this answer): ...
3
votes
1answer
96 views

How do I plot orbit planets and satellites?

I need to find the way to plot orbit planets and satellites in a coherent way. Let's say I want to generate a chart of the Moon's orbit around the Earth, or the jovian satellites around Jupiter. The ...
3
votes
1answer
41 views

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

When you check an entry of the Gaia DR2 stellar catalogue in Vizier, for example this one, you can see that there is a value for the G magnitude (in our case 18.0733 mag) and a value for the ...
1
vote
0answers
10 views

Specutils Gaussian1D fitter and estimators

I am running the "simple example" from specutils to do some line-fitting. The demo code is here: https://specutils.readthedocs.io/en/stable/fitting.html This runs and does what it says. ...
0
votes
1answer
35 views

trouble installing drizzlepac

I'm trying to install drizzlepac to follow this tutorial on aligning hst images: https://spacetelescope.github.io/notebooks/notebooks/DrizzlePac/align_to_catalogs/align_to_catalogs.html However, I get ...
1
vote
2answers
96 views

Convert dates to julian day number in astropy?

I'm using astropy and I need to convert dates like this: 2012.06.22_17:56:15_TAI into julian day number. I tried: ...
1
vote
1answer
127 views

Calculate depth and duration of exoplanet's transit using Python, astropy or lightkurve

I am creating a program for the analysis of exoplanets in Python using Astropy and Lightkurve libraries. I have light curve of specified star and I would like to calculate depth and duration of planet ...
7
votes
2answers
341 views

What does “additive fringing from the (multiplicative) twilights” mean?

The question How can I make the fringing pattern visible in my flat (twilight) images for filter i? includes: I have a bunch of twilight flats that have been preprocessed (dark, bias, overscan etc.)...
4
votes
2answers
185 views

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

I am using astropy and I would like to calculate orbital period of an exoplanet by its star's light curve. I follow tutorial in astropy docs and I use data from Kepler in Nasa Exoplanet Archive. ...
3
votes
0answers
47 views

How do I plot field of view of an earth-based observatory in Galactic Coordinates?

I would like to plot in Galactic Coordinate the sky field-of-view of an earth-based observatory (e.g. MAGIC). Something like this from Liu et 2016. I already know how plot source positions on a 2D ...
1
vote
1answer
36 views

Creating a 2D matrix from 2 FITS images of unequal dimensions for Radio/FIR correlation

I have two images of NGC 6946: ...
1
vote
1answer
51 views

L2 point ephemeris (celestial mechanics)

I'm a master student and I am trying to get the L2 ephemeris for some calculations in my master's project. It was kinda hard to find a file with the L2 ephemeris, but once I found it, I tried the next ...
2
votes
1answer
75 views

How to query a region on the sky when given only ecliptic coordinates?

I am new at using the Python packages astropy/astroquery and what I want to achieve is to use it to find stars that lay on the TESS continuous view zone (CVZ). I ...
2
votes
0answers
87 views

Covariance matrix not calculated when fitting gaussians?

So I am using Astropy's basic models.Gaussian1D model and a fitter = fitting.LevMarLSQfitter() to fit 3 Gaussian pulses with some added random noise. The fit is good, but when I type fitter.fit_info, ...
6
votes
3answers
3k views

How do I plot galactic coordinates using matplotlib and astropy in python?

I want to make a projection of millisecond pulsars on the galactic plane, much like this one from Sala et al. 2004: I have tried several methods, and have not gotten anywhere. This is my current ...
1
vote
1answer
368 views

Converting an RGB image to fits (astropy)

I am trying to save a NumPy RGB array (a 3d array with dimension 512x512x3), to a .fits file using astropy.io. Saving this array to a .png file works fine, but when ...
2
votes
0answers
182 views

How to “slice” a fits table in astropy?

I have imported my fits table, hdul0, into python. I'm using astropy.table. I opened it with hdul0 = fits.open('filename'). hdul0data = Table(hdul0[1].data) I ...
2
votes
1answer
446 views

Making sense of the lomb-scargle periodogram

I am trying to use the periodogram to tell when a signal is periodic or not by following the tutorial for the astropy Lomb-scargle periodogram here. http://docs.astropy.org/en/stable/stats/...
1
vote
0answers
87 views

Plotting GAIA barycentric radial velocity data with python

Does anybody know of a good tutorial on how to use python and astropy to generate plots of GAIA, RAVE or any other database of barycentric (heliocentric) radial velocity data of stars in our galaxy? ...
2
votes
2answers
1k views

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

I have an image of a single unsaturated source (asteroid) that I'd like to fit guesses for various model PSFs to, so that I can then compare the total flux in each case. I've only recently begun ...
3
votes
3answers
465 views

Differences between alt/az in Stellarium and Astropy

I've just started to learn Astropy. It's a nifty tool. Using some tutorials, I wrote and then made modifications to a little script that finds the Alt/Az of an object at a certain place and time. I ...
3
votes
0answers
30 views

Telluric Interference data

I am looking to create a function to correct for telluric interference and to do so I need to find data on Ozone interference. It has been suggested to me that Astropy may have a function that does a ...
0
votes
1answer
158 views

Get visible galactic longitudes in astropy

I would like to know which part of the Milky Way is currently up. Preferably using astropy. The ingredients I have are the current time, and my current position on earth. How would I use these to get ...
1
vote
2answers
358 views

Retrieving input effective radius from Sérsic profile

I'm playing around with Sérsic profiles, and would like to retrieve the effective (half-light) radius that I put in by integration of the profile. I'm not managing to, so perhaps someone can help me ...
1
vote
1answer
133 views

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

Of course the newly announced SDSS-III data and maps from the Sloan Digital Sky Survey with 1.2 million objects, along with all previous data sets are openly available, and I'm sure there are many ...
1
vote
0answers
422 views

Plot an AltAz grid over a square grid of RADec points

first post here. As I'm new, StackExchange won't let create or use the wcsaxes tag. wcsaxes looks like the most appropriate tool for the job, but astropy is closely related. I think the title says ...
1
vote
1answer
251 views

How to get error out of astropy constants

How do I get the error value out of an astropy.constants quantity? ...
1
vote
1answer
361 views

What does the BinTableHDU store?

I'm just getting started with very primitive analysis of FITS data, and I have a 'raw' FITS file which I don't know how to get different wavebands of data from (if this is even possible). ...
2
votes
1answer
132 views

Difference in redshift between 2 interacting galaxies

I have a galaxy 'A', say at redshift 1. Let's suppose this galaxy has no peculiar velocity. What would be the redshift of another galaxy 'B', that has a radial velocity of 500 km/s, relative to A? ...