ReportGalacticDynamics Jesus Sevilla PHY3111

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Galactic dynamics

Jesús Sevilla Pérez


April 2021 University of Malta

Abstract
The aim of this experiment was to study the differences in the geometry and properties
between barred and unbarred disc galaxies. For that purpose, the analysis of two galactic sim-
ulations has been carried out by using Pynbody, the python analysis package for astrophysical
N-body and smooth particle hydrodynamics simulations. Several images have been rendered
showing and comparing the stellar and gas components of the simulations. Then, the proper-
ties of a Peanut/Boxy bulge have been examined by taking profiles studying the stellar mass
distribution inside that region for stars at various heights above midplane and within different
age intervals. Finally, newly formed stars were considered and the observed star formation rate
inside the bulge has been contrasted with the previously presented background theory.

1. INTRODUCTION classify them. Based on their visual appearance


and morphology, Edwin Hubble created the now
Galaxy formation and evolution is one of the called Hubble sequence, which is the most im-
branches of physics with more interesting un- portant morphological classification scheme for
knowns, and it is yet impressive how far science galaxies. It divides them into four main groups:
has gone since the first boost that was provided ellipticals, spiral, lenticulars and irregulars [1].
by Edwin Hubble’ studies in the topic, specially A scheme of the regular galaxies is shown in
when our incapability of conducting experiments Figure 1. This project will be mostly focused
in the outer space is considered. on spiral galaxies.
In this report, a humble and suitable for an
undergrad student approach to barred spiral
galaxies and their characteristic peanut-shaped
bulge is presented. A subject that has been un-
der research for various decades and that is still
being widely studied for its crucial importance
at the time of understanding the formation and
dynamics of galaxies.

2. BACKGROUND THEORY

2.1. Galaxy morphological classification


Figure 1: The Hubble tunning fork. Adapted
Galaxies are systems comprised of stars, gas, from [7].
dust and mostly, dark matter, all of them grav-
itationally tied together [8].
Different criteria can be followed in order to

1
Figure 2: Components of a typical disk galaxy.
Adapted from [17].

2.2. Barred spiral galaxies Figure 3: Face-on view of The Milky Way.
Spiral galaxies, along with lenticular galaxies, Adapted from [6].
are disk galaxies [16] and as such, they are com-
posed of a central bulge made up of stars; a to a more random movement in the nucleus
flat rotating disk that can be separated into a of the resulting galaxy that would form the
thick (stars and gas) and a thin (only stars) com- bulge. This theory was in agreement with nu-
ponents; and a stellar halo embedding all this, merous old studies which had only found old
which is a spherical population of stars and glob- stars forming bulges [9]. These studies were
ular clusters [17]. Such a structure is presented based on photometry, a technique that might
in Figure 2. had been affected by dust obscuring important
For this project, a particular type of spiral data [15]. However, more recent studies based on
galaxies are of interest: barred spiral galaxies. infrared cameras and gravitational microlensing
These have a pronounced central bar feature [13] allow younger stars to form inside the bulge
in the disc plane composed of stars that has a (which would still be mainly composed of older
strong influence in the dynamics of the galaxy stars). This raises doubts about its formation
[2]. and is consider as evidence for a secular evo-
Barred galaxies have been found to be a ma- lution within the bulge. Recent research carried
jority, with approximately a 60% of spirals being out with high resolution galactic simulations also
barred [4]. points towards the latter theory [9].
The Milky Way, in which the Solar System is In the particular case of barred spirals, the
found, is itself a barred spiral galaxy. Figure 3 present hypothesis is that the bar feature chan-
shows a face-on view of The Milky Way, where nels gas inwards the bulge from the arms of the
its bar can be clearly identified. spiral using orbital resonance, fueling star birth
at the center of the galaxies [5].
2.3. Bulge formation and barred spirals
2.4. Peanut/Boxy/X-shaped bulges in
It has been traditionally believed that the bulges
spiral galaxies
in the galaxies’ center were formed by merging
of two more planar galactic structures. As a Several spiral galaxies display boxy, peanut or
result of the collision, the orbits of the stars X-shaped bulges when viewed side-on [3].
would be gravitationally disturbed, giving rise These components are due to disc and bar in-

2
stabilities and are composed of disc material [11]. 2.5.2. ESO 597-G036
They have recently been widely observed and
their formation and evolution has been studied Another remarkably visual example of a clear
in depth with the help of simulations (like the P/B bulge is the one of ESO 597-G036, which is
recent [10]), to understand their structure, ori- shown in Figure 5.
gin and their possible link to secular evolution.
More information on the latter concept can be
found in the references [18].
It has been observed that shortly after bars
are formed they become vertically unstable and,
that instability might lead itself to buckle out of
the equatorial plane of the galaxy. Possibly fol-
lowing this non-equilibrium state the inner parts
of the bar thicken remarkably and take the shape
of a box while the bar weakens. Posterior evo- Figure 5: Peanut/Boxy bulge in ESO 597-G036.
lution that escapes the scope of this report (but [Credit: NASA, ESA and the Hubble Heritage
that can be found at the references) can lead Team (STScI/AURA).]
with time to peanut- or X- like shape [11].

