Plotting Galactic Longitude from 180 to -180

Plotting Galactic Longitude from 180 to -180

I made a scatter plot in Python that looks like this:

However, I want galactic longitude, l, to be plotted from 180 to -180 like these graphs from Iorio and Belokurov (2019):

Here is the code for my plot:

sns.set_style("ticks") sns.set_context("poster") %matplotlib inline from matplotlib import pyplot as plt fig = plt.figure(figsize=(8,5)) ax = fig.add_subplot(1,1,1, aspect="equal") ax.scatter(rrl_pm.l, rrl_pm.b, s=1, color="black", alpha=0.1) ax.set_xlim(0, 360) ax.set_ylim(-90., 90.) ax.set_xlabel("l [deg]") ax.set_ylabel("b [deg]") textstr = 'N = ' + str(len(rrl_pm.l)) props = dict(boxstyle='round', facecolor="white", alpha=0.5) ax.text(0.05, 0.95, textstr, transform=ax.transAxes, fontsize=16, verticalalignment="top", bbox=props) plt.title("Scatter Plot of Cleaned Sample of RRLs in Sgr dSph with Spatial AND PM Cuts", fontsize = 16) plt.savefig("SP-Clean-Spatial-PM.png">

So essentially it only covers half the sky. Why exactly is this the case and what transformations do I need to apply to the galactic longitude for the 2nd plot to "wrap around" and display both sides?


x, y = rrl_pm.l, rrl_pm.b

The transformation you want is

xx = [(q+180)%360 - 180 for q in x]

Add 180, do modulo 360, then subtract 180.

Then set your limits

ax.set_xlim(180, -180)

import matplotlib.pyplot as plt x = (0, 10, 20, 40, 80, 160, 200, 280, 320, 340, 350) y = (0, 10, 20, 30, 40, 50, -50, -40, -30, -20, -10) fig = plt.figure(figsize=(8,5)) ax = fig.add_subplot(1,1,1, aspect="equal") ax.scatter(x, y) ax.set_xlim(0, 360) ax.set_ylim(-90., 90.) plt.title('Old', fontsize=18) xx = [(q+180)%360 - 180 for q in x] # DO THIS! fig = plt.figure(figsize=(8,5)) ax = fig.add_subplot(1,1,1, aspect="equal") ax.scatter(xx, y) ax.set_xlim(180, -180) ax.set_ylim(-90., 90.) plt.title('New', fontsize=18)

Plotting Galactic Longitude from 180 to -180 - Astronomy

Now let's figure out how longitude works in galactic coordinates. Think of the Earth again. How do you measure longitude on the Earth?

Lines of longitude on the Earth are oriented north and south. They all pass through the North and South Poles. 0 o longitude runs through Greenwich, England. 0 o is the Prime Meridian. If you travel eastward from England 60 o of longitude, you arive at Orsk, Russia. Orsk is at 60 o east. If you travel westward 60 o from England, you arrive in Goose Bay, Newfoundland (Canada). Goose Bay is at 60 o west.

In galactic coordinates, the Prime Meridian, or 0 o is at the galactic center.

Look at the Degrees Longitude diagram. See the bright galactic center and the 0 o line that runs through it. Instead of going from 0 o to 180 o east and 180 o west, galactic coordinates simply go from 0o to 360 o . There is no east/west or plus/minus in galactic longitude coordinates. Remember that 360 o is the same as 2 x 180 o , or 180 o is half of 360 o . Notice on the diagram that directly opposite of the 0 o line is the 180 o line.

Plotting Galactic Longitude from 180 to -180 - Astronomy

Lets compare the location of Sco X-1 on the black and white map to the location of Sco X-1 on this diagram. Where is it on the black and white map? It is in the center, above the galactic plane. Does this mean that it is not in the Milky Way? Not necessarily.

Look at the location of Sco X-1 in the Degrees Longitude diagram. It is nearly at 0 o . It is in the direction of the galactic center similarly, it is near the center of the black and white map.

Do you see now why it seems to be so far above the galactic plane? It is very close to the Earth. The latitude of Sco X-1 is about 24 o . Where would you draw it on the Degrees Latitude diagram?

Longitude & the Crab Nebula

Now lets compare the locations of the Crab Nebula. On the black and white map, it is the bright orange source all the way to the right.

On the Degrees Longitude diagram, it is near 180 o .

Now imagine yourself standing on Earth and looking at the galactic center. Suppose you want to then look at the Crab Nebula. You would have to either go to the other side of the Earth to see it (because you can't see through the Earth!), or you would have to wait for the Earth to spin around so that you are facing the opposite direction. Why do you think you won't be able to see the Crab Nebula if you are looking toward the galactic center?

(hint: compare the location of the Crab on each diagram: Degrees Longitude, Degrees Latitude diagram and Black and White map)

Imagine the night sky as a piece of black paper that is wrapped around the Earth. The seam of the paper (where the edges are taped together) is at 180 o . The Crab Nebula would be close to the seam since it is close to 180 o . Imagine someone pulling the tape off and laying the paper flat on a table. Now where would the Crab be? It would be near the right side of the paper, just as it is on the black and white map!

The black and white map tries to show all parts of the universe on a flat screen.

GaLactic and Extragalactic All-sky Murchison Widefield Array (GLEAM) survey II: Galactic plane 345° < l < 67°, 180° < l < 240°

ext^2$ of the GaLactic and Extragalactic All-sky Murchison Widefield Array (GLEAM) survey, covering half of the accessible galactic plane, across 20 frequency bands sampling 72–231 MHz, with resolution $4, ext-2, ext$ . Unlike previous GLEAM data releases, we used multi-scale CLEAN to better deconvolve large-scale galactic structure. For the galactic longitude ranges $345^circ < l < 67^circ$ , $180^circ < l < 240^circ$ , we provide a compact source catalogue of 22 037 components selected from a 60-MHz bandwidth image centred at 200 MHz, with RMS noise $approx10-20, ext, ext^<-1>$ and position accuracy better than 2 arcsec. The catalogue has a completeness of 50% at $120, ext$ , and a reliability of 99.86%. It covers galactic latitudes $1^circleq|b|leq10^circ$ towards the galactic centre and $|b|leq10^circ$ for other regions, and is available from Vizier images covering $|b|leq10^circ$ for all longitudes are made available on the GLEAM Virtual Observatory (VO).server and SkyView.

Tabular data behaves very similarly to image data such as that shown above, but the data array is a structured Numpy array which requires column access via the item notation:

Try and read in one of your own FITS files using , and see if you can also plot the array values in Matplotlib. Also, examine the header, and try and extract individual values. You can even try and modify the data/header and write the data back out - but take care not to write over the original file!

Read in the LAT Point Source Catalog and make a scatter plot of the Galactic Coordinates of the sources (complete with axis labels). Bonus points if you can make the plot go between -180 and 180 instead of 0 and 360 degrees. Note that the Point Source Catalog contains the Galactic Coordinates, so no need to convert them.

Question: Please Help Me Answer These Astronomy Questions: ( Information For Previous Questions Are Posted Below) Information Of Previous Question:

150 known Milky Way globular clusters are shown as black dots in Figure 10.5. This is a polar graph, organized such that the two coordinates used are distance from the center and angle around from "east," the direction of the traditional positive x-axis Each circle is 1 kiloparsec (kpc =- 1,000 pc) farther from the center, and each radial line repre- sents 15 degrees of galactic longitude. For example, find the globular cluster designated by a star symbol that is located at galactic longitude 180 degrees and almost10 kpc from the center. The dots at the edges of the graph represent clusters that are farther away than 19 kpc. The farthest cluster is at a projected distance of 36 kpc. The Sun and Earth are at the very center of this graph Distance from Sun in kiloparsecs 18 17 16 15 Galactic longitude 0-360 degrees 1490 13 12 105 75 60 120 11 10 135 45 150 30 7 65 15 Sun 80 0 360 3 345 1957 210 330 80 9 315 225 10 11 12 13 270 300 240 285 255 14 Galactio longitude. 0-360 degrees 15 16 17 18 Distance from Sun in kiloparsecs Figure 10.5 The three-dimension distribution of globular clusters projected on a sheet 5. The galactic longitude of M15 is 65° the galactic longitude of RU 106 is 301°. Based on these coordinates and the distances you found in Step 2, mark the location of M15 and RU 106 on Figure 10.5 6. Find the center of the distribution of globular clusters. One way to do this is to use a small circular object about the size of a quarter or water bottle cap and try to include as many globular clusters as possible within the circumference of the object you use. Make ."X" on the graph at the center of the distribution an 7. Estimate the distance from the Sun to the center of the distribution of clusters. Distance kpс Estimate the radius of the Milky Way based on the full extent of the distribution of clus ters. (Hint: Look at the farthest distances for the clusters on the graph or find the stated value that is given somewhere in this activity.) 8 Radius kpс 9. Determine the direction to the center of the distribution of clusters. This is the direction to the center of the galaxy Longitude to center of the distribution degrees 3) Average magnitude for M15 m 15.70 Average magnitude for RU106 m 17.72 4) M15 RU106 a) m-M+5 = 15.70-0.6+5 = 20.1 m-M+5 17.72-0.6+5 = 22.12 b) 20.1/ 5 4.02 22.12/5 4.42 c) M15 10 4.02 10471.285 pc RU106 10^4.42 26302.68 pc

