Questions tagged [python]

Questions about using the Python programming language to solve astronomical problems. General questions about Python are off-topic but might be asked on Stack Overflow.

24 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
218 views

Generate probability skymap

I am trying to generate skymaps for a set of Fermi GBM triggers, containing the probability that a trigger originated in a given part of the sky. For each trigger, I have access to the RA, dec, error ...
2
votes
0answers
41 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 ...
2
votes
0answers
24 views

Detect sources near image edge with python photutils

As my question suggests, I 'm trying to use a python library photutils in order to detect sources from MUSE cube. MUSE (Multi Unit Spectroscopic Explorer) is an ...
2
votes
0answers
42 views

PHOEBE 2.2 Documentation, components and semi-major axis definitions

I'm looking at PHOEBE 2.2 Documentation, specifically at a tutorial about constraints What are Constraints? Constraints live in their own context of the Bundle, and many are created by default - ...
2
votes
0answers
96 views
+100

How are small objects automatically identified and their locations determined in digital images?

I have a large quantity of old digital images of low energy electron diffraction (LEED) patterns that I must process to identify and locate small, sometimes elongated gaussian-like blobs of a few ...
2
votes
0answers
83 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, ...
2
votes
0answers
50 views

How would I code to find the seeing of a binary star system in python?

I have fit images of binary systems and want a program that will help determine which ones are highest quality, the seeing. The simplest way is apparently to equate it to the FWHM of the Gaussian of ...
2
votes
0answers
180 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 ...
2
votes
0answers
427 views

Coordinates reduction python

How can I calculate position (alt, az) of star for observer at some station (longitude, latitude) on specific date and time? I need full coordinates reduction with all elements included in calculation ...
1
vote
0answers
16 views

I am reading .fil File using UCBerkeleySETI / blimpy, but i am getting error?

I am working on pulsar search and I am reading the filterbank file using blimpy technique in python, but I am getting error. My question is that blimpy is a universal file reader, like ...
1
vote
0answers
8 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. ...
1
vote
0answers
40 views

Wavelength Calibration in Python - Line Identification algorithm

I was asked to develop a data reduction pipeline for a telescope and am facing a problem. I have the standard lamp spectra and need to identify the emission lines in order to find a wavelength ...
1
vote
0answers
56 views

Python interface for DMK 23U274 USB camera for astrophotography

I have access to a monochrome USB camera (DMK 23U274, The Imaging Source) and I'd like to record focal plane images from a small telescope with a python script that would control it by setting ...
1
vote
0answers
92 views

How to do logarithmic wavelength binning (in Python) in order to find redshift?

In Tonry and Davis (1979)(http://adsabs.harvard.edu/abs/1979AJ.....84.1511T), they formulated a cross-correlation method for extracting velocity redshifts. They bin the linear spectra into logarithmic ...
1
vote
0answers
100 views

Three Body Problem

I tried to solve the three body problem numerically. While after 1000 time steps the system looks stable (See Fig.1) it is completely unstable after 10000 time steps (See Fig.2). Is that an intrinsic ...
1
vote
0answers
171 views

To show perihelion precession motion of Mercury in Python with matplotlib

I'm trying to make it more general code so I can trace even a parabola or hyperbola for $e=1, E=0$ and $e>1, E>0$ respectively. And after achieving that general code I want to make the same code ...
1
vote
0answers
27 views

How can I get the fluxes of fetch_imaging_sample? - astroML

I'm working with astroML in Python and I need to get the fluxes from the magnitudes in r band of fetch_imaging_sample(). ...
1
vote
0answers
83 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? ...
1
vote
0answers
115 views

Comoving distance between two points [(RA1, Dec1, z1) and (RA2, Dec2, z2)]

I have Redshift (z), RA and Dec positions for two points in a galaxy catalogue (say P1 = [<...
1
vote
0answers
64 views

Efficiently calculating power spectra from galaxy catalogs

I am dealing with a problem which requires calculating either the correlation function or the power spectrum. At times, the 2-point-correlator seems the better route, at others, the PS. Right now I am ...
1
vote
0answers
95 views

Unsure how to obtain galactic roll?

I am having some issues with understanding what my adviser means by "galactic roll," but I have not been able to find anything online regarding this. My project involves generating an array of az/el ...
1
vote
0answers
416 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 ...
0
votes
0answers
19 views

How to select galaxy emitters from color-color diagram? (Those candidates which are above a line in a plot)

I am trying to select the OII emitters from the colour-colour diagram of galaxies data. I don't know how to select those candidates which are above the line. Here is my colour-colour diagram. . What I ...
0
votes
0answers
114 views

Smoothing an SED with binning

I have an (observed) SED of a galaxy, and am attempting to match model SEDs to it. To do this I need to be able to see its shape better, which would involve some sort of smoothing of the spectrum. I ...