forked from jchelly/SOAP
-
Notifications
You must be signed in to change notification settings - Fork 3
/
property_table.py
4538 lines (4483 loc) · 152 KB
/
property_table.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/env python
"""
property_table.py
This file contains all the properties that can be calculated by SOAP, and some
functionality to automatically generate the documentation (PDF) containing these
properties.
The rationale for having all of this in one file (and what is essentially one
big dictionary) is consistency: every property is defined exactly once, with
one data type, one unit, one description... Every type of halo still
implements its own calculation of each property, but everything that is exposed
to the user is guaranteed to be consistent for all halo types. To change the
documentation, you need to change the dictionary, so you will automatically
change the code as well. If you remember to regenerate the documentation, the
code will hence always be consistent with its documentation. The documentation
includes a version string to help identify it.
When a specific type of halo wants to implement a property, it should import the
property table from this file and grab all of the information for the
corresponding dictionary element, e.g. (taken from aperture_properties.py)
from property_table import PropertyTable
property_list = [
(prop, *PropertyTable.full_property_list[prop])
for prop in [
"Mtot",
"Mgas",
"Mdm",
"Mstar",
]
]
The elements of each row are documented later in this file.
Note that this file contains some code that helps to regenerate the dictionary
itself. That is useful for adding additional rows to the table.
"""
import numpy as np
import unyt
import subprocess
import datetime
import os
from typing import Dict, List
from halo_properties import HaloProperty
def get_version_string() -> str:
"""
Generate a version string that uniquely identifies the documentation file.
The version string will have the format
SOAP version a7baa6e -- Compiled by user ``vandenbroucke'' on winkel
on Tuesday 15 November 2022, 10:49:10
or
Unknown SOAP version -- Compiled by user ``vandenbroucke'' on winkel
on Tuesday 15 November 2022, 10:49:10
if no git version string can be obtained.
"""
handle = subprocess.run("git describe --always", shell=True, stdout=subprocess.PIPE)
if handle.returncode != 0:
git_version = "Unknown SOAP version"
else:
git_version = handle.stdout.decode("utf-8").strip()
git_version = f"SOAP version ``{git_version}''"
timestamp = datetime.datetime.now().strftime("%A %-d %B %Y, %H:%M:%S")
username = os.getlogin()
hostname = os.uname().nodename
return (
f"Generated by user ``{username}'' on {hostname} on {timestamp}. {git_version}"
)
def word_wrap_name(name):
"""
Put a line break in if a name gets too long
"""
maxlen = 20
count = 0
output = []
last_was_lower = False
for i in range(len(name)):
next_char = name[i]
count += 1
if count > maxlen and next_char.isupper() and last_was_lower:
output.append(r"\-")
output.append(next_char)
last_was_lower = next_char.isupper() == False
return "".join(output)
class PropertyTable:
"""
Auxiliary object to manipulate the property table.
You should only create a PropertyTable object if you actually want to use
it to generate an updated version of the internal property dictionary or
to generate the documentation. If you just want to grab the information for
a particular property from the table, you should directly access the
static table, e.g.
Mstar_info = PropertyTable.full_property_list["Mstar"]
"""
# some properties require an additional explanation in the form of a
# footnote. These footnotes are .tex files in the 'documentation' folder
# (that should exist). The name of the file acts as a key in the dictionary
# below; the corresponding value is a list of all properties that should
# include a footnote link to this particular explanation.
explanation = {
"footnote_MBH.tex": ["BHmaxM"],
"footnote_com.tex": ["com", "vcom"],
"footnote_AngMom.tex": ["Lgas", "Ldm", "Lstar", "Lbaryons"],
"footnote_kappa.tex": [
"kappa_corot_gas",
"kappa_corot_star",
"kappa_corot_baryons",
],
"footnote_disc_fraction.tex": ["DtoTstar", "DtoTgas"],
"footnote_SF.tex": [
"SFR",
"gasFefrac_SF",
"gasOfrac_SF",
"Mgas_SF",
"gasmetalfrac_SF",
],
"footnote_Tgas.tex": [
"Tgas",
"Tgas_no_agn",
"Tgas_no_cool",
"Tgas_no_cool_no_agn",
],
"footnote_lum.tex": ["StellarLuminosity"],
"footnote_circvel.tex": ["R_vmax_unsoft", "Vmax_unsoft", "Vmax_soft"],
"footnote_spin.tex": ["spin_parameter"],
"footnote_veldisp_matrix.tex": [
"veldisp_matrix_gas",
"veldisp_matrix_dm",
"veldisp_matrix_star",
],
"footnote_proj_veldisp.tex": [
"proj_veldisp_gas",
"proj_veldisp_dm",
"proj_veldisp_star",
],
"footnote_elements.tex": [
"gasOfrac",
"gasOfrac_SF",
"gasFefrac",
"gasFefrac_SF",
"gasmetalfrac",
"gasmetalfrac_SF",
],
"footnote_halfmass.tex": [
"HalfMassRadiusTot",
"HalfMassRadiusGas",
"HalfMassRadiusDM",
"HalfMassRadiusStar",
],
"footnote_satfrac.tex": ["Mfrac_satellites", "Mfrac_external"],
"footnote_Ekin.tex": ["Ekin_gas", "Ekin_star"],
"footnote_Etherm.tex": ["Etherm_gas"],
"footnote_Mnu.tex": ["Mnu", "MnuNS"],
"footnote_Xray.tex": [
"Xraylum",
"Xraylum_restframe",
"Xrayphlum",
"Xrayphlum_restframe",
],
"footnote_compY.tex": ["compY", "compY_no_agn"],
"footnote_dopplerB.tex": ["DopplerB"],
"footnote_coreexcision.tex": [
"Tgas_cy_weighted_core_excision",
"Tgas_cy_weighted_core_excision_no_agn",
"Tgas_core_excision",
"Tgas_no_cool_core_excision",
"Tgas_no_agn_core_excision",
"Tgas_no_cool_no_agn_core_excision",
"Xraylum_core_excision",
"Xraylum_no_agn_core_excision",
"Xrayphlum_core_excision",
"Xrayphlum_no_agn_core_excision",
"SpectroscopicLikeTemperature_core_excision",
"SpectroscopicLikeTemperature_no_agn_core_excision",
],
"footnote_cytemp.tex": [
"Tgas_cy_weighted",
"Tgas_cy_weighted_no_agn",
"Tgas_cy_weighted_core_excision",
"Tgas_cy_weighted_core_excision_no_agn",
],
"footnote_spectroscopicliketemperature.tex": [
"SpectroscopicLikeTemperature",
"SpectroscopicLikeTemperature_core_excision",
"SpectroscopicLikeTemperature_no_agn",
"SpectroscopicLikeTemperature_no_agn_core_excision",
],
"footnote_dust.tex": [
"DustGraphiteMass",
"DustGraphiteMassInMolecularGas",
"DustGraphiteMassInAtomicGas",
"DustSilicatesMass",
"DustSilicatesMassInMolecularGas",
"DustSilicatesMassInAtomicGas",
"DustLargeGrainMass",
"DustLargeGrainMassInMolecularGas",
"DustSmallGrainMass",
"DustSmallGrainMassInMolecularGas",
],
"footnote_diffuse.tex": [
"DiffuseCarbonMass",
"DiffuseOxygenMass",
"DiffuseMagnesiumMass",
"DiffuseSiliconMass",
"DiffuseIronMass",
],
"footnote_concentration.tex": [
"concentration",
"concentration_soft",
"concentration_dmo",
"concentration_dmo_soft",
],
"footnote_tensor.tex": [
"TotalInertiaTensor",
"TotalInertiaTensorReduced",
"TotalInertiaTensorNoniterative",
"TotalInertiaTensorReducedNoniterative",
"ProjectedTotalInertiaTensor",
"ProjectedTotalInertiaTensorReduced",
"ProjectedTotalInertiaTensorNoniterative",
"ProjectedTotalInertiaTensorReducedNoniterative",
],
"footnote_metallicity.tex": [
"LogarithmicMassWeightedDiffuseNitrogenOverOxygenOfGasLowLimit",
"LogarithmicMassWeightedDiffuseNitrogenOverOxygenOfGasHighLimit",
"LogarithmicMassWeightedDiffuseCarbonOverOxygenOfGasLowLimit",
"LogarithmicMassWeightedDiffuseCarbonOverOxygenOfGasHighLimit",
"LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfGasLowLimit",
"LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfGasHighLimit",
"LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfAtomicGasLowLimit",
"LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfAtomicGasHighLimit",
"LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfMolecularGasLowLimit",
"LogarithmicMassWeightedDiffuseOxygenOverHydrogenOfMolecularGasHighLimit",
"LogarithmicMassWeightedIronOverHydrogenOfStarsLowLimit",
"LogarithmicMassWeightedIronOverHydrogenOfStarsHighLimit",
"LogarithmicMassWeightedMagnesiumOverHydrogenOfStarsLowLimit",
"LogarithmicMassWeightedMagnesiumOverHydrogenOfStarsHighLimit",
"LogarithmicMassWeightedIronFromSNIaOverHydrogenOfStarsLowLimit",
"LinearMassWeightedOxygenOverHydrogenOfGas",
"LinearMassWeightedNitrogenOverOxygenOfGas",
"LinearMassWeightedCarbonOverOxygenOfGas",
"LinearMassWeightedDiffuseNitrogenOverOxygenOfGas",
"LinearMassWeightedDiffuseCarbonOverOxygenOfGas",
"LinearMassWeightedDiffuseOxygenOverHydrogenOfGas",
"LinearMassWeightedIronOverHydrogenOfStars",
"LinearMassWeightedMagnesiumOverHydrogenOfStars",
"LinearMassWeightedIronFromSNIaOverHydrogenOfStars",
],
}
# dictionary with human-friendly descriptions of the various lossy
# compression filters that can be applied to data.
# The key is the name of a lossy compression filter (same names as used
# by SWIFT), the value is the corresponding description, which can be either
# an actual description or a representative example.
compression_description = {
"FMantissa9": "$1.36693{\\rm{}e}10 \\rightarrow{} 1.367{\\rm{}e}10$",
"FMantissa13": "$1.36693{\\rm{}e}10 \\rightarrow{} 1.3669{\\rm{}e}10$",
"DMantissa9": "$1.36693{\\rm{}e}10 \\rightarrow{} 1.367{\\rm{}e}10$",
"DScale6": "1 pc accurate",
"DScale5": "10 pc accurate",
"DScale1": "0.1 km/s accurate",
"Nbit40": "Store less bits",
"None": "no compression",
}
# List of properties that get computed
# The key for each property is the name that is used internally in SOAP
# For each property, we have the following columns:
# - name: Name of the property within the output file
# - shape: Shape of this property for a single halo (1: scalar,
# 3: vector...)
# - dtype: Data type that will be used. Should have enough precision to
# avoid over/underflow
# - unit: Units that will be used internally and for the output.
# - description: Description string that will be used to describe the
# property in the output.
# - category: Category used to decide if this property should be calculated
# for a particular halo (filtering).
# - lossy compression filter: Lossy compression filter used in the output
# to reduce the file size. Note that SOAP does not actually compress
# the output; this is done by a separate script. We support all lossy
# compression filters available in SWIFT.
# - DMO property: Should this property be calculated for a DMO run?
# - Particle properties: Particle fields that are required to compute this
# property. Used to determine which particle fields to read for a
# particular SOAP configuration (as defined in the parameter file).
# - Output physical: Whether to output this value as physical or co-moving.
# - a-scale exponent: What a-scale exponent to set for this property. If set
# to None this marks that the property can not be converted to comoving
#
# Note that there is no good reason to have a diffent internal name and
# output name; this was mostly done for historical reasons. This means that
# you can easily change the name in the output without having to change all
# of the other .py files that use this property.
full_property_list = {
"AtomicHydrogenMass": (
"AtomicHydrogenMass",
1,
np.float32,
"snap_mass",
"Total gas mass in atomic hydrogen.",
"basic",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/SpeciesFractions",
"PartType0/ElementMassFractions",
],
True,
0,
),
"BHlasteventa": (
"BlackHolesLastEventScalefactor",
1,
np.float32,
"dimensionless",
"Scale-factor of last AGN event.",
"general",
"FMantissa9",
False,
["PartType5/LastAGNFeedbackScaleFactors"],
True,
None,
),
"BlackHolesTotalInjectedThermalEnergy": (
"BlackHolesTotalInjectedThermalEnergy",
1,
np.float32,
"snap_mass*snap_length**2/snap_time**2",
"Total thermal energy injected into gas particles by all black holes.",
"general",
"FMantissa9",
False,
["PartType5/AGNTotalInjectedEnergies"],
True,
None,
),
"BlackHolesTotalInjectedJetEnergy": (
"BlackHolesTotalInjectedJetEnergy",
1,
np.float32,
"snap_mass*snap_length**2/snap_time**2",
"Total jet energy injected into gas particles by all black holes.",
"general",
"FMantissa9",
False,
["PartType5/InjectedJetEnergies"],
True,
None,
),
"BHmaxAR": (
"MostMassiveBlackHoleAccretionRate",
1,
np.float32,
"snap_mass/snap_time",
"Gas accretion rate of most massive black hole.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/AccretionRates"],
True,
None,
),
"MostMassiveBlackHoleAveragedAccretionRate": (
"MostMassiveBlackHoleAveragedAccretionRate",
2,
np.float32,
"snap_mass/snap_time",
"Gas accretion rate of the most massive black hole, averaged over past 100Myr and past 10Myr. If the time between this snapshot and the previous one was less than the averaging time, then the value is averaged over the time between the snapshots.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/AveragedAccretionRates"],
True,
None,
),
"MostMassiveBlackHoleInjectedThermalEnergy": (
"MostMassiveBlackHoleInjectedThermalEnergy",
1,
np.float32,
"snap_mass*snap_length**2/snap_time**2",
"Total thermal energy injected into gas particles by the most massive black hole.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/AGNTotalInjectedEnergies"],
True,
None,
),
"MostMassiveBlackHoleAccretionMode": (
"MostMassiveBlackHoleAccretionMode",
1,
np.int32,
"dimensionless",
"Accretion flow regime of the most massive black hole. 0 - Thick disk, 1 - Thin disk, 2 - Slim disk",
"general",
"None",
False,
["PartType5/SubgridMasses", "PartType5/AccretionModes"],
True,
0,
),
"MostMassiveBlackHoleGWMassLoss": (
"MostMassiveBlackHoleGWMassLoss",
1,
np.float32,
"snap_mass",
"Cumulative mass lost to GW via BH-BH mergers over the history of the most massive black holes. This includes the mass loss from all the progenitors.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/GWMassLosses"],
True,
0,
),
"MostMassiveBlackHoleInjectedJetEnergyByMode": (
"MostMassiveBlackHoleInjectedJetEnergyByMode",
3,
np.float32,
"snap_mass*snap_length**2/snap_time**2",
"The total energy injected in the kinetic jet AGN feedback mode by the mostmassive black hole, split by accretion mode. The components correspond to the jet energy dumped in the thick, thin and slim disc modes, respectively.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/InjectedJetEnergiesByMode"],
True,
None,
),
"MostMassiveBlackHoleFormationScalefactor": (
"MostMassiveBlackHoleFormationScalefactor",
1,
np.float32,
"dimensionless",
"Scale-factor when most massive black hole was formed.",
"general",
"FMantissa13",
False,
["PartType5/SubgridMasses", "PartType5/FormationScaleFactors"],
True,
None,
),
"MostMassiveBlackHoleLastJetEventScalefactor": (
"MostMassiveBlackHoleLastJetEventScalefactor",
1,
np.float32,
"dimensionless",
"Scale-factor of last jet event for most massive black hole.",
"general",
"FMantissa13",
False,
["PartType5/SubgridMasses", "PartType5/LastAGNJetScaleFactors"],
True,
None,
),
"MostMassiveBlackHoleNumberOfAGNEvents": (
"MostMassiveBlackHoleNumberOfAGNEvents",
1,
np.int32,
"dimensionless",
"Number of thermal AGN events the most massive black hole has had so far",
"general",
"None",
False,
["PartType5/SubgridMasses", "PartType5/NumberOfAGNEvents"],
True,
0,
),
"MostMassiveBlackHoleNumberOfAGNJetEvents": (
"MostMassiveBlackHoleNumberOfAGNJetEvents",
1,
np.int32,
"dimensionless",
"Number of jet events the most massive black hole has had so far",
"general",
"None",
False,
["PartType5/SubgridMasses", "PartType5/NumberOfAGNJetEvents"],
True,
0,
),
"MostMassiveBlackHoleNumberOfMergers": (
"MostMassiveBlackHoleNumberOfMergers",
1,
np.int32,
"dimensionless",
"Number of mergers experienced by the most massive black hole.",
"general",
"None",
False,
["PartType5/SubgridMasses", "PartType5/NumberOfMergers"],
True,
0,
),
"MostMassiveBlackHoleRadiatedEnergyByMode": (
"MostMassiveBlackHoleRadiatedEnergyByMode",
3,
np.float32,
"snap_mass*snap_length**2/snap_time**2",
"The total energy launched into radiation by the most massive black hole, split by accretion mode. The components correspond to the radiative energy dumped in the thick, thin and slim disc modes, respectively.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/RadiatedEnergiesByMode"],
True,
None,
),
"MostMassiveBlackHoleTotalAccretedMass": (
"MostMassiveBlackHoleTotalAccretedMass",
1,
np.float32,
"snap_mass",
"The total mass accreted by the most massive black hole.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/TotalAccretedMasses"],
True,
0,
),
"MostMassiveBlackHoleTotalAccretedMassesByMode": (
"MostMassiveBlackHoleTotalAccretedMassesByMode",
3,
np.float32,
"snap_mass",
"The total mass accreted by the most massive black hole in each accretion mode. The components correspond to the mass accreted in the thick, thin and slim disc modes, respectively.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/TotalAccretedMassesByMode"],
True,
0,
),
"MostMassiveBlackHoleSpin": (
"MostMassiveBlackHoleSpin",
1,
np.float32,
"dimensionless",
"Dimensionless spin of the most massive black hole. Negative values indicate retrograde accretion.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/Spins"],
True,
0,
),
"MostMassiveBlackHoleWindEnergyByMode": (
"MostMassiveBlackHoleWindEnergyByMode",
3,
np.float32,
"snap_mass*snap_length**2/snap_time**2",
"The total energy launched into accretion disc winds by the most massive black hole, split by accretion mode. The components correspond to the radiative energy dumped in the thick, thin and slim disc modes, respectively.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/WindEnergiesByMode"],
True,
None,
),
"BHmaxID": (
"MostMassiveBlackHoleID",
1,
np.uint64,
"dimensionless",
"ID of most massive black hole.",
"basic",
"None",
False,
["PartType5/SubgridMasses", "PartType5/ParticleIDs"],
True,
None,
),
"BHmaxM": (
"MostMassiveBlackHoleMass",
1,
np.float32,
"snap_mass",
"Mass of most massive black hole.",
"basic",
"FMantissa9",
False,
["PartType5/SubgridMasses"],
True,
0,
),
"BHmaxlasteventa": (
"MostMassiveBlackHoleLastEventScalefactor",
1,
np.float32,
"dimensionless",
"Scale-factor of last thermal AGN event for most massive black hole.",
"general",
"FMantissa13",
False,
["PartType5/SubgridMasses", "PartType5/LastAGNFeedbackScaleFactors"],
True,
None,
),
"BHmaxpos": (
"MostMassiveBlackHolePosition",
3,
np.float64,
"snap_length",
"Position of most massive black hole.",
"general",
"DScale6",
False,
["PartType5/Coordinates", "PartType5/SubgridMasses"],
False,
1,
),
"BHmaxvel": (
"MostMassiveBlackHoleVelocity",
3,
np.float32,
"snap_length/snap_time",
"Velocity of most massive black hole relative to the simulation volume.",
"general",
"FMantissa9",
False,
["PartType5/SubgridMasses", "PartType5/Velocities"],
False,
1,
),
"DarkMatterInertiaTensor": (
"DarkMatterInertiaTensor",
6,
np.float32,
"snap_length**2",
"3D inertia tensor computed iteratively from the DM mass distribution, relative to the halo centre. Diagonal components and one off-diagonal triangle as (1,1), (2,2), (3,3), (1,2), (1,3), (2,3). Only calculated when we have more than 20 particles.",
"dm",
"FMantissa9",
True,
["PartType1/Coordinates", "PartType1/Masses"],
True,
2,
),
"DarkMatterInertiaTensorReduced": (
"DarkMatterInertiaTensorReduced",
6,
np.float32,
"dimensionless",
"Reduced 3D inertia tensor computed iteratively from the DM mass distribution, relative to the halo centre. Diagonal components and one off-diagonal triangle as (1,1), (2,2), (3,3), (1,2), (1,3), (2,3). Only calculated when we have more than 20 particles.",
"dm",
"FMantissa9",
True,
["PartType1/Coordinates", "PartType1/Masses"],
True,
0,
),
"DarkMatterInertiaTensorNoniterative": (
"DarkMatterInertiaTensorNoniterative",
6,
np.float32,
"snap_length**2",
"3D inertia tensor computed in a single interation from the DM mass distribution, relative to the halo centre. Diagonal components and one off-diagonal triangle as (1,1), (2,2), (3,3), (1,2), (1,3), (2,3). Only calculated when we have more than 20 particles.",
"dm",
"FMantissa9",
True,
["PartType1/Coordinates", "PartType1/Masses"],
True,
2,
),
"DarkMatterInertiaTensorReducedNoniterative": (
"DarkMatterInertiaTensorReducedNoniterative",
6,
np.float32,
"dimensionless",
"Reduced 3D inertia tensor computed in a single interation from the DM mass distribution, relative to the halo centre. Diagonal components and one off-diagonal triangle as (1,1), (2,2), (3,3), (1,2), (1,3), (2,3). Only calculated when we have more than 20 particles.",
"dm",
"FMantissa9",
True,
["PartType1/Coordinates", "PartType1/Masses"],
True,
0,
),
"DiffuseCarbonMass": (
"DiffuseCarbonMass",
1,
np.float32,
"snap_mass",
"Total gas mass in carbon that is not contained in dust.",
"gas",
"FMantissa9",
False,
["PartType0/Masses", "PartType0/ElementMassFractionsDiffuse"],
True,
0,
),
"DiffuseIronMass": (
"DiffuseIronMass",
1,
np.float32,
"snap_mass",
"Total gas mass in iron that is not contained in dust.",
"gas",
"FMantissa9",
False,
["PartType0/Masses", "PartType0/ElementMassFractionsDiffuse"],
True,
0,
),
"DiffuseMagnesiumMass": (
"DiffuseMagnesiumMass",
1,
np.float32,
"snap_mass",
"Total gas mass in magnesium that is not contained in dust.",
"gas",
"FMantissa9",
False,
["PartType0/Masses", "PartType0/ElementMassFractionsDiffuse"],
True,
0,
),
"DiffuseOxygenMass": (
"DiffuseOxygenMass",
1,
np.float32,
"snap_mass",
"Total gas mass in oxygen that is not contained in dust.",
"gas",
"FMantissa9",
False,
["PartType0/Masses", "PartType0/ElementMassFractionsDiffuse"],
True,
0,
),
"DiffuseSiliconMass": (
"DiffuseSiliconMass",
1,
np.float32,
"snap_mass",
"Total gas mass in silicon that is not contained in dust.",
"gas",
"FMantissa9",
False,
["PartType0/Masses", "PartType0/ElementMassFractionsDiffuse"],
True,
0,
),
"DopplerB": (
"DopplerB",
1,
np.float32,
"dimensionless",
"Kinetic Sunyaey-Zel'dovich effect, assuming a line of sight towards the position of the first lightcone observer.",
"general",
"FMantissa9",
False,
[
"PartType0/Coordinates",
"PartType0/Velocities",
"PartType0/ElectronNumberDensities",
"PartType0/Densities",
],
False,
1,
),
"DtoTgas": (
"DiscToTotalGasMassFraction",
1,
np.float32,
"dimensionless",
"Fraction of the total gas mass that is in the disc.",
"gas",
"FMantissa9",
False,
["PartType0/Coordinates", "PartType0/Masses", "PartType0/Velocities"],
True,
0,
),
"DtoTstar": (
"DiscToTotalStellarMassFraction",
1,
np.float32,
"dimensionless",
"Fraction of the total stellar mass that is in the disc.",
"star",
"FMantissa9",
False,
["PartType4/Coordinates", "PartType4/Velocities", "PartType4/Masses"],
True,
0,
),
"DustGraphiteMass": (
"DustGraphiteMass",
1,
np.float32,
"snap_mass",
"Total dust mass in graphite grains.",
"gas",
"FMantissa9",
False,
["PartType0/Masses", "PartType0/DustMassFractions"],
True,
0,
),
"DustGraphiteMassInAtomicGas": (
"DustGraphiteMassInAtomicGas",
1,
np.float32,
"snap_mass",
"Total dust mass in graphite grains in atomic gas.",
"gas",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/DustMassFractions",
"PartType0/ElementMassFractions",
"PartType0/SpeciesFractions",
],
True,
0,
),
"DustGraphiteMassInMolecularGas": (
"DustGraphiteMassInMolecularGas",
1,
np.float32,
"snap_mass",
"Total dust mass in graphite grains in molecular gas.",
"gas",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/DustMassFractions",
"PartType0/SpeciesFractions",
"PartType0/ElementMassFractions",
],
True,
0,
),
"DustGraphiteMassInColdDenseGas": (
"DustGraphiteMassInColdDenseGas",
1,
np.float32,
"snap_mass",
"Total dust mass in graphite grains in cold, dense gas.",
"gas",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/DustMassFractions",
"PartType0/Densities",
"PartType0/Temperatures",
],
True,
0,
),
"DustLargeGrainMass": (
"DustLargeGrainMass",
1,
np.float32,
"snap_mass",
"Total dust mass in large grains.",
"gas",
"FMantissa9",
False,
["PartType0/Masses", "PartType0/DustMassFractions"],
True,
0,
),
"DustLargeGrainMassInMolecularGas": (
"DustLargeGrainMassInMolecularGas",
1,
np.float32,
"snap_mass",
"Total dust mass in large grains in molecular gas.",
"gas",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/DustMassFractions",
"PartType0/SpeciesFractions",
"PartType0/ElementMassFractions",
],
True,
0,
),
"DustLargeGrainMassInColdDenseGas": (
"DustLargeGrainMassInColdDenseGas",
1,
np.float32,
"snap_mass",
"Total dust mass in large grains in cold, dense gas.",
"gas",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/DustMassFractions",
"PartType0/Densities",
"PartType0/Temperatures",
],
True,
0,
),
"DustSilicatesMass": (
"DustSilicatesMass",
1,
np.float32,
"snap_mass",
"Total dust mass in silicate grains.",
"gas",
"FMantissa9",
False,
["PartType0/Masses", "PartType0/DustMassFractions"],
True,
0,
),
"DustSilicatesMassInAtomicGas": (
"DustSilicatesMassInAtomicGas",
1,
np.float32,
"snap_mass",
"Total dust mass in silicate grains in atomic gas.",
"gas",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/DustMassFractions",
"PartType0/SpeciesFractions",
"PartType0/ElementMassFractions",
],
True,
0,
),
"DustSilicatesMassInMolecularGas": (
"DustSilicatesMassInMolecularGas",
1,
np.float32,
"snap_mass",
"Total dust mass in silicate grains in molecular gas.",
"gas",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/DustMassFractions",
"PartType0/SpeciesFractions",
"PartType0/ElementMassFractions",
],
True,
0,
),
"DustSilicatesMassInColdDenseGas": (
"DustSilicatesMassInColdDenseGas",
1,
np.float32,
"snap_mass",
"Total dust mass in silicate grains in cold, dense gas.",
"gas",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/DustMassFractions",
"PartType0/Densities",
"PartType0/Temperatures",
],
True,
0,
),
"DustSmallGrainMass": (
"DustSmallGrainMass",
1,
np.float32,
"snap_mass",
"Total dust mass in small grains.",
"gas",
"FMantissa9",
False,
[
"PartType0/Masses",
"PartType0/DustMassFractions",
"PartType0/ElementMassFractions",
],
True,
0,
),
"DustSmallGrainMassInMolecularGas": (
"DustSmallGrainMassInMolecularGas",