Aitoff projection¶

This function was ported from the IDL Astronomy User’s Library.

NAME: AITOFF PURPOSE: Convert longitude, latitude to X,Y using an AITOFF projection. EXPLANATION: This procedure can be used to create an all-sky map in Galactic coordinates with an equal-area Aitoff projection. Output map coordinates are zero longitude centered. CALLING SEQUENCE: AITOFF, L, B, X, Y INPUTS: L - longitude - scalar or vector, in degrees B - latitude - same number of elements as L, in degrees OUTPUTS: X - X coordinate, same number of elements as L. X is normalized to be between -180 and 180 Y - Y coordinate, same number of elements as L. Y is normalized to be between -90 and 90. NOTES: See AIPS memo No. 46, page 4, for details of the algorithm. This version of AITOFF assumes the projection is centered at b=0 degrees. REVISION HISTORY:

Written W.B. Landsman STX December 1989 Modified for Unix:

Converted to IDL V5.0 W. Landsman September 1997

Carry out an inverse Aitoff projection.

This function reverts to aitoff projection made by the function aitoff. The result is either two floats or arrays (depending on whether float or array was used as input) representing longitude and latitude. Both are given in degrees with -180 < longitude < +180 and -90 < latitude < 90.

A value between -180. and +180. (see convention in aitoff function).

