SÍGAME main module

Submodules

sigame.galaxy module

Module with classes to set up the main galaxy object, create and load related data products from the simulation itself (particle_data class) and processed outputs (datacube class).

class sigame.galaxy.datacube(gal_ob, **kwargs)

An object referring to the datacube constructed for a galaxy (in one of the ISM phases)

Note

Must be added as an attribute to a galaxy object.

add_shape()

Adds tuple of datacube dimensions (v length, x length, y length) as an attribute to datacube object.

create_dc(ISM_dc_phase)

Calculates the datacube of a specific ISM_phase

Parameters:ISM_dc_phase (str) – The datacube ISM phase

Examples

>>> gal_ob.datacube.create_dc('GMC')
get_dc(**kwargs)

Returns datacube as a numpy array.

Parameters:
  • ISM_dc_phase (str) – default: ‘GMC’
  • target (str) – default: ‘L_CII’
get_dc_summed(**kwargs)

Returns sum of datacube for all datacube ISM phases as numpy array.

get_kpc_per_arcsec()

Returns physical scale for this galaxy in kpc per arcsec.

get_map(**kwargs)
get_total_sum(**kwargs)

Returns total value of datacube for all datacube ISM phases in dictionary.

get_v_axis()

Returns velocity axis.

get_x_axis_arcsec()

Returns positional axis (x or y) in arcsec.

get_x_axis_kpc()

Returns position (x or y) axis.

preview(**kwargs)
class sigame.galaxy.dict_to_attr(dictionary)

Essentially turns dictionary into a attributes of an object.

class sigame.galaxy.dynamic_mass(gal_ob, **kwargs)

Bases: sigame.galaxy.particle_data

Allows for the creation of a dynamic mass model for either a spherical/elliptical galaxy or a disk galaxy and allows the domain to be either internal mass, or galaxy radius. Requires sim object in galaxy.

G = 4.30218082510576e-06
get_plot_series(**kwargs)
preview(**kwargs)
class sigame.galaxy.galaxy(**kwargs)

An object referring to one particular galaxy.

Parameters:gal_index (int) – Galaxy index, default: 0

Examples

>>> import galaxy as gal
>>> gal_ob = gal.galaxy(gal_index=0)
add_attr(attr_name, **kwargs)

creates desired attribute and adds it to galaxy.

check_classification()

checks if galaxy classification is correct (all galaxies are initialized with a ‘spherical’ classification.)

check_for_attr(attr_name, **kwargs)

checks if galaxy has a specific attribute, if not then adds it.

get_radial_axis()

returns 1D radius array for galaxy

class sigame.galaxy.galaxy_sample(**kwargs)
get_galaxy_panel(**kwargs)

loads Series, checks that desired attributes exist in all galaxies in the Series, and organizes the galaxies into a 3D object array for easy plotting.

kwargs key default entry —————————– n_rows 4 n_cols 4 add_attributes [] overWrite False threshold n_rows * n_cols kwargs galaxy kwargs for datacube, sim, and other desired galaxy attributes

get_series(**kwargs)

writes and returns galaxy series if it doesn’t exist, returns the galaxy series if it does exist.

plot_panels(attr, **kwargs)

organizes the galaxy series into panels, checks all the galaxies in the Series for the desired object and plots all the relant information for that galaxy in its designated subplot. constructs a savename and saves the image.

attr str A string of the class name that will be plotted.

kwargs key default entry —————————– line ‘CII’ sharex False sharey False dimentions 2 num_axis_labels 2 directory_root ‘plots/line_emission/’ set_aspect False kwargs for get_galaxy_panel, galaxy, and any(all) galaxy add_attributes

class sigame.galaxy.interpolate_clouds(**kwargs)

Bases: sigame.galaxy.galaxy

An object that will interpolate in cloud models of info such as line luminosity for one galaxy.

Child class that inherits from parent class ‘galaxy’.

interpolate_GMCs()

Adds info from cloud model runs to GMCs

interpolate_dif()

