Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 12 additions & 25 deletions SOAP/particle_selection/aperture_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -3109,17 +3109,14 @@ def LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfAtomicGasLowLimit(
self,
) -> unyt.unyt_quantity:
"""
Atomic mass-weighted sum of the logarithm of the diffuse oxygen over hydrogen ratio of gas
Atomic hydrogen mass-weighted sum of the logarithm of the diffuse oxygen over hydrogen ratio of gas
particles, excluding the contribution from dust and using a lower limit on the ratio
of 1.e-4 times the solar ratio, set in the parameter file.
"""
if (self.Ngas == 0) or (self.AtomicHydrogenMass == 0):
return None
return 10 ** (
(
self.gas_log10_O_over_H_diffuse_low_limit[self.gas_is_cold_dense]
* self.gas_mass_HI[self.gas_is_cold_dense]
).sum()
(self.gas_log10_O_over_H_diffuse_low_limit * self.gas_mass_HI).sum()
/ self.AtomicHydrogenMass
)

Expand All @@ -3128,17 +3125,14 @@ def LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfAtomicGasHighLimit(
self,
) -> unyt.unyt_quantity:
"""
Atomic mass-weighted sum of the logarithm of the diffuse oxygen over hydrogen ratio of gas
Atomic hydrogen mass-weighted sum of the logarithm of the diffuse oxygen over hydrogen ratio of gas
particles, excluding the contribution from dust and using a lower limit on the ratio
of 1.e-3 times the solar ratio, set in the parameter file.
"""
if (self.Ngas == 0) or (self.AtomicHydrogenMass == 0):
return None
return 10 ** (
(
self.gas_log10_O_over_H_diffuse_high_limit[self.gas_is_cold_dense]
* self.gas_mass_HI[self.gas_is_cold_dense]
).sum()
(self.gas_log10_O_over_H_diffuse_high_limit * self.gas_mass_HI).sum()
/ self.AtomicHydrogenMass
)

Expand All @@ -3147,17 +3141,14 @@ def LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfMolecularGasLowLimit(
self,
) -> unyt.unyt_quantity:
"""
Molecular mass-weighted sum of the logarithm of the diffuse oxygen over hydrogen ratio of gas
Molecular hydrogen mass-weighted sum of the logarithm of the diffuse oxygen over hydrogen ratio of gas
particles, excluding the contribution from dust and using a lower limit on the ratio
of 1.e-4 times the solar ratio, set in the parameter file.
"""
if (self.Ngas == 0) or (self.MolecularHydrogenMass == 0):
return None
return 10 ** (
(
self.gas_log10_O_over_H_diffuse_low_limit[self.gas_is_cold_dense]
* self.gas_mass_H2[self.gas_is_cold_dense]
).sum()
(self.gas_log10_O_over_H_diffuse_low_limit * self.gas_mass_H2).sum()
/ self.MolecularHydrogenMass
)

Expand All @@ -3166,17 +3157,14 @@ def LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfMolecularGasHighLimit(
self,
) -> unyt.unyt_quantity:
"""
Molecular mass-weighted sum of the logarithm of the diffuse oxygen over hydrogen ratio of gas
Molecular hydrogen mass-weighted sum of the logarithm of the diffuse oxygen over hydrogen ratio of gas
particles, excluding the contribution from dust and using a lower limit on the ratio
of 1.e-3 times the solar ratio, set in the parameter file.
"""
if (self.Ngas == 0) or (self.MolecularHydrogenMass == 0):
return None
return 10 ** (
(
self.gas_log10_O_over_H_diffuse_high_limit[self.gas_is_cold_dense]
* self.gas_mass_H2[self.gas_is_cold_dense]
).sum()
(self.gas_log10_O_over_H_diffuse_high_limit * self.gas_mass_H2).sum()
/ self.MolecularHydrogenMass
)