y : float or array

A value between -90. and +90 (see convention in aitoff function).

If arrays are used for input, the function returns an array for the longitude, for the latitude, and an index array containing those array indices for which the reprojection could be carried out.

Deriving The Shape Of The Galactic Stellar Disc

While analysing the complex structure of the Milky Way, an international team of astronomers from Italy and the United Kingdom has recently derived the shape of the Galactic outer stellar disc, and provided the strongest evidence that, besides being warped, it is at least 70% more extended than previously thought. Their findings will be reported in an upcoming issue of Astronomy & Astrophysics, and is a new step in understanding the large-scale structure of our Galaxy.

Using the 2MASS all-sky near infrared catalogue, Yazan Momany and his collaborators reconstructed the outer structure of the Galactic stellar disc, in particular, its warp. Their work will soon be published in Astronomy & Astrophysics. Observationally, the warp is a bending of the Galactic plane upwards in the first and second Galactic longitude quadrants (0<l<180 degrees) and downwards in the third and fourth quadrants (180<l<360 degrees). Although the origin of the warp remains unknown, this feature is seen to be a ubiquitous property of all spiral galaxies. As we are located inside the Galactic disc, it is difficult to unveil specific details of its shape. To appreciate a warped stellar disc one should, therefore, look at other galaxies. Figure 1 shows a good example of what a warped galaxy looks like.

