# Tag Info

## Hot answers tagged astronomy

40

Transform an image under an arbitrary projection? Looks like a job for ImageTransformation :) @halirutan's cart function gives you a mapping from latitude and longitude to the Mollweide projection. What we need here is the inverse mapping, because ImageTransformation is going to look at each pixel in the Mollweide projection and fill it in with the colour ...

34

Let me first name your maps correctly (you switched night and day maps): night= Import["http://eoimages.gsfc.nasa.gov/images/imagerecords/55000/55167/earth_lights_lrg.jpg"]; day= Import["http://eoimages.gsfc.nasa.gov/images/imagerecords/57000/57752/land_shallow_topo_2048.tif"]; The images have different sizes: ImageDimensions[day] (* ==> {2048, 1024} ...

34

It took me quite a while, but finally, here's a visualization of the perigee of Flamsteed's comet: I should first note two things: first, some of the needed data for computing the orbit of comet C/1683 O1 was missing in AstronomicalData["CometC1683O1", "Properties"], and I had to pull information from external sources to supplement the information ...

33

Update June 2015 Here is an updated version of the program. I've made it compatible with newer Mathematica versions (AstronomicalData returns Quantity structures in newer versions, which wrangled calculations). It should now work on versions 8 through 10. Let me know if it doesn't. I added animation and simplified the presentation (no tooltips in the ...

32

To summarize various contributions from this post and others (Rahul Narain, halirutan, cormullion, Szabolcs, belisarius, J.M.) into a single plot, see the following definitions invmollweide[{x_, y_}] := With[{theta = ArcSin[y]}, {Pi (x)/(2 Cos[theta]), ArcSin[(2 theta + Sin[2 theta])/Pi]}]; fc[phi_] := Block[{theta}, If[Abs[phi]...

32

a=Most@Sort[StarData[ EntityClass["Star", "StarNearest10"], {"Name", "DistanceFromSun"}], #1[[2]] < #2[[2]] &] (*{{"Proxima Centauri", Quantity[4.2181, "LightYears"]}, {"Rigel Kentaurus A", Quantity[4.38982, "LightYears"]}, {"Rigel Kentaurus B", Quantity[4.4001, "LightYears"]}, {"Barnard's Star", Quantity[5.9339, "...

19

Yes, the basic idea is here: Demonstration: Day and Night World Clock Now, to use the images, create an alpha channel using the computed the day-night curve--called "terminator" curve (rasterize it in grayscale), and compose two images using ImageCompose with the generated alpha channels (SetAlphaChannel to the second image). Try the following code: a = ...

19

Stars RA and Dec for stars can be fetched via StarData["Sirius", {"RightAscension", "Declination"}] (* -> {6 h, 45 m, 9.3 s, -16 degrees, -42 arc minutes, -47.2 arc seconds} *) Although one can specify a particular date and time for these coordinates, the result Mathematica gives does not actually depend on the date or time at all - an indication ...

19

This was a fun question to answer, even considering that I know nothing about general relativity. It's all a matter of translating the equations presented in this paper by Oliver James, Eugenie von Tunzelmann, Paul Franklin, and Kip Thorne into notebook expressions. Embedding Diagrams The paper gives some really cool figures to show the curvature of 4-...

17

Edit: for general approach to Ticks, go there: GeoProjection for astronomical data - wrong ticks data = Cases[ Import[FileNames["*.dat"][[1]]], {a_, b_, c_} :> {b, Mod[a, 360, -180]}]; (*thanks to bbgodfrey*) To show points you have to stick with GeoGraphics. GeoListPlot is designed for Entities. To add something more to the question I ...

17

Download and learn Package for Radar Charts. Import["http://tinyurl.com/ntmhkca"] Load package: Needs["RadarChart"] Consider this year on monthly period (you can do any period): month = DateRange[DateObject[{2016}], DateObject[{2017}], Quantity[1, "Months"]] and a function f[l_] := N[l[[1]] + l[[2]]/60] Get the data set = f[...

16

Perhaps naïve: Norm@AstronomicalData["Jupiter", "Position"] (* 7.74204*10^11 edit .... copy/paste error corrected *) Checking some consistence EuclideanDistance @@ (AstronomicalData[#, "Position"] & /@ {"Earth", "Jupiter"}) == AstronomicalData["Jupiter", "Distance"] (* True *)

15

Offered as an alternative to getting the same information and a check on it, one can also get this measurement from a WolframAlpha query: ... Of some interest, by these measurements Jupiter appears to have moved quite a ways further from the Sun since belisarius's answer just some 11 hours ago. 67.74204*10^11 vs 7.74232*10^11 WolframAlpha can also ...

15

At the beginning of your notebook set the Metric system as default. \$UnitSystem = "Metric" This works for me. If not try below suggestion Remember you are reading the data from wolfram alpha! it's a regional thing so if the upper solution didn't work, you can try something like (I don't remember exactly though) SetOptions[WolframAlpha, PodStates -> {"...

14

AstronomicalData was updated to remove Pluto, so you don't need to anymore. In[27]:= AstronomicalData["Planet"] Out[27]= {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"}

13

There is actually a somewhat cryptic but very simple way to make NDSolve only return the solution at the end point: sol = NDSolve[{ r''[t] == -G r[t]/Norm[r[t]]^3, r[0] == {1, 0, 0}, r'[0] == {0, 2 Pi // N, 0} }, r, {t, 1, 1}, Method -> "ExplicitRungeKutta", MaxStepSize -> (1/365 // N) ] As it is easy to oversee: the difference is ...

13

It's been demoted to a "dwarf planet", a splendid way of avoiding saying it's not a planet like Jupiter. From the documentation in Mathematica 8:

13

Jean Meeus's Astronomical Algorithms (as well as the related book Astronomical Formulæ for Calculators) is what you should start looking at whenever you need to deal with algorithms for quantities of astronomical interest. For instance, here is a translation of Meeus's method for the Julian Date: Options[jd] = {"Calendar" -> "Gregorian"}; jd[{...

13

Well I decided to give it a bit of a go...First import the image and convert to grayscale, then crop to focus on the area of interest. Then I used a LaplacianGaussianFilter, which is often used in blob detection. img = ImageAdjust@ColorConvert[Import["http://i.imgur.com/4lDwE33.jpg"], "Grayscale"]; smallimg = ImageAdjust@ImageTake[img, {200, 500}, {200, 600}...

12

Heres an alternative. pic = Import["http://i.stack.imgur.com/4xyhd.png"] Let's say you are lazy and you don't want to write mathematical equations. We can use built-in transformations to create domain, image of transformation, and create InterpolationFunction based on this data. data = Join @@ Table[{lat, long}, {lat, -89, 89}, {long, -179, 179}]; ...

12

My question is: how to set that NDSolve will not save whole InterpolationFunction for the result? There is actually a very simple way to do this: instead of specifying a list of functions in the second argument, specify an empty list instead. This now begs the question of how one can obtain results. The solution is to use the event location functionality ...

12

This is simplest implementation. If a new crater gets closer than 30 to some old craters, only closest old crater is getting replaced with new one. You can built on this example something more sophisticated. craters = {{0, 0}}; number = {1}; Dynamic[new = RandomReal[{-250, 250}, 2]; near = Nearest[craters, new][[1]]; Row[{ Graphics[{PointSize[.05], ...

12

ToExpression["\\[" <> # <> "]"] & /@ {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"} Gives (also corrected the code thanks to Kuba)

11

Here is a solution inspired from tutorial/NDSolveStateData (Mathematica 8): G = 4 Pi^2 // N; stateData = First[ NDSolve`ProcessEquations[ { r''[t] == -G r[t]/Norm[r[t]]^3, r[0] == {1, 0, 0}, r'[0] == {0, 2 Pi // N, 0} }, r, {t, 0, 1}, Method -> "ExplicitRungeKutta", ...

11

Import data (from wherever it is located): rad = Import["C:/Temp/DadosRad2014_RADECVELOC_15124_1024.dat"] Reverse first two elements of each sublist of rad, assure that RA lies in between -180 and 180, and discard third element; p = Cases[rad, {a_, b_, c_} -> {b, Mod[a, 360, -180]}]; Fix GeoGridLines, adjust ImageSize, and adjust FrameTicks and ...

11

You have most of the pieces here already. UPDATED The proper coordinates In this problem, we want to get the positions of astronomical objects in terms of a Cartesian system that is geocentric and rotates with the Earth. In astronomy, the positions of objects are commonly given in terms of right ascension (RA) and declination (Dec), which are similar to ...

10

UPDATED VERSION: Import the images: img1 = Import[NotebookDirectory[] <> "Image1.png"]; img2 = Import[NotebookDirectory[] <> "Image2.png"]; imgs = {img1, img2}; ImageCollage[imgs] Binarize the two images using the "MinimumError"-Method, pad the images (hald the size of the original images) and perform an Opening to get rid of binarized ...

10

I think you are looking for the GeoCenter option to GeoGraphics. GeoGraphics[ GeoCenter -> {0., 180.}, GeoModel -> Entity["PlanetaryMoon", "Moon"], GeoProjection -> "Mollweide", GeoRange -> All, Background -> Black ]

10

Here's something that is nowhere near the sophistication of the original, but might get you started. The following assumes an orbital period for Venus of 225 days (thanks Michael!), and an average orbital distance from the sun of 0.72 AU (from very superficial Google searches). Table[ Module[ {venus, earth}, venus = 0.72 AngleVector[2 Pi/225 d]; ...

10

Might as well... eorb = PlanetData["Earth", "OrbitPath"]; vorb = PlanetData["Venus", "OrbitPath"]; dl = DateRange[{2010, 1, 1}, {2015, 12, 31}, "Week"]; epos = Table[QuantityMagnitude[UnitConvert[ PlanetData["Earth", EntityProperty["Planet", "HelioCoordinates", {"Date" -> dates}]], ...

Only top voted, non community-wiki answers of a minimum length are eligible