KINEMATICS OF NEARBY HOST NGC 7582

Item Type Electronic Thesis; text

Authors Walla, Emily

Citation Walla, Emily. (2020). KINEMATICS OF NEARBY ACTIVE GALACTIC NUCLEUS HOST NGC 7582 (Bachelor's thesis, University of Arizona, Tucson, USA).

Publisher The University of Arizona.

Rights Copyright © is held by the author. Digital access to this material is made possible by the University Libraries, University of Arizona. Further transmission, reproduction or presentation (such as public display or performance) of protected items is prohibited except with permission of the author.

Download date 07/10/2021 08:31:34

Item License http://rightsstatements.org/vocab/InC/1.0/

Link to Item http://hdl.handle.net/10150/651409 KINEMATICS OF NEARBY ACTIVE GALACTIC NUCLEUS HOST NGC 7582

By

EMILY CATHERINE WALLA

______

A Thesis Submitted to The Honors College

In Partial Fulfillment of the Bachelor’s degree With Honors in

Astronomy

THE UNIVERSITY OF ARIZONA

MAY 2020

Approved by:

______

Dr. Stephanie Juneau

NSF National Optical-Infrared Astronomy Research Lab, The Astro Data Lab Dr. Susan Ridgway, NSF National Optical-Infrared Astronomy Research Laboratory, served as a secondary advisor for this project. She provided extensive scientific background for the project.

Madison Walder, undergraduate student in the University of Arizona Class of Spring 2020, worked on a project adjacent to mine and as such, provided some small modifications to the code eventually used to complete my project.

Leah Fulmer, PhD candidate at the University of Washington, worked with Stephanie Juneau before me and completed some initial analyses and wrote code that was foundational in the first year of the project but was ultimately not implemented in the project’s final form. Building off of Leah’s work has made me better at the python computer language, and their contribution to this project should be recognized. Draft version May 9, 2020 Typeset using LATEX default style in AASTeX63

Kinematics of Nearby Active Galactic Nucleus Host NGC 7582

Emily Walla,1 Stephanie Juneau,2 Susan Ridgway,2 Madison Walder,1 and Leah Fulmer3

1University of Arizona Department of Astronomy and Steward Observatory 2NSF National Optical-Infrared Astronomy Research Laboratory 3University of Washingtom Department of Astronomy

(Received May 6, 2020; Accepted May 9, 2020) Submitted to AJ

ABSTRACT High-quality, spatially-resolved spectroscopy from the MUSE instrument on the Very Large Telescope allows for the exploration of the chemical composition and kinematics of and gas around Active Galactic Nuclei (AGN). The IFU Spectroscopy Tool (GIST) performs kinematic fitting of the MUSE Data, opening the door for analysis of outflows, inflows and structure of active . We present an analysis, by applying the GIST Pipeline to MUSE IFU data, of the nearby active galaxy NGC 7582. In the and gas kinematics, we find signatures of a large-scale bar. We report on neutral gas kinematics for the first time, finding tentative evidence for large-scale outflows outside the outflowing ionized gas cones. Furthermore, we confirm the presence of a recently-found kinematically distinct core comprised of a ring of fast-moving stars approximately 600 pc in diameter. Our study emphasizes the need to account for galaxy substructure and different phases of the interstellar medium while continuing to improve our understanding of the connection between AGN and their host galaxies.

Keywords: AGN, galaxy evolution, interstellar medium, neutral gas outflow, ionized gas outflows, galaxy structure,

1. INTRODUCTION Active galactic nuclei (AGN) are supermassive black holes at the center of their host galaxies that are actively accret- ing material and feeding outflows of matter from the galaxy. Through this process of accretion and expulsion, feedback can suppress star formation in some regions of the galaxy while possibly exciting it in others (Cresci et al. 2015). How- ever, the effect AGN have on the long-term evolution of their host galaxy and the role they play in transitioning galaxies from gas-rich with ample star formation to gas-poor with few stellar births are not well understood. Improving the understanding of the AGN-host galaxy relationship requires high-quality observations taken over a wide wavelength range in order to paint the most complete picture possible of the components and kinematics of active galaxies. Itegral-field spectroscopy done by the Multi-Unit Spectroscopic Explorer (MUSE) instrument on the European Southern Observatory’s Very Large Telescope provides approximately 90,000 spatially resolved spectra, allowing for a detailed analysis of the kinematics of gas and stars (Bacon et al. 2010). Furthermore, the MUSE instrument’s wide field of view allows for this kinematic analysis to be done on a kpc scale. Large-scale mapping is vital to understanding the relationship between AGN and their host galaxies, as AGN-ionized regions and outflows often span kpc, and inflows and large-scale structures in the galaxy may not be captured in narrow fields of view. To gain more physical insight on the AGN-host galaxy connection, we conduct a detailed case study of an intriguing active galaxy that has previously showed hints of a relationship between the AGN and the large-scale host galaxy structure. NGC 7582 is a nearby (z = 0.005 (de Vaucouleurs et al. 1991)) galaxy housing a of 7 mass 5.5 ∗ 10 M which fuels its active nucleus. The AGN of NGC 7582 is Compton thick and the broad line region is obscured optically. With a disk inclined 65 degrees, the galaxy has significant line-of-sight velocities, allowing for the analysis of rotational, radial and other motions of its components. A MUSE datacube containing information on right ascension, declination, and wavelength was collected in 2015 in ESO program 095.A-0934 (PI Juneau). This datacube 2 Walla et al. is centered on the optical galactic nucleus and covers 64 sq kpc at the distance of NGC 7582: approximately 22.5 Mpc (Tully et al. 2013).

2. METHODS Previous work on this data revealed a flattened kinematically distinct core of fast-moving stars. This ring or disk of stars is approximately 600 pc in diameter, and is centered on the galactic nucleus, which serves to collimate biconical outflows of ionized gas (Prieto et al. 2014, Juneau et al., submitted, hereafter J20). We confirm the presence of this kinematically distinct core and include visualization of the higher-order Gauss-Hermite moments of the stellar kinematics. Furthermore, we present signatures of a large-scale bar in the ionized gas, and we find clear indications of distinct kinematics of the neutral interstellar medium (ISM) traced by the Na D absorption lines; this could be due to differential motion, misaligned rotation, neutral gas outflows or a combination of these. The data used in this analysis were collected through ESO program 095.A-0934 (PI Juneau). With dimensions in right ascension and declination and a third dimension in wavelength, the spectral pixels, or ”spaxels” compose a 3-dimensional dataset. The datacube’s wavelength range is 4750A˚ to 9352A,˚ with a step size of 1.25A,˚ yielding 3682 spectral datapoints per spatial coordinate, and each side of the datacube covers 1’ of sky, or approximately 8kpc at the distance to NGC 7582. The datacube was spectrally trimmed to span 4750A˚ to 8900A˚ using the muse python data analysis framework (MPDAF) (Bacon et al. 2016), and this spectrally trimmed datacube was used for analysis. A white light image, created by summing the flux across the entire spectrum in each spaxel using the MPDAF package, is shown in Fig1. Analysis of the reduced datacube be- gan with the GIST pipeline (Bittner et al. 2019a). The pipeline first creates Voronoi Bins of the datacube (Cappel- lari & Copin 2003), such that the spec- tra across all bins have constant or near- constant signal-to-noise ratios, a param- eter determined by the GIST user. The pipeline then performs penalized pixel fitting (pPXF) (Cappellari 2017) of the binned spectra to fit the stellar contin- uum. This fit yields line-of-sight ve- locity distribution in the galaxy’s rest frame, allowing for the user to analyze the line-of-sight velocity, velocity dispe- rion, skewness of the velocity, and kurto- sis of the dispersion. Then, GIST performs an analysis of select emission and absorption lines us- ing the GANDALF module(Sarzi et al. 2017), which treats each emission or ab- sorption line input to the pipeline as Figure 1. White light image NGC 7582, created by summing the flux over a Gaussian template, and by combin- each spaxel f the MUSE datacube using the MPDAF package. Each side measures 8kpc, centered on the optical galactic nucleus. The blue, green, and ing the given templates with those from red stars in the Southeast, center and Northwest of the galaxy correspond to an input spectral template library, GIST the respectively colored spectra in Figs2 and6 finds and stores the kinematic informa- tion – velocity and velocity dispersion – . and the flux and amplitude of the emis- sion and absorption lines (Sarzi et al. 2006). A full description of the GIST pipeline’s capabilities can be found in the work by Bittner and colleagues, and in the online documentation (Bittner et al. 2019b). We selected a target signal-to-noise ratio of 50 and a minimum signal-to-noise ratio of 3 for the Voronoi binning step of the GIST pipeline. Any bins that could not meet the minimum SNR were excluded from the analysis and not plotted, while individual spaxels that met or exceeded the target SNR were left as individual spaxels and not included NGC7582 Kinematics 3 in larger bins. E-MILES, the Extended MILES stellar population models Vazdekis et al.(2016), served as our input library of spectral templates for the pPXF module of the GIST pipeline. Though E-MILES’s spectral range runs from 0.168µm to 5.0µm, we selected the range from 4750A˚ to 8900A˚ , because the spectral range of the MUSE datacube is 4750A˚ to 9500A,˚ with poor sky subtraction and no prominent astronomical emission or absorption lines past 8900A.˚ In addition to the GIST pipeline default emission line fits, we fit for sodium-D absorption lines, blue wings of all emission lines within the spectral range, and red wings of Hα,Hβ, [N ii] λ6584, and [O iii] λλ4959, 5007. Emission lines corresponding to the galactic disk were tied to Hα, as this line is strong where there is star formation and stellar activity, which occurs in the galaxy disk (Baldwin et al. 1981); emission lines in the red and blue wings were tied to [O iii] λ5007, as this line is a strong tracer for gas ionized by an AGN (Peterson 1997). Initial guesses for the velocity of the gas in the blue wings were set to -200 km/s, while intial guesses for the red wings were set to +200 km/s. The wings are expected to account for outflowing gas towards and away from the observer, respectively. Though the GIST pipeline automatically generates kinematic maps, we elected to generate our own maps for the purpose of analysis. This was done by modifying the GIST sourcecode in a Jupyter Notebook, on the Astro Data Lab server (Fitzpatrick et al. 2014), to enable the user to create maps of flux and amplitude line ratios, dispersion-velocity ratios and the difference of gaseous and stellar kinematics. Our modified code also allows the user to customize the colormaps and colorbars of the plots, and to display multiple maps in one figure. These modifications allow for specific analyses not supported by the GIST pipeline’s default output maps and visualization settings.

3. RESULTS We analyzed the kinematics of the stars, ionized and neutral gas in NGC 7582. To illustrate, we extracted spectra three different regions of the galaxy, shown in Fig2. These spectra were each created from the ESO-reduced MUSE datacube using MPDAF to sum the flux of 25 pixels in a 5x5 square centered on the location of the marker star symbols seen in Fig1. The green-colored spectrum seen in Fig2 corresponds the center of the galaxy indicated by the green star in Fig1, the blue-colored spectrum corresponds to the Southeast region of the galaxy indicated by the blue star marker, and the red-colored spectrum is from the Northwest region of the galaxy shown by the red star marker. Visual analysis of Fig2 reveals blue-shifts in the [O iii] λ5007, [O i], and [Ar iii]emission lines in the center of NGC 7582 that are not seen – if the emission lines appear – in the spectra from the Northwest and Southeast regions of the galaxy. However, a more detailed analysis of NGC 7582’s spectra using the GIST pipeline is necessary to develop a greater understanding of NGC 7582’s kinematics. We present results on the stellar kinematics in section 3.1, on the kinematics of ionized gas in section 3.2, and finally, results on the kinematics of neutral gas in the ISM – as traced by Na D – in section 3.3.

Figure 2. Rest frame spectra of NGC 7582 from 3 regions of the galaxy: Center (green), Northwest (red), and Southeast (blue), corresponding to the location of the star symbols in Fig1. Each spectra is created using MPDAF, and is comprised of the summed spectra of 25 spaxels located in 5x5 spaxels squares in the respective galactic regions. Overplotted in fuchsia are dotted vertical lines marking Hβ, [O i] λ6300, Na D, and Hα, [S ii], and [Ar iii]emission or absorption lines. Note that the flux of the central spectra has been divided by 8. Additional features, such as the [Ca ii] triplet around 8500A.˚ 4 Walla et al.

3.1. Stellar Kinematics The stellar kinematics, seen in Fig.3, show the large-scale counter-clockwise rotation of NGC 7582’s galactic disk and its kinematically distinct core. This core rotates more rapidly than the surrounding stars and shows a drop in velocity dispersion compared to the surrounding stars; in Fig3’s σ panel (top right), the stars surrounding the core have σ of 120-150 km/s, while the core has a σ of roughly 75 km/s. The rise in velocity dispersion surrounding the core could be due to a number of factors: a co-rotating disk of an inclination offset from the inclination angle of the galaxy, a galactic bulge, and disruption by the galactic bars. In the bottom panels of Fig3, we see that the higher-order Gauss-Hermite moments have local extrema near the galactic core. The third moment (h3) is a measure

Figure 3. Voronoi-binned stellar kinematics of NGC 7582. Note that (0,0) is the center of the image, corresponding to the galactic center of NGC 7582, and that ∆δ and ∆α are not sky coordinates but coordinates in the galaxy. Top Left: Stellar Velocity (km/s), v. Colormap ranges from -150 km/s (dark blue) to +150 km/s (dark red). Top Right: Stellar velocity dispersion, σ. Colormap ranges from 0 km/s (dark blue) to 150 km/s (dark red). Bottom Left: 3rd order Gauss-Hermite moment, representing the skewness of the velocity Gaussian spread. The colormap ranges from -0.2 (dark red) to +0.2 (dark blue). Red colors indicate skewness to the right of the median, while bluer colors indicate skewness toward the left of the median. Bottom Right: 4th order Gauss-Hermite moment, representing the kurtosis of the velocity dispersion. The colormap ranges from 0.0 (dark blue) to 0.2 (dark red). NGC7582 Kinematics 5 of the velocity distribution’s skewness, which indicates deviations from a normal distribution. In the bottom left panel of Fig3, we see that the distribution is skewed towards bluer wavelength in the South end of the kinematically distinct core and along the approaching side of the galaxy’s semimajor axis. Conversely, the distribution is skewed towards redder wavelengths in the North end of the kinematically distinct core and in the redshifted side of the galaxy. The high values of skewness in the kinematically distinct core may indicate the necessity for multiple velocity distribution components to fully describe the stellar velocity field. The fourth Gauss-hermite moment (h4), in the bottom left panel of Fig3, is a measure of the kurtosis of the velocity distribution; that is, the tail-heaviness or peakedness of the distribution. Overall, the stellar velocity distribution is not tail-heavy a and not steeply peaked as all of the values of the third moment are < 1. We do see a local maxima in the central few arcseconds of the kurtosis map, indicating that the distribution there is more tail-heavy and more steeply peaked than elsewhere in the galaxy. The same region shows a drop in velocity dispersion, interestingly, suggesting that there is comparatively more coherent stellar motion in that area than the surrounding area.

3.2. Ionized Gas Kinematics An intriguing aspect of research is how the gas kinematics relate to the stellar kinematics in galaxies with active nuclei. Fig4 shows the kinematics of the three components of [N ii] λ6584: the blue wing, the component of the galactic disk, and the red wing, respectively. The top panels show the velocity, v, and the bottom panels show the velocity dispersion, σ. The middle panel of Figs4 and5 shows large-scale rotation following the same counter-clockwise direction as the stellar velocity field seen in Fig3. The signatures of low-high-low velocity accompanied by high-low- high dispersion along the major axis are likely along the leading edge of the galactic bar, which may indicate funneling and/or piling up of gas along the bar. The regions of relatively high velocity dispersion of gas near the center of the galaxy – and not along the major axis – likely correspond to the outflowing gas described in J20. The ionized gas outflows distort the middle velocity maps of Figs4 and5 at approximately (10”, 0”), and in a diagonal line in the Southwest quadrant of the map. The edges of the outflow cone are again visible in the σ map, appearing as regions of relatively higher σ. Signatures of outflows are seen in the left and right panels of Figs4 and5. In the left panels of both figures, we see a highly negative velocity stripe with velocity dispersion of 70-80 km/s running from approximately (0”,0”) to (10”,-30”); the maps show another, less clear, stripe running roughly horizontally from (0”, 0”) to (20”, 0”). This is the blue wing component predominantly corresponding to the edges of the conical outflow of AGN-ionized gas described by J20. The backside of this 3-dimensional, hollow cone is seen at approximately (10”,-5”) and is slightly redshifted relative to the front side of the outflow in both Figs4 and5. This spread of velocity could cause a higher σ in the region where both sides of the cone are detected, and might explain the ≥ 150 km/s σ line in the southwest quadrant of the leftmost panel; in the northeast quadrant, the region of higher v and σ most likely corresponds to the cone outflowing from the back side of the galaxy. The bottom (southern) edge of the cone appears to have a parabolic shape, although the top edge of the front cone is not defined well enough to determine if the shape is symmetrical. The rightmost panels of Fig4 show the red wing of ionized gas. This is gas that is expected to be greatly redshifted relative to the gas in the galactic disk. The lower edge of the back outflow cone is well defined in the southeast quadrant as a roughly horizontal line of bins from (-5”,-5”) to (-25”,-5”), with velocities ranging from approximately 40 km/s to 160 km/s, and velocity dispersions of approximately 150 km/s. The upper edge of the rear outflow cone can also be seen as a group of bins with v > 160 km/s. The region in the southwest quadrant where v ≥200 km/s and σ of approximately 60 km/s likely corresponds to the back side of the front outflow cone. In Fig5, the velocity and velocity dispersion of [O iii] λ5007is shown. Juneau and colleagues have studied the outflow of ionized gas from NGC 7582, and this figure offers a different look at the same data used in that study. The left bottom panel of Fig5, showing the velocity dispersion, shows high velocity dispersion along the cone in the blue wing, corresponding to the cone outflowing from the front-side of NGC 7582. The edges of the cone have a lower σ than the region between. At approximately (-10”,15”) in the map, we see a local maximum of σ, where the velocity dispersion is approximately 90 km/s. This maximum, which can be seen in the velocity map as well, likely marks the nearest edge of the cone outflowing from the backside of NGC 7582, which supports the results by J20. The rightmost panels of5 show the emission line fit for the red wing of [O iii] λ5007. However, because of the red wing’s low signal-to-noise ratio, the kinematic maps of this ionized gas are unfortunately not especially informative. In the velocity plot of the [O iii] λ5007component in the disk of the galaxy, the galactic bar appears as a slight dip in velocity accompanied by a rise in velocity. The three-component fit performed by the GANDALF module does 6 Walla et al.

Figure 4. Kinematics of three components of [N ii] λ6584 in NGC 7582. Top Row: Velocity of three components of [N ii] are plotted. Colormap ranges from -200 km/s (dark blue) to +200 km/s (dark red). Left: Velocity fit with the blue wing gaussian component. Middle: Velocity of fit with the central core gaussian component. Right: Velocity of fit with the red wing gaussian component. Bottom Row: Velocity dispersion, σ of three components of [N ii]. Colormap ranges from 0 km/s (dark blue) to 150 km/s (dark red). Left: σ of [N ii] fit using the blue wing gaussian component. Middle: σ fit using the central core gaussian component. Right: σ fit using the red wing gaussian component. not fully isolate the velocity component associated with the disk rotation, resulting in distortions of the velocity field along the edges of the front ionization cone. This is likely due to the [O iii]emission line flux from the ionized cone dominating the flux in that region.

3.3. Neutral Gas Kinematics We present a study of the neutral gas kinematics of the ISM in NGC 7582 for the first time, using Na D absorption as a tracer. Fig6 shows the same spectra plotted in Fig2, zoomed into the spectral region centered on the sodium doublet. The spectrum extracted from the Northwest of the galaxy, plotted in red, shows a red-shift and the spectrum extracted from the Southewast of the galaxy shows a blue-shift; these results are expected, given the rotation of the galactic disk as seen in Fig3. The spectrum extracted from the central region of the galaxy would be expected to have NaD absorption lines aligned with the lines’ restframe wavelengths, which are indicated by the dashed fuchsia lines; however, this is not the case: the central spectrum unexpectedly shows a subtle red-shift in the NaD absorption. This result is the first clue that the neutral gas kinematics of NGC 7582 are distinct from the galaxy’s stellar kinematics. To better characterize the kinematics of neutral gas in the ISM of NGC 7582, we added NaD absorption lines to the input file for GIST’s GANDALF module. The kinematics of Naλ5890 are shown in Fig7. The left panel shows the velocity of neutral gas while the right panel shows the corresponding velocity dispersion. We find high velocity dispersion – ranging from approximately 60 km/s to ≥ 100 km/s near the center of the galaxy, (0”,0”), on the right plot. We also see a stripe of relatively high velocity dispersion in the Northwest region of the galaxy that, though discontinuous, also appears in the Southeast portion of the galaxy. The position angle of this stripe appears to coincide with that of the galactic bar. We see another stripe of high velocity dispersion near the center line, moving from (0”,0”) NGC7582 Kinematics 7

Figure 5. Kinematics of three components of [O iii] λ5007in NGC 7582. Top Row: Velocity of three components of [O iii]are plotted. Colormap ranges from -150 km/s (dark blue) to +150 km/s (dark red). Left: Velocity of fit with the blue wing gaussian component. Middle: Velocity of fit with the central core gaussian component. Right: Velocity of fit with the red wing gaussian component. Bottom Row: Velocity dispersion, σ of three components of [O iii]. Colormap ranges from 0 km/s (dark blue) to 150 km/s (dark red). Left: σ fit using the blue wing gaussian component. Middle: σ fit using the central core gaussian component.Right: σ fit using the red wing gaussian component.

Figure 6. Spectra of NGC 7582, taken from 3 regions of the galaxy – center (green), red (Northwest), blue (Southeast), corresponding to the locations of the star symbols in Fig1 – centered on the sodium doublet. Notice the of the spectra taken from the Northwest and Central region of the galaxy, and the blueshift of the spectra taken from the Southeast region of the galaxy. 8 Walla et al.

Figure 7. Left: Velocity map of neutral Naλ5890 gas in NGC 7582. Colormap ranges from -100 km/s (dark blue) to +100 km/s (dark red). Right: Velocity dispersion map of neutral Naλ5890 gas. Colormap ranges from 0 km/s (dark blue) to 100 km/s (dark red). in a steep line towards (10”,-25”), apparently along the same line – or near to it – tracing the lower edge of the front- facing outflowing cone, seen in Figs4 and5. This stripe also coincides with bins of relatively high-magnitude velocity seen in the left-side plot of Fig7, where velocities are ≤ −80 km/s. In the velocity plot, we see a region of highly negative velocity at approximately (5,0), where the stars and ionized gas both exhibit positive velocity; this high- velocity region also has high dispersion. This evidence points towards outflows of neutral gas, outside the outflowing cone of ionized gas. The velocity dispersion of NaD elsewhere in the galaxy are relatively low, which corresponds to coherent motion of the gas. Understanding the relationship between the stars and neutral gas allows for a more complete picture of NGC 7582’s kinematics. In Fig8, we show maps of the stellar velocity and velocity dispersion subtracted from the velocity and velocity dispersion of NaD. In the left panel, we see that the velocities in the Northwest region of the galaxy are largely negative, indicating that the NaD is moving slower than the stars in that region. In the Southeast region of the galaxy, we see a large section positive velocities, indicating that, once more, neutral gas is lagging behind the stars. However, near the center line, approximately 10” vertically away from the center, the velocity difference is closer to 0, indicating that the stars and gas may be moving more coherently. Indeed, in the right panel of Fig8, we see a slight drop in the velocity dispersion difference in the Southern region of the galaxy, near the centerline; yet, in the North region of the galaxy, we see a very slight rise in the magnitude of the velocity dispersion difference along the centerline. The rise indicates that the neutral gas is moving more coherently than the stars. We also see a rise around the center of the galaxy, corresponding to the same high-dispersion ring seen in the top right panel of Fig3, which may mean that neutral gas is unaffected by the kinematically distinct core of NGC 7582. Along the northwest edge of the galaxy, we see several bins with high velocity dispersion differences, near 80 km/s, indicating that the neutral gas in that region is moving much less coherently than the stars. This may be due to shocks or drag caused by the bar, outflows of neutral gas or a poor fit due to low detection and high noise in those bins, as detection of NaD is much lower outside the central few square arcseconds of NGC 7582, as seen in Fig9.

4. CONCLUSIONS Investigating the kinematics of stars and gas in galaxies hosting AGN is necessary to understand the multi-scale influence AGN have on their host galaxies. By applying the GIST pipeline to spatially-resolved spectroscopic datacube obtained with MUSE, we are able to analyze a significant region of AGN host NGC 7582 and gain deeper insight into the relationship between this galaxy’s active nucleus and the kinematics of its stars and gas. In characterizing the stellar kinematics to higher order moments, we find further signatures of the kinematically distinct core in NGC 7582, notably higher-magnitude skewness and kurtosis that correspond to the kinematically distinct core and large-scale structure in the skewness of the galaxy’s velocity distribution. NGC7582 Kinematics 9

Figure 8. Left: Map of stellar velocity subtracted from Naλ5890 gas velocity in NGC 7582. Colormap ranges from -100 km/s (dark blue) to +100 km/s (dark red). Right: Map of stellar velocity dispersion subtracted from Naλ5890 gas velocity dispersion. Colormap ranges from -100 km/s (dark blue) to +100 km/s (dark red).

Figure 9. Amplitude map of NaD absorption line.

We analyzed the motion of ionized gas in NGC 7582. We used a 3-component fit with GIST’s GANDALF module to characterize the kinematics of the ionized gas tracers [N ii] λ6584and [O iii] λ5007. In the galactic disk, we find that the velocity field shows an overall rotation similar to the stellar velocity field, except with signatures of the large-scale bar. In the red and blue components of the fit, we find similar signatures of ionized gas outflows cones as described by J20. In addition to ionized gas, we studied the kinematics of neutral gas in the ISM of NGC 7582. We added the contribution of instellar absorption features in the GANDALF module to analyze the velocity distribution of neutral gas as traced by NaD absorption lines. Though detection of NaD absorption is relatively low everywhere in NGC 7582 except for the galactic center, we report for the first time that neutral gas experiences large-scale rotation distinct from the rotation of stars. Furthermore, we find tentative evidence for neutral gas outflowing beyond the edges of the ionized gas outflow cones. 10 Walla et al.

ACKNOWLEDGMENTS We would like to thank Adrian Bittner for his continued support with the GIST Pipeline and Phil Pinto for his patiently-provided advice for using python. This research is based on observations made with ESO telescopes at the La Silla Paranal Observatory under program ID 095.B-0934. This research uses services or data provided by the Astro Data Lab at NSF’s National Optical-Infrared Astronomy Research Laboratory. NSF’s NOIR Lab is operated by the Association of Universities for Research in Astronomy (AURA), Inc. under a cooperative agreement with the National Science Foundation.

REFERENCES

Bacon, R., Piqueras, L., Conseil, S., Richard, J., & Fitzpatrick, M. J., Olsen, K., Economou, F., et al. 2014, in Shepherd, M. 2016, MPDAF: MUSE Python Data Society of Photo-Optical Instrumentation Engineers Analysis Framework. http://ascl.net/1611.003 (SPIE) Conference Series, Vol. 9149, Proc. SPIE, Bacon, R., Accardo, M., Adjali, L., et al. 2010, in 91491T, doi: 10.1117/12.2057445 Ground-based and Airborne Instrumentation for Astronomy III, ed. I. S. McLean, S. K. Ramsay, & Peterson, B. M. 1997, An Introduction to Active Galactic H. Takami, Vol. 7735, International Society for Optics Nuclei and Photonics (SPIE), 131 – 139, doi: 10.1117/12.856027 Prieto, M. A., Mezcua, M., Fern´andez-Ontiveros, J. A., & Baldwin, J. A., Phillips, M. M., & Terlevich, R. 1981, Schartmann, M. 2014, Monthly Notices of the Royal PASP, 93, 5, doi: 10.1086/130766 Astronomical Society, 442, 2145, Bittner, A., Falc´on-Barroso, J., Nedelchev, B., et al. 2019a, A&A, 628, A117, doi: 10.1051/0004-6361/201935829 doi: 10.1093/mnras/stu1006 —. 2019b, GIST: Galaxy IFU Spectroscopy Tool. Sarzi, M., Falc´on-Barroso, J., Davies, R. L., et al. 2006, http://ascl.net/1907.025 MNRAS, 366, 1151, Cappellari, M. 2017, MNRAS, 466, 798, doi: 10.1111/j.1365-2966.2005.09839.x doi: 10.1093/mnras/stw3020 —. 2017, GANDALF: Gas AND Absorption Line Fitting. Cappellari, M., & Copin, Y. 2003, Monthly Notices of the Royal Astronomical Society, 342, 345, http://ascl.net/1708.012 doi: 10.1046/j.1365-8711.2003.06541.x Tully, R. B., Courtois, H. M., Dolphin, A. E., et al. 2013, Cresci, G., Mainieri, V., Brusa, M., et al. 2015, The AJ, 146, 86, doi: 10.1088/0004-6256/146/4/86 Astrophysical Journal, 799, 82, Vazdekis, A., Koleva, M., Ricciardelli, E., R¨ock, B., & doi: 10.1088/0004-637x/799/1/82 de Vaucouleurs, G., de Vaucouleurs, A., Corwin, Herold G., Falc´on-Barroso,J. 2016, MNRAS, 463, 3409, J., et al. 1991, Third Reference Catalogue of Bright doi: 10.1093/mnras/stw2231 Galaxies NGC7582 Kinematics 11

5. APPENDIX Included in this document are the text to two Jupyter notebooks, written and run on the Astro Data Lab server. Maps Class 0428 is used to create the kinematics maps seen in this paper. ApertureEmissions is used to create the spectra seen in this paper. ApertureEmissions

May 9, 2020

[30]: # Emily Walla, Stephanie Juneau, Madison Walder # May 8 2020

# make necessary imports

import numpy as np

import matplotlib.pyplot as plt

from astropy.io import fits import astropy.units asu

#mpdaf used to manipulate the MUSE datacube from mpdaf.obj import Cube, WCS, WaveCoord, Image from mpdaf.drs import PixTable

# necessary to make matplotlib function well in the jupyter environment %matplotlib inline

1 Spectral Extractions of Apertures

1.1 Step 1. Aperture Extraction the subcubeimg function creates a subcube of an aperture that you specify

parameters: file_cube: format: string; what is returned from the whiteimg func above, the cube of your fits file.

center: format: float(x,y); the x and y coordinates of the center of your aperture.

diameter : format: float; the diameter of your aperture.

units: format: astropy.u.; the units of your input coordinates and diameter.

label: format: "string"; what you want your plot to be titled

1 shape: format: <0, 1, 2>; 0 will return a circular aperture, 1 will return a square aperture, and 2 will return both. the default is shape = 2. [360]: def subcubeimg(file_cube_name, center, diameter, units, label, shape=2): file_cube= Cube(file_cube_name)

if shape==0: #makes a circular aperture subcube= file_cube.subcube_circle_aperture(center=center,␣ ,→radius=(diameter*0.5), unit_center=units, unit_radius=units) subcubeImg= subcube.sum(axis=0)

return subcube, subcubeImg

elif shape==1: # makes a square aperture subcube= file_cube.subcube(center=center, size=diameter,␣ ,→unit_center=units, unit_size=units) subcubeImg= subcube.sum(axis=0)

return subcube, subcubeImg

elif shape==2: subcube_circ= file_cube.subcube_circle_aperture(center=center,␣ ,→radius=(diameter*0.5), unit_center=units, unit_radius=units) subcube_squa= file_cube.subcube(center=center, size=diameter,␣ ,→unit_center=units, unit_size=units) squaImg= subcube_squa.sum(axis=0) circImg= subcube_circ.sum(axis=0)

return subcube_circ, subcube_squa

[361]: file_cube_name="/home/jail/dlusers/ewalla02/MUSE/Juneau/ADP.2016-07-12T07:36: ,→55.307.fits" label="ESO-reduced cube"

jeso_subcube_center,center_img= subcubeimg(file_cube_name,(163,157),5,␣ ,→label=label,shape=1,units=None) jeso_subcube_right,right_img= subcubeimg(file_cube_name,(220,270),5, label=␣ ,→label+" right",shape=1,units=None) jeso_subcube_left,left_img= subcubeimg(file_cube_name,(100,45),5,label=␣ ,→label+" left",shape=1,units=None)

2 # I plot the location of the extracted subcubes on the full whitelight image for␣ ,→context cube= Cube(file_cube_name) whiteimg= cube.sum(axis=0) plt.figure(figsize=(7,7)) whiteimg.plot(cmap="gray",scale="log") plt.plot(163,157,"g*") plt.plot(220,270,"r*") plt.plot(100,45,"b*") plt.show()

3 2 Spectral Extractions of Apertures

2.1 Step 2. Spectra Extraction the spectrualExtraction function extracts spectra from a specified wavelength range

parameters: file_cube: format: string; what is returned from the subcube func above, the cube of your fits file.

label: format: string; what you want your extraction to be labeled as when it is plotted

full : format: True/False; default: False. Indicates if the full spectrum of the cube is extracted (True) or only a specified wavelength range (False).

lmin: format: int or float; default: 4500. The minimum wavelength of your range, in angstroms.

lmax: format: int or float; default: 9500. The maximum wavelength of your range, in angstroms. [275]: def spectralExtraction(file_cube, label, full=False, lmin=4500, lmax=9500): if full == True: # returns the entire summed spectrum, over the entire wavelength range fullSpec= file_cube.sum(axis=(1,2))

plt.figure(figsize=(14,7)) fullSpec.plot() plt.title(label) plt.show()

return fullSpec

else: # returns the summed spectrum of the given wavelength range

l1,l2= file_cube.sum(axis=(1,2)).wave.pixel([lmin,lmax], nearest=True) spec= (file_cube[l1:l2+1,:,:].sum(axis=(1,2)))

plt.figure(figsize=(14,7)) spec.plot() plt.title(label) plt.show()

return spec

[323]: center_spec= spectralExtraction(jeso_subcube_center,full=True, label="Center") left_spec= spectralExtraction(jeso_subcube_left,full=True, label="Lower left") right_spec= spectralExtraction(jeso_subcube_right,full=True, label="Upper␣ ,→Right") center_specdat= (center_spec.data)/8

4 left_specdat= left_spec.data right_specdat= right_spec.data wavelength= np.arange(4750.1083984,9352.6083984,1.25)

5 The Emission/absorption line plotting zone Here we plot the spectra all on one plot, with im- portant emission and absorption features marked. The last cell plots in specific regions to better view the emission features. [324]: redshift=.005264 #wavelength = wavelength*(1+redshift) #Common Emission (or emission+absorption) Lines Lines halpha= 6562.8 hbeta= 4861.33 o3= 5007 mg= 5167.321 he= 4400 sky= 5577 FeII= 5710.6218 NiII= 5756.108 CIV= 5781.1 C1= 5782.32 Ni= 6498.24 SII= 6716.4700 NII6549= 6548.03 NII6583= 6583.41 HeII= 4685.74 NI= 5200.39 OI= 6300.20 ArIII= 7135.67

6 #Common Absorption Lines na1= 5890.00 na2= 5896.00 ca1= 8498.03 ca2= 8542.09 ca3= 8662.14

absarray= [ hbeta,o3, halpha,na1, na2, OI, SII,␣ ,→ArIII, ca1,ca3,NII6583,NII6549] absnames=["H","[OIII] 5007","H",None,"Na D","[OI] 6300","[SII]␣ ,→6717","[ArIII]","Ca","Ca","N[II]6583","[NII] 6549",] red_absarray= np.zeros_like(absarray) forj in range(len(absarray)): red_absarray[j]=(absarray[j]*(redshift+1)) print("red-shifted lines:", red_absarray)

red-shifted lines: [4886.92004112 5033.356848 6597.3465792 5921.00496 5927.036544 6333.3642528 6751.82549808 7173.23216688 8542.76362992 8707.73750496 6618.06507024 6582.49882992]

[357]: wavelength= np.arange(4750.1083984,9352.6083984,1.25) wavelength= wavelength/(1+redshift)

plt.figure(figsize=(16,4))

plt.plot(wavelength,center_specdat,color="green",linewidth=1,alpha=.65,␣ ,→label="Center/8") plt.plot(wavelength,right_specdat,color="red",linewidth=.5,alpha=. ,→65,label="Northwest") plt.plot(wavelength,left_specdat,color="blue",linewidth=.5,alpha=. ,→65,label="Southeast")

forj in range(0,8): plt.axvline(absarray[j],linewidth=1, alpha=. ,→5,color="fuchsia",linestyle="dashed") plt.text(absarray[j]-60,3800,s=absnames[j],rotation=90,fontsize=10)

plt.ylim(500,5000) plt.xlim(4750,8900)

plt.title("Spectra of different Regions of Galaxy") plt.legend()

7 plt.xlabel("Wavelength (Å)") plt.ylabel("1e-20 erg/(Å cm^2 s") plt.grid() plt.show()

[351]: wavelength= np.arange(4750.1083984,9352.6083984,1.25) wavelength= wavelength/(1+redshift)

plt.figure(figsize=(7,7))

plt.plot(wavelength,center_specdat,color="green",linewidth=1,alpha=.75,␣ ,→label="Center/8") plt.plot(wavelength,right_specdat,color="red",linewidth=1.0,alpha=. ,→75,label="Northwest") plt.plot(wavelength,left_specdat,color="blue",linewidth=1.0,alpha=. ,→75,label="Southeast")

forj in range(3,5): plt.axvline(absarray[j],linewidth=1, alpha=. ,→5,color="fuchsia",linestyle="dashed") plt.text(absarray[j]-10,450,s=absnames[j],rotation=90,fontsize=15) plt.ylim(300,2750) plt.xlim(5840,5940)

plt.title("Spectra Near NaD of different Regions of Galaxy") plt.legend() plt.xlabel("Wavelength (Å)") plt.ylabel("1e-20 erg/(Å cm^2 s") plt.show()

8 [ ]:

[ ]:

9 Maps_Class_0428

May 9, 2020

[1]: ### notebook for plotting maps ### Emily Walla, Stephanie Juneau, Madison Walder ### May 8 2020

[2]: # make necessary inputs import numpy as np

import matplotlib.pyplot as plt import matplotlib.colors as colors

from astropy.io import fits import astropy.units asu

#mpdaf used to manipulate the MUSE datacube from mpdaf.obj import Cube, WCS, WaveCoord, Image from mpdaf.drs import PixTable

import os import optparse import warnings warnings.filterwarnings('ignore') from matplotlib.tri import Triangulation, TriAnalyzer

from mpl_toolkits.axes_grid1 import AxesGrid from matplotlib.ticker import MultipleLocator, FuncFormatter

from plotbin.sauron_colormap import register_sauron_colormap register_sauron_colormap()

# necessary to make matplotlib function well in the jupyter environment %matplotlib inline

[3]: # set path and outdirectory path="data/gistTutorial/results/jeso-47509200-fullimg-030220_042920A/" outdir="Maps_Class_outdir"2

1 [4]: # call the gandalf emission line file so you can see which numbers correspond to␣ ,→which lines file= fits.open(path+"jeso-47509200-fullimg-030220_gandalf_BIN.fits") file[1].data

[4]: FITS_rec([( 0., 0., 'HeII', 3203.15, 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), ( 1., 1., '[NeV]', 3345.81, 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), ( 2., 2., '[NeV]', 3425.81, 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), ( 3., 3., '[OII]', 3726.03, 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), ( 4., 4., '[OII]', 3728.73, 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), ( 5., 5., '[NeIII]', 3868.69, 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), ( 6., 6., '[NeIII]', 3967.4 , 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), ( 7., 11., '[OIII]', 4363.15, 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), ( 8., 12., 'HeII', 4685.74, 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), ( 9., 13., '[ArIV]', 4711.3 , 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (10., 14., '[ArIV]', 4740.1 , 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (11., 15., 'Hb', 4861.32, 'f', 'l', 0.35, 0., 10., 't24', 2.56914136e-322), (12., 17., '[OIII]', 5006.77, 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (13., 18., '[NI]', 5197.9 , 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (14., 19., '[NI]', 5200.39, 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (15., 20., 'HeI', 5875.6 , 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (16., 21., '[OI]', 6300.2 , 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (17., 24., 'Ha', 6562.8 , 'f', 'l', 1. , 0., 10., 'f', 2.56914136e-322), (18., 25., '[NII]', 6583.34, 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (19., 26., '[SII]', 6716.31, 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (20., 27., '[SII]', 6730.68, 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322),

2 (21., 30., '[ArIII]', 7135.67, 'f', 'l', 1. , 0., 10., 't24', 2.56914136e-322), (22., 100., 'NaI', 5890. , 'f', 'l', -1. , 0., 10., 't101', 1.10343781e-312), (23., 101., 'NaI', 5896. , 'f', 'l', -1. , 0., 10., 'f', 1.10343781e-312), (24., 313., '[ArIV]w', 4711.3 , 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (25., 314., '[ArIV]w', 4740.1 , 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (26., 315., 'Hbw', 4861.32, 'f', 'l', 0.35, -200., 50., 't317', 2.56914136e-322), (27., 317., '[OIII]w', 5006.77, 'f', 'l', 1. , -200., 50., 'f', 2.56914136e-322), (28., 318., '[NI]w', 5197.9 , 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (29., 319., '[NI]w', 5200.39, 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (30., 320., 'HeIw', 5875.6 , 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (31., 321., '[OI]w', 6300.2 , 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (32., 324., 'Haw', 6562.8 , 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (33., 325., '[NII]w', 6583.34, 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (34., 326., '[SII]w', 6716.31, 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (35., 327., '[SII]w', 6730.68, 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (36., 330., '[ArIII]w', 7135.67, 'f', 'l', 1. , -200., 50., 't317', 2.56914136e-322), (37., 415., 'Hbrw', 4861.32, 'f', 'l', 0.35, 200., 50., 't417', 2.56914136e-322), (38., 417., '[OIII]rw', 5006.77, 'f', 'l', 1. , 200., 50., 'f', 2.56914136e-322), (39., 424., 'Harw', 6562.8 , 'f', 'l', 1. , 200., 50., 't417', 2.56914136e-322), (40., 425., '[NII]rw', 6583.34, 'f', 'l', 1. , 200., 50., 't417', 2.56914136e-322)], dtype=(numpy.record, [('LINE_ID', '>f8'), ('i', '>f8'), ('name', 'S15'), ('_lambda', '>f8'), ('action', 'S15'), ('kind', 'S15'), ('a', '>f8'), ('v', '>f8'), ('s', '>f8'), ('fit', 'S15'), ('aon', '>f8')]))

[89]: class Maps: # Class to make maps of GIST outputs

3 # with customizable colorbars, the ability to take line ratios, and the␣ ,→ability to make side-by-side plots # of things that aren't side-by-side in the GIST outputs

def __init__(self,outdir,LEVEL="BIN"): # Initialize the instance of this Class # from GIST sourcecode

# read data in using the given outdir: self.runname= outdir self.rootname= outdir.split( '/')[-2].split('_')[0]

# Read bintable self.table_hdu= fits.open(outdir+self.rootname+ '_table.fits') self.X= np.array( self.table_hdu[1].data.X) self.Y= np.array( self.table_hdu[1].data.Y) self.FLUX= np.array( self.table_hdu[1].data.FLUX ) self.binNum_long= np.array( self.table_hdu[1].data.BIN_ID ) self.ubins= np.unique( np.abs(self.binNum_long) ) self.pixelsize= self.table_hdu[0].header[ 'PIXSIZE']

# Read in ppxf table: self.hdu= fits.open(outdir+self.rootname+ '_ppxf.fits') self.result= np.empty((len(self.ubins),4)) self.result[:,0]= np.array( self.hdu[1].data.V) self.result[:,1]= np.array( self.hdu[1].data.SIGMA ) self.result[:,2]= np.array( self.hdu[1].data.H3 ) self.result[:,3]= np.array( self.hdu[1].data.H4 )

# Convert results to long version self.result_long= np.zeros( (len(self.binNum_long), self.result. ,→shape[1]) ); self.result_long[:,:]= np.nan fori in range( len(self.ubins) ): self.idx= np.where( self.ubins[i] == np.abs(self.binNum_long) )[0] self.result_long[self.idx,:]= self.result[i,:] self.result= self.result_long self.result[:,0]= self.result[:,0]- np.nanmedian(self.result[:,0])

# read GANDALF result if LEVEL == 'SPAXEL': self.gandalf_emisetup= fits.open(outdir+self. ,→rootname+'_gandalf_SPAXEL.fits')[1].data self.gandalf_raw= fits.open(outdir+self. ,→rootname+'_gandalf_SPAXEL.fits')[2].data elif LEVEL == 'BIN': self.gandalf_emisetup= fits.open(outdir+self.rootname+ '_gandalf_BIN. ,→fits')[1].data

4 self.gandalf_raw= fits.open(outdir+self.rootname+ '_gandalf_BIN. ,→fits')[2].data self.gandalf_Flux= np.array( self.gandalf_raw.FLUX ) self.gandalf_Ampl= np.array( self.gandalf_raw.AMPL ) self.gandalf_Vel= np.array( self.gandalf_raw.V) self.gandalf_Sigma= np.array( self.gandalf_raw.SIGMA ) self.gandalf_AoN= np.array( self.gandalf_raw.AON )

if LEVEL == 'BIN': self.gandalf_Flux_long= np.zeros( (len(self.binNum_long), self. ,→gandalf_Flux.shape[1]) ); self.gandalf_Flux_long[:,:]= np.nan self.gandalf_Ampl_long= np.zeros( (len(self.binNum_long), self. ,→gandalf_Ampl.shape[1]) ); self.gandalf_Ampl_long[:,:]= np.nan self.gandalf_Vel_long= np.zeros( (len(self.binNum_long), self. ,→gandalf_Vel.shape[1]) ); self.gandalf_Vel_long[:,:]= np.nan self.gandalf_Sigma_long= np.zeros( (len(self.binNum_long), self. ,→gandalf_Sigma.shape[1])); self.gandalf_Sigma_long[:,:]= np.nan self.gandalf_AoN_long= np.zeros( (len(self.binNum_long), self. ,→gandalf_AoN.shape[1]) ); self.gandalf_AoN_long[:,:]= np.nan

fori in range( len(self.ubins) ): idx= np.where( self.ubins[i] == np.abs(self.binNum_long) )[0] self.gandalf_Flux_long[idx,:]= self.gandalf_Flux[i,:] self.gandalf_Ampl_long[idx,:]= self.gandalf_Ampl[i,:] self.gandalf_Vel_long[idx,:]= self.gandalf_Vel[i,:] self.gandalf_Sigma_long[idx,:]= self.gandalf_Sigma[i,:] self.gandalf_AoN_long[idx,:]= self.gandalf_AoN[i,:]

self.gandalf_Flux= self.gandalf_Flux_long self.gandalf_Ampl= self.gandalf_Ampl_long self.gandalf_Vel= self.gandalf_Vel_long self.gandalf_Sigma= self.gandalf_Sigma_long self.gandalf_AoN= self.gandalf_AoN_long

self.gandalf_Flux= np.array( self.gandalf_Flux ) self.gandalf_Ampl= np.array( self.gandalf_Ampl ) self.gandalf_Vel= np.array( self.gandalf_Vel ) self.gandalf_Sigma= np.array( self.gandalf_Sigma ) self.gandalf_AoN= np.array( self.gandalf_AoN )

self.X= np.array( self.X) self.Y= np.array( self.Y)

def TicklabelFormatter(self,x,pos): # formats the tick label

5 # how? I have no idea -- EW return("${}$".format(int(x))) def setup_plot(self,usetex= False): # from GIST fontsize= 14 dpi= 300

plt.rc('font', family='serif') plt.rc('text', usetex=usetex)

plt.rcParams['axes.labelsize']= fontsize plt.rcParams['legend.fontsize']= fontsize-3 plt.rcParams['font.size']= fontsize

plt.rcParams['xtick.major.pad']= '7' plt.rcParams['ytick.major.pad']= '7'

plt.rcParams['text.latex.preamble']=[r '\boldmath'] def velocity_set(self, vminmax, iterate, FLAG): # set vmin, vmax for colormap # inputs: custom: None, or a custom array; FLAG: "PPXF" or "GANDALF" # returns: vmin, vmax in km/s

#default values if vminmax is None: if FLAG =="GANDALF": vmin_init=[-100, 60,0,0] vmax_init=[100, 160, 10, 1e5] elif FLAG =="PPXF": vmin_init=[-100, 60,-0.2,-0.2] vmax_init=[100, 160, 0.2, 0.2]

vminmax=np.zeros((4,2)) vminmax[:,0]= vmin_init vminmax[:,1]= vmax_init vmin= vminmax[iterate,0] vmax= vminmax[iterate,1] # customizable values else: vmin= vminmax[iterate,0] vmax= vminmax[iterate,1]

return vmin, vmax

6 def ImageInPixels(self, val, vmin, vmax, grid, cmaplist, iterate, FLAG): # create image in pixels # inputs: val, vmin, vmax, grid, cmaplist, iterate, all from code # FLAG: "PPXF" or "GANDALF" # outputs: image, a plot

xmin= np.nanmin(self.X)-6; xmax= np.nanmax(self.X)+6 ymin= np.nanmin(self.Y)-6; ymax= np.nanmax(self.Y)+6 npixels_x= int( np.round( (xmax- xmin)/self.pixelsize )+1) npixels_y= int( np.round( (ymax- ymin)/self.pixelsize )+1) i= np.array( np.round( (self.X- xmin)/self.pixelsize ), dtype=np.int ) j= np.array( np.round( (self.Y- ymin)/self.pixelsize ), dtype=np.int ) image= np.full( (npixels_x, npixels_y), np.nan ) image[i,j]= val

if FLAG =="GANDALF": plottype=0 else: plottype= iterate #plottype = iterate image= grid[plottype].imshow(np.rot90(image), cmap=cmaplist[iterate],␣ ,→interpolation=None, vmin=vmin, vmax=vmax, \ extent=[xmin-self.pixelsize/2, xmax+self.pixelsize/2, ymin-self. ,→pixelsize/2, ymax+self.pixelsize/2])

return image

def plot_PPXF(self, outdir, vminmax=None, contour_offset_saved=0.20,␣ ,→contour=False): # Create/Set output directory # EW - we don't need this rn for our purposes # can uncomment later if needed # if os.path.isdir(outdir+'maps/') == False: # os.mkdir(outdir+'maps/') # outdir = outdir+'maps/'

# set list of colormaps cmaplist=[ 'RdYlBu_r', 'RdYlBu_r', 'RdYlBu', 'RdYlBu_r'] # Setup main figure self.setup_plot() fig= plt.figure(figsize=(16,16)) grid= AxesGrid(fig, 111, nrows_ncols=(2,2),axes_pad= 1.5,␣ ,→share_all=True,\ label_mode="all", cbar_location="right", cbar_mode="each",␣ ,→cbar_size='4%', cbar_pad="2%")

7 for iterate in range(0,4): # Prepare main plot val= self.result[:,iterate] vmin, vmax= self.velocity_set(vminmax, iterate, FLAG="PPXF")

#invert x-axis #grid[iterate].invert_xaxis()

image= self.ImageInPixels(val, vmin, vmax, grid, cmaplist,␣ ,→iterate,FLAG="PPXF") # set colorbar ticks grid.cbar_axes[iterate].colorbar(image)

if contour==True: Y_Triangulation= Triangulation(self.X-self.pixelsize/2, self. ,→Y-self.pixelsize/2) # Create a mesh from a Delaunay␣ ,→triangulation XY_Triangulation.set_mask( TriAnalyzer(XY_Triangulation). ,→get_flat_tri_mask(0.01)) # Remove bad triangles at the border of the␣ ,→field-of-view levels= np.arange( np.min(np.log10( self.FLUX ))+␣ ,→contour_offset, np.max(np.log10( self.FLUX )), 0.2) grid[iterate].tricontour(XY_Triangulation, np.log10(self.FLUX),␣ ,→levels=levels, linewidths=1, colors='k') else: print("Contours will not be plotted")

# Set tick labels from colorbar for cax in grid.cbar_axes: cax.tick_params(labelsize=12)

# Set V, SIGMA, H3, H4 labels grid[0].text(0.02, 0.98,r '$V_{stellar} (km/s) $',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[0]. ,→transAxes, fontsize=16) grid[1].text(0.02, 0.98,r '$\sigma_{stellar} (km/s)$',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[1]. ,→transAxes, fontsize=16) grid[2].text(0.02, 0.98,r 'h3',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[2]. ,→transAxes, fontsize=16) grid[3].text(0.02, 0.98,r 'h4',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[3]. ,→transAxes, fontsize=16) # Set xlabel and ylabel

8 grid[0].set_ylabel(r'$\Delta\delta$ [arcsec] ') grid[2].set_ylabel(r'$\Delta\delta$ [arcsec] ') grid[0].set_xlabel(r'$\Delta\alpha$ [arcsec] ') grid[1].set_xlabel(r'$\Delta\alpha$ [arcsec] ') grid[2].set_xlabel(r'$\Delta\alpha$ [arcsec] ') grid[3].set_xlabel(r'$\Delta\alpha$ [arcsec] ')

# Invert x-axis # grid[0].invert_xaxis()

# adjust white space fig.subplots_adjust(wspace=0.5, hspace=0.05)

plt.show()

def Gandalf_setup_plot(self, wings): self.setup_plot(usetex=False)

if wings =="yes": fig= plt.figure(figsize=(21,7)); grid=␣ ,→AxesGrid(fig,111, nrows_ncols=(1,3), axes_pad=0.0,\ share_all=True, label_mode="L",␣ ,→cbar_location="right", cbar_mode="single", cbar_size='6%') else: fig= plt.figure(figsize=(7,7)); grid= AxesGrid(fig, 111,␣ ,→nrows_ncols=(1,1), axes_pad=0.0,\ share_all=True, label_mode="L", cbar_location="right",␣ ,→cbar_mode="single", cbar_size='6%') contour_offset= 0.20 return grid

def Gandalf_plot_line(self,outdir,operation, line_idx, vminmax,␣ ,→AoNThreshold, LEVEL, iterate, lineIdentifier, contour_offset_saved,title): if operation ==1: print("operation selected: SUBTRACTION") elif operation ==2: print("operation selected: RATIO") elif operation ==0: print("operation selected: NONE") else: print("invalid operation input. please input 0, 1 or 2."); exit(1) # get lists labellist=[ 'V', 'S', 'F', 'A'] cmaplist=["RdYlBu_r","RdYlBu_r","RdYlBu_r","RdYlBu_r"] title= [title] # set line indices if type(line_idx) == int: line1= np.array([line_idx]) line2=0 wings="no" FLAG="GANDALF"

9 iterate_for_img= np.array([iterate]) cmaplist=["RdYlBu_r","RdYlBu_r","RdYlBu_r","RdYlBu_r"] else: # plot multiple plots if len(line_idx)>=3: if iterate>=2: cmaplist=["RdYlBu_r","RdYlBu_r","RdYlBu_r"] else:cmaplist=["RdYlBu_r","RdYlBu_r","RdYlBu_r"]

iterate_for_img= np.array([0,1,2]) wings="yes" line1= np.zeros(3) i=0 title=["%s Blue Wing"%title, "%s Core" %title, "%s Red␣ ,→Wing"%title] fori in range(3): line1[i]= line_idx[i] if operation>=1: line2= np.zeros(3) forj in range(3,6): line2[j-3]= line_idx[j] FLAG= None # plot one plot, with operation else: wings="no" print(wings) line1= np.array([line_idx[0]]) line2= np.array([line_idx[1]]) FLAG="GANDALF" iterate_for_img= np.array([iterate]) cmaplist=["RdYlBu_r","RdYlBu_r","RdYlBu_r","RdYlBu_r"]

# Setup main figure grid= self.Gandalf_setup_plot(wings)

# set vmin, vmax for colorbar vmin, vmax= self.velocity_set(vminmax, iterate, FLAG) print("vmin, vmax set:", vmin, vmax) i=0 fori in range(len(line1)): line= int(line1[i]) print(line) if operation>=1: linetwo= int(line2[i]) # Velocity if iterate ==0: # set if there is an operation or not

10 if operation ==1: val= np.subtract(self.gandalf_Vel[: ,→,line],self.gandalf_Vel[:,linetwo]) elif operation ==2: val= np.divide(self.gandalf_Vel[: ,→,line],self.gandalf_Vel[:,linetwo]) elif operation ==0: val= self.gandalf_Vel[:,line] # Dispersion if iterate ==1: if operation ==0: val= self.gandalf_Sigma[:,line] elif operation ==1: val= np.subtract(self.gandalf_Sigma[: ,→,line],self.gandalf_Sigma[:, linetwo]) elif operation ==2: val= np.divide(self.gandalf_Sigma[: ,→,line1],self.gandalf_Sigma[:, linetwo]) # Flux if iterate ==2: if operation ==1: val= np.subtract(( self.gandalf_Flux[:,line]␣ ,→),( self.gandalf_Flux[:,linetwo] )) elif operation ==2: val= np.divide(( self.gandalf_Flux[:,line]␣ ,→),( self.gandalf_Flux[:,linetwo] )) elif operation ==0: val=( self.gandalf_Flux[:,line] ) # Amplitude if iterate ==3: if operation ==1: val= np.subtract( self.gandalf_Ampl[: ,→,line],( self.gandalf_Ampl[:,linetwo] ) ) elif operation ==2: val= np.divide( self.gandalf_Ampl[: ,→,line],( self.gandalf_Ampl[:,linetwo] ) ) elif operation ==0: val= self.gandalf_Ampl[:,line] # check that the results are real numbers

if len( np.where( np.isnan(val) == True)[0]) == len(val): print("whoops! All NaNs!") return(None)

# Create image in pixel image= self.ImageInPixels(val, vmin, vmax, grid, cmaplist,␣ ,→iterate_for_img[i], FLAG) if iterate ==2 or3: grid.cbar_axes[i].colorbar(image,norm=colors.LogNorm()) else: grid.cbar_axes[i].colorbar(image) # Set labels # title grid[i].text(0.985, 0.975, title[i] , horizontalalignment='right',␣ ,→verticalalignment='top', transform= grid[i].transAxes, fontsize=16) # Set xlabel and ylabel grid[i].set_xlabel(r'$\Delta\alpha$ [arcsec] '); grid[i]. ,→set_ylabel(r'$\Delta\delta$ [arcsec] ')

11 # plot type if iterate ==0: grid[0].text(0.02, 0.98,r '$V$ $ (km/s) $',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[0]. ,→transAxes, fontsize=16) elif iterate ==1: grid[0].text(0.02, 0.98,r '$\sigma (km/s)$',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[0]. ,→transAxes, fontsize=16) elif iterate ==2: grid[0].text(0.02, 0.98,r ' Flux ',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[0]. ,→transAxes, fontsize=16) elif iterate ==3: grid[0].text(0.02, 0.98,r ' Ampl ',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[0]. ,→transAxes, fontsize=16)

# Fix minus sign in ticklabels grid[0].xaxis.set_major_formatter(FuncFormatter(self.TicklabelFormatter)) grid[0].yaxis.set_major_formatter(FuncFormatter(self.TicklabelFormatter)) # Set tick frequency and parameters grid[0].xaxis.set_major_locator(MultipleLocator(10)); grid[i].yaxis. ,→set_major_locator(MultipleLocator(10)) # Major tick every 10 units grid[0].xaxis.set_minor_locator(MultipleLocator(1)); grid[i].yaxis. ,→set_minor_locator(MultipleLocator(1)) # Minor tick every 1 units grid[0].tick_params(direction="in", which='both', bottom=True, top=True,␣ ,→left=True, right=True) # Ticks inside of plot plt.show()

# Save plot #plt.savefig(outdir+self. ,→rootname+'_gandalf-'+lineIdentifier[0]+lineIdentifier[1]+'_'+labellist[iterate]+'_'+LEVEL+'. ,→pdf', bbox_inches='tight', pad_inches=0.3)

def Gandalf_plot_maps(self, outdir, operation, line_idx, plottype,vminmax,␣ ,→AoNThreshold, LEVEL="BIN", title="Title"): # Get list of emission lines linelist=[] fori in range( len(self.gandalf_emisetup.name) ): linelist.append( [self.gandalf_emisetup.name[i].decode('utf-8'),␣ ,→str(self.gandalf_emisetup._lambda[i])] ) # Apply AoN threshold to GANDALF fori in range(0, self.gandalf_AoN.shape[1]):

12 if AoNThreshold<0: idx_AoNThreshold= np.where( self.gandalf_AoN[: ,→,i]> AoNThreshold )[0] else: idx_AoNThreshold= np.where( self.gandalf_AoN[:,i]<␣ ,→AoNThreshold )[0]

self.gandalf_Flux[idx_AoNThreshold,i]= np.nan self.gandalf_Ampl[idx_AoNThreshold,i]= np.nan self.gandalf_Vel[idx_AoNThreshold,i]= np.nan self.gandalf_Sigma[idx_AoNThreshold,i]= np.nan self.gandalf_AoN[idx_AoNThreshold,i]= np.nan

self.gandalf_Flux[ np.where(self.gandalf_Flux ==-1)[0]]= np.nan self.gandalf_Ampl[ np.where(self.gandalf_Ampl ==-1)[0]]= np.nan self.gandalf_Vel[ np.where(self.gandalf_Vel ==-1)[0]]= np.nan self.gandalf_Sigma[np.where(self.gandalf_Sigma==-1)[0]]= np.nan

self.gandalf_Vel= self.gandalf_Vel- np.nanmedian( self.gandalf_Vel )

# Create/Set output directory if os.path.isdir(outdir+'maps/') == False: os.mkdir(outdir+'maps/') outdir= outdir+ 'maps/'

# set plottype if type(line_idx) == int: lineIdentifier= linelist[int(line_idx)] else: lineIdentifier= linelist[int(line_idx[0])] if plottype == 'V': iterate=0 elif plottype == 'S': iterate=1 elif plottype == 'F': iterate=2 elif plottype == 'A': iterate=3 else: print("No plottype set. Exit!"); exit(1) contour_offset_saved=.2

self.Gandalf_plot_line(outdir,operation, line_idx, vminmax,␣ ,→AoNThreshold, LEVEL,iterate, lineIdentifier, contour_offset_saved,title)

def Gandalf_gistPlot(self,outdir, operation, line, plottype, vminmax,␣ ,→AoN_Threshold, level="BIN", title="Title"): print("line", line,"selected")

self.Gandalf_plot_maps(outdir,operation,line_idx=line,␣ ,→plottype=plottype, vminmax=vminmax, AoNThreshold=AoN_Threshold,␣ ,→LEVEL=level,title=title)

plt.show()

13 ########## Sigma Over V ########## def SigmaOverV(self, outdir, line, vminmax, AoNThreshold, level="Bin",␣ ,→title="Title"): FLAG="GANDALF" iterate=0 # Create/Set output directory if os.path.isdir(outdir+'maps/') == False: os.mkdir(outdir+'maps/') outdir= outdir+ 'maps/' linelist=[] fori in range( len(self.gandalf_emisetup.name) ): linelist.append( [self.gandalf_emisetup.name[i].decode('utf-8'),␣ ,→str(self.gandalf_emisetup._lambda[i])] ) # Apply AoN threshold to GANDALF fori in range(0, self.gandalf_AoN.shape[1]):

if AoNThreshold<0: idx_AoNThreshold= np.where( self.gandalf_AoN[: ,→,i]> AoNThreshold )[0] else: idx_AoNThreshold= np.where( self.gandalf_AoN[:,i]<␣ ,→AoNThreshold )[0]

self.gandalf_Vel[idx_AoNThreshold,i]= np.nan self.gandalf_Sigma[idx_AoNThreshold,i]= np.nan self.gandalf_AoN[idx_AoNThreshold,i]= np.nan print("AoN threshold determined:", AoNThreshold)

self.gandalf_Vel[ np.where(self.gandalf_Vel ==-1)[0]]= np.nan self.gandalf_Sigma[np.where(self.gandalf_Sigma==-1)[0]]= np.nan

self.gandalf_Vel= self.gandalf_Vel- np.nanmedian( self.gandalf_Vel )

val= np.abs(np.divide(self.gandalf_Vel[:,line],self.gandalf_Sigma[: ,→,line])) if len( np.where( np.isnan(val) == True)[0]) == len(val): print("whoops! All NaNs!") return(None)

# Setup main figure grid= self.Gandalf_setup_plot(wings="no")

# set vmin, vmax for colorbar vmin, vmax= self.velocity_set(vminmax, iterate, FLAG) print("vmin, vmax set:", vmin, vmax) cmaplist=["RdYlBu_r"] image= self.ImageInPixels(val, vmin, vmax, grid, cmaplist, iterate,␣ ,→FLAG)

14 grid.cbar_axes[0].colorbar(image) # Set labels # title grid[0].text(0.985, 0.975, title, horizontalalignment='right',␣ ,→verticalalignment='top', transform= grid[0].transAxes, fontsize=16) # Set xlabel and ylabel grid[0].set_xlabel(r'$\Delta\alpha$ [arcsec] '); grid[0]. ,→set_ylabel(r'$\Delta\delta$ [arcsec] ') grid[0].text(0.02, 0.98,r '$\sigma$/V $ (km/s) $',␣ ,→horizontalalignment='left', verticalalignment='top', transform=grid[0]. ,→transAxes, fontsize=16) # Fix minus sign in ticklabels grid[0].xaxis.set_major_formatter(FuncFormatter(self.TicklabelFormatter)) grid[0].yaxis.set_major_formatter(FuncFormatter(self.TicklabelFormatter)) # Set tick frequency and parameters grid[0].xaxis.set_major_locator(MultipleLocator(10)); grid[0].yaxis. ,→set_major_locator(MultipleLocator(10)) # Major tick every 10 units grid[0].xaxis.set_minor_locator(MultipleLocator(1)); grid[0].yaxis. ,→set_minor_locator(MultipleLocator(1)) # Minor tick every 1 units grid[0].tick_params(direction="in", which='both', bottom=True, top=True,␣ ,→left=True, right=True) # Ticks inside of plot plt.show()

######### Star Gas Difference ########## def StarGasDifference(self, outdir, line,vminmax, plottype, AoNThreshold,␣ ,→LEVEL, title, AoNToggle= True): # inputs: # outdir, line, plottype, vminmax, AoNThreshold, LEVEL, title,␣ ,→described at top # AoNToggle: decides if an AoNThreshold will be applied to the map

# Get list of emission lines linelist=[] fori in range( len(self.gandalf_emisetup.name) ): linelist.append( [self.gandalf_emisetup.name[i].decode('utf-8'),␣ ,→str(self.gandalf_emisetup._lambda[i])] ) FLAG="GANDALF"

# call the gas information gas_vel= self.gandalf_Vel[:,line] gas_sigma= self.gandalf_Sigma[:,line] gas_flux= self.gandalf_Flux[:,line] gas_ampl= self.gandalf_Ampl[:,line]

# call the stellar information star_vel= self.result[:,0]

15 star_sigma= self.result[:,1] star_flux= self.result[:,2] star_ampl= self.result[:,3]

# subtract gas from stars starGasDiff_Vel= np.subtract(gas_vel, star_vel) starGasDiff_Sigma= np.subtract(gas_sigma, star_sigma) starGasDiff_Flux= np.subtract(gas_flux, star_flux) starGasDiff_Ampl= np.subtract(gas_ampl, star_ampl)

# Apply AoN threshold to GANDALF if AoNToggle == True:

if AoNThreshold<0: idx_AoNThreshold= np.where( self.gandalf_AoN[: ,→,line]> AoNThreshold )[0] else: idx_AoNThreshold= np.where( self.gandalf_AoN[:,line]<␣ ,→AoNThreshold )[0]

starGasDiff_Flux[idx_AoNThreshold]= np.nan starGasDiff_Ampl[idx_AoNThreshold]= np.nan starGasDiff_Vel[idx_AoNThreshold]= np.nan starGasDiff_Sigma[idx_AoNThreshold]= np.nan self.gandalf_AoN[idx_AoNThreshold]= np.nan

# still using the GANDALF values to decide where not to plot starGasDiff_Flux[ np.where(self.gandalf_Flux ==-1)[0]]= np.nan starGasDiff_Ampl[ np.where(self.gandalf_Ampl ==-1)[0]]= np.nan starGasDiff_Vel[ np.where(self.gandalf_Vel ==-1)[0]]= np.nan starGasDiff_Sigma[np.where(self.gandalf_Sigma==-1)[0]]= np.nan

starGasDiff_Vel= starGasDiff_Vel- np.nanmedian( starGasDiff_Vel )

# set plottype if plottype == 'V': iterate=0; val= starGasDiff_Vel elif plottype == 'S': iterate=1; val= starGasDiff_Sigma elif plottype == 'F': iterate=2; val= starGasDiff_Flux elif plottype == 'A': iterate=3; val= starGasDiff_Ampl

# check that we don't have arrays of entirely nans if len( np.where( np.isnan(val) == True)[0]) == len(val): print("whoops! All NaNs!") return(None)

# set vmin, vmax for colormap vmin, vmax= self.velocity_set(vminmax, iterate, FLAG)

# set up for plots

16 labellist=[ 'V', 'S', 'F', 'A'] cmaplist=["RdYlBu_r","RdYlBu_r","Blues","Blues"]

# Setup main figure grid= self.Gandalf_setup_plot(wings="no")

image= self.ImageInPixels(val, vmin, vmax, grid, cmaplist, iterate,␣ ,→FLAG)

if iterate ==2: grid.cbar_axes[0].colorbar(image, norm=colors.LogNorm()) else: grid.cbar_axes[0].colorbar(image) # Set labels # title grid[0].text(0.985, 0.975, title , horizontalalignment='right',␣ ,→verticalalignment='top', transform= grid[0].transAxes, fontsize=16) # plot type if iterate ==0: grid[0].text(0.02, 0.98,r '$V$ $ (km/s) $',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[0]. ,→transAxes, fontsize=16) elif iterate ==1: grid[0].text(0.02, 0.98,r '$\sigma [km/s]$',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[0]. ,→transAxes, fontsize=16) elif iterate ==2: grid[0].text(0.02, 0.98,r ' Flux ',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[0]. ,→transAxes, fontsize=16) elif iterate ==3: grid[0].text(0.02, 0.98,r ' Ampl ',␣ ,→horizontalalignment='left', verticalalignment='top', transform= grid[0]. ,→transAxes, fontsize=16)

# Set xlabel and ylabel grid[0].set_xlabel(r'$\Delta\alpha$ [arcsec] ') grid[0].set_ylabel(r'$\Delta\delta$ [arcsec] ')

# Fix minus sign in ticklabels grid[0].xaxis.set_major_formatter(FuncFormatter(self.TicklabelFormatter)) grid[0].yaxis.set_major_formatter(FuncFormatter(self.TicklabelFormatter))

# Set tick frequency and parameters grid[0].xaxis.set_major_locator(MultipleLocator(10)); grid[0].yaxis. ,→set_major_locator(MultipleLocator(10)) # Major tick every 10 units grid[0].xaxis.set_minor_locator(MultipleLocator(1)); grid[0].yaxis. ,→set_minor_locator(MultipleLocator(1)) # Minor tick every 1 units

17 grid[0].tick_params(direction="in", which='both', bottom=True, top=True,␣ ,→left=True, right=True) # Ticks inside of plot # Save plot #plt.savefig(outdir+self. ,→rootname+'_gandalf-'+lineIdentifier[0]+lineIdentifier[1]+'_'+labellist[iterate]+'_'+LEVEL+'. ,→png', bbox_inches='tight', pad_inches=0.3) plt.show()

[105]: # create instance of the class test= Maps(path)

[113]: vminmax_gandalf=np.zeros((4,2)) vmin_init_gandalf=[-200,0,0,-150] #min value for colorbar for: V, sigma,␣ ,→h3, h4 vmax_init_gandalf=[200, 150, 50000, 150] #max value for colorbar for: V,␣ ,→sigma, h3, h4 vminmax_gandalf[:,0]= vmin_init_gandalf vminmax_gandalf[:,1]= vmax_init_gandalf line= np.array([32,17,38]) test.Gandalf_gistPlot(path,0,line,plottype="V",␣ ,→vminmax=vminmax_gandalf,AoN_Threshold=4, title="H") test.Gandalf_gistPlot(path,0,line,plottype="S",␣ ,→vminmax=vminmax_gandalf,AoN_Threshold=4, title="H")

vminmax_gandalf=np.zeros((4,2)) vmin_init_gandalf=[-200,0,0,-150] #min value for colorbar for: V, sigma,␣ ,→h3, h4 vmax_init_gandalf=[200, 150, 50000, 150] #max value for colorbar for: V,␣ ,→sigma, h3, h4 vminmax_gandalf[:,0]= vmin_init_gandalf vminmax_gandalf[:,1]= vmax_init_gandalf line= np.array([33,18,39]) test.Gandalf_gistPlot(path,0,line,plottype="V",␣ ,→vminmax=vminmax_gandalf,AoN_Threshold=4, title="N[II]") test.Gandalf_gistPlot(path,0,line,plottype="S",␣ ,→vminmax=vminmax_gandalf,AoN_Threshold=4, title="N[II]")

line [32 17 38] selected operation selected: NONE vmin, vmax set: -200.0 200.0 32 17 38

18 line [32 17 38] selected operation selected: NONE vmin, vmax set: 0.0 150.0 32 17 38

line [33 18 39] selected operation selected: NONE vmin, vmax set: -200.0 200.0 33 18 39

19 line [33 18 39] selected operation selected: NONE vmin, vmax set: 0.0 150.0 33 18 39

[109]: vminmax_gandalf=np.zeros((4,2)) vmin_init_gandalf=[-200,0,0,-150] #min value for colorbar for: V, sigma,␣ ,→h3, h4 vmax_init_gandalf=[200, 150, 50000, 150] #max value for colorbar for: V,␣ ,→sigma, h3, h4 vminmax_gandalf[:,0]= vmin_init_gandalf vminmax_gandalf[:,1]= vmax_init_gandalf line= np.array([27,12,37])

test.Gandalf_gistPlot(path,0,line,plottype="V",␣ ,→vminmax=vminmax_gandalf,AoN_Threshold=2, title="O[III]") test.Gandalf_gistPlot(path,0,line,plottype="S",␣ ,→vminmax=vminmax_gandalf,AoN_Threshold=2, title="O[III]")

20 line [27 12 37] selected operation selected: NONE vmin, vmax set: -200.0 200.0 27 12 37

line [27 12 37] selected operation selected: NONE vmin, vmax set: 0.0 150.0 27 12 37

[83]: #N2/Ha, O3/Hb vminmax_gandalf=np.zeros((4,2)) vmin_init_gandalf=[-100, 50,0,0] #min value for colorbar for: V, sigma,␣ ,→h3, h4 vmax_init_gandalf=[100, 150,3,5] #max value for colorbar for: V, sigma, h3,␣ ,→h4

21 vminmax_gandalf[:,0]= vmin_init_gandalf vminmax_gandalf[:,1]= vmax_init_gandalf line= np.array([33,18,39,32,17,38]) test.Gandalf_gistPlot(path,2,line,plottype="A",␣ ,→vminmax=vminmax_gandalf,AoN_Threshold=4, title="N[II]/Ha")

#N2/Ha, O3/Hb vminmax_gandalf=np.zeros((4,2)) vmin_init_gandalf=[-100, 50,0,0] #min value for colorbar for: V, sigma,␣ ,→h3, h4 vmax_init_gandalf=[100, 150,3, 10] #max value for colorbar for: V, sigma,␣ ,→h3, h4 vminmax_gandalf[:,0]= vmin_init_gandalf vminmax_gandalf[:,1]= vmax_init_gandalf lineo3= np.array([27,12,38,26,11,37]) test.Gandalf_gistPlot(path,2,lineo3,plottype="A",␣ ,→vminmax=vminmax_gandalf,AoN_Threshold=4, title="O[III]/Hb") line [33 18 39 32 17 38] selected operation selected: RATIO vmin, vmax set: 0.0 5.0 33 18 39

line [27 12 38 26 11 37] selected operation selected: RATIO vmin, vmax set: 0.0 10.0 27 12 38

22 [10]: # gandalf example vminmax_gandalf=np.zeros((4,2)) vmin_init_gandalf=[-150,0,0,0] vmax_init_gandalf=[150, 150, 10, 10000] #max value for colorbar for: V, sigma,␣ ,→flux, amplitude vminmax_gandalf[:,0]= vmin_init_gandalf vminmax_gandalf[:,1]= vmax_init_gandalf # testing each plot type #test.Gandalf_gistPlot(outdir,0,12,"V",vminmax=vminmax_gandalf,AoN_Threshold=4,␣ ,→title="OIII") #test.Gandalf_gistPlot(outdir,0,12,"S",vminmax=vminmax_gandalf,AoN_Threshold=4,␣ ,→title="OIII") #test.Gandalf_gistPlot(outdir,0,12,"F",vminmax=vminmax_gandalf,AoN_Threshold=4,␣ ,→title="OIII") #test.Gandalf_gistPlot(outdir,0,12,"A",vminmax=vminmax_gandalf,AoN_Threshold=4,␣ ,→title="OIII")

line 12 selected operation selected: NONE vmin, vmax set: -150.0 150.0 12

23 line 12 selected operation selected: NONE vmin, vmax set: 0.0 150.0 12

24 line 12 selected operation selected: NONE vmin, vmax set: 0.0 10.0 12

25 line 12 selected operation selected: NONE vmin, vmax set: 0.0 10000.0 12

26 [74]: # ppxf example

vminmax=np.zeros((4,2)) vmin_init=[-150,0,-0.2,0] #min value for colorbar for: V, sigma, h3, h4 vmax_init=[150, 150, 0.2, 0.2] #max value for colorbar for: V, sigma, h3, h4 vminmax[:,0]= vmin_init vminmax[:,1]= vmax_init test.plot_PPXF(outdir,vminmax)

Contours will not be plotted

27 [119]: # NaD Dispersion, Velocity, Flux and Amplitude # create instance of the class test= Maps(path)

vmin_init_gandalf=[-100,0,-3000,-3000] #min value for colorbar for: V,␣ ,→sigma, h3, h4 vmax_init_gandalf=[100, 100, 100,0] #max value for colorbar for: V, sigma,␣ ,→h3, h4 vminmax_gandalf[:,0]= vmin_init_gandalf vminmax_gandalf[:,1]= vmax_init_gandalf test. ,→Gandalf_gistPlot(outdir,0,22,"S",vminmax=vminmax_gandalf,AoN_Threshold=-4,title="Na␣ ,→5890") test. ,→Gandalf_gistPlot(outdir,0,22,"V",vminmax=vminmax_gandalf,AoN_Threshold=-4,title="Na␣ ,→5890")

28 line 22 selected operation selected: NONE vmin, vmax set: 0.0 100.0 22

line 22 selected operation selected: NONE vmin, vmax set: -100.0 100.0 22

29 line 22 selected operation selected: NONE vmin, vmax set: -3000.0 100.0 22

30 line 22 selected operation selected: NONE vmin, vmax set: -3000.0 0.0 22

31 [ ]:

[116]: # Na-Star Velocity and dispersion

vminmax_diff=np.zeros((4,2)) vmin_init_diff=[-100,-100,0,0] vmax_init_diff=[100, 100, 10, 1000] #max value for colorbar for: V, sigma,␣ ,→flux, amplitude vminmax_diff[:,0]= vmin_init_diff vminmax_diff[:,1]= vmax_init_diff

test.StarGasDifference(outdir,22,vminmax=vminmax_diff,plottype="V",␣ ,→AoNThreshold=-4, LEVEL="BIN", title="Na5890 - Stars", AoNToggle= True) test.StarGasDifference(outdir,22,vminmax=vminmax_diff,plottype="S",␣ ,→AoNThreshold=-4, LEVEL="BIN", title="Na5890 - Stars", AoNToggle= True)

32 33 [87]: # sigma over v vminmax_gandalf=np.zeros((4,2)) vmin_init_gandalf=[0, 50,0,-150] #min value for colorbar for: V, sigma,␣ ,→h3, h4 vmax_init_gandalf=[3, 150, 10, 150] #max value for colorbar for: V, sigma,␣ ,→h3, h4 vminmax_gandalf[:,0]= vmin_init_gandalf vminmax_gandalf[:,1]= vmax_init_gandalf

test.SigmaOverV(outdir, 22, vminmax=vminmax_gandalf, AoNThreshold=-4,␣ ,→level="Bin", title="Na")

AoN threshold determined: -4 vmin, vmax set: 0.0 3.0

34 [ ]:

35