Questions tagged [astropy]

Questions related to Astropy, a community Python package for Astronomy

23 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
226 views

Calculation of average FWHM by PSF fitting of all the detected stars in the fits image

I need to calculate the FWHM of all the stars detected via the DaoStarFinder package/any other package by performing PSF fitting in Python. Here is the code for my detection. ...
Abhinna Sundar's user avatar
3 votes
0 answers
74 views

Keyerror: 0 while using astropy SkyCoord

I am facing a problem while using SkyCoord from astropy library. The scenario is as below, I have read the data from a fits file into a pandas dataframe. I have applied several quality cuts to the ...
CTZenScientist's user avatar
3 votes
0 answers
370 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 ...
Tutan's user avatar
  • 73
3 votes
0 answers
35 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 ...
lost_in_space's user avatar
2 votes
0 answers
56 views

How can I compute reasonable errors on my Gaussian fits to the observed strong optical lines of interest?

I'm fitting Gaussians to optical lines spanning from H-beta to Sulfur using Astropy's Gaussian (https://docs.astropy.org/en/latest/api/astropy.modeling.functional_models.Gaussian1D.html) model with a ...
Astroturf's user avatar
  • 1,111
2 votes
0 answers
126 views

Why I get slightly (but not acceptable) difference for my Local Sidereal time?

I am trying to convert my UTC into LST by using formula for my astrophysics simulation. The problem is that I get something like difference of 1~2 min when I use known formula and python library ...
Kyle's user avatar
  • 127
2 votes
0 answers
59 views

Computing the sky coordinates using astropy

I need your help with an error I have been receiving while trying to obtain the sky coordinates using astropy module in python. The code looks like the following, ...
CTZenScientist's user avatar
2 votes
0 answers
45 views

How to use astropy to join data tables based on sky coordinates?

I have 2 astronomical tables, from a fits file and a csv file, that look something like this ...
NeStack's user avatar
  • 313
2 votes
0 answers
356 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 ...
Joey's user avatar
  • 21
1 vote
0 answers
93 views

Photometry in SExtractor vs Python

I wanted to find stars in the dwarf Spheroidal (dSph) galaxy. I performed photometry using SExtractor and in Python using DaoStarFinder and other astropy packages. However, while extracting the ...
Abhinna Sundar's user avatar
1 vote
0 answers
270 views

Convert RA from hours to h:m:s

I'm working on a small mount controller software in Python. From the ASCOM standard, right ascension is reported in unit of hours. How do I convert from hours to hours:min:sec? Here is my attempt in ...
Adrian's user avatar
  • 106
1 vote
0 answers
84 views

easy curve modeling package for transits that fits the data not just the parameters?

Does anyone have any recommendations for easy-to-use exoplanet transit light curve model fitting packages like batman, but that fits the data, not just the model parameters? Thank you so much. I need ...
strange_octopi's user avatar
1 vote
0 answers
56 views

How to plot matplotlib plots as tables in python(hdf5 tables)

I have extracted the data from a fits file and plotted a spectra.i need to do the same for multiple fits files .how can I store the resultant spectra's as a hdf5 table or fits table? And which ...
Walker's user avatar
  • 11
1 vote
0 answers
49 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 ...
nealmcb's user avatar
  • 412
1 vote
0 answers
92 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 ...
unicorn's user avatar
  • 21
1 vote
0 answers
182 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? ...
Thomas Brennan's user avatar
1 vote
0 answers
628 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 ...
Christopher Jordan's user avatar
0 votes
0 answers
35 views

Crop a FITS file in shape of another

I have a FITS file, let us say file A. I have another FITS file, file B. File B has a smaller footprint than file A. I want to crop file A in shape of file B. How do I go about doing that?
SlightDecoy's user avatar
0 votes
0 answers
33 views

How to compute object counts in narrowband imaging?

How do we go about computing the object counts from an emission nebula in H alpha? Do need to search the object in Vizier, get the reported FLux for the object in a catalog?.. Do I use synphot-astropy ...
Adrian's user avatar
  • 106
0 votes
0 answers
55 views

Calculating the Flux density through different photometric filters

For a project I wrote the following python script for calculating the flux density. My question is: If the user enters for example magV = 22 and the user selects the B filter instead of the V filter ...
Adrian's user avatar
  • 106
0 votes
0 answers
86 views

Compute rotation angle of fits image

I have a fits image and the header has the keys PC1_1, PC1_2, PC2_1, PC2_2. I want to compute the angle by which my image is rotated so that North will be up. I use the formula below: angle = np....
Sketos's user avatar
  • 31
0 votes
0 answers
70 views

Effective radius from astropy sersic profile

I would like to integrate the 2d Sérsic profile of the astropy library to check the half light radius, but I have some issues. First, I create a simple profile: ...
Antonio's user avatar
0 votes
0 answers
76 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 ...
Hiba Jamal's user avatar