Adds info from cloud model runs to diffuse gas clouds

setup_tasks()

Controls tasks to be executed, based on existing files and the overwrite [ow] parameter

class sigame.galaxy.make_map(child, dictionary)

Bases: sigame.galaxy.plot_it

add_to_axis(ax, **kwargs)
class sigame.galaxy.make_plot(child, dictionary)

Bases: sigame.galaxy.plot_it

add_to_axis(ax, **kwargs)
class sigame.galaxy.make_quiver(child, dictionary)

Bases: sigame.galaxy.plot_it

add_to_axis(ax, **kwargs)
class sigame.galaxy.make_scatter(child, dictionary)

Bases: sigame.galaxy.plot_it

add_to_axis(ax, **kwargs)
class sigame.galaxy.particle_data(gal_ob, **kwargs)

An object referring to the particle data (sim or ISM)

Note

Must be added as an attribute to a galaxy object.

Parameters:
  • gal_ob (object) – Instance of galaxy class.
  • silent (bool) – Parameter telling the code to do (or not) print statements.

Examples

>>> import galaxy as gal
>>> gal_ob = gal.galaxy(gal_index=0)
>>> simgas = gal_ob.particle_data.get_data(data='sim')['gas']
add_names()

Add file location for particle data file (sim_type or ISM_phase)

classify_galaxy(**kwargs)
gas_quiver_plot(**kwargs)
get_data(**kwargs)

Returns rotated particle data as dataframe.

Parameters:data (str) – Data type, default: ‘sim’
get_map(**kwargs)
get_raw_data(**kwargs)

Returns raw not rotated particle data in dictionary.

positions_plot(**kwargs)
class sigame.galaxy.plot_it(results, **kwargs)
add_to_axis(ax, **kwargs)
make_image(**kwargs)

use only if one make_image instance will be used for figure.

class sigame.galaxy.profiles(gal_ob, **kwargs)

Bases: sigame.galaxy.datacube

velocity_profile(gal_ob, cube_type, **kwarg)
class sigame.galaxy.regions(gal_ob, **kwargs)

An object that allows creation of a number of fixed-size regions.

Note

Must be added as an attribute to a galaxy object.

Parameters:
  • max_regions_per_gal (int) – Maximum number of regions that will be drawn per galaxy, default: 100
  • region_size (str) – Region size in arcsec, default: 10
  • search_within (float) – fraction of galaxy radius to extract regions from, default: 0.25

Examples

>>> import galaxy as gal
>>> gal_ob = gal.galaxy(gal_index=0)
>>> args = dict(ISM_phase='GMC',line1='CII',line2='NII_205',extract_from='regions')
>>> gal_obj.add_attr('regions',**args)
>>> line_lums = gal_obj.regions.get_line_lums(gal_obj,**args)
get_SFRsd(gal_ob, method='exact', **kwargs)

Extracts SFR surface densities from all regions in galaxy.

Parameters:method (str) – method by which SFR is estimated (‘exact’: use sim data, ‘CII’: use [CII] flux. )
get_f_CII_neu(gal_ob, **kwargs)

Extracts fraction of [CII] coming from neutral gas for all regions in galaxy.

get_f_neu(gal_ob, **kwargs)

Extracts neutral gas mass fraction for all regions in galaxy.

get_line_lums(gal_ob, **kwargs)

Extracts line luminosity of two lines [Jy*km/s] from all regions in galaxy.

Parameters:
  • line1 (str) – line1 in ratio line1/line2, default: ‘CII’
  • line2 (str) – line2 in ratio line1/line2, default: ‘NII_205’
  • PSF (str) – Choice of PSF, default: ‘none’ (other options: ‘gauss’)
plot_positions(gal_ob, region_indices, **kwargs)

Plots position of regions on top of moment 0 map.

class sigame.galaxy.subgrid_galaxy(**kwargs)

Bases: sigame.galaxy.galaxy

An object that will contain the subgrid information for one galaxy. Child class that inherits from parent class ‘galaxy’.