2.5.3. NGC 4710


2.5. Galaxies showing P/B bulge
One more final example of a P/B bulge is found
2.5.1. The Milky Way in the galaxy NGC 4710, which is presented in
Although the boxy character of the Milky Way’s Figure 6.
bulge has been questioned and debated by the
scientific community for a long time, latter im-
ages taken using the Wide-Field Infrared Sur-
vey Explorer, an infrared-wavelength astronom-
ical space telescope launched in December 2009
by NASA, has proven the bulge’s boxy shape,
which is shown in Figure 4.

Figure 6: Peanut/Boxy bulge in NGC


4710.[Credit:NASA,ESA and and P. Goudfrooij
(STScI).]

3. METHODOLOGY

3.1. Equipment

Figure 4: Contrast enhanced and zoomed-in The experiment has been completely software
Wide-Field Infrared Survey Explorer (WISE) based and the only required tool has been
image of the Milky Way’s boxy bulge. Adapted Python 3 with the packages Pynbody, Mat-
from [12]. plotlib, Numpy and Scipy, along with the results
of two simulations of different galaxies first la-
belled as Run708main and Run708mainDiff.

3
3.2. Procedure 3.2.2. Effects of the P/B bulgue on the stel-
lar density.
3.2.1. Start-up and identification of the
barred galaxy For this part of the analysis, the barred simula-
tion was first rotated so that the bar was aligned
In this section remarkable parts of the used code
with the x-axis. The rotation was applied with
or commands which were important for the pro-
the funtion rotate z().
cedure are explained. However, more technical
Then, with the aim of studying the galaxies’
details can be found in Appendix A, where a
bulge, both galaxies were set to be side-on with
script with the code used for every task is pre-
pyn.analysis.angmom.sideon() and side-on
sented.
images of the stars within a radius of 4 kpc were
After the required packages were imported,
taken (using again pyn.plot.stars.render()).
the physical units for the distances and veloc-
A first observation to the dependence of the
ities for both galaxies were set to be kpc and
stellar mass distribution inside the bulge on the
km/s, respectively. This was done by creating
age of the stars was done by repeating the same
two text files with names Run708main.units and
images for the stars grouped by the filters given
Run708mainDiff.units with the following con-
by:
tent [14]:

pos: kpc a pyn.filt.LowPass('age','2Gyr')


vel: km s^-1 pyn.filt.BandPass('age','2Gyr','4Gyr')
mass: Msol pyn.filt.BandPass('age','4Gyr','6Gyr')
pyn.filt.BandPass('age','6Gyr','8Gyr')
The galaxies were then loaded and labelled as pyn.filt.HighPass('age','8Gyr')
g1 and g2, and their appearance was set to be
face-on. For g1: Stars were thus separated into groups with less
than 2 Gyr, between 2 and 4 Gyr, between 4 and
g1 = pyn.load("run708main.01000") 6, between 6 and 8, and finally, those with more
g1.physical_units() than 8 Gyr. Stars with less than 2 Gyr can be
pyn.analysis.angmom.faceon(g1) considered as young stars and, in the same way,
stars with more than 8 Gyr are considered old
Then, the mass of the stellar, gaseous and dark stars.
matter components of each galaxy were com- In order to study their distribution along the
puted by making use of the galaxies’ attributes. z-axis, a profile was done comparing the ver-
For g1: tical density of these groups for each simula-
M1_s = np.sum(g1.s["mass"]) tion. The used command for this task was
M1_g = np.sum(g1.g["mass"]) pyn.analysis.profile.VerticalProfile().
M1_dm = np.sum(g1.dm["mass"]) Then, for the purpose of analyzing the influ-
M1 = M1_s+M1_g+M1_dm ence that the B/P bulge could have over the
mass distribution, another profile was obtained
A first aim of this experiment was to identify for stars at different heights above midplane.
the barred galaxy. For this purpose, images of Guided by the stellar distribution that was ob-
their stellar and gaseous components were gen- served in the previously rendered images, stars
erated by using pyn.plot.stars.render() and in both galaxies were divided into four groups,
pyn.plot.image(), respectively. each fulfilling each of the following conditions:
Furthermore, a profile of the stellar |z| ≤ 0.25, 0.25 ≤ |z| ≤ 0.75, 0.75 ≤ |z| ≤ 1 and
radial density of each galaxy was ob- 1 ≤ |z| ≤ 1.25 (assuming kpc as the unit of dis-
tained for both simulations making use of tance). For doing so, an illustrating pseudo-code
pyn.analysis.profile.Profile(). of the one used would be:

