Questions tagged [astronomy]

Questions on the astronomical applications of Mathematica.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

Computing local time for next n cases of a given sidereal time?

I would like to compute the next say 500 instances of a given time in the sidereal day, outputting them in UTC. So for instance for sidereal time 1427 (meaning 14h 27m) I would get ...
user avatar
  • 175
4 votes
2 answers
105 views

Location of the point on Earth with the Sun at the zenith

This should be an easy question, but I don't know the correct syntax. I'm trying to create an animation based on NightHemisphere during a year. For each day, the instant correspond to the time of the ...
user avatar
0 votes
1 answer
129 views

Performance improvement of array setup and processing

I need to improve the speed of the following algorithm: Take a list $x={x_1,...x_n}$. For each integer $i=1,..n$ construct the following list assuming $z=x_i$ if $i=1$ and $z=x_{i-1}$ otherwise: $X_i=...
user avatar
1 vote
0 answers
68 views

Path of moon orbiting the Earth [closed]

I'm trying to make an animation showing the path of the moon orbiting around the earth, but I'm having some trouble plotting it. For some reason, Mathematica doesn't give me any error messages but ...
user avatar
  • 145
0 votes
1 answer
49 views

Constructing Wolfram Alpha Query for Solar Position

When I use Mathematica calls to WolframAlpha, it clearly knows about the motion of the sun, so I can request the solar declination at any date/time: But I'm having great difficulty crafting a query ...
user avatar
  • 53
2 votes
1 answer
72 views

Charting sun location throughout the year from a specified geographic location

I'd like to chart the location of the sun (azimuth and elevation) from a given location (e.g., Chicago) throughout the year for a stated year (e.g., 2010). Here is the basic extraction of the current ...
user avatar
1 vote
1 answer
48 views

Units Question for PlanetData[..]

I asked a similar question yesterday, which was answered splendidly, but I missed adding a detail. Attached is a command, its output, and the issue I have now. This outputs g/cm^3, but I'd rather have ...
user avatar
  • 636
2 votes
2 answers
83 views

Converting Units [duplicate]

I'm using MMA 12.2. Trying to put together some astronomy pages, but the output of the command below is in miles. I would rather have it in SI units instead. On my system evaluating ...
user avatar
  • 636
2 votes
1 answer
72 views

Getting error Solve::units [closed]

I'm trying to solve the following formula for i, given values for all other variables. There are two equations, the first one is a formula to show the transit ...
user avatar
  • 223
22 votes
1 answer
361 views

Travelling around Jupiter

Since we have soon historical conjunction of Jupiter and Saturn I have prepared code with visualization planet Jupiter and Saturn with moons. This code first been prepared for version 11.3 and with ...
user avatar
  • 33.7k
0 votes
1 answer
88 views

Quick question about "shifting x axis"

Imagine I have two lists: x={x1,x2,x3,x4,...} y={y1,y2,y3,y4,...} And I want a listplot ListPlot[Transpose[{x,y}]] Would do ...
user avatar
  • 575
5 votes
0 answers
145 views

Fast N-Body Simulation with CUDA [closed]

There is a Mathematica code for 3 body simulation ...
user avatar
  • 8,648
3 votes
1 answer
375 views

2 body orbits around a barycenter

I'm attempting to plot a barycentric orbit of the sun and Jupiter. Initial Conditions ...
user avatar
  • 747
4 votes
1 answer
479 views

gravitational two body problem for the orbit of the sun and jupiter around their barycenter

This is a simulation of the sun and jupiter orbiting the respective barycenter. Initial conditions ...
user avatar
  • 747
2 votes
1 answer
425 views

N body simulation

I'm trying to solve a 3 body problem consisting of the earth moon and sun. I'm wanting to show the earth orbiting the sun and the moon orbiting the earth as a result of the gravitational forces. ...
user avatar
  • 747
7 votes
1 answer
118 views

Detect sub figures and split (automatically?)

I would like to take a large figure showing a sequence of individual plots and automatically split the into series of images showing the individual sub-plots (to be exported as animated GIF later). ...
user avatar
2 votes
1 answer
123 views

NDSolve Maxsteps Reached Error

