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.

Filter by
Sorted by
Tagged with
1
vote
0answers
37 views

Derive LOSVD from galaxy spectrum, using fourier method

I am trying to implement a programm, that derives the kinematics (specifically the kinematic parameters: mean rotation velocity, velocity, dispersion, hermite coefficients h3 and h4) from an ...
0
votes
0answers
17 views

How to create synthetic galaxy spectrum by broadening stellar spectra with a gaussian

I am trying to create a synthetic galaxy spectrum, by convolving a gaussian-velocity-distribution f(v) with my stellar spectra S. I have already logarithmically rebinned the spectrum and removed the ...
1
vote
0answers
22 views

Filtering local region in SIMBAD

I am completely new to astrophysics and currently writing a paper on Cepheid variables for high school physics. I would like to filter out all Cepheid variables in the local system which I would ...
-2
votes
1answer
61 views

Calculate exact date and time from position of the sun - 88° degrees

I am currently working on an astrology project and need to figure out the exact date and time based on the sun's position of birth - 88° degree (approx. 89 days) before the moment of birth. I am using ...
1
vote
0answers
47 views

impossible to download some packages on python [closed]

i am new to python i will like to install some packages like einsteinpy, astropy, and several others but the error message is always the same, i think i have a problem with the pip version but i dont ...
2
votes
0answers
53 views

Logarithmic rebinning and continuum removal of stellar spectra

I am trying to learn how to derive the line of sight velocity distributions from galaxy spectrum to extract kinematical parameters like rotational velocity and velocity dispersion. Therefore I need to ...
1
vote
1answer
45 views

working with stellar spectra in fits format in python