add_FUV()
add_GMCs()
add_P_ext()
add_dif()
setup_tasks()
sigame.galaxy.test_preview(**kwargs)

Function to visually check the methods above.

class sigame.galaxy.var(val, err)

takes a value and its err and returns strings of printable values with appropriate significant figures for presenting data.

class sigame.galaxy.galaxy(**kwargs)

An object referring to one particular galaxy.

Parameters:gal_index (int) – Galaxy index, default: 0

Examples

>>> import galaxy as gal
>>> gal_ob = gal.galaxy(gal_index=0)
add_attr(attr_name, **kwargs)

creates desired attribute and adds it to galaxy.

check_classification()

checks if galaxy classification is correct (all galaxies are initialized with a ‘spherical’ classification.)

check_for_attr(attr_name, **kwargs)

checks if galaxy has a specific attribute, if not then adds it.

get_radial_axis()

returns 1D radius array for galaxy

sigame.global_results module

Module: global_results

class sigame.global_results.global_results(**kwargs)

An object referring to the global results of a selection of galaxies, containing global properties of as attributes.

print_galaxy_properties(**kwargs)
print_results()

sigame.param module

Submodule: param

sigame.param.read_params(params_file)

Extracts parameters from parameter file set in sigame/__init__.py

sigame.param.update_params_file(new_params)

sigame.plot module

Module: plot

sigame.plot.CII_3D()

Places galaxies in 3D space with L_[CII] as a function of two other parameters

sigame.plot.CII_CIII_mass()

Plots C+/C++ mass ratio vs another parameter (like G0)

sigame.plot.CII_NII205(**kwargs)

Plot CII/NII205 ratio against selected property for a certain redshift

Arguments: xaxis - what to plot the ratio against - str

Options: ‘z’ : redshift ‘Zsfr’ : SFR-weighted metallicity ‘SFRsd’ : star formation rate surface density ‘f_neu’ : neutral gas mass fraction
sigame.plot.CII_NII205_SFRsd_regions(**kwargs)

Plot CII/NII205 ratio against surface density of SFR

Optional arguments: region_size float default = 16.8 arcsec (Croxall+17 Herschel) N_regions int default = 1

sigame.plot.CII_NII205_f_neu_regions(**kwargs)

Plot CII/NII205 ratio against neutral gas mass fraction

Optional arguments: region_size float default = 16.8 arcsec (Croxall+17 Herschel) N_regions int default = 1

sigame.plot.CII_SFR_SigmaSFR()

Plots L_[CII]/SFR against Sigma_SFR

sigame.plot.CII_SFR_UVB()

L_[CII] vs SFR for different assumptions for the UVB on diffuse gas

sigame.plot.CII_SFR_Z()

L_[CII] vs SFR for different assumptions on Z

sigame.plot.CII_SFR_combo()

Plot CII-SFR relations from different assumptions!

sigame.plot.CII_SFR_z2()

Plots L_[CII] SFR together with observations at z~2

sigame.plot.CII_mass()

Plots ionized carbon fraction per gas element

sigame.plot.DTM_ratios()

Checks DTM ratios in cloudy model outputs

sigame.plot.GMC_grid()

Plots abundances and other things vs radius for selected models

sigame.plot.ISM_mass_fractions()

Plots mass fraction in different ISM phases

sigame.plot.OIII_SFR()

Inspect [OIII]88micron emission (called by line_SFR() in analysis.py)

sigame.plot.OI_CII_G0()

Plot OI/CII against 60/100 micron ratio or mass-weigthed FUV (NOT FINISHED)

sigame.plot.OI_OIII_SFR(plotmodels=True, twopanel=True)

Inspect [OI]63micron AND [OIII]88micron emission (called by line_SFR() in analysis.py)

sigame.plot.OI_SFR()

Inspect [OI]63micron emission (called by line_SFR() in analysis.py)

sigame.plot.SFR_Mism()

Plot of SFR vs ISM mass

