Questions tagged [astropy]

Questions related to Astropy, a community Python package for Astronomy

The Astropy Project is a community effort to develop a common core package for Astronomy in Python and foster interoperability between Python astronomy packages.

This package provides core data structure and transformations adapted to astronomy, files and I/O tools, as well as computation utilities.

For more information, refer to the Astropy documentation.

When you are posting questions about astropy, it is helpful to include the sample data file(s). Since FITS files are large, linking to publicly available MAST data, or a GitHub repo, are the best options.

730 questions
-2
votes
1 answer

Convert from ITRS to ICRS using astropy

Say pleases is it possible using AstroPy to transform ITRS(International Terrestrial Reference System) to ICRS(International Celestial Reference System)? I have read the documentation and understand how to do ICRS to ITRS conversions, but not sure…
-2
votes
1 answer

How to convert RA-Dec coordinates to galactic coordinates in python

I was converting a pixel coordinate fits file to world coordinates in Python. The header shows that this fits file is in RA-Dec coordinate system . I want to convert this to galactic coordinates. Here is what I've tried. from astropy import…
LALI
  • 1
  • 1
  • 2
-2
votes
1 answer

How to convert earth-coordinates to astronomical coordinates ?

How can I calculate position (ra, dec) of star observed at some station (longitude, latitude) on specific date and time (in julian format)? I have made some detections in specific days at a specific station, I'd like to convert my earth coordinates…
ADHAFERA
  • 69
  • 1
  • 5
-2
votes
1 answer

How to reshape array inside an astropy.coordinate.SkyCoord object?

I want to make a 2D contour plot using one SkyCoord object containing an array of coordinates as an input parameter. To do this, I wanted to make a mesh gird over parameters. The code is something like this. l = np.linspace(0, 360, 180) b =…
-2
votes
2 answers

Modifying entries in python astropy table

New to Python, I don't understand the outcome of the following operations. I read a table from a file using astropy.Table data = Table.read(image_data_file, format='ascii') Then I make a new identical table: data2 = data When a change an entry (or…
Giovanni
  • 1
  • 1
-3
votes
2 answers

How could I speed up this function

I am downloading a star catalog from Vizier (using astroquery). The catalog concerned does not include star names so I am getting these from SIMBAD (also using astroquery) by querying all SIMBAD stars within 1 arcsec of each of my Vizier catalog…
nakb
  • 321
  • 1
  • 3
  • 16
-3
votes
2 answers

Python error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed with exit status 2

I have a problem installing an additional package to Python Anaconda using pip in the Anaconda Prompt: pip install --upgrade pyregion The error I get is: error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed…
Elias Wahlstedt
  • 1
  • 1
  • 1
  • 4
-3
votes
1 answer

The following code, throwing the following error ...

sun_ra=round(sunpy.sun.apparent_rightascension(t),4)*15.0 File "/home/user/.local/lib/python2.7/site-packages/astropy/units/quantity.py", line 963, in float raise TypeError('Only dimensionless scalar quantities can be ' TypeError: Only…
-3
votes
1 answer

Astropy isn't working with Python

I've been having difficulty with Python recently, mainly since I think I had several versions and conflicts (due to Anaconda installs, canopy installs etc.). So I cleaned those out. I reinstalled python (2.7) via brew. I reinstalled numpy and…
npross
  • 1,756
  • 6
  • 19
  • 38
-5
votes
2 answers

calculate equivalent width using python code

I have this Fortran program for compute equivalent width of spectral lines i hope to find help for write python code to do same algorithm (input file contain tow column wavelength and flux) PARAMETER (N=195) ! N is the number of…
Ahmed Shokry
  • 1
  • 1
  • 3
1 2 3
48
49