# Tag Info

42

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

41

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

33

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

21

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

21

I managed to debug the code from KerrOrbitGRProject and reproduce the results for the Schwarzschild metric (figures on pp. 7-8) coords = {t, r, θ, φ}; n = Length[coords]; a = 0; ρ = r^2 + a^2 Cos[θ]^2; Δ = r^2 \[Minus] 2*M*r + a^2; tt = 2 M*r/ρ \[Minus] 1; rr = ρ/Δ; θθ = ρ; \ φφ = (Δ + (2 M* r*(r^2 + a^2))/ρ) Sin[θ]^2; tφ = \[Minus]4 ...

20

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

19

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

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

17

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 *)

16

You can write your own algorithm and use it from NDSolve. For example, for RK4: CRK4[]["Step"[rhs_, t_, h_, y_, yp_]] := Module[{k0, k1, k2, k3 }, k0 = h yp; k1 = h rhs[t + h/2, y + k0/2]; k2 = h rhs[t + h/2, y + k1/2]; k3 = h rhs[t + h/2, y + k2]; {h, (k0 + 2 k1 + 2 k2 + k3)/6}] CRK4[___]["DifferenceOrder"] := 4 CRK4[___]["StepMode"] := Fixed ...

16

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

15

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

15

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}]; ...

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

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

14

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

14

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

14

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

13

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

13

To clarify why it is that your command did not work, here is what your free-form input was translated to: EntityValue[EntityClass["Star", {"DistanceFromSun" -> TakeSmallest[1]}], "DistanceFromSun"] This returns {Missing["NotAvailable"]} because the Sun itself is part of the "Star" domain and though it is closest to itself it (apparently) has no value ...

13

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}]], ...

12

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

12

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

12

I'm sorry for a delay. The cause of this problem originates from my thoughtless approach and/or abuse of specific case of a Sinusoidal projection. I was using n Degree to specify ticks position. It was working so I wrongly assumed it gets positions in projection automatically. As we can see, it's not the case. Answer: we have to project ticks positions ...

12

My first question is: is it possible that the import is discarding the timestamp data? The relevant timing data is contained in the attributes of the /Strain/strain dataset. These can be extracted using: H1url = "https://losc.ligo.org/s/events/GW150914/H-H1_LOSC_4_V1-1126259446-32.hdf5"; strainH1 = Import[H1url, {"Datasets", "/strain/Strain"}]; attrsH1 ...

12

I did some time ago. tv = 225; te = 365.25; rv = 0.72; re = 1; e[t_] := {Cos[2 Pi t/te], Sin[2 Pi t/te]}; v[t_] := 0.72 {Cos[2 Pi t/tv], Sin[2 Pi t/tv]}; vis[t_, s_] := Graphics[ {Yellow, PointSize[0.05], Point[{0, 0}], White, Circle[{0, 0}, 1], Circle[{0, 0}, 0.72], Blue, PointSize[0.03], Point[v[t]], Red, Point[e[t]], White, Table[Line[{v[...

12

First question. I'm pretty sure that the difference is due to what happens with machine underflow. As of V11.3, underflow goes to machine zero instead of to arbitrary-precision numbers (as it does in versions < 11.3). See (94996), (169361), (174587). Try SetSystemOptions["CatchMachineUnderflow" -> False] in versions < 11.3 to see if it will prevent ...

11

Please tell me if this meets your needs, I feel it does: Graphics3D[{{ Yellow, Sphere[QuantityMagnitude @ AstronomicalData["Sun", "Position"], 0.05]}, AstronomicalData[#, "OrbitPath"] & /@ otherCelestials }, Axes -> True, SphericalRegion -> True, ViewVector -> {{1, -2, 1}, {0, 0, 0}} ] Manipulate[ Graphics3D[{{ Yellow, Sphere[...

11

Importing and converting the data Import the data (replace "path_to_the_downloaded_file.html" with the file path of the actual data). data = Import["path_to_the_downloaded_file.html", "Text"]; We know that our data of interest is formatted as (4 digits)(whitespace)(4 digits), so we can extract that, extract time of sunrise from it, and convert the sunrise ...

11

You might find the functions ColorToneMapping and BrightnessEqualize useful, as well as modifying gamma in ImageAdjust. I'm not completely delighted with how my attempt has come out, but I suppose it's something. The "smoothness" you mention from the image you linked might be done using something like a WienerFilter. attempt 1 From this code: ImageAdjust[...

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