sigame.plot.SFR_Mstar(alpha=0.7)

Plot of SFR vs stellar mass for one or more redshift groups

sigame.plot.SFRsd_histo()

Histogram of SFR surface densities

sigame.plot.Tk_nH_ratio()
sigame.plot.add_CII_observations_to_plot(plot='line_SFR', SFR_range=[0.001, 10000.0], Lcii_range=[0.001, 10000000000.0], one_symbol_only=False, plot_DeLooze14=True, fillstyle='full')

Add observational points to line-SFR relation plot

sigame.plot.add_CII_observations_to_plot1(slope_models, intercept_models, mark_reasons=False, mark_uplim=False, mark_det=False, z1='z6', MW=True, ms_scaling=1, alpha=1, line='[CII]')

‘ Purpose ——— Adds observatinos to plot

sigame.plot.add_Vallini_2015(xr, zreds, galnames, color='purple')
sigame.plot.add_line_ratio_obs(ratio='CII_NII', zred_sample='lowz')

Plots observations of the relevant line ratio against redshift

Parameters:
  • - str (zred_sample) –
  • Options
    • ‘CII_NII’: plots the [CII]/[NII]205 line ratio
    • ’OIII_NII’: plots the [OIII]88/[NII]122 line ratio
  • - str
  • Options
    • ‘highz’: adds observations at high redshift
    • ’lowz’: adds observations at low redshift
sigame.plot.arrow_length(n)
sigame.plot.axis_range(x, log=False, **kwargs)

Calculate a reasonable axis range

sigame.plot.check_GMC_dist(gal_index=0)

Check mass distribution of GMCs

sigame.plot.cloud_rad_prof()

Plots radial profiles of one specific cloudy model

sigame.plot.cloud_rad_profs(line='CII', ISM_phase='dif', FUV='5UV')

Plots radial profiles of several cloudy models

sigame.plot.cloud_radial_profiles(ISM_phase='DNG', target='L_CII', FUV='5')

Make plots to compare radial profiles of different clouds

sigame.plot.comp_ISM_phases(**kwargs)

Plotting function for comparing fractions of mass or line luminosity vs. SFR of Z. Called by ISM_line_contributions and ISM_line_efficiency() and ISM_mass_contributions() in analysis.py

sigame.plot.delete_old_plots()
sigame.plot.dif_grid()

Plots abundances and other things vs radius for selected models

sigame.plot.diffuse_ion_vs_neu_gas()

Plots Tk and nH histograms of diffuse ionized vs diffuse neutral gas

sigame.plot.dynamic_mass_panels(**kwargs)

plots the dynamic mass for each galaxy in a panel view.

classes.galaxy_sample( **kwargs ) classes.galaxy_sample -> get_galaxy_panel( **kwargs )

sigame.plot.effect_of_CMB(line='CII')

Derive how much the line luminosities are affected by CMB subraction

sigame.plot.geometrical_correction_factor(ISM_phase='GMC', line='CII', extreme='max')

Plots radial profiles of emissivity for clouds with extreme geometrical correction factors

sigame.plot.get_CII_NII205_croxall_SFRsd(save=True)
sigame.plot.getlabel(foo)

Gets label for plots

sigame.plot.grid_contour()

Makes contour plot of some value derived from cloudy, as function of grid parameters (in progress)

sigame.plot.grid_parameters(histo_color='teal', FUV=0.002, ISM_phase='GMC', figsize=(10, 7))

Make histograms of galaxies with grid points on top What this function does ——— 1) Makes 4-panel figure with histograms of [Mgmc, G0, Z, P_ext] in GMCs 2) OR makes 4-panel figure with histograms of [nH, R, Z, Tk] in diffuse clouds :param ISM_phase: :type ISM_phase: ISM phase in cloudy models, can be either ‘GMC’ or ‘dif’ - str :param default: :type default: ‘GMC’ :param histo_color: :type histo_color: color selection for histograms - str :param options:

  • ‘<a specific color>’: all histograms will have this color
  • ‘colsel’: each galaxy will have a different color, using colsel from param_module.read_params