The disc of our Galaxy is made up of three major components: the stellar, the gaseous, and the interstellar dust components. The warping of the gas and dust component has been well established and documented. In particular, the gaseous component is known to be warped and to extend out to 25,000 parsecs (pc). In contrast, the true extent of this stellar warping is still being debated. Over the past years, there has been changing evidence of a difference in the warp amplitude between stars and gas. These studies have led to the idea that the Milky Way stellar disc is truncated beyond 14,000 pc from the Galactic centre.

The new analysis by Momany and his team provides the first clear and complete view of the outer stellar disc warp. They analyzed the distribution of over 115 million stars from the all-sky 2MASS catalogue that comprise the totality of the Galactic disc. Among the many different stellar types, M-giant stars were found to be the ideal stellar tracer for reconstructing the outer disc structure. They are, in fact, highly luminous but relatively cool and evolved stars, and these unique properties allow better determination of their distance. The analysis also shows that M-giants stars located at distances between 3,000 and of 17,000 pc from the Sun draw the same stellar warp signature. This means that a global and large-scale Milky Way feature has been identified to about 25,000 pc from the Galactic centre: the team thus clearly demonstrates that there is no truncation of the stellar disc beyond 14,000 pc. The figures below illustrate the shape of the Galactic outer stellar disc. Figure 2 shows the density maps as derived from the 2MASS M-giant sample at 14,000 pc from the Galactic centre. The presence of the warp is quite clear at both ends of the stellar disc. Figure 3 quantitatively shows the amplitude and orientation of the disc&rsquos stellar warp as a function of the Galactic longitude. It also shows the consistency of the warp signature in the three disc components (gas, dust, and stars). It is a natural consequence of the close physical correlation between these three Galactic disc components, and proves once more the existence of a global and regular warp signature for the Galactic disc.

Last but not least, this new evidence of an extended and warped Milky Way stellar disc allows the team to solve a heated debate among astronomers. In the past years, astronomers have identified over-densities in the opposite direction to the Galactic centre. Located in the Galactic plane, they stretch over 100 degrees in Monoceros constellation. Known as the Monoceros Ring, this over-density was believed to be the remnant of a dwarf satellite galaxy cannibalised by the Milky Way. Another well-known example exists in the Sagittarius constellation of how the Milky Way halo is continuously building up by means of cannibalised smaller galaxies. Recently, an over-density located in Canis Major was associated to the Monoceros Ring and identified as the core of a satellite galaxy currently being accreted into the Galactic plane. Momany and colleagues&rsquo work, however, casts serious doubt on this scenario. They show that the Canis Major over-density is easily explained by the imprint of the Galactic warp. They may also be able to explain the Monoceros Ring by the complex structure of the outer disc, but they cannot offer a definite conclusion about this issue yet, as very little is known about the Monoceros Ring. It seems, however, that the Sagittarius dwarf remains the only example we have for the moment of how our Milky Way is still growing by cannibalising smaller galaxies.

Plotting Galactic Longitude from 180 to -180 - Astronomy

Hydrogen Line Observing Group
Amateur Radio Astronomy
located 51 14'53.1N 1 34'15.6W

The objectives of the Hydrogen Line Observing Group ( HLOG ) are to use a back yard radio telescope to make observations of radiation from Neutral Hydrogen. Initially our observations will be limited to Galactic Hydrogen and the data collected is being used to help us understand the shape, structure and motion of our Galaxy, the Milky Way.

The Telescope is a 3.7m dia ex Ku Band dish with an f/d of 0.43. It is fed with a dual mode feed horn located at the prime focus.
Located at the rear of the Feed Horn are the LNA, a G4DDK VLNA tuned for 1420MHz and a down converter to a fixed IF of 144MHz. The Noise figure of the VLNA is 0.26dB and when coupled with the slight under illumination of the dish ground noise and side lobes have been minimised to achieve a system temperature of about 48K.

Plotting Galactic Longitude from 180 to -180 - Astronomy

In addition to studying the motions of stars, we can use observations of other types of objects to help determine the structure of the galaxy. For example, the distribution of gas and dust may be different from the distribution for stars.