Expand Down Expand Up @@ -3327,9 +3315,8 @@ def LinearMassWeightedIronFromSNIaOverHydrogenOfStars(
self,
) -> unyt.unyt_quantity:
"""
Mass-weighted sum of the iron over hydrogen ratio for star particles,
times the solar ratio, set in the parameter file, and
only taking into account iron produced by SNIa.
Mass-weighted sum of the iron over hydrogen ratio for star particles, only
taking into account iron produced by SNIa.
"""
if self.Nstar == 0:
return None
Expand Down Expand Up @@ -3402,7 +3389,7 @@ def LogarithmicMassWeightedMagnesiumOverHydrogenOfStarsLowLimit(
self,
) -> unyt.unyt_quantity:
"""
Mass-weighted sum of the logarithm of the iron over hydrogen ratio for star particles,
Mass-weighted sum of the logarithm of the magnesium over hydrogen ratio for star particles,
using a lower limit of 1.e-4 times the solar ratio, set in the parameter file.
"""
if self.Nstar == 0:
Expand All @@ -3416,7 +3403,7 @@ def LogarithmicMassWeightedMagnesiumOverHydrogenOfStarsHighLimit(
self,
) -> unyt.unyt_quantity:
"""
Mass-weighted sum of the logarithm of the iron over hydrogen ratio for star particles,
Mass-weighted sum of the logarithm of the magnesium over hydrogen ratio for star particles,
using a lower limit of 1.e-3 times the solar ratio, set in the parameter file.
"""
if self.Nstar == 0:
Expand Down
46 changes: 19 additions & 27 deletions SOAP/property_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -4256,7 +4256,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Linear sum of the oxygen over hydrogen ratio of gas, weighted by with the cold dense gas mass.",
description="Linear sum of the total oxygen over hydrogen ratio of cold dense gas, weighted by the gas mass.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4273,7 +4273,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Linear sum of the total nitrogen over oxygen ratio of gas, weighted by with the cold dense gas mass.",
description="Linear sum of the total nitrogen over oxygen ratio of cold dense gas, weighted by the gas mass.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4290,7 +4290,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Linear sum of the total carbon over oxygen ratio of gas, weighted by with the cold dense gas mass.",
description="Linear sum of the total carbon over oxygen ratio of cold dense gas, weighted by the gas mass.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4307,7 +4307,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Linear sum of the diffuse nitrogen over oxygen ratio of gas, weighted by with the cold dense gas mass.",
description="Linear sum of the diffuse nitrogen over oxygen ratio of cold dense gas, weighted by the gas mass.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4324,7 +4324,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Linear sum of the diffuse carbon over oxygen ratio of gas, weighted by with the cold dense gas mass.",
description="Linear sum of the diffuse carbon over oxygen ratio of cold dense gas, weighted by the gas mass.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4341,7 +4341,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Linear sum of the diffuse oxygen over hydrogen ratio of gas, weighted by with the cold dense gas mass.",
description="Linear sum of the diffuse oxygen over hydrogen ratio of cold dense gas, weighted by the gas mass.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4358,7 +4358,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse nitrogen over oxygen ratio of gas, weighted by with the cold dense gas mass. Imposes a lower limit of 1.e-4 times solar N/O.",
description="Logarithmic sum of the diffuse nitrogen over oxygen ratio of cold dense gas, weighted by the gas mass. Imposes a lower limit of 1.e-4 times solar N/O.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4375,7 +4375,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse nitrogen over oxygen ratio of gas, weighted by with the cold dense gas mass. Imposes a lower limit of 1.e-3 times solar N/O.",
description="Logarithmic sum of the diffuse nitrogen over oxygen ratio of cold dense gas, weighted by the gas mass. Imposes a lower limit of 1.e-3 times solar N/O.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4392,7 +4392,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse carbon over oxygen ratio of gas, weighted by with the cold dense gas mass. Imposes a lower limit of 1.e-4 times solar C/O.",
description="Logarithmic sum of the diffuse carbon over oxygen ratio of cold dense gas, weighted by the gas mass. Imposes a lower limit of 1.e-4 times solar C/O.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4409,7 +4409,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse carbon over oxygen ratio of gas, weighted by with the cold dense gas mass. Imposes a lower limit of 1.e-3 times solar C/O.",
description="Logarithmic sum of the diffuse carbon over oxygen ratio of cold dense gas, weighted by the gas mass. Imposes a lower limit of 1.e-3 times solar C/O.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4426,7 +4426,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of gas, weighted by with the cold dense gas mass. Imposes a lower limit of 1.e-4 times solar O/H.",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of cold dense gas, weighted by the gas mass. Imposes a lower limit of 1.e-4 times solar O/H.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4443,7 +4443,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of gas, weighted by with the cold dense gas mass. Imposes a lower limit of 1.e-3 times solar O/H.",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of cold dense gas, weighted by the gas mass. Imposes a lower limit of 1.e-3 times solar O/H.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand All @@ -4460,16 +4460,14 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of atomic gas, weighted by the atomic gas mass. Imposes a lower limit of 1.e-4 times solar O/H.",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of gas, weighted by the atomic hydrogen mass. Imposes a lower limit of 1.e-4 times solar O/H.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
"PartType0/Masses",
"PartType0/ElementMassFractionsDiffuse",
"PartType0/ElementMassFractions",
"PartType0/SpeciesFractions",
"PartType0/Temperatures",
"PartType0/Densities",
],
output_physical=True,
a_scale_exponent=0,
Expand All @@ -4479,16 +4477,14 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of atomic gas, weighted by the atomic gas mass. Imposes a lower limit of 1.e-3 times solar O/H.",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of gas, weighted by the atomic hydrogen mass. Imposes a lower limit of 1.e-3 times solar O/H.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
"PartType0/Masses",
"PartType0/ElementMassFractionsDiffuse",
"PartType0/ElementMassFractions",
"PartType0/SpeciesFractions",
"PartType0/Temperatures",
"PartType0/Densities",
],
output_physical=True,
a_scale_exponent=0,
Expand All @@ -4498,16 +4494,14 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of molecular gas, weighted by the molecular gas mass. Imposes a lower limit of 1.e-4 times solar O/H.",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of gas, weighted by the molecular hydrogen mass. Imposes a lower limit of 1.e-4 times solar O/H.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
"PartType0/Masses",
"PartType0/ElementMassFractionsDiffuse",
"PartType0/ElementMassFractions",
"PartType0/SpeciesFractions",
"PartType0/Temperatures",
"PartType0/Densities",
],
output_physical=True,
a_scale_exponent=0,
Expand All @@ -4517,16 +4511,14 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of molecular gas, weighted by the molecular gas mass. Imposes a lower limit of 1.e-3 times solar O/H.",
description="Logarithmic sum of the diffuse oxygen over hydrogen ratio of gas, weighted by the molecular hydrogen mass. Imposes a lower limit of 1.e-3 times solar O/H.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
"PartType0/Masses",
"PartType0/ElementMassFractionsDiffuse",
"PartType0/ElementMassFractions",
"PartType0/SpeciesFractions",
"PartType0/Temperatures",
"PartType0/Densities",
],
output_physical=True,
a_scale_exponent=0,
Expand Down Expand Up @@ -4584,7 +4576,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the magnesium over hydrogen ratio of stars, weighted by the stellar mass. Imposes a lower limit of 1.e-4 times solar Fe/H.",
description="Logarithmic sum of the magnesium over hydrogen ratio of stars, weighted by the stellar mass. Imposes a lower limit of 1.e-4 times solar Mg/H.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=["PartType4/Masses", "PartType4/ElementMassFractions"],
Expand All @@ -4596,7 +4588,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Logarithmic sum of the magnesium over hydrogen ratio of stars, weighted by the stellar mass. Imposes a lower limit of 1.e-3 times solar Fe/H.",
description="Logarithmic sum of the magnesium over hydrogen ratio of stars, weighted by the stellar mass. Imposes a lower limit of 1.e-3 times solar Mg/H.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=["PartType4/Masses", "PartType4/ElementMassFractions"],
Expand Down Expand Up @@ -4642,7 +4634,7 @@ class PropertyTable:
shape=1,
dtype=np.float32,
unit="dimensionless",
description="Sum of the iron over hydrogen ratio of stars, weighted by the stellar mass, where only iron from SNIa is included.",
description="Linear sum of the iron over hydrogen ratio of stars, weighted by the stellar mass, where only iron from SNIa is included.",
lossy_compression_filter="FMantissa9",
dmo_property=False,
particle_properties=[
Expand Down
Loading