sigame.plot.grid_surface()

Plots grid as surface in 3D

sigame.plot.histo_SFRsd()

Make histograms of SFR surface denesity What this function does ——— 1) Make histograms of SFR surface density

sigame.plot.histos(bins=100, col=[u'indigo', u'gold', u'hotpink', u'firebrick', u'indianred', u'yellow', u'mistyrose', u'darkolivegreen', u'olive', u'darkseagreen', u'pink', u'tomato', u'lightcoral', u'orangered', u'navajowhite', u'lime', u'palegreen', u'darkslategrey', u'greenyellow', u'burlywood', u'seashell', u'mediumspringgreen', u'fuchsia', u'papayawhip', u'blanchedalmond', u'chartreuse', u'dimgray', u'black', u'peachpuff', u'springgreen', u'aquamarine', u'white', u'orange', u'lightsalmon', u'darkslategray', u'brown', u'ivory', u'dodgerblue', u'peru', u'lawngreen', u'chocolate', u'crimson', u'forestgreen', u'darkgrey', u'lightseagreen', u'cyan', u'mintcream', u'silver', u'antiquewhite', u'mediumorchid', u'skyblue', u'gray', u'darkturquoise', u'goldenrod', u'darkgreen', u'floralwhite', u'darkviolet', u'darkgray', u'moccasin', u'saddlebrown', u'grey', u'darkslateblue', u'lightskyblue', u'lightpink', u'mediumvioletred', u'slategrey', u'red', u'deeppink', u'limegreen', u'darkmagenta', u'palegoldenrod', u'plum', u'turquoise', u'lightgrey', u'lightgoldenrodyellow', u'darkgoldenrod', u'lavender', u'maroon', u'yellowgreen', u'sandybrown', u'thistle', u'violet', u'navy', u'magenta', u'dimgrey', u'tan', u'rosybrown', u'olivedrab', u'blue', u'lightblue', u'ghostwhite', u'honeydew', u'cornflowerblue', u'slateblue', u'linen', u'darkblue', u'powderblue', u'seagreen', u'darkkhaki', u'snow', u'sienna', u'mediumblue', u'royalblue', u'lightcyan', u'green', u'mediumpurple', u'midnightblue', u'cornsilk', u'paleturquoise', u'bisque', u'slategray', u'darkcyan', u'khaki', u'wheat', u'teal', u'darkorchid', u'salmon', u'deepskyblue', u'rebeccapurple', u'darkred', u'steelblue', u'palevioletred', u'lightslategray', u'aliceblue', u'lightslategrey', u'lightgreen', u'orchid', u'gainsboro', u'mediumseagreen', u'lightgray', u'mediumturquoise', u'lemonchiffon', u'cadetblue', u'lightyellow', u'lavenderblush', u'coral', u'purple', u'aqua', u'whitesmoke', u'mediumslateblue', u'darkorange', u'mediumaquamarine', u'darksalmon', u'beige', u'blueviolet', u'azure', u'lightsteelblue', u'oldlace'], add=False, one_color=True)

Makes figure with several histograms on top of each other.

Parameters:
  • bins (number of bins - float/int) –
  • = 100 (default) –
sigame.plot.line_SFR(**kwargs)

Plots line luminosity against SFR (together with observations)

Parameters:line (str) – Line to look at, default: ‘CII’
sigame.plot.line_SFR_test(line='CII', figsize=(10, 10))

Check effects on [CII]-SFR relation for different tests individually

sigame.plot.line_SFR_z_bins(line='CII', xr=[0.1, 200], yr=array([1.e+06, 1.e+10]))

Plots L_[CII] and SFR together with observations for specified line in 3 panels of different redshift bins

sigame.plot.line_map()

Makes line emission maps