Hey I am new to working with astronomical data in Python. I wanted to start working with stellar spectra and I am having trouble with the data. To get a first look I just wanted to plot a spectra (...
4
votes
1answer
49 views

Accessing SDSS server SQL server via python

Is there a way to directly access any of the Sloan Digital Sky Survey servers via SQL via Python? Currently I have been able to run SQL queries from the website they provide (for example https://...
2
votes
2answers
149 views

Open source code for the maths behind a heliostat?

Theoretically, using a Raspberry Pi, (at least) one mirror, and two motors, one should be able to build a heliostat, i.e. a device which redirects sunlight to a fixed spot, like a scrub in the shadow ...
3
votes
1answer
48 views

Open source library to calculate image from signals of a distributed set of radio dishes?

The National Radio Astronomy Observatory's Q&A "How To Make Images With a Radio Telescope" says The most straightforward way to make a radio image with your satellite antenna system, ...
21
votes
3answers
5k views

Why won't the Sun set for days at N66.2 which is below the arctic circle?

Correct me if I am wrong, but if we count sunsets by the center of the Sun apparently crossing the horizon then the Sun is supposed to set every day at latitudes under the arctic circle. (Yes if you ...
3
votes
1answer
58 views

Lightkurve nan values after bin light curve

I am using lightkurve 2.0.2 library with Python 3.8.5 and astropy 4.2 for processing exoplanet transits. However when I want to bin light curve to fixed number of points, all values in ...
1
vote
0answers
70 views

Schechter Luminosity Function fitting plot of galaxies

I would like to plot the Schechter Luminosity function of galaxies. Here is my data(I have the Luminosity L[Ha] in erg/s). I would like to plot like this figure from this paper. In this paper, they ...
1
vote
2answers
92 views

How should I interpret this result obtained using lomb scargle?

I used lomb scargle for periodic analysis. The time interval used is constant at 500 seconds. #My data (x=time, y=intensity values) is : x= ( 00:28, 00:37, 00:45, 00:53, 01:02, 01:10, 01:19, 01:27, ...
1
vote
1answer
65 views

RA expressed in degrees

Using the Python package Skyfield I thought that I could get the RA expressed in degrees simply by doing ra.degrees, but I get the following message this angle is usually expressed in hours, not ...
0
votes
1answer
124 views

How to Interpret Lomb Scargle periodogram

lomb scargle periodogram: ...
1
vote
0answers
29 views

Using the 'exoplanet' module to fit a radial velocity curve for a binary star system

As part of a project, I am trying to fit a radial velocity curve using the below tutorial for the binary star system (EBLM J0608-59): https://docs.exoplanet.codes/en/stable/tutorials/rv/ I have the ...
3
votes
0answers
119 views

Issues in dimensions and slicing while plotting contours over a FITS Image in Astronomical Plotting Library in python (APLpy)

I have been trying to plot the contours of a FITS image over itself in APLpy. The image was created in AIPS, and has dimensions (1024,1024,1,1), viz., right ascension (RA--SIN), declination (DEC--SIN),...
2
votes
0answers
47 views

Should I fit a function to this lightcurve?

I am creating a light curve for the duration of a binary system in order to find out the duration of the eclipse. I am unsure as to whether to fit a function to the data (is it appropriate) as by ...
0
votes
0answers
20 views

Completeness detection analysis of magnitudes of galaxies

I have a magnitude from the observation. I would like to find the detection completeness of the magnitude. I want to plot the figure like this in python How to plot the Detection completeness and ...
2
votes
1answer
160 views

“LinAlgError: SVD did not converge in Linear Least Squares” with eleanor.py

I'm doing some tests with eleanor module (i'm a novice). I'm using the example code written on eleanor.py website ...
2
votes
1answer
380 views

How to plot celestial equator in galactic coordinates? Why does my plot appear “backwards”? [duplicate]

I'm trying to plot celestial equator in galactic coordinates. Here is my code (based on this answer): ...
1
vote
0answers
44 views

Using lightkurve to identify a planet

I have gotten LightKurve to work and plot a lightcurve to allow for the identification of possible transits. However is there a way I can get it to run and tell me if there is a possible transit in ...
2
votes
2answers
115 views

Technique for folding sparse event data in order to detect an underlying periodicity?

@JamesK's answer to When will the next transit of Earth be visible from Mars? Was the last one really on May 11, 1984? lists dates of 18 transits which I've converted to days since 1500-Jan-01 as <...
6
votes
1answer
317 views

Cannot identify mistake in calculating orbital eccentricity vector; magnitude equals one instead of zero (with python code)

I have a gravitational nbody simulation, for which I would like to determine various orbital parameters. For each body, I have 3-D vectors (x,y,z -space) for position, velocity, and acceleration. I am ...
1
vote
1answer
241 views

How can I calculate the apparent position of stars as seen from a location on Earth at a specific time?

I'd like to be able to generate star maps using Python, similar to what is done at YourSky. I believe this is possible with Astropy and the details provided in this question. I can import stars from ...
2
votes
1answer
71 views

How to recognize exoplanet transit

I am using Python package lightkurve for exoplanets searching by the transit method. When I download light curve of some star and apply periodogram, I find frequency and power of periodic components ...
2
votes
1answer
115 views

How can I calculate the right ascension of an observer on Earth's surface in the TEME frame with python.skyfield?

I would like to calculate the right ascension of a point on earth as specified above with the Skyfield Python library, and I can not figure out how to do this. I know that calculating the geocentric ...
0
votes
0answers
28 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 ...
18
votes
2answers
3k views

Why does the Fourier transform of this CMB image have a hole in it?

The BBC's Desert telescope takes aim at ageing our Universe contains the image below of the Cosmic Microwave Background from the Atacama Cosmology Telescope or ACT. It looks like this is plotted with ...
1
vote
0answers
34 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
1answer
53 views

trouble installing drizzlepac

I'm trying to install drizzlepac to follow this tutorial on aligning hst images: https://spacetelescope.github.io/notebooks/notebooks/DrizzlePac/align_to_catalogs/align_to_catalogs.html However, I get ...
1
vote
2answers
225 views

Convert dates to julian day number in astropy?

I'm using astropy and I need to convert dates like this: 2012.06.22_17:56:15_TAI into julian day number. I tried: ...
1
vote
1answer
331 views

Calculate depth and duration of exoplanet's transit using Python, astropy or lightkurve

I am creating a program for the analysis of exoplanets in Python using Astropy and Lightkurve libraries. I have light curve of specified star and I would like to calculate depth and duration of planet ...
7
votes
2answers
353 views

What does “additive fringing from the (multiplicative) twilights” mean?

The question How can I make the fringing pattern visible in my flat (twilight) images for filter i? includes: I have a bunch of twilight flats that have been preprocessed (dark, bias, overscan etc.)...
4
votes
1answer
115 views

How can the IAU 2000A vs IAU 2000B nutation comparison be reproduced?

I am attempting to plot how the IAU 2000A nutation model degrades as its terms are omitted. As a spot-check, I decided to compare it to IAU 2000B, which includes only the 77 most important lunisolar ...
4
votes
2answers
340 views

Get orbital period of exoplanet from light curve using astropy.timeseries

I am using astropy and I would like to calculate orbital period of an exoplanet by its star's light curve. I follow tutorial in astropy docs and I use data from Kepler in Nasa Exoplanet Archive. ...
1
vote
0answers
116 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 ...
3
votes
0answers
84 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
1answer
56 views

Are there any good DSO API's for python out there?

I was wondering if there was good DSO database API out there for python so I could fetch things like a distance away from Earth or radius etc. I tried looking however couldn't find the exact thing I ...
0
votes
2answers
4k views

How to create 3D animation of particles position vs time in python?

I am trying to make a 3-D animation of stars' position vs time. I have the information of the stars' x, y and z co-ordinates over time. I was looking at the example of Matplotlib and did understood ...
3
votes
1answer
79 views

Galactic Equator zenith transit

I need to find the two times of zenith passage of the Galactic Equator for a given Earth Lat/Lon on any day between 3500 BC and 1500 AD. Since the Galactic Equator is a line and not a point, I try to ...
2
votes
0answers
41 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 ...
1
vote
1answer
141 views

Python controllable amateur astrophotography cameras?

I would like to read further about any successes that amateur astrophotographers (or professionals) have had with USB CCD cameras that are controlled by Python scripts. I'd like to script the setting ...
1
vote
0answers
170 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 ...
2
votes
1answer
99 views

Neutrino Modelling in Friedmann Equation

I'm trying to model neutrinos in the Friedmann Equation. I've covered the case of the Benchmark Model where we have matter, radiation, curvature, and the cosmological constant, Lambda. I know my ...
-1
votes
1answer
111 views

Cannot plot Kepler FITS files with topcat in Windows

This is a continuation of my earlier question here. I was able to find Kepler data. Now I wanted to plot the data using Topcat. But when I tried to plot the data, I received error. Below is the error ...
2
votes
0answers
49 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 - ...
1
vote
1answer
146 views

How to compute Ascension / Descension cycle of the Moon

I am struggling to find out an information about how to determine ascending/descending cycle of the Moon. I can find from this source and a bunch of others, that Moon begins to descend when reaches ...
2
votes
0answers
110 views

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 ...