4
LowStars = g1.s[(abs(g1.s['z'])<=0.25)] Mass/M g1 g2
MedlowStars = Stellar 6.530110 · 1010 6.692863 · 1010
,→ g1.s[(abs(g1.s['z'])>0.25)& Gas 6.983023 · 1010 6.820270 · 1010
,→ (abs(g1.s['z'])<=0.50)] Dark matter 1.216182 · 1012 1.216182 · 1012
MedStars = g1.s[(abs(g1.s['z'])>0.50)& Total 1.351313 · 1012 1.351313 · 1012
,→ (abs(g1.s['z'])<=0.75)]
MedhighStars = Table 1: Masses of the stellar, gas and dark mat-
,→ g1.s[(abs(g1.s['z'])>0.75)& ter components of each simulation.
,→ (abs(g1.s['z'])<=1)]
HighStars = g1.s[(abs(g1.s['z'])>1)&
In Figure 8 it can be clearly distinguished the
,→ (abs(g1.s['z'])<=1.25)]
central bar feature of g1 that extends diagonally
Profiles were then repeated using the same pro- from y ∼ −2 kpc to y ∼ 2 kpc, while in Fig-
cedure above explained. ure 8b, the arms of the gas spirals are appre-
The height interval 0.75 ≤ |z| ≤ 1 kpc was ciated to be born at the regions that coincide
of particular interest since it corresponds to the with the edges of the bar, which is a common
edge of the bulge and the results for density pro- characteristic between barred galaxies.
files could be contrasted with the previously ob- On the other hand, g2 seems to be an almost
tained images. Thus, for this particular interval, perfect spirally symmetric galaxy, with its pos-
radial density profiles were taken for stars sepa- sible degree of barred galaxy being absolutely
rated by their age as before. negligible.
The stellar mass distribution is shown as a
3.2.3. Newly formed stars
profile of the stellar radial density for both sim-
ulations in Figure 7.
The rate of star formation was studied by
rendering images of the stars under 0.1 1011
Gyr in both galaxies (applying the filter g1
pyn.filt.LowPass(‘age’,‘0.1 Gyr’)) and g2
109
getting radial density profiles. The obtained
results when compared with the images of
Σ/M kpc−2

the gas component in order to test hypothesis 107


presented in the theoretical background.
105
4. ANALYSIS OF RESULTS

4.1. Mass of each component and identi- 103


fication of the barred galaxy
The obtained masses are presented in Table 1. 0 10 20 30
There, it is shown how, despite both of them r/kpc
having the same total mass, it is slightly differ-
Figure 7: Stellar radial density for both simula-
ently distributed, with g1 having a more massive
tions (logaritmic scale at the vertical axis).
gas component and g2 having a more massive
stellar component. Both of them have the same
dark matter mass as well. It is there appreciated how, due to the pres-
Figures 8 and 9 show rendered images of the ence of the bar, and taking into account that
star component and a map with the gas matter both galaxies have almost the same stellar mass
density for g1 and g2, respectively. (see Table 1), g1 shows a lower mass density near

5
6 6
1010
4 4
109
2 2

ρ/M kpc−3
y/kpc

108

y/kpc
0 0

−2 107
−2

−4 −4 106

−6 −6 105
−5 0 5 −5 0 5
x/kpc x/kpc

(a) Face-on view of the stars in g1. (b) Face-on view of the gas in g1.

Figure 8: Rendered images for the stellar and gas components of g1.

6 1012
6
4 4

2 1010
2

ρ/M kpc−3
y/kpc

y/kpc

0 0
108
−2 −2

−4 −4
106
−6 −6
−5 0 5 −5 0 5
x/kpc x/kpc
(a) Face-on view of the stars in g2. (b) Face-on view of the gas in g2.

Figure 9: Rendered images for the stellar and gas components of g2.

6
r = 0 which is, however, more radially dis-
tributed. < 2 Gyr
On the other hand, g2 starts with a higher 2 ∼ 4 Gyr
density that decays slightly faster due to it hav- 108 4 ∼ 6 Gyr
ing its masscontained in a smaller circularly

ρ/M kpc−3
6 ∼ 8 Gyr
shaped region, reaching a point where its den-
> 8 Gyr
sity becomes lower than the one of g1. 106

4.2. Effect of a P/B bulgue on the


galaxy’s properties
104
4.2.1. Mass distribution of stars with differ-
ent ages.
0 2 4 6
The rendered side-on images for stars within dif- z/kpc
ferent age ranges are presented, along with side-
on views of both galaxies in Figure 12. Figure 10: Mass distribution of stars in g1 with
There, it can be seen that for both galax- different ages over the z-axis.
ies, younger stars (subfigures 12a and 12b) are
mainly contained in the midplane and then, the
older they are the higher their positions are < 2 Gyr
above the galactic disc, giving raise to a more 2 ∼ 4 Gyr
prominent bulge (12g,12h). 108 4 ∼ 6 Gyr
In the case of g1, the latter is observed to take
ρ/M kpc−3