sigame.plot.line_profile_movie(element='CII', gal_index=3, vmax=600.0, dv=50.0, figsize=(15, 15), fs=15, overWrite=False, interval=100, writer='ffmpeg', dpi=400, show=False, scheme=<matplotlib.colors.LinearSegmentedColormap object>)

Make movie of projection slices in velocity :param gal_index: :type gal_index: ** galaxy index - default = 0 :param vmax: :type vmax: ** velocity range - default = 400. . :param dv: :type dv: ** velocity bin size - default = 50 :param figsize: :type figsize: ** size of plt.figure - default = (15,15) :param fs: :type fs: ** fontsize - default = 15 :param overWrite: interval: ** length of time between images - default = 300 ms

writer: ** how images will be compiled - default = ‘ffmpeg’
Parameters:
  • dpi (** resolution - default = 400) –
  • show (** will show movie at end iff True - default = False) –
  • that can be changed below (Parameters) –
  • ---------
  • grid_size (size of grid on each side in kpc (default: 10 kpc)) –
  • pixel_size (size of each pixel in kpc (default: 0.1 kpc)) –
  • dv (velocity bin width (default: 40 km/s)) –
  • vmax (maximum velocity considered (default: 400 km/s)) –
sigame.plot.line_profile_panels(**kwargs)

plots the line profiles for each galaxy in a panel view.

classes.galaxy_sample( **kwargs ) classes.galaxy_sample -> get_galaxy_panel( **kwargs )

sigame.plot.line_ratios()

Creates diagnostic plots from line ratios (reguires you to run si.analysis.grid_galaxies first)

sigame.plot.make_contour(i, fontsize, kwargs)

Makes contour plot (called by simple_plot)

Parameters:
  • contour_type (method used to create contour map - str) –
  • options1
    • plain: use contourf on colors alone, optionally with contour levels only (no filling)
    • hexbin: use hexbin on colors alone
    • median: use contourf on median of colors
    • mean: use contourf on mean of colors
    • sum: use contourf on sum of colors
sigame.plot.make_histo(x, bins, col, lab, percent=True, weights=1, lw=1, ls='-')

Makes a histogram (called by simple_plot)

sigame.plot.make_map(ob)
sigame.plot.map_comparison(line='CII', fontsize=6)

Purpose Compare maps of gas mass and/or line emission

sigame.plot.map_line(gal_index=8, line='CII', ISM_dc_phase='tot')

Makes maps of line using datacubes

sigame.plot.map_line_ratio(gal_index=0, line1='CII', line2='NII_205', ISM_phase='tot', unit='mJy', add_to_fig=False, save=True)

Makes maps of line using datacubes

sigame.plot.map_mass(gal_index=-1, add_to_fig=False, save=True, fontsize=10, inc='z')

Make maps of surface density of the gas

sigame.plot.map_sim(R_cut=10, ISM_phase='gmc')

Map by either: 1) plotting particle positions 2) or making slice projection plot of gas elements of one galaxy :param R_cut: :type R_cut: max radius - float/int :param default = 30:

sigame.plot.map_with_vmin(data, x_axis, lab, scaling=100000000.0, log=True, draw=True, add_to_fig=True, fontsize=10, cmap=<matplotlib.colors.LinearSegmentedColormap object>)
sigame.plot.mapping(galnum=-1, add_to_fig=False)

Makes maps of surface density of the FUV radiation field (mass-weighted)

sigame.plot.mass_metallicity()

Compare mass vs metallicity with observations different redshifts

sigame.plot.opt_depth_test(ISM_phase='GMC', FUV='5')
sigame.plot.plot_CII_obs(CII_obs, markers, ms, mews, obs_col, mark_reason=False, mark_det=False, mark_uplim=False, ms_scaling=1, alpha=1, one_symbol_only=False, verbose=False, zorder=0, fillstyle='full')
sigame.plot.radial_gas_distribtion()

Plots gas mass surface density as function of radius (in progress)

sigame.plot.radial_line_profile(gal_index=0, v_res=20, x_res=50, rad_res=200, target='L_CII')