Recall that the hyperfine splitting (electron spin-flip) of the hydrogen ground state can be studied at the characteristic wavelength of photons emitted--21 cm in the radio part of the spectrum. This emission is very optically thin, but there are so many H I atoms (neutral hydrogen) that the emission line can be seen everywhere in the galaxy--there is very little obscuration. This is a prime method for delineating spiral structure in our galaxy. If we know the rotation curve for the galaxy and assume that the gas is in circular orbit around the galactic center, we can use 21-cm line profiles to map the spiral arms.

Here is how it works: Along a given line of sight, say there are four clouds A, B, C, and D. Each is in its own orbit around the galaxy, and so has a different radial velocity, so what would be a single line is split into several components as shown above. Note that the highest velocity peak is the one that lies closest to the center of the galaxy along that line of sight, which is the distance R min . From different lines of sight, we build up maps of spiral arms. Note that the spiral structure is poorly determined towards l = 0, 180 (why?).

A has the greatest angular speed and is moving fastest away from the Sun. A has higher density of hydrogen, so appears with the highest intensity. B and C are moving at about the same angular speed, greater than the Sun's angular speed. D is outside the solar distance, so has slower angular speed, and also has the lowest hydrogen density. (This image is from Nick Strobel's web site.)

  • gas (no, should see absorption or emission lines of stars shining through it)
  • dust (no, dust causes extinction of starlight, and glows in the IR)
  • MACHOs-- Massive, compact halo objects ? (e.g. small, faint stars such as black dwarfs [dead white dwarfs], brown dwarfs [failed stars], neutron stars, or black holes)?
  • WIMPs-- Weakly interacting massive particles ? (e.g. neutrinos, or some as-yet-undiscovered particle)?

Note that galactic rotation curves are even easier to measure in other galaxies, and they all show this same tendency for a dark matter halo. We will see that the dark matter problem only continues to get more extreme as we consider larger scale structures of the universe.
A series of rotation curves for spiral galaxies. (Figure from Rubin, Ford, and Thonnard (1978), Ap. J. Lett., 225, L107.) Structure of the Galaxy

When we map the locations of neutral hydrogen clouds using the technique of interpreting line profiles, as discussed above, we find that the gas clouds tend to be distributed in clumps. When these clumps are mapped as a function of galactic longitude and distance (assuming a rotation curve for the galaxy) we find that they lie along discrete spiral arms. From this we learn that our galaxy is a spiral galaxy, similar to the Andromeda galaxy, or the M100 galaxy shown below.


The mathematics converting Milky Way velocity to distance is more distorting than a mirror in an amusement park or Escher print.

Ever since Isaac Newton broke sunlight into a rainbow with a glass prism, scientists have realised that light and other forms of electromagnetic radiation contain hidden information. Research has shown that radiation can be used to determine the temperature, chemical composition and even the velocity of the objects that emit it.

A distorted mirror

Astronomers have long sought to combine two crucial pieces of information: the fact that the Milky Way galaxy rotates and the fact that atomic hydrogen releases radio emission at a wavelength of 21 cm, to produce a map of the galaxy.

The reasoning is that the overall velocity of hydrogen gas in the Milky Way must be determined by the rotation of the galaxy and so if we can use precise radio measurements to determine the velocity of the gas relative to the Sun and we have an accurate rotational model of the Milky Way, we can turn velocity measurements into distance measurements and so create a 3D map of the galaxy.

This grand dream, called kinematic distance estimation, has run into two main difficulties:

  • The Milky Way does not in fact have a simple rotational model. The two inner spiral arms, called the near and far 3kpc arms, are expanding away from the central bar at about 50 kilometres per second. The gas in the Perseus arm streams along the arm as well as rotating with the galaxy. Increasing evidence suggests that stars and other denser objects may rotate at a different speed than the cold gas.
  • The mathematical models that convert velocity to distance always have two possible values for any object closer to the galactic centre than the Sun. It is sometimes difficult to choose between these near and far values. Moreover, simple rotational models squeeze the radial velocity of all objects in the direction of the centre of the galaxy (0° galactic longitude) and its opposite, "anticentre" direction, 180°, down to zero. This velocity blending and velocity compression are more distorting than a mirror in an amusement park or an Escher print, making reconstructing the original map a major challenge.