6 ∼ 8 Gyr
the sought-after P/B shape. Figure 12g shows
> 8 Gyr
that the old-intermediate stars form a ribbon(or 106
X)/peanut shape, while the older stars from Fig-
ure 12i show a tendency to form a more boxy
shape. It is the superposition of both of them
104
what leads to the characteristic shape appreci-
ated when the entire galaxy is observed (Fig-
ure 12k). 0 2 4 6
On the other hand, a clearly spherical distri- z/kpc
bution is shown for the bulge formed by stars
of all ages in g2. This would continuously ex- Figure 11: Mass distribution of stars in g2 with
pand for older stars with its shape remaining different ages over the z-axis.
unchanged.
Profiles with the mass density of the stars with
The difference between Figures 10 and 11 lies
different ages against their height (z-axis) are
at the rate at which the density decreases with
shown in Figures 10 and 11.
the distance, which is seen to be much lower for
For both galaxies it is shown how older stars
the barred galaxy. That is, stars appear to get
get to reach higher distances over midplane, as it
greater heights above midplane without showing
was already deducted from Figure 12. It is also
a that abrupt decline in their numbers, which is
to be remarked than the lines in both graphs do
clearly a consequence of the bulge’s geometry.
not intersect each other, which means that for
The effect is present for all ages and thus ev-
any chosen height, older stars will always have a
ery density line ends in a greater value of z for
greater contribution to the total mass density of
Figure 10 than for Figure 11.
the galaxy.

7
1 1
z/kpc

z/kpc
0 0

−1 −1
−4 −2 0 2 4 −4 −2 0 2 4
x/kpc x/kpc
(a) Stars in g1 with less than 2 Gyr. (b) Stars in g2 with less than 2 Gyr.

1 1
z/kpc

z/kpc
0 0

−1 −1
−4 −2 0 2 4 −4 −2 0 2 4
x/kpc x/kpc
(c) Stars in g1 between 2 and 4 Gyr. (d) Stars in g2 between 2 and 4 Gyr.

1 1
z/kpc

z/kpc

0 0

−1 −1
−4 −2 0 2 4 −4 −2 0 2 4
x/kpc x/kpc
(e) Stars in g1 between 4 and 6 Gyr. (f) Stars in g2 between 4 and 6 Gyr.

1 1
z/kpc

z/kpc

0 0

−1 −1
−4 −2 0 2 4 −4 −2 0 2 4
x/kpc x/kpc
(g) Stars in g1 between 6 and 8 Gyr. (h) Stars in g2 between 6 and 8 Gyr.

Figure 12: Side-on view of stars with different ages for both simulations. Images at the left belong
to g1 (barred galaxy) and images at the right belong to g2 (unbarred galaxy). Subfigures 12k and
12l show the entire galaxies.

8
1 1
z/kpc

z/kpc
0 0

−1 −1
−4 −2 0 2 4 −4 −2 0 2 4
x/kpc x/kpc
(i) Stars in g1 with more than 8 Gyr. (j) Stars in g2 with more than 8 Gyr.

1 1
z/kpc

z/kpc
0 0

−1 −1
−4 −2 0 2 4 −4 −2 0 2 4
x/kpc x/kpc
(k) Side-on view of g1. (l) Side-on view of g2.

Figure 12: Side-on view of stars with different ages for both simulations. Images at the left belong
to g1 (barred galaxy) and images at the right belong to g2 (unbarred galaxy). Subfigures 12k and
12l show the entire galaxies. (cont.)

4.2.2. Radial density of stars at different


heights above midplane.
1011 |z| < 0.25 kpc
0.25 < |z| < 0.5 kpc
0.5 < |z| < 0.75 kpc
Radial density profiles for stars at different 1010 0.75 < |z| < 1 kpc
heights are presented in Figures 13 and 14 for
Σ/M kpc−2

1 < |z| < 1.25 kpc


both galaxies. 9
10
From Figure 13 it can be appreciated that
the geometry of the P/B bulge becomes more
present for stars at a greater height above mid- 108
plane (that are still inside the bulge), being the
boxy shape perfectly recognisable from the step 107
that the function shows at r ∼ 1.5 kpc for stars
with |z| > 0.75 kpc. 0 1 2 3 4
On the other hand, lower stars have a density r/kpc
profile more similar to that of stars in g2, which
shows what would be expected from a more spi- Figure 13: Radial density profiles for stars at
rally symmetric galaxy. For them, the density different heights in g1.
decreases with the radius gradually and reveal-
ing a more spherical bulge. the images previously presented in Figure 12.
It is interesting to study the stars located be- For this purpose, Figure 15 shows density pro-
tween 0.75 and 1 kpc above midplane, for they files for stars in g1 located in that interval sepa-
can be contrasted with the shapes observed in rated by their ages.

9
that the shape of the density profiles matches
|z| < 0.25 kpc
1011 perfectly with the shape of the bulge that is
0.25 < |z| < 0.5 kpc
0.5 < |z| < 0.75 kpc
found in Figure 12, particularly for stars that
10
10 0.75 < |z| < 1 kpc are more than 6 Gyr, since younger stars have
Σ/M kpc−2

1 < |z| < 1.25 kpc not enough relative density to be distinguish-
10 9 able in the rendered images. Medium age stars
are found to show a ribbon(or X)/peanut shape,
108 while, as they get older, they tend to expand
forming the sought-after boxy shape.
This supports the theoretical background
107
given in subsection 2.3, saying that this kind of
bulges appear as a consequence of the bar’s in-
0 1 2 3 4 stability, which leads to a bulking process that
r/kpc gives the X/peanut shape through secular evo-
lution. This would also explain the fact that
Figure 14: Radial density profiles for stars at older stars are found at higher distances over
different heights in g2. midplane.

4.2.3. Newly formed stars in the bulge