Plot the radial line profile of a galaxy :param gal_index: default = 0; first galaxy name in galnames list from parameter file :type gal_index: galaxy index - int :param v_res: :type v_res: velocity resolution [km/s] - float/int :param default = 20: :param x_res: :type x_res: spatial resolution [pc] - float/int :param default = 50: :param los: :type los: Line of Sight direction - list :param default = [1, 0, 0] = z-direction: :param rad_res: :type rad_res: radial resolution [pc] - float/int :param default = 200: :param target: :type target: what to make the radial profile of - str :param default = ‘L_CII’: :param options:

  • line emission: ‘L_CII’
  • gas mass: ‘mass’
sigame.plot.radial_mass_profile(gal_index=0, sim_type='gas', method='sum')

Plot the radial mass profile of a galaxy

Parameters:
  • gal_index (galaxy index - int) –
  • sim_type (simulation type - str) –
  • method (how to sum within each radial bin - str) –
  • sum (sum all particles) –
  • mean (take mean of particles) –
  • mw (take mass-weighted mean of particles) –
sigame.plot.radial_vel_profile(gal_index=0, sim_type='gas', v_type='speed', method='mean')

Plot the radial velocity profile of a galaxy

Parameters:
  • gal_index (galaxy index - int) –
  • sim_type (simulation type - str) –
  • method (how to sum within each radial bin - str) –
  • sum (sum all particles) –
  • mean (take mean of particles) –
  • mw (take mass-weighted mean of particles) –
sigame.plot.set_mpl_params()
sigame.plot.sim_3d(gal_index=0)

Scatter plot in 3D of fluid elements in simulation

sigame.plot.sim_Pext()

Check out parameters going into P_ext

sigame.plot.sim_history()

Plots merger history for galaxies that have been identified in several snapshots

sigame.plot.sim_neutral_ionized()

Histograms of GMC, DNG and DIG mass fractions per gas element in one galaxy

sigame.plot.sim_phase_diagram()

Plots Tk vs nH for gas elements in one galaxy

sigame.plot.sim_vs_dc_maps(**kwargs)
sigame.plot.sim_young_stars()

Plots number of young stars within one galaxy

sigame.plot.simple_plot(**kwargs)

A function to standardize all plots

Plots that can be created this way: 1. errorbar plot (with x and/or y errorbars) 2. line 3. histogram 4. markers 5. bar 6. hexbin 7. scatter plot 8. filled region

