mirror of
https://github.com/Findus23/halo_comparison.git
synced 2024-09-13 09:03:49 +02:00
added more analysis of music shifts
This commit is contained in:
parent
74ad71a625
commit
57ba12dc5d
1 changed files with 25 additions and 15 deletions
|
@ -10,13 +10,13 @@ right_corner_highres_boundary = np.array([0.601410, 0.558650, 0.645789])
|
|||
# this seems to be the extent of the highres region in units such that it lies in [0...1[
|
||||
lxref = right_corner_highres_boundary - left_corner_highres_boundary
|
||||
|
||||
# presumable the centre of the highres region:
|
||||
# presumably the centre of the highres region:
|
||||
# xc = left_corner_highres_boundary + 0.5 * lxref
|
||||
# xc = np.array([math.fmod(xc_i, 1.0) for xc_i in xc])
|
||||
# #or equivalently
|
||||
xc = (left_corner_highres_boundary + 0.5 * lxref) % 1.0
|
||||
|
||||
print(f'our calculated centre: {xc}')
|
||||
print(f"our calculated centre: {xc}")
|
||||
|
||||
# hardcoded because I only want to understand my specific case (read from auriga_6_ics.conf_log.txt):
|
||||
shift_unit = 2
|
||||
|
@ -27,41 +27,51 @@ desired_box_centre = np.array([0.5, 0.5, 0.5])
|
|||
xshift = (desired_box_centre - xc) * ncoarse / shift_unit + desired_box_centre
|
||||
xshift = xshift.astype(int) * shift_unit
|
||||
|
||||
print(f'our music shift: {xshift}')
|
||||
print(f"our music shift: {xshift}")
|
||||
|
||||
adrian_shift = (desired_box_centre - xc * ncoarse).astype(np.int64)
|
||||
print(f'adrians shift as noted in our music source: {adrian_shift}')
|
||||
print(f"adrians shift as noted in our music source: {adrian_shift}")
|
||||
oliver_shift = np.array([-6, 0, -12])
|
||||
assert (xshift == oliver_shift).all()
|
||||
|
||||
print(f'difference between adrians and olivers way to calculate the shift: {adrian_shift - oliver_shift}')
|
||||
print(
|
||||
f"difference between adrians and olivers way to calculate the shift: {adrian_shift - oliver_shift}"
|
||||
)
|
||||
|
||||
print(f'our music shift transformed to Mpc coordinates: {xshift / ncoarse * 100}')
|
||||
print(f"our music shift transformed to Mpc coordinates: {xshift / ncoarse * 100}")
|
||||
|
||||
|
||||
xshift_in_mpc = np.array([-4.6875, 0, -9.375])
|
||||
#according to music output:
|
||||
# according to music output:
|
||||
highres_region_centre = np.array([0.566187, 0.517375, 0.612728]) * 100
|
||||
|
||||
shifted_highres_centre = highres_region_centre + xshift_in_mpc
|
||||
|
||||
print(f'our music shift applied to our calculated highresregion centre: {shifted_highres_centre}')
|
||||
print(
|
||||
f"our music shift applied to our calculated highresregion centre: {shifted_highres_centre}"
|
||||
)
|
||||
# print(f'adrians shift applied to our calculated highresregion centre: {shifted_highres_centre}')
|
||||
|
||||
print(f'difference between our calculated centre and the actual centre of the box: {desired_box_centre * 100 - shifted_highres_centre}')
|
||||
print(
|
||||
f"difference between our calculated centre and the actual centre of the box: {desired_box_centre * 100 - shifted_highres_centre}"
|
||||
)
|
||||
|
||||
h_adrian = 0.6777 #according to cosmICweb for the EAGLE sim
|
||||
h_adrian = 0.6777 # according to cosmICweb for the EAGLE sim
|
||||
|
||||
centre_adrian = np.array([56.50153741810241, 49.40761085700951, 49.634393647291695])
|
||||
centre_music = np.array([58.25576087992683, 51.34632916228137, 51.68749302578122])
|
||||
|
||||
original_centre_in_adrians_zoom = np.array([4.367988,1.307087,7.743252]) / h_adrian
|
||||
original_centre_in_adrians_zoom = np.array([4.367988, 1.307087, 7.743252]) / h_adrian
|
||||
|
||||
print(f'shift from original to his zooms according to adrian: {original_centre_in_adrians_zoom}')
|
||||
print(
|
||||
f"shift from original to his zooms according to adrian: {original_centre_in_adrians_zoom}"
|
||||
)
|
||||
|
||||
print(f'shift from our centre to adrians: {centre_adrian - centre_music}')
|
||||
print(f"shift from our centre to adrians: {centre_adrian - centre_music}")
|
||||
|
||||
original_centre_from_our_total_shift = xshift_in_mpc + (centre_adrian - centre_music)
|
||||
|
||||
#addition b/c they are in different directions, should cancel each other out
|
||||
print(f'difference between adrians shift and our corrected shift: {original_centre_in_adrians_zoom + original_centre_from_our_total_shift}')
|
||||
# addition b/c they are in different directions, should cancel each other out
|
||||
print(
|
||||
f"difference between adrians shift and our corrected shift: {original_centre_in_adrians_zoom + original_centre_from_our_total_shift}"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue