diff --git a/data/create_ics_from_snapshot.py b/data/create_ics_from_snapshot.py new file mode 100644 index 0000000000000000000000000000000000000000..1144d71283a2e57271a4f3b46a754b962e553dc5 --- /dev/null +++ b/data/create_ics_from_snapshot.py @@ -0,0 +1,43 @@ + +import h5py +import sys + +def ics_from_snapshot(inputfile, outputfile): + f_input = h5py.File(inputfile, 'r') + f_output = h5py.File(outputfile, 'w') + + f_input.copy('Header', f_output) + f_input.copy('Units', f_output) + + g_PT0 = f_output.create_group('PartType0') + g_PT4 = f_output.create_group('PartType4') + + f_input.copy('PartType0/Coordinates', g_PT0) + f_input.copy('PartType0/InternalEnergies', g_PT0) # InternalEnergy + f_input.copy('PartType0/Masses', g_PT0) + f_input.copy('PartType0/ParticleIDs', g_PT0) + f_input.copy('PartType0/SmoothingLengths', g_PT0) # SmoothingLength + f_input.copy('PartType0/Velocities', g_PT0) + + f_input.copy('PartType4/Coordinates', g_PT4) + f_input.copy('PartType4/Masses', g_PT4) + f_input.copy('PartType4/ParticleIDs', g_PT4) + f_input.copy('PartType4/BirthTimes', g_PT4) # StellarFormationTime + f_input.copy('PartType4/Velocities', g_PT4) + + f_output['PartType4/StellarFormationTime'] = f_output['PartType4/BirthTimes'] + del f_output['PartType4/BirthTimes'] + + f_output['PartType0/SmoothingLength'] = f_output['PartType0/SmoothingLengths'] + del f_output['PartType0/SmoothingLengths'] + + f_output['PartType0/InternalEnergy'] = f_output['PartType0/InternalEnergies'] + del f_output['PartType0/InternalEnergies'] + + grp = f_output.create_group('Info') + grp.attrs["Input file"] = inputfile + + f_input.close() + f_output.close() + + return diff --git a/data/getEaglePhotometryTable.sh b/data/getEaglePhotometryTable.sh new file mode 100755 index 0000000000000000000000000000000000000000..8ef21a36581d41fe37e5dbbbba82c9ffe3a930d9 --- /dev/null +++ b/data/getEaglePhotometryTable.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# from Swift IsolatedGalaxy_feedback example +wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/YieldTables/EAGLE/photometry.tar.gz +tar -xf photometry.tar.gz diff --git a/data/getICs.sh b/data/getICs.sh new file mode 100755 index 0000000000000000000000000000000000000000..df2a886418eacb1ff861fd454a213d31d0665f38 --- /dev/null +++ b/data/getICs.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# from Swift IsolatedGalaxy_feedback example (see Nobels et al. arXiv:2309.13750 for details) +wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/IsolatedGalaxies_COLIBRE/M5_disk.hdf5 +wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/IsolatedGalaxies_COLIBRE/M6_disk.hdf5 + diff --git a/data/getPS20CoolingTables.sh b/data/getPS20CoolingTables.sh new file mode 100755 index 0000000000000000000000000000000000000000..11317204bdbeae96484f63bdd15db9ecd927b5f8 --- /dev/null +++ b/data/getPS20CoolingTables.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# get cooling tables from Ploeckinger & Schaye (2020) +wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/CoolingTables/COLIBRE/UV_dust1_CR1_G1_shield1.hdf5 diff --git a/data/getYieldTable.sh b/data/getYieldTable.sh new file mode 100755 index 0000000000000000000000000000000000000000..045d22a0183415e6f9f52352217f4faa2169c058 --- /dev/null +++ b/data/getYieldTable.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# from Swift IsolatedGalaxy_feedback example +wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/YieldTables/EAGLE/yieldtables.tar.gz +tar -xf yieldtables.tar.gz + diff --git a/data/getall.sh b/data/getall.sh new file mode 100755 index 0000000000000000000000000000000000000000..30e27a29f89dbe7341203e800b047fedcc25dc8e --- /dev/null +++ b/data/getall.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +./getICs.sh +./getEaglePhotometryTable.sh +./getYieldTable.sh +./getPS20CoolingTables.sh