I'm trying to solve a system of Equations. The code is commented below, I am mainly conserved with the last few lines, specifically the NDSolve line. No matter what I do to the Maxsteps option, the ...
user avatar
  • 157
3 votes
2 answers
205 views

Solar Power Calculations

Good Afternoon, I have calculated the Incident beam radiation for a given locations local sunlight hours. ...
user avatar
  • 747
4 votes
1 answer
68 views

StarData, Altitude/Azimuth Anomaly with TimeZones

I am trying to compute lunar parallax using the position of the star Regulus on February 19th of this year. I get different answers depending on how I specify the date. Here are the particulars: <...
user avatar
7 votes
1 answer
494 views

Can NDSolve address spherical gravitational collapse?

As far as I know spherical gravitational collapse -of central importance to theoretical physics- is thought to be out of the scope of Wolfram Mathematica. However there are cases, as in this article,...
user avatar
4 votes
1 answer
84 views

Finding the next total SolarEclipse over a given latitude and longitude?

What is a reasonable way to code the title question in Mathematica? Trying the following gave Polygons over GeoPositions over Lists of pairs, but just digging into these seemed inelegant. Besides, ...
user avatar
  • 402
7 votes
1 answer
177 views

StarData: proper motion of a star in HelioCoordinates

I am not an astronomer, but am trying to calculate the trajectory of an interstellar space probe, for example to Proxima Centauri. The HelioCoordinates seem appropriate, as typically used within the ...
user avatar
  • 91
0 votes
2 answers
187 views

Plotting a parametric solution from NDSolve

Im trying to animate multiple points around multiple parametric plots which depicts orbital motion of body around a planet. Initial conditons are; ...
user avatar
  • 747
1 vote
0 answers
239 views

Numerical integration for equations of motion

...
user avatar
0 votes
1 answer
627 views

Plotting elliptical orbits using Verlet method

I'm looking to solve a 2 body system consisting of the Earth and a body of mass in orbit. I'm using the Verlet method to numerically integrate Newton's equation of motion in order to plot an ...
user avatar
  • 747
5 votes
1 answer
70 views

Select Specific StarData

The help menu for StarData has many examples such as StarData[EntityClass[ "Star", {EntityProperty["Star", "DistanceFromEarth"] -> TakeSmallest[10]}]] ...
user avatar
-1 votes
2 answers
124 views

a ListAnimate problem

Thanks to @AlexTrounev, I learned how to use ListAnimate, but I still get stuck using it. Before ListAnimate everything is correct. I just cannot successfully use ListAnimate to make the plot. I have ...
user avatar
0 votes
1 answer
92 views

Integrating the Planck Function over certain filter ranges [closed]

ClearAll["Global`*"] ...
user avatar
0 votes
1 answer
547 views

Animate particle's trajectory

Does anyone know how to animate the trajectory of a particle, but make sure before the particle reaching a certain spot, there's nothing. I mean I want to make an animation that look like https://en....
user avatar
7 votes
1 answer
1k views

Interpreting Mathematica code on black holes

