Pipeline functions
GADGETPlotting.birth_histogram_pipeline — Method
birth_histogram_pipeline(
base_name::String,
source_path::String;
<keyword arguments>
)::NothingSave the results of the birth_histogram_plot function as one image per snapshot, if there are stars present.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.output_path::String = "birth_histogram": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.cmdf_pipeline — Method
cmdf_pipeline(
base_name::String,
source_path::String;
<keyword arguments>
)::NothingSave the results of the cmdf_plot function as one image per snapshot, if there are stars present.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.output_path::String = "CMDF": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.x_norm::Bool = false: If the x axis will be normalized to its maximum value.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the time stamps, all available time units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.cmdf_pipeline — Method
cmdf_pipeline(
base_name::Vector{String},
source_path::Vector{String},
labels::Array{String, 2};
<keyword arguments>
)::NothingSave the results of the cmdf_plot function for several simulations as one image per snapshot, if there are stars present.
Arguments
base_name::Vector{String}: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::Vector{String}: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.labels::Array{String, 2}: Labels for the different simulations.output_path::String = "CMDF": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the ordinal of the frame. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.x_norm::Bool = false: If the x axis will be normalized to its maximum value.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the time stamps, all available time units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.compare_simulations_pipeline — Method
compare_simulations_pipeline(
base_name::Vector{String},
source_path::Vector{String},
labels::Array{String, 2},
fig_name::String,
x_quantity::String,
y_quantity::String;
<keyword arguments>
)::NothingMake a figure comparing y_quantity vs. x_quantity for several simulations.
x_quantity and y_quantity can be any magnitude used in the get_time_evolution function, namely:
- "scale_factor"
- "redshift"
- "clock_time" (Physical time)
- "sfr" (SFR)
- "sfr_prob" (SFR probability - Not normalized)
- "gas_number" (Gas particle number)
- "dm_number" (Dark matter particle number)
- "star_number" (Star number)
- "gas_mass" (Total gas mass)
- "dm_mass" (Total dark matter mass)
- "star_mass" (Total star mass)
- "gas_density" (Total gas density)
- "gas_frac" (Gas fraction)
- "dm_frac" (Dark matter fraction)
- "star_frac" (Star fraction)
- "gas_bar_frac" (Baryonic gas fraction)
- "star_bar_frac" (Baryonic star fraction)
The numeric values of a quantity can also be saved as a text files for the simulations. One column per simulation, one row per sanpshot.
Arguments
base_name::Vector{String}: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::Vector{String}: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.labels::Array{String, 2}: Labels for the different simulations, e.g. [label1 label2 ...].fig_name::String: Base name for the figure. The file will be namedfig_name`yquantity_vs_x_quantityformat`.x_quantity::String: Physical magnitude for the x axis.y_quantity::String: Physical magnitude for the y axis.output_path::String = "compare_simulations": Path to the output directory. The images will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.title::String = "": Title for the figure. If an empty string is given, no title is printed.x_factor::Int64 = 0: Numerical exponent to scale thex_quantity, e.g. ifx_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.y_factor::Int64 = 0: Numerical exponent to scale they_quantity, e.g. ify_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.scale::NTuple{2, Symbol} = (:identity, :identity): Scaling to be used for the x and y axes. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
smooth_data::Bool = false: If true a smoothing window with no weighs is applied to the y data. If false (the default) no transformation occurs.bins::Int64 = 0: Number of subdivisions for the smoothing of the data, only relevant ifsmooth_data = true.legend_pos::Symbol = :bottomright: Position of the legend, e.g.:topleft.text_quantity::String = "": Name of the quantity to be saved in a text file. Any magnitude used in theget_time_evolutionfunction can be used. If left empty no text file will be produced.file_name::String = "results": Name of the .dat file that will be generated iftext_quantityis not an empty string.mass_unit::Unitful.FreeUnits = UnitfulAstro.Msun: Unit of mass to be used in the output, all available mass units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Msun.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.sfr_unit::Unitful.FreeUnits = UnitfulAstro.Msun / UnitfulAstro.yr: Unit of mass/time to be used in the output, all available time and mass units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Msun/UnitfulAstro.yr.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in UnitfulAstro.jl and UnitfulAstro.jl can be used.density_unit::Unitful.FreeUnits = UnitfulAstro.Msun / UnitfulAstro.kpc^3: Unit of density to be used in the output, all available density units in UnitfulAstro.jl and UnitfulAstro.jl can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.cpu_txt_pipeline — Method
cpu_txt_pipeline(
source_path::Vector{String},
target::String,
labels::Array{String, 2};
<keyword arguments>
)::NothingSave the result of the cpu_txt_plot function, comparing the CPU usage of one process among several simulations.
Arguments
source_path::Vector{String}: Paths to the directories containing the cpu.txt files, set in the GADGET variableOutputDir.target::String: Target process.labels::Array{String, 2}: Labels for the different simulations.step::Int64 = 1: Step used to traverse the CPU cycles, i.e. one everystepcycles is used for the output plot.output_path::String = "cpu_txt": Path to the output directory.title::String = "": Title for the figure. If an empty string is given no title is printed, which is the default.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.cpu_txt_pipeline — Method
cpu_txt_pipeline(
source_path::Vector{String},
targets::Vector{String};
<keyword arguments>
)::NothingSave the result of the cpu_txt_plot function as one image per simulation.
Arguments
source_path::Vector{String}: Paths to the directories containing the cpu.txt files, set in the GADGET variableOutputDir.targets::Vector{String}: Target processes to be plotted for each simulation.step::Int64 = 1: Step used to traverse the CPU cycles, i.e. one everystepcycles is used for the output plot.output_path::String = "cpu_txt": Path to the output directory.title::Vector{String} = String[]: Titles for the figures. If an empty string is given no title is printed, which is the default.names::Vector{String} = String[]: Names for the files. If an empty string is given, the images will be assigned a number, starting from 0.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.density_histogram_pipeline — Method
density_histogram_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of the density_histogram_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Vertical lines with personalized positions and ticks can be added to the plot. By default none are drawn.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "density_histogram": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.flags::Union{Tuple{Vector{<:Real}, Vector{<:AbstractString}}, Nothing} = nothing: The first vector in the Tuple has the positions of the vetical lines. The second has the corresponding labels. The positions should be in the correct units of density and take into accountfactor.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.factor::Int64 = 0: Numerical exponent to scale the density, e.g. iffactor= 10 the x axis will be scaled by $10^{10}$. The default is no scaling.y_scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.density_unit::Unitful.FreeUnits = UnitfulAstro.Msun / UnitfulAstro.kpc^3: Unit of density to be used in the output, all available density units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.density_map_pipeline — Method
density_map_pipeline(
base_name::String,
source_path::String,
z_quantity::Union{String, Nothing},
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of the density_map_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base name of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Path to the directory containing the snapshot files, set in the GADGET variableOutputDir.z_quantity::Union{String, Nothing}: Quantity to be mapped. The options are:"Z": The metallicity (relative to solar metallicity)."fmol": The fraction of molecular gas."fatom": The fraction of atomic gas.nothing: The density itself will be mapped.
anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "density_map": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.plane::String = "All": Indicates which plane will be plotted."XY"⟶ x-y plane alone."XZ"⟶ x-z plane alone."YZ"⟶ y-z plane alone."All"⟶ The three planes in a single 1x3 figure.
axes::Bool = false: If true, the axes passing through (0, 0) are drawn. If false, no axes are drawn.box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".ps", ".svg" and ".png".
GADGETPlotting.density_profile_pipeline — Method
density_profile_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64,
type::String;
<keyword arguments>
)::NothingSave the results of the density_profile_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.type::String: Particle type."gas"⟶ Gas particle."dark_matter"⟶ Dark matter particle."stars"⟶ Star particle.
output_path::String = "density_profile": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.factor::Int64 = 0: Numerical exponent to scale the density, e.g. iffactor= 10 the y axis will be scaled by $10^{10}$. The default is no scaling.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scalepositions["box_size"]if vacuum boundary conditions were used, and it will scalepositions["box_size"] / 2if periodic boundary conditions were used.box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.mass_unit::Unitful.FreeUnits = UnitfulAstro.Msun: Unit of mass to be used in the output, all available mass units in Unitful and UnitfulAstro can be used.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.density_profile_pipeline — Method
density_profile_pipeline(
base_name::Vector{String},
source_path::Vector{String},
anim_name::String,
frame_rate::Int64,
type::String,
labels::Array{String, 2};
<keyword arguments>
)::NothingSave the results of the density_profile_plot function for several simulations as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::Vector{String}: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::Vector{String}: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.type::String: Particle type."gas"⟶ Gas particle."dark_matter"⟶ Dark matter particle."stars"⟶ Star particle.
labels::Array{String, 2}: Labels for the different simulations.output_path::String = "density_profile": Path to the output directory. The images will be stored inoutput_path/images/ and will be named frame_XXXformatwhere XXX is the ordinal of the frame. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.factor::Int64 = 0: Numerical exponent to scale the density, e.g. iffactor= 10 the y axis will be scaled by $10^{10}$. The default is no scaling.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scalepositions["box_size"]if vacuum boundary conditions were used, and it will scalepositions["box_size"] / 2if periodic boundary conditions were used.box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.mass_unit::Unitful.FreeUnits = UnitfulAstro.Msun: Unit of mass to be used in the output, all available mass units in Unitful and UnitfulAstro can be used.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.evolution_summary_pipeline — Method
evolution_summary_pipeline(
base_name::String,
source_path::String,
fig_name::String;
<keyword arguments>
)::NothingProduce up to three figures summarizing the time evolution of the simulation.
The plotted parameters are the number of particles, the total mass, the baryonic fractional mass and the star formation rate (SFR), the first three for gas and stars. If the simulation is Newtonian, only one figure is produced (parameters vs. time), but if the simulation is cosmological, three figures are produced (parameters vs. time, parameters vs. scale factor and parameters vs. redshift).
Args:
base_name::String: Base name of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Path to the directory containing the snapshot files, set in the GADGET variableOutputDir.fig_name::String: Base name for the figures. The images will be namedfig_name_vs_XXXformatwhere XXX is 'time', 'redshift' or 'scale_factor'.output_path::String = "evolution_summary": Path to the output directory. The images will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.mass_factor::Int64 = 0: Numerical exponent to scale the mass, e.g. ifmass_factor= 10 the corresponding axis will be scaled by $10^{10}$.number_factor::Int64 = 0: Numerical exponent to scale the number of particles, e.g. ifnumber_factor= 4 the corresponding axis will be scaled by $10^4$.mass_unit::Unitful.FreeUnits = UnitfulAstro.Msun: Unit of mass to be used in the output, all available mass units in Unitful and UnitfulAstro can be used.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.sfr_unit::Unitful.FreeUnits = UnitfulAstro.Msun / UnitfulAstro.yr: Unit of mass/time to be used in the output, all available time and mass units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.fatom_rho_pipeline — Method
fatom_rho_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of the fatom_rho_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "fatom_vs_rho"": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.fmol_Z_pipeline — Method
fmol_Z_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of the fatom_rho_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "fmol_vs_Z"": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.fmol_fatom_pipeline — Method
fmol_fatom_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of the fmol_fatom_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "fmol_vs_ftom": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.fraction_histogram_pipeline — Method
fraction_histogram_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64,
fraction::String;
<keyword arguments>
)::NothingSave the results of the fraction_histogram_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Vertical lines with personalized positions and ticks can be added to the plot. By default none are drawn.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.fraction::String: Which fraction to plot against the temperature. The options are"atomic": Atomic fraction."molecular": Molecular fraction.
output_path::String = "density_histogram": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.flags::Union{Tuple{Vector{<:Real}, Vector{<:AbstractString}}, Nothing} = nothing: The first vector in the Tuple has the positions of the vetical lines. The second has the corresponding labels. The positions should be in the correct units of density and take into accountfactor.bins::Int64 = 20: Number of subdivisions used for the histogram.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.y_scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.fraction_temp_pipeline — Method
fraction_temp_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64,
fraction::String;
<keyword arguments>
)::NothingSave the results of the fraction_temp_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.fraction::String: Which fraction to plot against the temperature. The options are"atomic": Atomic fraction."molecular": Molecular fraction.
output_path::String = "rho_vs_temp": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.temp_unit::Unitful.FreeUnits = Unitful.K: Unit of temperature to be used in the output, all available temperature units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.gas_star_evolution_pipeline — Method
gas_star_evolution_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of gas_star_evolution_plot function for the last snapshot as one image and generate a GIF and a video animating the whole evolution for all snapshots.
Arguments
base_name::String: Base name of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Path to the directory containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "gas_star_evolution": Path to the output directory. The image will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the last snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.sfr_unit::Unitful.FreeUnits = UnitfulAstro.Msun / UnitfulAstro.yr: Unit of mass/time to be used in the output, all available time and mass units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".ps", ".svg" and ".png".
GADGETPlotting.kennicutt_schmidt_pipeline — Method
kennicutt_schmidt_pipeline(
base_name::String,
source_path::String;
<keyword arguments>
)::NothingSave the results of the kennicutt_schmidt_plot function as one image per snapshot.
It will produce output only for the snapshots that have enough young stars to produce at least five data points for the linear fitting.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.output_path::String = "Kennicutt_Schmidt": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.temp_filter::Unitful.Quantity = Inf * Unitful.K: Maximum temperature allowed for the gas particles.age_filter::Unitful.Quantity = 20.0UnitfulAstro.Myr: Maximum star age allowed for the calculation of the SFR.max_r::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Maximum distance up to which the parameters will be calculated, with units.bins::Int64 = 50: Number of subdivisions of [0,max_r] to be used. It has to be at least 5.error_formating::String = "std_error": What to print as error values. The options are:"std_error"⟹ mean ± standard_error."conf_interval"⟹ mean ± max(upper_95% - mean, mean - lower_95%).
time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.mass_unit::Unitful.FreeUnits = UnitfulAstro.Msun: Unit of mass to be used in the output, all available mass units in Unitful and UnitfulAstro can be used.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.mass_profile_pipeline — Method
mass_profile_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64,
type::String;
<keyword arguments>
)::NothingSave the results of the mass_profile_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.type::String: Particle type."gas"⟶ Gas particle."dark_matter"⟶ Dark matter particle."stars"⟶ Star particle.
scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
output_path::String = "mass_profile": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.factor::Int64 = 0: Numerical exponent to scale the mass, e.g. iffactor= 10 the y axis will be scaled by $10^{10}$. The default is no scaling.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scalepositions["box_size"]if vacuum boundary conditions were used, and it will scalepositions["box_size"] / 2if periodic boundary conditions were used.box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.mass_unit::Unitful.FreeUnits = UnitfulAstro.Msun: Unit of mass to be used in the output, all available mass units in Unitful and UnitfulAstro can be used.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.mass_profile_pipeline — Method
mass_profile_pipeline(
base_name::Vector{String},
source_path::Vector{String},
anim_name::String,
frame_rate::Int64,
type::String,
labels::Array{String, 2};
<keyword arguments>
)::NothingSave the results of the mass_profile_plot function for several simulations as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::Vector{String}: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::Vector{String}: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.type::String: Particle type."gas"⟶ Gas particle."dark_matter"⟶ Dark matter particle."stars"⟶ Star particle.
labels::Array{String, 2}: Labels for the different simulations.output_path::String = "mass_profile": Path to the output directory. The images will be stored inoutput_path/images/ and will be named frame_XXXformatwhere XXX is the ordinal of the frame. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.factor::Int64 = 0: Numerical exponent to scale the mass, e.g. iffactor= 10 the y axis will be scaled by $10^{10}$. The default is no scaling.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scalepositions["box_size"]if vacuum boundary conditions were used, and it will scalepositions["box_size"] / 2if periodic boundary conditions were used.box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.mass_unit::Unitful.FreeUnits = UnitfulAstro.Msun: Unit of mass to be used in the output, all available mass units in Unitful and UnitfulAstro can be used.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.metallicity_profile_pipeline — Method
metallicity_profile_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64,
type::String;
<keyword arguments>
)::NothingSave the results of the metallicity_profile_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.type::String: Particle type."gas"⟶ Gas particle."dark_matter"⟶ Dark matter particle."stars"⟶ Star particle.
output_path::String = "metallicity_profile": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scalepositions["box_size"]if vacuum boundary conditions were used, and it will scalepositions["box_size"] / 2if periodic boundary conditions were used.box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.metallicity_profile_pipeline — Method
metallicity_profile_pipeline(
base_name::Vector{String},
source_path::Vector{String},
anim_name::String,
frame_rate::Int64,
type::String,
labels::Array{String, 2};
<keyword arguments>
)::NothingSave the results of the metallicity_profile_plot function for several simulations as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::Vector{String}: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::Vector{String}: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.type::String: Particle type."gas"⟶ Gas particle."dark_matter"⟶ Dark matter particle."stars"⟶ Star particle.
labels::Array{String,2}: Labels for the different simulations.output_path::String = "metallicity_profile": Path to the output directory. The images will be stored inoutput_path/images/ and will be named frame_XXXformatwhere XXX is the ordinal of the frame. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scalepositions["box_size"]if vacuum boundary conditions were used, and it will scalepositions["box_size"] / 2if periodic boundary conditions were used.box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.quantities_2D_pipeline — Method
quantities_2D_pipeline(
base_name::String,
source_path::String;
<keyword arguments>
)Save the results of the quantities_2D_plot function as one folder per snapshot.
It will produce output only for snapshots that have stars.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.output_path::String = "Kennicutt_Schmidt": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
title::String = "": Title for the figure. If an empty string is given no title is printed, which is the default.filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.temp_filter::Unitful.Quantity = Inf * Unitful.K: Maximum temperature allowed for the gas particles.age_filter::Unitful.Quantity = 20.0UnitfulAstro.Myr: Maximum star age allowed for the calculation of the SFR.max_r::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Maximum distance up to which the parameters will be calculated, with units.bins::Int64 = 50: Number of subdivisions of [0,max_r] to be used. It has to be at least 5.scale::NTuple{2, Symbol} = (:identity, :identity): Scaling to be used for the x and y axes. It will apply equally to every figure produced. The options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
x_factor::Int64 = 0: Numerical exponent to scale thex_quantity, e.g. ifx_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.y_factor::Int64 = 0: Numerical exponent to scale they_quantity, e.g. ify_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.mass_unit::Unitful.FreeUnits = UnitfulAstro.Msun: Unit of mass to be used in the output, all available mass units in Unitful and UnitfulAstro can be used.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.rho_temp_pipeline — Method
rho_temp_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of the rho_temp_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "rho_vs_temp": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.temp_unit::Unitful.FreeUnits = Unitful.K: Unit of temperature to be used in the output, all available temperature units in Unitful and UnitfulAstro can be used.density_unit::Unitful.FreeUnits = UnitfulAstro.Msun / UnitfulAstro.kpc^3: Unit of density to be used in the output, all available density units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.scatter_grid_pipeline — Method
scatter_grid_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of the scatter_grid_plot function as one image per snapshot, and then generate a GIF and video animating the images.
Arguments
base_name::String: Base name of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Path to the directory containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "scatter_grid": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".ps", ".svg" and ".png".
GADGETPlotting.sfr_txt_pipeline — Method
sfr_txt_pipeline(
snapshots::Vector{String},
source_path::Vector{String},
x_axis::Int64,
y_axis::Vector{Int64};
<keyword arguments>
)::NothingSave the results of the sfr_txt_plot function as one image per simulation or one image per column depending on comparison_type.
This function takes a modified version of sfr.txt which is produced by a private version of GADGET3. GADGET4 produces a sfr.txt, but it is not compatible with this function.
Arguments
snapshots::Vector{String}: Path to the snapshot files, to get its headers.source_path::Vector{String}: Paths to the directories containing the sfr.txt files, set in the GADGET variableOutputDir.x_axis::Int64: Column number for the x axis.y_axis::Vector{Int64}: Column numbers for the y axis.output_path::String = "sfr_txt": Path to the output directory.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
comparison_type::Int64 = 0: Selects which parameters (columns or simulations) will be compared:0⟶ Different columns are compared, for a single simulation (one plot per simulation).1⟶ Different simulations are compared, using the same column (one plot per column).
titles::Vector{String} = String[]: Titles for the figures. If an empty string is given, no title is printed.names::Vector{String} = String[]: Names for the files. If an empty string is given, the images will be assigned a number given by the order ofsource_path.labels::Union{Nothing, Array{String, 2}} = nothing: Labels for the different simulations. Only relevant ifcomparison_type = 1.bins::Int64 = 0: Number of subdivisions for the smoothing of the data. The default is no smoothing. It will apply equally to every figure produced.scale::NTuple{2, Symbol} = (:identity, :identity): Scaling to be used for the x and y axes. It will apply equally to every figure produced. The options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
x_factor::Int64 = 0: Numerical exponent to scale thex_quantity, e.g. ifx_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.y_factor::Int64 = 0: Numerical exponent to scale they_quantity, e.g. ify_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.min_filter::NTuple{2, Float64} = (-Inf, -Inf): Value filter for the x and y axes. It will apply equally to every figure produced. If a value of the x data is lower thanmin_filter[1], then it is deleted. Equivalently with the y axis andmin_filter[2]. The default is -Inf for both, i.e. no filtering.mass_unit::Unitful.FreeUnits = UnitfulAstro.Msun: Unit of mass to be used in the output, all available mass units in Unitful and UnitfulAstro can be used.time_unit::Unitful.FreeUnits = UnitfulAstro.Myr: Unit of time to be used in the output, all available time units in Unitful and UnitfulAstro can be used.sfr_unit::Unitful.FreeUnits = UnitfulAstro.Msun / UnitfulAstro.yr: Unit of mass/time to be used in the output, all available time and mass units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".
GADGETPlotting.star_map_pipeline — Method
star_map_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of the star_map_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base name of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Path to the directory containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "star_map": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.plane::String = "All": Indicates which plane will be plotted."XY"⟶ x-y plane alone."XZ"⟶ x-z plane alone."YZ"⟶ y-z plane alone."All"⟶ The three planes in a single 1x3 figure.
box_size::Unitful.Quantity = 1000.0UnitfulAstro.kpc: Size of the plotting region if vacuum boundary conditions were used. Its unit doesn't have to be the same aslength_unit.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scalepositions["box_size"]if vacuum boundary conditions were used, and it will scalepositions["box_size"] / 2if periodic boundary conditions were used.axes::Bool = false: If true, the axes passing through (0, 0) are drawn. If false, no axes are drawn.length_unit::Unitful.FreeUnits = UnitfulAstro.kpc: Unit of length to be used in the output, all available length units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".ps", ".svg" and ".png".
GADGETPlotting.temperature_histogram_pipeline — Method
temperature_histogram_pipeline(
base_name::String,
source_path::String,
anim_name::String,
frame_rate::Int64;
<keyword arguments>
)::NothingSave the results of the temperature_histogram_plot function as one image per snapshot, and then generate a GIF and a video animating the images.
Arguments
base_name::String: Base names of the snapshot files, set in the GADGET variableSnapshotFileBase.source_path::String: Paths to the directories containing the snapshot files, set in the GADGET variableOutputDir.anim_name::String: File name of the generated video and GIF, without the extension.frame_rate::Int64: Frame rate of the output video and GIF.output_path::String = "temperature_histogram": Path to the output directory. The images will be stored inoutput_path/images/ and will be namedbase_name_XXXformatwhere XXX is the number of the snapshot. The GIF and the video will be stored inoutput_path.sim_cosmo::Int64 = 0: Value of the GADGET variableComovingIntegrationOn:0⟶ Newtonian simulation (static universe).1⟶ Cosmological simulation (expanding universe).
filter_function::Function = pass_all: A function with the signature:foo(snap_file::String, type::String)::Vector{Int64}See the function
pass_allfor an example. By default, no particles are filtered.step::Int64 = 1: Step used to traverse the list of snapshots. By default all snapshots will be plotted.temp_unit::Unitful.FreeUnits = Unitful.K: Unit of temperature to be used in the output, all available temperature units in Unitful and UnitfulAstro can be used.format::String = ".png": File format of the output figure. All formats supported by the GR backend can be used, namely ".pdf", ".svg" and ".png".