Tag Info

Hot answers tagged

26

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


22

I'm not sure what your goal is, exactly, but here is a simulation I cooked up. It should give you some ideas: metersToAU[m_] := m/(1.496*10^11) ; orbit = First@AstronomicalData["Earth", "OrbitPath"]; earthCurrentPosition = AstronomicalData["Earth", "Position"] // metersToAU; radiusEarth = AstronomicalData["Earth", "Radius"] // metersToAU; radiusSun = ...


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


14

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


14

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


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

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


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:


12

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


11

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


8

A couple of years ago I was in an email conversation about this topic with Jeff Bryant, a WRI employee. He was not directly responsible for AstronomicalData, but he told me that Mathematica did not correct for atmospheric refraction. Good to know, as the refraction at the horizon is about the same size as the sun itself (both in degrees). At that time I ...


8

You can use Transpose with its second argument: (* example data *) {r, g, b} = DiskMatrix[#, 100] & /@ {30, 20, 10}; Image[Transpose[{r, g, b}, {3, 1, 2}]] But it is simpler to use the Interleaving option of Image: Image[{r, g, b}, Interleaving -> False]


7

Very similar to Vitaliy's answer, but deleting all craters within the critical distance, and somewhat more compact: craters = {{0, 0}}; number = {1}; Dynamic[ (craters = #; Row[{Graphics[{PointSize@.05, Point@#}, ImageSize -> 230, PlotRange -> 300, Frame -> True], ListLinePlot[AppendTo[number, Length@#], PlotRange -> All, ImageSize ...


7

Search for brfASTRO.m which is a fantastic astronomy package that Peter Breitfeld wrote. He offers wonderful material on his homepage. I used many of his routines (thank you Peter!) Here is my (long but untested) version which I probably also copied partly and forgot from where. Please contact me if you feel that proper credit is due! This is a small part ...


7

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


7

This is not a full answer, but more a response to J.M.'s comment and provides a routine to calculate $\Delta T$ which was sitting on my hard disk. This is intended as a starting point for further calculations. deltaT::usage = "deltaT[date] calculate the arithmetic difference, in seconds, \ between the Terrestrial Dynamical Time (TD) and the Universal \ ...


6

A bit of spelunking reveals that AstronomicalData delegates the calculation of those properties to the function PlanetaryAstronomy`Private`RiseSetsX. You can verify this by evaluating: On[PlanetaryAstronomy`Private`RiseSetsX] AstronomicalData["Moon", "NextRiseTime"] Off[PlanetaryAstronomy`Private`RiseSetsX] My impression is that it is performing a purely ...


6

WolframAlpha["Sunrise june 25, 2013", {{"DaylightInformation", 1}, "ComputableData"}, PodStates -> {"DaylightInformation__More"}] gives {{"begin astronomical twilight", "3:56 am PDT"}, {"begin nautical twilight", "4:40 am PDT"}, {"begin civil twilight", "5:18 am PDT"}, {"sunrise", "5:49 am PDT"}, {"sunset", "8:33 pm PDT"}, {"end ...


6

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


5

How about m = Quantity[AstronomicalData["Earth", "Mass"], AstronomicalData["Earth", "Mass", "Units"]] 5.9721986*10^24 kg m // FullForm Quantity[5.9721985999999999999999999999999999999999202`8.*^24,"Kilograms"]


4

Oh, I was going to say the same thing. Here's a picture instead of me clicking in the little screw icon... This pastes the query into your document (and runs it too): WolframAlpha["Sunrise june 25, 2013", {{"DaylightInformation", 1}, "ComputableData"}] Then I assigned the results to a symbol for further processing.


4

Regarding your first point: The planetary orbital planes are indeed inclined to that of the Earth and you have the inclinations. However, you also need to know the azimuthal locations of the ascending and descending nodes which together define the line about which to pivot the orbital ellipse. Regarding your second point: If you assume, as you say, that ...


4

I have not found good duplicate, and there is none in curated-data so maybe one can find this useful. data = RandomChoice[{1, 2, 3, 4, Missing[]}, {100, 3}]; n = 100; DeleteCases[data, {___, _Missing, ___}]~Do~{n} // Timing // First Cases[data, {_?NumberQ ..}]~Do~{n} // Timing // First Pick[data, FreeQ[#, _Missing] & /@ data, True]~Do~{n} // Timing // ...


4

There is a more general way to solve this. You say that the velocity is $\sqrt{\frac{GM}{r_\rm{orbit}}}$, but let's recognize that this is just a special case of the Vis-viva equation $v = \sqrt{GM(\frac{2}{r}-\frac{1}{a})}$ where $r$ is the distance between the large body and the small body, and $a$ is the semimajor axis. A body with the velocity given by ...


4

Here's your data processed. SetDirectory@NotebookDirectory[]; FileNames["*.fit"] {"Copy of bias6.fit", "Copy of bias7.fit", "Copy of bias8.fit", "Copy of bias9.fit", "Copy of CCD Image 64.fit", "Copy of CCD Image 65.fit", "Copy of CCD Image 66.fit", "Copy of CCD Image 67.fit", "Copy of dark12.fit"} Upload the data: pics = Import[#, "RawData"][[1]] ...


3

An approximation (speed is in m/s and Position in m): AstronomicalData["Mars", {"Speed", {2019, 3, 1, 0, 0, 0}}] Normalize @@ Differences[ AstronomicalData[ "Mars", {"Position", {2019, 3, 1, 0, 0, #}}] & /@ {0, 1}] (* {-22373.4, 8780.75, 734.403} *)


3

The orbit path is given in astronomical units whereas the position is given in meters, so you have to scale: UnitConvert[Quantity[1, "AstronomicalUnit"], "m"] (* Quantity[149597870700, "Meters"] *) Animate[ Graphics3D[ { (AstronomicalData[#, "OrbitPath"] /.Line[a__] :> Line[149597870700 a]) & /@ AstronomicalData["Planet"], ...


2

There are a lot of ways to do that, for example: name = AstronomicalData["Exoplanet"]; radius = AstronomicalData["Exoplanet", "Radius"]; a = AstronomicalData["Exoplanet", "SemimajorAxis"]; planet = {#, AstronomicalData[#, "Radius"]} & /@ {"Neptune", "Saturn"}; data = DeleteCases[Transpose[{name, radius, a}], {_, ...


2

More physics than Mathematica as pointed out in the comments..., but here's my shot at it. G = 6.672*10^-11; m[1] = AstronomicalData["Earth", "Mass"]; tmax = 20000; r[1] = AstronomicalData["Earth", "Radius"]; sol = NDSolve[{θ'[t] == 1/(r[1] + 300000) Sqrt[(G m[1])/(r[1] + 300000)], θ[0] == 50 °}, θ[t], {t, tmax}]; Show[ParametricPlot[{(r[1] + 300000) ...


2

As Sjoerd shows, AstronomicalData[] can be used to determine the altitude of the sun. However, if you do not need too much accuracy, such as in this application, you can use a low-accuracy method for computing the altitude. Most of the formulae I will be using are from (of course) Jean Meeus's Astronomical Algorithms. Some auxiliary routines will be needed. ...



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