Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [astropy]

Questions related to Astropy, a community Python package for Astronomy

astropy
1 vote
2 answers
97 views

Plotting star maps with equatorial coordinates system

I'm trying to generate star maps with the equatorial coordinates system (RAJ2000 and DEJ2000). However, I only get a grid system where meridians and parallels are in parallel, while parallels should ...
Unix's user avatar
  • 2,420
0 votes
0 answers
23 views

aperture photometry with astropy photutils using a set of predefined apertures

I am using photutils to perform isophotal fitting on the image of a galaxy. #First a dummy iteration to get the right centre geometry = EllipseGeometry(x0=301, y0=307, sma=20, eps=0.8, pa=np.deg2rad(...
EnPM's user avatar
  • 1
1 vote
0 answers
26 views

Spaces in the object name for astroquery Simbad.query_object

I have a list of object names without any spaces, but the Simbad.query_object of astroquery requires spaces. For example, with space works... see below: from astroquery.simbad import Simbad ...
HP AS's user avatar
  • 109
1 vote
1 answer
38 views

How to check for failed convergence when using astropy fitting (specifically LevMarLSQFitter())

The sequence: fit_something = fitting.LevMarLSQFitter() fitted = fit_something(initial_guess_and_model,x,y,acc=accuracy,maxiter=maximumum_iterations) Will provide a fitted model, and in the ...
Claudio Pedrazzi's user avatar
1 vote
1 answer
75 views

How can I save and load header information of FITS files suing pickle?

Background I want to convert the header information of a FITS data into a dictionary and save it as a binary file using Python. And of course, the binary data has to be loaded later. Problem The ...
jipparchus's user avatar
1 vote
1 answer
168 views

Optimizing Lat/Lon Extraction from Astropy's GeocentricTrueEcliptic SkyCoord

I am facing a challenge that should be straightforward but has proven to be quite complex with the Astropy library. Specifically, I need to frequently compute the longitude and latitude from a ...
ysBach's user avatar
  • 360
0 votes
1 answer
61 views

Astropy: using SkyCoord object to calculate the AltAz coordinates for an object in a time range, want to get the date of max altitude

I want to find the date in which an object will be at its maximum altitude in the sky for a set location. Given an object's right ascension and declination, an observers location and a range of dates, ...
Juan Martin Hunicken's user avatar
0 votes
1 answer
70 views

How to write a fits file from an ASCII file (astronomical spectrum)?

I have used iraf in the past to do this, and I have no problem when the pixel scale does not vary (although I have to manually edit the task parameters for it to work correctly). Now I am working with ...
Carl's user avatar
  • 1
0 votes
1 answer
69 views

How to convert MJD time in UTC (only date, no time) in order to make a plot

I have a list of MJD time. I need to convert it in list UTC but only the date (year/month/day) and no time, so a list that I can use to make a plot with time in x-axis. Thanks I tried with astropy and ...
Federica Giacchino's user avatar
0 votes
1 answer
55 views

Unable to change Astropy cache location

I'm running the latest version of Astropy in Python using a Mac. I'd like to change the directory where Astropy caches files. I'm running: astropy.config.set_temp_cache(path='/Users/josephprendergast/...
JoeP's user avatar
  • 1
0 votes
0 answers
55 views

How to access the quasar spectrum from the FITS file in SDSS DR16 catalog

I am trying to access the SDSS catalog through the FITS file I downloaded here, I am looking at the DR16Q_v4.fits file. Unfortunately I cannot seem to find where the actual spectrum data is located ...
Ducktective's user avatar
0 votes
0 answers
60 views

Calculate rise / set time from Ra, Dec, Longitude and Latitude

I am trying to get the local rise and set time for an object in the sky given its coordinates in right ascension and declination, as well as the observers latitude and longitude. So far I've figured ...
Boomer Sooner's user avatar
0 votes
0 answers
65 views

Astropy `SkyCoord` gives incorrect results when transforming points near the Declination pole

The Astropy SkyCoord class provides incorrect values of a coordinate that is located near, or at, a coordinate pole when using its internal functions to transform between coordinate systems. For ...
ascendants's user avatar
  • 2,342
2 votes
1 answer
267 views

How do I use Astropy to transform coordinates from J2000 to Lat, Lon, and Altitude

I've followed the instructions from questions present on this site pertaining to this issue, but the code all seems off. For one thing, the altitude seems far too low, and it doesn't appear that the ...
TheForWarden's user avatar
1 vote
0 answers
136 views

AstroPy to transform coordinates

I want to transform the icrs coordinates (ar and dr) from epoch 1991.25 to epoch 2016.0, also in the icrs system. But I got this error. It's my first time using AstroPy. <SkyCoord (ICRS): (ra, dec) ...
B612's user avatar
  • 23

15 30 50 per page
1
2 3 4 5
51