< 2 Gyr Face and side-on images of the stars that are less
2 ∼ 4 Gyr than 0.1 Gyr in both galaxies are presented in
107 4 ∼ 6 Gyr
Figure 16.
6 ∼ 8 Gyr
Furthermore, in order to get quantitative in-
Σ/M kpc−2

> 8 Gyr
106 formation about the mass distribution of these
stars in the galaxies, radial density profiles are
shown in Figure 17.
105 In the case of g1, Figures 16a and 17a show
that recently born stars are entirely constrained
to the midplane of the disk and the majority of
104 them are concentrated inside the bulge. Addi-
0 1 2 3 4 tionally, out of it the star density remains almost
r/kpc constant along the galactic disk. This result is
not surprising when compared with Figure 8b
Figure 15: Density profile of stars in g1 with and knowing that stars are born from high gas
0.75 < |z| < 1 kpc sparated by their age. concentrations inside the galaxy, since it is ap-
preciated that the bulge keeps the highest gas
density in the galaxy. For this reason, the same
Looking at this image, it has to be remarked
patterns drawn by new stars in Figure 16a can be
that the vertical axes has been taken to be at
perfectly identified in Figure 8b. Furthermore,
logarithmic scale (as in the rest of the already
the gas matter density was already observed to
presented profiles) in order to give a better vi-
remain constant along the spirals of the galaxy,
sualization of the data for different scales. How-
which turns out to be in agreement with Fig-
ever, it has to be taken into account that the
ure 17b.
densities of stars that are less than 2 Gyr old
On the other hand, newly formed stars in g2
are various orders of magnitude less than those
and their radial density profile are shown in Fig-
of older stars.
ures 16b and 17b, respectively. As it was the
That being said, it is observed from the figure

10
z/kpc 1 1

z/kpc
0 0
−1 −1
6 6

4 4

2 2
y/kpc

y/kpc
0 0

−2 −2

−4 −4

−6 −6
−5 0 5 −5 0 5
x/kpc x/kpc

(a) Stars in g1. (b) Stars in g2.

Figure 16: Newly formed stars in both galaxies (less than 0.1 Gyr).

109 109
Σ/M kpc−2

Σ/M kpc−2

107 107

105 105

0.0 2.5 5.0 7.5 10.0 0.0 2.5 5.0 7.5 10.0
r/kpc r/kpc
(a) Radial density profile for g1. (b) Radial density profile for g2.

Figure 17: Radial density profiles for newly formed stars in both galaxies.

11
case of g1, these stars can only be found at has over the mass distribution has been demon-
the midplane too. However, the main difference strated with profiles of stars at different heights
is that there is not such a big step between the above midplane.
star density that can be seen inside and out- Furthermore, a deeper study was done to the
side the bulge and, although it still gradually stars found at the height corresponding to the
decreases, it appears to be almost constant for edge of the bulge, separating the stars inside by
the entire plane (except from the very center, their age. By taking density profiles and com-
where simulations might show a singularity and paring them with the rendered images of them
one has to be careful). Again, the position of it was seen that their mass distribution already
these new stars in g2 matches perfectly the gas revealed the observed geometry of their contri-
distribution in the galaxy shown in Figure 9b. bution to the bulge.
The results studied in this section are actually Finally, newly formed stars in the galaxies
found to be in agreement with the increasingly turned out to support the hypothesis presented
more considered hypothesis presented in subsec- in the theoretical background, with the presence
tion 2.3, which states that secular evolution in- of the bar giving raise to a higher star formation
side galaxies allows new stars to be formed inside rate inside the bulge due to gas channeling.
the bulge, since both g1 and g2 contain newly On the other hand, more time available could
formed stars inside their bulges. have allowed the acquisition of further theo-
Finally, the idea of bars in barred spiral galax- retical background and a better understanding
ies acting as channels for gas to flow inside the of the features of the Pynbody package, which
bulge seems to be supported by the simulation. could have lead to deeper discussions and the
The barred galaxy shows a higher gas concentra- study of further properties beyond our current
tion in the bulge, which is equivalent to a higher knowledge.
star formation rate. Meanwhile, gas concentra-
tion in the unbarred galaxy’s bulge is not much REFERENCES
higher than in the rest of the disc, and so it the
star formation rate. 1
E. Hubble, “Extragalactic nebulae.”, ApJ 64,
Provided by the SAO/NASA Astrophysics
5. CONCLUSION Data System, 321–369 (1926).
2
J. Sellwood and A. Wilkinson, “Dynamics
Throughout this experiment, the main differ- of barred galaxies”, Reports on Progress in
ences between the barred and the unbarred spi- Physics 56, 173–256 (1993).
ral galaxy simulations have been successfully 3
found by making use of a developed python code. M. Bureau and K. C. Freeman, “The nature
First of all, face and side-on images have been of boxy/peanut-shaped bulges in spiral galax-
rendered for a straightforward identification of ies”, The Astronomical Journal 118, 126–138
the bar and the found P/B bulge. Then, the (1999).
4
slightly different stellar radial densities of the P. B. Eskridge and J. A. Frogel, “What is
two galaxies have been explained in terms of the the true fraction of barred spiral galaxies?”,
geometry of the bar. Astrophysics and Space Science 269, 427–430
The study of the distribution of stars with dif- (1999).
ferent ages along the vertical distance has shown 5
J. H. Knapen, D. Perez-Ramirez, and S. Laine,
that older stars tend to occupy higher positions “Circumnuclear regions in barred spiral galax-
above midplane, giving raise to the sought-after ies – ii. relations to host galaxies”, Monthly
peanut/boxy shape. This was found to be con- Notices of the Royal Astronomical Society
sistent with the presented background theory on 337, 808–828 (2002).
galaxy formation. The effect that this bulge

