Skip to content

Commit bc05006

Browse files
committed
Merge branch 'master' of github.com:kyleaoman/velociraptor-python
2 parents 16b68db + 23a99a6 commit bc05006

File tree

11 files changed

+399
-136
lines changed

11 files changed

+399
-136
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ dist/*
1414

1515
# MacOS
1616
*.DS_Store
17+
18+
# autoformatter virtualenv
19+
black_formatting_env/*

pyproject.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools]
6+
packages = ["velociraptor"]
7+
8+
[project]
9+
name = "velociraptor-python"
10+
version="0.16.1"
11+
authors = [
12+
{ name="Josh Borrow", email="[email protected]" },
13+
{ name="Kyle Oman", email="[email protected]" },
14+
]
15+
description="Velociraptor catalogue reading routines."
16+
readme = "README.md"
17+
requires-python = ">3.6.0"
18+
classifiers = [
19+
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
20+
"Operating System :: OS Independent",
21+
]
22+
dependencies = [
23+
"numpy",
24+
"h5py",
25+
"unyt>=2.6.0",
26+
"astropy",
27+
]
28+
29+
[project.urls]
30+
"Homepage" = "https://github.com/SWIFTSIM/velociraptor-python"
31+
"Bug Tracker" = "https://github.com/SWIFTSIM/velociraptor-python/issues"
32+
"Documentation" = "https://velociraptor-python.readthedocs.io/en/latest"
33+
34+
[project.scripts]
35+
velociraptor-plot = "velociraptor.velociraptor_plot:velociraptor_plot"
36+
velociraptor-compute-box-size-correction = "velociraptor.velociraptor_compute_box_size_correction:velociraptor_compute_box_size_correction"

tests/__init__.py

Whitespace-only changes.

tests/test_load_catalogue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
from velociraptor import load
6-
from helper import requires
6+
from .helper import requires
77

88

99
@requires("cosmo_0000.properties")

velociraptor-compute-box-size-correction

Lines changed: 0 additions & 128 deletions
This file was deleted.

velociraptor/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.16.1"
1+
__version__ = "0.17.0"

velociraptor/catalogue/registration.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,18 +1087,24 @@ def registration_log_element_ratios_times_masses(
10871087
"LogIronOverHydrogen": "Fe_over_H",
10881088
"LogOxygenOverHydrogenAtomic": "O_over_H_atomic",
10891089
"LogOxygenOverHydrogenMolecular": "O_over_H_molecular",
1090+
"LogNitrogenOverOxygen": "N_over_O",
1091+
"LogCarbonOverOxygen": "C_over_O",
10901092
}[long_species]
10911093
element_name = {
10921094
"LogOxygenOverHydrogen": "Oxygen",
10931095
"LogIronOverHydrogen": "Iron",
10941096
"LogOxygenOverHydrogenAtomic": "Atomic-phase Oxygen",
10951097
"LogOxygenOverHydrogenMolecular": "Molecular-phase Oxygen",
1098+
"LogNitrogenOverOxygen": "Nitrogen over Oxygen",
1099+
"LogCarbonOverOxygen": "Carbon over Oxygen",
10961100
}[long_species]
10971101
fraction_name = {
10981102
"LogOxygenOverHydrogen": "O/H",
10991103
"LogIronOverHydrogen": "Fe/H",
11001104
"LogOxygenOverHydrogenAtomic": "O/H",
11011105
"LogOxygenOverHydrogenMolecular": "O/H",
1106+
"LogNitrogenOverOxygen": "N/O",
1107+
"LogCarbonOverOxygen": "C/O",
11021108
}[long_species]
11031109

11041110
short_floortype = {"Lo": "lowfloor", "Hi": "highfloor"}[floor_type]
@@ -1143,18 +1149,24 @@ def registration_lin_element_ratios_times_masses(
11431149
"OxygenOverHydrogen": "O_over_H",
11441150
"IronOverHydrogen": "Fe_over_H",
11451151
"IronfromSNIaOverHydrogen": "FeSNIa_over_H",
1152+
"NitrogenOverOxygen": "N_over_O",
1153+
"CarbonOverOxygen": "C_over_O",
11461154
}[long_species]
11471155
element_name = {
11481156
"TotalOxygenOverHydrogen": "Oxygen",
11491157
"OxygenOverHydrogen": "Oxygen",
11501158
"IronOverHydrogen": "Iron",
11511159
"IronfromSNIaOverHydrogen": "SNIaIron",
1160+
"NitrogenOverOxygen": "Nitrogen over Oxygen",
1161+
"CarbonOverOxygen": "Carbon over Oxygen",
11521162
}[long_species]
11531163
fraction_name = {
11541164
"TotalOxygenOverHydrogen": "O/H",
11551165
"OxygenOverHydrogen": "O/H",
11561166
"IronOverHydrogen": "Fe/H",
11571167
"IronfromSNIaOverHydrogen": "Fe(SNIa)/H",
1168+
"NitrogenOverOxygen": "N/O",
1169+
"CarbonOverOxygen": "C/O",
11581170
}[long_species]
11591171
except KeyError:
11601172
raise RegistrationDoesNotMatchError

velociraptor/catalogue/translator.py

Lines changed: 122 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,8 +1222,8 @@ def VR_to_SOAP(particle_property_name: str) -> str:
12221222
"exclusivesphere.100kpc.gasmassincolddensegas",
12231223
-1,
12241224
),
1225-
"stellar_birth_densities.logaverage": (
1226-
"fofsubhaloproperties.logarithmicallyaveragedstellarbirthdensity",
1225+
"stellar_birth_densities.median": (
1226+
"fofsubhaloproperties.medianstellarbirthdensity",
12271227
-1,
12281228
),
12291229
"stellar_birth_densities.min": (
@@ -1234,6 +1234,30 @@ def VR_to_SOAP(particle_property_name: str) -> str:
12341234
"fofsubhaloproperties.maximumstellarbirthdensity",
12351235
-1,
12361236
),
1237+
"stellar_birth_pressures.median": (
1238+
"fofsubhaloproperties.medianstellarbirthpressure",
1239+
-1,
1240+
),
1241+
"stellar_birth_pressures.min": (
1242+
"fofsubhaloproperties.minimumstellarbirthpressure",
1243+
-1,
1244+
),
1245+
"stellar_birth_pressures.max": (
1246+
"fofsubhaloproperties.maximumstellarbirthpressure",
1247+
-1,
1248+
),
1249+
"stellar_birth_temperatures.median": (
1250+
"fofsubhaloproperties.medianstellarbirthtemperature",
1251+
-1,
1252+
),
1253+
"stellar_birth_temperatures.min": (
1254+
"fofsubhaloproperties.minimumstellarbirthtemperature",
1255+
-1,
1256+
),
1257+
"stellar_birth_temperatures.max": (
1258+
"fofsubhaloproperties.maximumstellarbirthtemperature",
1259+
-1,
1260+
),
12371261
"snii_thermal_feedback_densities.max": (
12381262
"fofsubhaloproperties.lastsupernovaeventmaximumgasdensity",
12391263
-1,
@@ -1262,6 +1286,102 @@ def VR_to_SOAP(particle_property_name: str) -> str:
12621286
"exclusivesphere.100kpc.linearmassweighteddiffuseoxygenoverhydrogenofgas",
12631287
-1,
12641288
),
1289+
"lin_element_ratios_times_masses.lin_N_over_O_total_times_gas_mass_30_kpc": (
1290+
"exclusivesphere.30kpc.linearmassweightednitrogenoveroxygenofgas",
1291+
-1,
1292+
),
1293+
"lin_element_ratios_times_masses.lin_N_over_O_total_times_gas_mass_50_kpc": (
1294+
"exclusivesphere.50kpc.linearmassweightednitrogenoveroxygenofgas",
1295+
-1,
1296+
),
1297+
"lin_element_ratios_times_masses.lin_N_over_O_total_times_gas_mass_100_kpc": (
1298+
"exclusivesphere.100kpc.linearmassweightednitrogenoveroxygenofgas",
1299+
-1,
1300+
),
1301+
"lin_element_ratios_times_masses.lin_N_over_O_times_gas_mass_30_kpc": (
1302+
"exclusivesphere.30kpc.linearmassweighteddiffusenitrogenoveroxygenofgas",
1303+
-1,
1304+
),
1305+
"lin_element_ratios_times_masses.lin_N_over_O_times_gas_mass_50_kpc": (
1306+
"exclusivesphere.50kpc.linearmassweighteddiffusenitrogenoveroxygenofgas",
1307+
-1,
1308+
),
1309+
"lin_element_ratios_times_masses.lin_N_over_O_times_gas_mass_100_kpc": (
1310+
"exclusivesphere.100kpc.linearmassweighteddiffusenitrogenoveroxygenofgas",
1311+
-1,
1312+
),
1313+
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_lowfloor_30_kpc": (
1314+
"exclusivesphere.30kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgaslowlimit",
1315+
-1,
1316+
),
1317+
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_lowfloor_50_kpc": (
1318+
"exclusivesphere.50kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgaslowlimit",
1319+
-1,
1320+
),
1321+
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_lowfloor_100_kpc": (
1322+
"exclusivesphere.100kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgaslowlimit",
1323+
-1,
1324+
),
1325+
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_highfloor_30_kpc": (
1326+
"exclusivesphere.30kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgashighlimit",
1327+
-1,
1328+
),
1329+
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_highfloor_50_kpc": (
1330+
"exclusivesphere.50kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgashighlimit",
1331+
-1,
1332+
),
1333+
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_highfloor_100_kpc": (
1334+
"exclusivesphere.100kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgashighlimit",
1335+
-1,
1336+
),
1337+
"lin_element_ratios_times_masses.lin_C_over_O_total_times_gas_mass_30_kpc": (
1338+
"exclusivesphere.30kpc.linearmassweightedcarbonoveroxygenofgas",
1339+
-1,
1340+
),
1341+
"lin_element_ratios_times_masses.lin_C_over_O_total_times_gas_mass_50_kpc": (
1342+
"exclusivesphere.50kpc.linearmassweightedcarbonoveroxygenofgas",
1343+
-1,
1344+
),
1345+
"lin_element_ratios_times_masses.lin_C_over_O_total_times_gas_mass_100_kpc": (
1346+
"exclusivesphere.100kpc.linearmassweightedcarbonoveroxygenofgas",
1347+
-1,
1348+
),
1349+
"lin_element_ratios_times_masses.lin_C_over_O_times_gas_mass_30_kpc": (
1350+
"exclusivesphere.30kpc.linearmassweighteddiffusecarbonoveroxygenofgas",
1351+
-1,
1352+
),
1353+
"lin_element_ratios_times_masses.lin_C_over_O_times_gas_mass_50_kpc": (
1354+
"exclusivesphere.50kpc.linearmassweighteddiffusecarbonoveroxygenofgas",
1355+
-1,
1356+
),
1357+
"lin_element_ratios_times_masses.lin_C_over_O_times_gas_mass_100_kpc": (
1358+
"exclusivesphere.100kpc.linearmassweighteddiffusecarbonoveroxygenofgas",
1359+
-1,
1360+
),
1361+
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_lowfloor_30_kpc": (
1362+
"exclusivesphere.30kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgaslowlimit",
1363+
-1,
1364+
),
1365+
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_lowfloor_50_kpc": (
1366+
"exclusivesphere.50kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgaslowlimit",
1367+
-1,
1368+
),
1369+
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_lowfloor_100_kpc": (
1370+
"exclusivesphere.100kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgaslowlimit",
1371+
-1,
1372+
),
1373+
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_highfloor_30_kpc": (
1374+
"exclusivesphere.30kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgashighlimit",
1375+
-1,
1376+
),
1377+
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_highfloor_50_kpc": (
1378+
"exclusivesphere.50kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgashighlimit",
1379+
-1,
1380+
),
1381+
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_highfloor_100_kpc": (
1382+
"exclusivesphere.100kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgashighlimit",
1383+
-1,
1384+
),
12651385
"log_element_ratios_times_masses.log_O_over_H_times_gas_mass_lowfloor_30_kpc": (
12661386
"exclusivesphere.30kpc.logarithmicmassweighteddiffuseoxygenoverhydrogenofgaslowlimit",
12671387
-1,

0 commit comments

Comments
 (0)