astropy Questions

1

Trying to run this code from AstroPy:docs import matplotlib.pyplot as plt from astropy.visualization import astropy_mpl_style plt.style.use(astropy_mpl_style) from astropy.utils.data import g...
Sileas asked 17/11, 2021 at 5:24

2

Solved

I have a spectrum in a fits file that I generated with Iraf. The wavelength axis is encoded in the header as: WAT0_001= 'system=multispec' WAT1_001= 'wtype=multispec label=Wavelength units=angstro...
Ary asked 28/4, 2015 at 15:17

2

Solved

I have a .fits file that contains data. I would like to construct a pandas dataframe from this particular file but I don't know how to do it. data = fits.open('datafile') data.info gives: N...
Offing asked 18/10, 2016 at 15:7

2

Solved

Long story short: I want to plot Gaia astrometry data to TESS imagery in Python. How is it possible? See below for elaborated version. I have 64x64 pixel TESS imagery of a star with Gaia ID 4687...
Kowalski asked 9/1, 2019 at 19:11

3

Solved

I'm trying to write a function to display astronomical images with a colorbar on the top (automaticly with the same length of the x-axis). I'm having problem because when I try to put the tick on ...
Future asked 1/11, 2017 at 17:57

1

Solved

I am trying to use a FITS file. I have the following code: from astropy.io import fits from astropy.wcs import WCS hdul = fits.open(fitsfilename)[0] wcs = WCS(hdul.header) It gives me these warn...
Cinema asked 9/1, 2019 at 14:2

1

Solved

I have a fits file about an astronomical object. I can plot it like this: from astropy.io import fits from astropy.wcs import WCS hdul = fits.open(fitsfilename)[0] wcs = WCS(hdul.header) fig = p...
Buchalter asked 9/1, 2019 at 12:14

3

Solved

I am using plt.imshow() to plot values on a grid (CCD data in my case). An example plot: I need to indicate a barrier on it, to show which pixels I care about. This is similar to what I need: ...
Troika asked 13/12, 2018 at 9:55

1

I am doing a transformation of coordinates in Astropy. But this is not working correctly. The situation is the following, I have a Coordinate of a star in J2000, and I want to transform it into act...
Advert asked 19/10, 2018 at 22:32

1

Solved

I have position (x,y,z) and velocity (Vx,Vy,Vz) vectors in Earth Centered Inertial Coordinates (ECI) for a satellite orbit, and ultimately want to end up with geodetic coordinates (Latitude, Longit...

2

Solved

I have the nice hexbin plot below, but I'm wondering if there is any way to get hexbin into an Aitoff projection? The salient code is: import numpy as np import math import matplotlib.pyplot as pl...
Cynewulf asked 20/9, 2017 at 11:22

1

I am trying to use the Model.tied (or Parameter.tied) attribute in astropy.modelling, but can't seem to figure out how it works. For example, let's say I wanted to create a compound model with two ...
Shearin asked 4/8, 2017 at 19:7

3

Solved

I’m trying to load into memory a few 2 000 FITS using astropy.io.fits: def readfits(filename): with fits.open(filename) as ft: # the fits contain a single HDU data = ft[0].data return data da...
Percept asked 5/10, 2015 at 15:35

1

Solved

This issue has been plaguing me for some time. I'm trying to handle some large amount of data that is in the form of a .fits file (on the order of 11000x9000 pixels). What I need to do is create a ...
Cobaltous asked 2/8, 2016 at 7:29

2

Solved

I have seen a couple of answers referring to PyEphem on here and how that can produce sunset/sunrise times, however it would be more useful to me if I could find a solution using solely Astropy pac...
Eisenstein asked 22/1, 2016 at 17:23

2

I have a FITS file named 'my_cube.fits' with WCS. The file has spatial information on axis 1 and 2 (X and Y) and spectral information on axis 3 (Z). When I load it using astropy.io.fits, the spectr...
Citreous asked 2/5, 2016 at 14:36

1

Solved

I am developing a script in order to make heatmap from a sky survey with python and the libraries numpy, astropy. I created a stars distribution map and now I'm trying to make a heatmap. My heatma...
Greenhouse asked 11/3, 2016 at 17:55

1

Solved

I have two sources with equatorial coordinates (ra, dec) and (ra_0, dec_0) located at distances r and r_0, and I need to calculate the 3D distance between them. I use two approaches that should gi...
Comyns asked 22/12, 2015 at 2:42

1

Solved

I'm trying to append data to a fits file using astropy.io. Here is an example of my code: import numpy as np from astropy.io import fits a1 = np.array([1,2,4,8]) a2 = np.array([0,1,2,3]) hdul...
Cryobiology asked 18/12, 2015 at 4:57

1

Solved

I am using a direct convolution algorithm to compute the convolution between this image: and this kernel: I am using the implementation in astropy for the direct convolution. This results i...
Medardas asked 17/12, 2015 at 10:21

1

Solved

I am trying to make a plot of galactic coordinates using python. Let's say that I have this data: data = [(0.261, -7.123, 13.03, 'Unidentified'), (-0.326, 77, 13.03, 'Galaxies')] Where each tuple...
Incrocci asked 13/10, 2015 at 14:53

1

I have a large fits file (over 30,000 x 30,000) pixels. IRAF cannot handle this size of image. How can one crop a file of this size while retaining correct header information, as IRAF does when usi...
Estafette asked 22/9, 2015 at 22:44

1

Solved

I am new to Python and using Python 2.7 on Windows I am using Astropy library, but when I want to view an attribute on the following class: >>> astropy.cosmology.FlatLambdaCDM.Ok0 it re...
Ciro asked 5/8, 2014 at 2:33

1

Solved

I am tying to get the physical sky coordinates of a given pixel from within a python script. I would like to use astropy's WCS, but I'll do anything from within python. I have tried these two snip...
Venesection asked 24/7, 2014 at 20:11

1

Solved

I've looked and looked for a solution to this problem and am turning up nothing. I'm generating rectangular FITS images through matplotlib and subsequently applying WCS coordinates to them using ...
Recor asked 28/1, 2014 at 19:33

© 2022 - 2024 — McMap. All rights reserved.