12
6 16
R. Nemirof and J. Bonnell, Apod: 2005 au- Swinburne University of Technology, Disk
gust 25 - barred spiral milky way, (Aug. 2005) galaxies — cosmos, https : / / astronomy .
https://apod.nasa.gov/apod/ap050825. swin.edu.au/cosmos/d/Disk+Galaxies.
html. 17
Swinburne University of Technology, Halo —
7
E. Aptoula, S. Lefèvre, and C. Collet, “Math- cosmos, https://astronomy.swin.edu.au/
ematical morphology applied to the segmenta- cosmos/h/halo.
tion and classification of galaxies in multispec- 18
Swinburne University of Technology, Secular
tral images”, Proceedings of the EURASIP evolution — cosmos, https : / / astronomy .
European Signal Processing Conference (EU- swin . edu . au / cosmos / s / Secular +
SIPCO) (2006). Evolution.
8
L. S. Sparke and J. S. Gallagher III, Galax-
ies in the universe: an introduction, 2nd ed.
(Cambridge University Press, 2007).
9
M. Ness, V. P. Debattista, T. Bensby, S. Feltz-
ing, R. Roškar, D. R. Cole, J. A. Johnson, and
K. Freeman, “Young stars in an old bulge: a
natural outcome of internal evolution in the
milky way”, The Astrophysical Journal 787,
L19 (2014).
10
F. Fragkoudi, E. Athanassoula, A. Bosma,
and F. Iannuzzi, “The effects of boxy/peanut
bulges on galaxy models”, Monthly Notices of
the Royal Astronomical Society 450, 229–245
(2015).
11
E. Athanassoula, “Boxy/peanut/x bulges, bar-
lenses and the thick part of galactic bars: what
are they and how did they form?”, Galactic
Bulges, 391–412 (2016).
12
M. Ness and D. Lang, “The x-shaped bulge of
the milky way revealed by wise”, The Astro-
nomical Journal 152, 14 (2016).
13
Y. Cendes, Young stars in the galactic bulge-
an outcome of internal evolution, https : / /
astrobites.org/2014/01/24/young-stars-
in- the- galactic- bulge- an- outcome- of-
internal-evolution/.
14
Pynbody Team, A walk through pynbody’s low-
level facilities, https : / / pynbody . github .
io/pynbody/tutorials/data_access.html#
a - walk - through - pynbody - s - low - level -
facilities.
15
Swinburne University of Technology, Bulges —
cosmos, https://astronomy.swin.edu.au/
cosmos/b/Bulges.

13
A. PYTHON SCRIPT

The following Python script contains the code that has been used for doing every task in this
experiment.

1 import numpy as np
2 import pynbody as pyn
3 import matplotlib.pylab as plt
4 plt.rcParams.update({
5 "text.usetex": True,
6 "font.family": "serif",
7 "font.serif": ["Latin Modern Roman"]})
8 plt.rcParams.update({'font.size': 20})
9

10 g1 = pyn.load("run708main.01000")
11 g2 = pyn.load("run708mainDiff.01000")
12 g1.physical_units()
13 g2.physical_units()
14 galaxies=[g1,g2]
15