Other options

There are two other major distance estimation techniques, parallax and photometric estimates, but both have their own problems. The gold standard, parallax is the most accurate. Recent breakthroughs in radio astronomy have allowed parallax measurements at least as far away as the central bar, but the measurements are time consuming and so far distances to only a few dozen distant objects have been completed. The Gaia satellite, launched in December 2013, should measure parallax for up to a billion stars, producing much more detail, but only for unobscured stars in a large region on the near side of the galaxy.

Photometric estimates use data on the temperature of stars and by comparing their observed brightness to their temperature, attempt to estimate their distance.

Both Gaia and photometric techniques require observing stars, which are often obscured by dust or too far away to observe accurately. Velocity measurements, on the other hand, are available for hydrogen gas even on the far side of our galaxy.

It seems likely that a full map of the Milky Way will be completed only by combining radio parallax and kinematic techniques. Radio parallax measurements could be used to calibrate and correct the mathematical models used to convert velocity data into distances.

Looking into the mirror

To provide more insight into the distortions caused by the mathematical models that convert velocity into distance (and vice versa), I have created a web animation. The animation, which is available here, requires a modern HTML5 browser and probably will not work with Internet Explorer. It has been tested with Firefox, Chrome and Safari. It works best on a large display. You may wish to view it in full screen mode.

The animation consists of three images.

The first image shows the eight major components contained in standard models of the visible disk of the Milky Way. These are the four main spiral arms, the central bar, the two inner near and far 3kpc arms that ring the central bar, and the Orion spur, the structure located between the Sagittarius and Perseus arms within which our own Sun is located.

The second image shows how those components would get converted into a velocity map given a very simple rotational model of the Milky Way. This model assumes that the distance between the Sun and the centre of the galaxy is 8000 parsecs and that every part of the galaxy rotates at exactly the same speed: 210 km/s.

If you click on one of the components in the first image, the second image will change to show how it would appear in a velocity map. If you click away from these components, the second image will again show the blended results of all eight components. As you can see, the inner galaxy gets mapped to overlapping parts of the velocity image, and all the objects in the directions of the galactic centre and anticentre get mapped to a single point.

The third image is an actual velocity map of the Milky Way constructed using data from the LAB HI survey of atomic hydrogen gas. There are many differences of detail between the actual velocity map in the third image and the theoretical velocity map in the second image, but what is striking is that the overall pattern is remarkably similar, despite the extreme simplicity of the rotational model used to create the second image.

It was an enormous surprise when astronomers discovered that most hydrogen gas in the Milky Way rotates about the galactic centre at approximately the same rate. This is in sharp contrast to planets in our solar system, where the outer planets rotate around the sun much more slowly than the inner planets. The most popular explanation for the peculiar behaviour of the Milky Way (and other galaxies) is large amounts of the mysterious dark matter.

By comparing the three images, you can see that all eight components of the standard model of the Milky Way are reflected in the real velocity data, and indeed velocity measurements of atomic hydrogen are what led to the creation of the standard model in the first place.

Velocity images

The third velocity image and a number of other images are available below in much greater detail.

The images were constructed using either the LAB HI atomic hydrogen survey mentioned above or a second survey of molecular gas.

In all cases the images were created in Blender from 3D meshes generated from the velocity data using a marching cubes algorithm to create isosurfaces of constant gas temperature.

The marching cubes algorithm is most often used by medical researchers and technicians to convert MRI scans into 3D models of the brain and other tissues. Recently astronomers have become interested in applying the same techniques to astronomical objects.

Each of the thumbnails below leads to a separate page with a larger preview image and a caption. Each page also has a download link to a much more detailed full size image, which is many thousands of pixels in width and height.

Watch the video: How to plot a GPS-derived fix on a paper chart (September 2021).