Questions tagged [astropy]

Questions related to Astropy, a community Python package for Astronomy

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

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

I recently installed motorized solar blinds on various windows in our house to reduce solar gain during the summer months. I have integrated the blinds with my hubitat home automation system, and am ...
user avatar
  • 115
2 votes
1 answer
63 views

Pulling spectral data from Hubble Telescope automatically

Libraries currently I am using: Astropy, Numpy, Matplotlib I am looking to create a python script that pulls spectral data (wavelength vs flux chart) from the Hubble Telescope, specifically for Be ...
user avatar
0 votes
1 answer
49 views

How is CASA different from SAO DS9?

I was told that CASA is used extensively in Radio Astronomy. However, softwares like SAO DS9 and also python (Astropy) are also used for radio astronomy data analysis. So, what makes CASA different as ...
user avatar
2 votes
1 answer
63 views

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

I am trying to use get_body() to get position and motion data for solar system objects. I’ve tried the following: ...
user avatar
1 vote
0 answers
23 views

Convert Earth-centered coordinates to rotating libration point (RLP) coordinates?

I'd like to plot the path of an object near L2 (like the Webb space telescope) in a rotating libration point coordinate system. That makes it is easy to distinguish halo orbits from more general ...
user avatar
  • 291
1 vote
0 answers
28 views

Find Periodicity in Lightcurve Using Lombscargle Periodogram(Astropy)

How to find the Nyquist factor for unevenly sampled data like here.https://github.com/jakevdp/PracticalLombScargle/blob/master/figures/LINEAR_Example.ipynb ? I have time binned for 5 mins. I mean for ...
user avatar
  • 21
1 vote
1 answer
38 views

How to handle empty tables returned by astroquery Nist.query() in Python?

I'm writing a code to extract wavelengths of certain species of atoms/ions in a given wavelength range using the Nist.query() command of the Python package ...
user avatar
1 vote
3 answers
475 views

Calculating the position of stars at a given point in time

Is there any particular methods that help us calculate the position of a star at a certain point in time? This question is what I am trying to achieve, but for me, I do not want to use the data ...
user avatar
5 votes
1 answer
649 views

Astropy units issue

hope you're all doing well. I'm not very familiarized with AstroPy and I'm having a problem computing the conversion between angular momentum units. If I define the ...
user avatar
  • 525
1 vote
1 answer
56 views

Incorrect best period fit over phase-folded data

I am using the astropy Lomb-Scargle periodogram here, https://docs.astropy.org/en/stable/timeseries/lombscargle.html to get the best period fit using its model() method for simulated data given in ...
user avatar
1 vote
1 answer
245 views

What objects can I search for using astropy.coordinates?

The spectacular Python package astropy allows the user to search for a celestial object using astropy.coordinates, querying ...
user avatar
  • 1,931
4 votes
1 answer
64 views

Plotting The Kepler Field Full View

I have downloaded the calibrated ffi(full field image) for the Kepler field, aside from the primary HDU which contains the metadata, they contain 84 channels, each in the form of an image HDU, ...
user avatar
1 vote
2 answers
109 views

How should I interpret this result obtained using lomb scargle?

I used lomb scargle for periodic analysis. The time interval used is constant at 500 seconds. #My data (x=time, y=intensity values) is : x= ( 00:28, 00:37, 00:45, 00:53, 01:02, 01:10, 01:19, 01:27, ...
user avatar
0 votes
1 answer
272 views

How to Interpret Lomb Scargle periodogram

lomb scargle periodogram: ...
user avatar
0 votes
0 answers
41 views

Setting specific CENTER coordinates coordinate in SWARP

The SWARP Documentation specifies that we first set the CENTER_TYPE to MANUAL and then in the CENTER parameter we specify either one of the equatorial coordinates (RA, Dec). This is specified in the ...
user avatar
2 votes
1 answer
98 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 ...
user avatar
3 votes
1 answer
929 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): ...
user avatar
3 votes
1 answer
463 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 ...
user avatar
  • 155
5 votes
2 answers
915 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 ...
user avatar
  • 3,536
1 vote
1 answer
77 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. ...
user avatar
  • 31
1 vote
1 answer
75 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 ...
user avatar
  • 13
1 vote
2 answers
464 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: ...
user avatar
  • 21
1 vote
1 answer
596 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 ...
user avatar
  • 293
7 votes
2 answers
388 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.)...
user avatar
  • 31.6k
5 votes
2 answers
621 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. ...
user avatar
  • 293
3 votes
0 answers
170 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 ...
user avatar
  • 73
1 vote
1 answer
47 views

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

I have two images of NGC 6946: ...
user avatar
  • 199
2 votes
1 answer
136 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 ...
user avatar
2 votes
1 answer
145 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 ...
user avatar
  • 179
2 votes
0 answers
157 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, ...
user avatar
8 votes
3 answers
7k 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 ...
user avatar
  • 185
1 vote
1 answer
658 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 ...
user avatar
2 votes
0 answers
273 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 ...
user avatar
  • 21
2 votes
1 answer
951 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/...
user avatar
  • 23
1 vote
0 answers
128 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? ...
user avatar
2 votes
2 answers
2k 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 ...
user avatar
3 votes
3 answers
683 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 ...
user avatar
  • 701
3 votes
0 answers
32 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 ...
user avatar
0 votes
1 answer
205 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 ...
user avatar
1 vote
2 answers
520 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 ...
user avatar
  • 784
3 votes
2 answers
192 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 ...
user avatar
  • 31.6k
1 vote
0 answers
510 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 ...
user avatar
1 vote
1 answer
345 views

How to get error out of astropy constants

How do I get the error value out of an astropy.constants quantity? ...
user avatar
  • 113
1 vote
1 answer
550 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). ...
user avatar
  • 113
2 votes
1 answer
156 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? ...
user avatar