I am trying to understand the code written down on page 7 of this document (code is in Mathematica) I understand pretty much all of the code on the previous page needed to setup the page 7 code (...
user avatar
  • 319
1 vote
0 answers
362 views

Solving the values of Christoffel symbols from a given metric tensor

Is there any easy mathematica package by which I can solve the Christoffel symbols from a given metric tensor?
user avatar
  • 31
4 votes
1 answer
187 views

Creating the celestial sphere for astronomical demonstrations

Quick question: has anybody produced (and/or willing to produce and share) a nice celestial sphere with some stars and/or constellations? I am traveling , so I cannot do it myself right now, but I ...
user avatar
  • 5,200
1 vote
0 answers
603 views

Calculating Christoffel Symbols [duplicate]

I am totally new in the astrophysics field and I need to calculate Christoffel symbols for a model. The line element for the FLRW metric and the geodesic equation is given below: ...
user avatar
  • 31
1 vote
2 answers
174 views

Using WhenEvent to calculate the period of an orbit

I'm having trouble trying to have Mathematica tell me when the period of the orbit of my system is. Namely, I'm trying to use Mathematica to find the orbital period of the Earth around the Sun. Here's ...
user avatar
  • 111
0 votes
1 answer
177 views

Plotting the orbit of the Earth around the Sun. Error: step size is effectively zero; singularity or stiff system suspected

I've been asked to plot the orbit of the Earth around the sun over a period of three years. I've copied my exact code below. When I try to run it I get a series of errors, the first being: NDSolve:...
user avatar
15 votes
1 answer
1k views

Speed up NDSolve compared to Python (calls to LSODA)

I migrated a numerical model code from Python to Mathematica and am surprised how much faster the Python version runs. Profiling of the Python version tells me that it is about 100 times faster (120 ...
user avatar
6 votes
1 answer
152 views

Does SolarEclipse only cover a limited date range?

If I use the example from the documentation for SolarEclipse and simply replace the years there with older ones, say from around Shakespeare's time, ...
user avatar
  • 12.7k
18 votes
2 answers
982 views

Processing images from NASA's Juno Jupiter Orbiter

Question Can you help me improve what I’ve done to create an enhanced-color picture from an image provided by NASA’s JunoCam? [My work is shown in the penultimate image of Jupiter in this post.] I’...
user avatar
  • 3,446
2 votes
1 answer
85 views

InverseFunction's domain is not the range of the function that was inverted

I wrote a function to calculate how long of a period has past when a planet traverses an angle theta from perihelion in an orbit of a given eccentricity. ...
user avatar
1 vote
2 answers
110 views

How do I pull a multiple pieces of data from a while loop and put into a table

I am wanting to pull multiple pieces of data from a while loop and put it in a list. The example I have added below is a table with inputted data that I found. Im pretty sure the syntax is unrelated ...
user avatar
  • 11
1 vote
0 answers
116 views

SatelliteData for a hypothetical satellite

SatelliteData appears to have some sort of orbit propagator behind it. It works for existing satellites, but is there any way to use it to predict the orbit of a ...
user avatar
  • 13.4k
4 votes
1 answer
139 views

Typeset the standard "Moon" symbol

As it says on the tin, I want a way to typeset the astronomical symbol for the moon, which is a crescent. I also want this in such a way that I could integrate it into a button as a label, like the ...
user avatar
1 vote
1 answer
259 views

list of dates for vernal equinox

I'm trying to get a list of dates and times of the vernal equinox for the last 30 years (or some other time interval). I'm flailing about and really have gotten nowhere. When I've tried typing ...
user avatar
1 vote
1 answer
101 views

TrueAnomaly of planet orbit as a function?

It is possible to obtain the true anomaly of a planet this way: ...
user avatar
1 vote
1 answer
2k views

How to convert astronomical RA and Dec from sexagesimal to degree?

Astronomers use right ascension (RA) and declination (Dec) to refer to the sky coordinates of celestial objects. RA and Dec can take be represented degrees or in sexagesimal (base 60). How can I ...
user avatar
  • 1,783
2 votes
1 answer
426 views

Calculating with scientific notation

I want to calculate the gravitational force between the Earth and its Moon using Newton's gravitational formula: (G M1 M2)/d^2 and its appropriate physical units. I'd include the code I wrote for ...
user avatar
4 votes
1 answer
486 views

Lagrangian form of Earth-Sun Kepler blows up NDSolve?

I've looked at this 1-D SE question. That question seems to have difficulties around diverging potential functions, and I don't have that. I've looked at this 2-D 3-body demonstration, but that starts ...
user avatar
  • 8,561
2 votes
0 answers
481 views

Plotting orbits of trajectories of bodies sharing the earth's orbit in coordinates centered at the barycenter of the solar system [closed]

I am attempting to try and plot the trajectories of a trio of satellites that are orbiting with the earth-moon system around the solar system's barycenter. Originally, I had the satellites in orbit ...
user avatar
4 votes
1 answer
594 views

Orbit followed by a particle around Schwarzschild Black Hole

The following is a equation which describes various possible orbits of a particle around the Schwarzschild black hole spacetime in general relativity. I want to solve it from ...
user avatar
  • 73
6 votes
1 answer
195 views

TimeZone Anomaly

I ran into the following situation when I was trying to determine the time of sunrise (using the built-in Sunrise function) for a variable location on a variable ...
user avatar