16 M1_s = np.sum(g1.s["mass"])
17 M1_g = np.sum(g1.g["mass"])
18 M1_dm = np.sum(g1.dm["mass"])
19 M1 = M1_s+M1_g+M1_dm
20 print("Galaxy1: StellarMass = %e, GasMass = %e, DarkMatterMass = %e, TotalMass =
,→ %e"%(M1_s,M1_g,M1_dm,M1))
21

22 M2_s = np.sum(g2.s["mass"])
23 M2_g = np.sum(g2.g["mass"])
24 M2_dm = np.sum(g2.dm["mass"])
25 M2 = M2_s+M2_g+M2_dm
26 print("Galaxy2: StellarMass = %e, GasMass = %e, DarkMatterMass = %e, TotalMass =
,→ %e"%(M2_s,M2_g,M2_dm,M2))
27

28 pyn.analysis.angmom.faceon(g1)
29 pyn.analysis.angmom.faceon(g2)
30

31 # Face-on images of the stars


32 for i in [0,1]:
33 plt.figure(i)
34 plt.figure(figsize=(5.8,5.2))
35 pyn.plot.stars.render(galaxies[i].s,width=12,dynamic_range=3);
36 plt.xlabel('$x$/kpc')
37 plt.ylabel('$y$/kpc')
38 plt.savefig('Galaxy%sStarsFaceOn.pdf'%(i+1),bbox_inches='tight')
39

40 # Face-on images of the gas

14
41 for i in [0,1]:
42 plt.figure(i)
43 plt.figure(figsize=(5.8,5.2))
44 pyn.plot.image(galaxies[i].g,qty="rho",width=12,qtytitle=r"$\rho$");
45 plt.savefig('Galaxy%sgas.pdf'%(i+1),bbox_inches='tight')
46

47 # Rotation stars in Galaxy1


48 g1.rotate_z(115)
49

50 # Stellar radial density profile COMPARISON


51 pro1=pyn.analysis.profile.Profile(g1.s,min=0.001,max=30)
52 pro2=pyn.analysis.profile.Profile(g2.s,min=0.001,max=30)
53

54 plt.figure(figsize=(5.8,5.2))
55 plt.plot(pro1["rbins"],pro1["density"])
56 plt.plot(pro2["rbins"],pro2["density"])
57 plt.semilogy()
58 plt.xlabel('$r$/kpc')
59 plt.ylabel('$\Sigma$/M$_\odot$kpc$^{-2}$')
60 plt.legend(("g1","g2"))
61 plt.savefig('RadialDensityProfileGalaxyCOMP.pdf',bbox_inches='tight')
62

63 # Side on orientation
64 pyn.analysis.angmom.sideon(g1)
65 pyn.analysis.angmom.sideon(g2)
66

67 # Plot stars SideOn


68 for i in [0,1]:
69 plt.figure(figsize=(5.8,5.2))
70 pyn.plot.stars.render(galaxies[i].s,dynamic_range=3.0,width=8)
71 plt.xlabel('$x$/kpc')
72 plt.ylabel('$z$/kpc')
73 axes = plt.gca()
74 axes.set_ylim([-1,1])
75 plt.savefig('Galaxy%sStarsSideOn.pdf'%i,bbox_inches='tight')
76

77 # Filters by AGE
78 filt=[None]*5
79 filt[0] = pyn.filt.LowPass('age', '2 Gyr')
80 filt[1] = pyn.filt.BandPass('age', '2 Gyr', '4 Gyr')
81 filt[2] = pyn.filt.BandPass('age', '4 Gyr', '6 Gyr')
82 filt[3] = pyn.filt.BandPass('age', '6 Gyr', '8 Gyr')
83 filt[4] = pyn.filt.HighPass('age', '8 Gyr')
84 new_stars_filt = pyn.filt.LowPass('age', '0.1 Gyr')
85

86 # Intervals
87 ranges=[[None for x in range(5)] for x in [0,1]]

15
88 for i in [0,1]:
89 for k in range(0,5):
90 ranges[i][k]=galaxies[i].s[filt[k]]
91

92 new_stars = g1.s[new_stars_filt]
93 new_stars2 = g2.s[new_stars_filt]
94

95 # Plot stars with different AGES


96 for i in [0,1]:
97 for k in range(0,5):
98 plt.figure(figsize=(5.8,5.2))
99 ax=pyn.plot.stars.render(ranges[i][k],dynamic_range=2.0,width=8)
100 plt.xlabel('$x$/kpc')
101 plt.ylabel('$z$/kpc')
102 axes=plt.gca()
103 axes.set_ylim([-1,1])
104 plt.savefig('Gal%sSideOn_Interval%s.pdf'%((i+1),k),bbox_inches='tight')
105

106 # VERTICAL PROFILES


107 Vprofiles=[[None for x in range(5)] for x in [0,1]]
108 for i in [0,1]:
109 for j in range(0,5):
110

,→ Vprofiles[i][j]=pyn.analysis.profile.VerticalProfile(ranges[i][j],rmin=0.001,rm
111

112 for i in [0,1]:


113 plt.figure(figsize=(6,5.2))
114 for j in range(5):
115 plt.plot(Vprofiles[i][j]["rbins"],Vprofiles[i][j]["density"])
116

117 plt.semilogy()
118 axes=plt.gca()
119 axes.set_xlim([-0.25,7])
120 plt.xlabel('$z$/kpc')
121 plt.ylabel(r'$\rho$/M$_\odot$kpc$^{-3}$')
122 plt.legend((r'$<2$ Gyr',r'$2\sim 4$ Gyr',r'$4\sim 6$ Gyr',r'$6\sim 8$
,→ Gyr',r'$>8$ Gyr'))
123 plt.savefig('VerticalDensityProfileGalaxy%s.pdf'%(i+1),bbox_inches='tight')
124

125 # HEIGHT ranges


126 h=[[None for x in range(5)] for x in [0,1]]
127

128 for i in [0,1]:


129 h[i][0] = galaxies[i].s[(abs(galaxies[i].s['z'])<=0.25)]
130 h[i][1] =
,→ galaxies[i].s[(abs(galaxies[i].s['z'])>0.25)&(abs(galaxies[i].s['z'])<=0.50)]

16
131 h[i][2] =
,→ galaxies[i].s[(abs(galaxies[i].s['z'])>0.50)&(abs(galaxies[i].s['z'])<=0.75)]
132 h[i][3] =
,→ galaxies[i].s[(abs(galaxies[i].s['z'])>0.75)&(abs(galaxies[i].s['z'])<=1)]
133 h[i][4] =
,→ galaxies[i].s[(abs(galaxies[i].s['z'])>1)&(abs(galaxies[i].s['z'])<=1.25)]
134

135 # PROFILES
136 hprofiles = [[None for x in range(5)] for x in [0,1]]
137 for i in [0,1]:
138 for j in range(5):
139

,→ hprofiles[i][j]=pyn.analysis.profile.Profile(h[i][j],ndim=2,rmin=0.001,rmax=4)
140

141 for j in [0,1]:


142 plt.figure(j)
143 plt.figure(figsize=(6,5.2))
144 for i in range(5):
145 plt.plot(hprofiles[j][i]["rbins"],hprofiles[j][i]["density"])
146 plt.xlabel('$r$/kpc')
147 plt.ylabel(r'$\Sigma$/M$_\odot$kpc$^{-2}$')
148 plt.legend([r'$|z|<0.25$ kpc',r'$0.25<|z|<0.5$ kpc',r'$0.5<|z|<0.75$
,→ kpc',r'$0.75<|z|<1$ kpc',r'$1<|z|<1.25$ kpc','high'],fontsize=16)
149 plt.semilogy()
150 plt.savefig('Radial_heights%s.pdf'%(j+1),bbox_inches='tight')
151

152 # QUESTION 5. Stars with 0.75<z<1 kpc are h[0][3]


153 # SEPARATION BY AGE AND GENERATION OF PROFILES
154

155 ages075_1=prof075_1=[None]*5
156

157 for k in range(0,5):


158 ages075_1[k]=h[0][3][filt[k]]
159

,→ prof075_1[k]=pyn.analysis.profile.Profile(ages075_1[k],ndim=2,rmin=0.001,rmax=4)
160

161 plt.figure(figsize=(6,5.2))
162

163 for i in range(0,5):


164 plt.plot(prof075_1[i]["rbins"],prof075_1[i]["density"])
165

166 plt.xlabel('$r$/kpc')
167 plt.ylabel(r'$\Sigma$/M$_\odot$kpc$^{-2}$')
168 plt.legend((r'$<2$ Gyr',r'$2\sim 4$ Gyr',r'$4\sim 6$ Gyr',r'$6\sim 8$ Gyr',r'$>8$
,→ Gyr'),loc='upper right',fontsize=16)
169 plt.semilogy()
170 plt.savefig('AgesMedhigh1.pdf',bbox_inches='tight')

17
171

172

173 # Side On View of Newly formed stars


174 plt.figure(figsize=(5.8,5.2))
175 pyn.plot.stars.render(new_stars,dynamic_range=3.0,width=12)
176 plt.xlabel('$x$/kpc')
177 plt.ylabel('$z$/kpc')
178 axes = plt.gca()
179 axes.set_ylim([-1.25,1.25])
180 plt.savefig('NewStarsGal1SideOn',bbox_inches='tight')
181

182 plt.figure(figsize=(5.8,5.2))
183 pyn.plot.stars.render(new_stars2,dynamic_range=3.0,width=12)
184 plt.xlabel('$x$/kpc')
185 plt.ylabel('$z$/kpc')
186 axes = plt.gca()
187 axes.set_ylim([-1.25,1.25])
188 plt.savefig('NewStarsGal2SideOn',bbox_inches='tight')
189

190 # Face on orientation


191 pyn.analysis.angmom.faceon(new_stars)
192 pyn.analysis.angmom.faceon(new_stars2)
193

194 # Face-on New stars 1


195 plt.figure(figsize=(5.8,5.2))
196 pyn.plot.stars.render(new_stars,width=12,dynamic_range=3);
197 plt.xlabel('$x$/kpc')
198 plt.ylabel('$y$/kpc')
199 plt.savefig('NewStarsGal',bbox_inches='tight')
200

201 # New stars in galaxy 2


202 plt.figure(figsize=(5.8,5.2))
203 pyn.plot.stars.render(new_stars2,width=12,dynamic_range=3);
204 plt.xlabel('$x$/kpc')
205 plt.ylabel('$y$/kpc')
206 plt.savefig('NewStarsGal2',bbox_inches='tight')
207

208 new_profile = pyn.analysis.profile.Profile(new_stars,ndim=2,rmin=0.001,rmax=10)


209 new_profile2 = pyn.analysis.profile.Profile(new_stars2,ndim=2,rmin=0.001,rmax=10)
210

211 plt.plot(new_profile["rbins"],new_profile["density"])
212 plt.xlabel('$r$/kpc')
213 plt.ylabel(r'$\Sigma$/M$_\odot$kpc$^{-2}$')
214 plt.semilogy()
215 plt.savefig('new_densityprof',bbox_inches='tight')
216

217 plt.plot(new_profile2["rbins"],new_profile2["density"])

18
218 plt.xlabel('$r$/kpc')
219 plt.ylabel(r'$\Sigma$/M$_\odot$kpc$^{-2}$')
220 plt.semilogy()
221 plt.savefig('new_densityprof2',bbox_inches='tight')

19

You might also like