Parameters:
  • '1' below can be replaced by '2', '3', '4' etc for several plotting options in the same axis (The) –
  • add (if True add to existing axis object, otherwise new figure+axes will be created - bool) –
  • = False (default) –
  • fig (figure number - int) –
  • = 0 (default) –
  • figsize (figure size - (x,y) tuple) –
  • = (8,6) (default) –
  • x1 (x values - list or numpy array) –
  • y1 (y values - list or numpy array) –
  • xr,yr (x and/or y range - list) –
  • = set automatically by matplotlib (default) –
  • xlog,ylog (determines if x and/or y axes should be logarithmic - bool) –
  • = False (range set automatically by matplotlib) (default) –
  • fill1 (if defined, markers will be used - str) –
  • options
    • ‘y’: use filled markers
    • ’n’: use open markers
  • = 'y' (default) –
  • ls1 (linestyle - str) –
  • = 'None' (does markers by default) (default) –
  • ma1 (marker type - str) –
  • = 'x' (default) –
  • ms1 (marker size - float/int) –
  • = 5 (default) –
  • mew1 (marker edge width - float/int) –
  • = 2 (default) –
  • col1 (color of markers/lines - str) –
  • = 'k' (default) –
  • ecol1 (edgecolor - str) –
  • = 'k'
  • lab1 (label for x1,y7 - 'str') –
  • = '' (default) –
  • alpha1 (transparency factor - float) –
  • = '1.1' (default) –
  • dashes1 (custom-made dashes/dots - str) –
  • = ''
  • legend (whether to plot legend or not - bool) –
  • = False
  • leg_fs (legend fontsize - float) –
  • = not defined (same as fontsize for labels/tick marks) (default) –
  • legloc (legend location - str or list of coordinates) –
  • = (default) –
  • cmap1 (colormap for contour plots - str) –
  • = 'viridis' (default) –
  • xlab (x axis label - str) –
  • = no label (default) –
  • ylab (y axis label - str) –
  • = no label
  • title (plot title - str) –
  • = no title (default) –
  • xticks,yticks (whether to put x ticks and/or y ticks or not - bool) –
  • = True,True (default) –
  • fontsize (fontsize of tick labels - float) –
  • = 15 (default) –
  • lab_to_tick (if axis labels should be larger than tick marks, say how much here - float/int) –
  • = 1.0 (default) –
  • lex1,uex1 (lower and upper errorbars on x1 - list or numpy array) –
  • options
    • if an element in uex1 is 0 that element will be plotted as upper limit in x
  • = None (default) –
  • ley1,uey1 (lower and upper errorbars on y1 - list or numpy array) –
  • options
    • if an element in uey1 is 0 that element will be plotted as upper limit in y
  • = None
  • histo1 (whether to make a histogram of x1 values - bool) –
  • = False
  • histo_real1 (whether to use real values for histogram or percentages on y axis - bool) –
  • = False
  • bins1 (number of bins in histogram - int) –
  • = 100 (default) –
  • weights1 (weights to histogram - list or numpy array) –
  • = np.ones(len(x1)) (default) –
  • hexbin1 (if True, will make hexbin contour plot - bool) –
  • = False
  • contour_type1 (it defined, will make contour plot - 'str') –
  • options
  • = not defined (will not make contour plot) (default) –
  • barwidth1 (if defined, will make bar plot with this barwidth - float) –
  • = not defined (will not do bar plot) (default) –
  • scatter_color1 (if defined, will make scatter plot with this color - list or numpy array) –
  • = not defined (will not do scatter plot) (default) –
  • colormin1 (minimum value for colorbar in scatter plot - float) –
  • = not defined (will use all values in scatter_color1) (default) –
  • lab_colorbar (label for colorbar un scatter plot - str) –
  • = not defined (will not make colorbar) (default) –
  • hatchstyle1 (if defined, make hatched filled region - str) –
  • options
    • if set to ‘’, fill with one color
    • otherwise, use ‘/’ ‘//’ ‘///’’ etc.
  • = not defined (will not make hatched region) (default) –
  • text (if defined, add text to figure with this string - str) –
  • default (not defined (no text added)) –
  • textloc (must be specified in normalized axis units - list) –
  • = [0.1,0.9] (default) –
  • textbox (if True, put a box around text - bool) –
  • = False
  • fontsize_text (fontsize of text on plot - float/int) –
  • = 0/7 * fontsize (default) –
  • grid (turn on grid lines - bool) –
  • = False
  • figname (if defined, a figure will be saved with this path+name - str) –
  • = not defined (no figure saved) (default) –
  • figtype (format of figure - str) –
  • = 'png' (default) –
  • figres (dpi of saved figure - float) –
  • = 1000 (default) –
  • SC_return (return scatter plot object or not - bool) –
  • = False
sigame.plot.surface_plot_test()

Testing the maps created for the line profile movies

sigame.plot.test_rad_cloud_profiles(ISM_phase='DNG', line='CII', FUV='5')

Compares total luminosity of clouds used for interpolation and cloud radial profiles used for datacubes

sigame.plot.trim_df(file, skip, maxcol)

Comment columns to trim a dataframe

sigame.plot.velocity_map_panels(**kwargs)

plots the line-of-sight luminosity-weighted velocity for each galaxy in a panel view.

classes.galaxy_sample( **kwargs ) classes.galaxy_sample -> get_galaxy_panel( **kwargs )

sigame.plot.velocity_movie(gal_index=0, target='L_CII')

Makes images out of snapshots in velocity from datacubes

Module contents