You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey,
I'm quite new with the code and still studying it, so I'm not very familiar with it and don't trust myself to commit code changes, but I think I noticed a bug in the function "calculate_distance_line_full_relativity" in the file "tardis/transport/geometry/calculate_distances.py".
This function is responsible for getting the distance that a packet with frequency "nu'' needs to go through in order to reach a line with the frequency "nu_line", in the case of full relativity, i.e. time and spatial stretch. In this case the doppler shift is:
nu_co-move = nu_lab * (1- beta * mu) / sqrt(1 - beta^2)
Today, the code calculate the distance as:
distance = - mu * r + (ct - nu_r * nu_r * sqrt(ct * ct - (1 + r * r * (1 - mu * mu) * (1 + pow(nu_r, -2)) ))) / (1 + nu_r * nu_r)
This is problematic because there is a unit error in the place marked in bold. It's obviously not allowed to add 1 (scalar) with r^2 (cm^2). I tried to rederive the distance for getting the packet to nu_line and I think it could be significantly simpler under the reasonable assumption that "gamma" is constant in each cell.This seems to me like a reasonable assumption because its a second order effect and the code anyway assumes constant density and temperature for each cell, so why not also gamma.
Anyway, in this case the derivation should be similar to what was done for the non relativistic case.
The result I got were similar to the one for the non-relativistic case up to a factor of gamma for nu:
nu_diff = comov_nu - nu_line
distance = (nu_diff / (nu*gamma) ) * C_SPEED_OF_LIGHT * time_explosion
where "comov_nu" is the frequency of nu after being doppler shifted to its cell point of reference.
In case we would like to get a full derivation without the "gamma" approximation the result is the positive value here (where mu is written as m).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey,
I'm quite new with the code and still studying it, so I'm not very familiar with it and don't trust myself to commit code changes, but I think I noticed a bug in the function "calculate_distance_line_full_relativity" in the file "tardis/transport/geometry/calculate_distances.py".
This function is responsible for getting the distance that a packet with frequency "nu'' needs to go through in order to reach a line with the frequency "nu_line", in the case of full relativity, i.e. time and spatial stretch. In this case the doppler shift is:
nu_co-move = nu_lab * (1- beta * mu) / sqrt(1 - beta^2)
Today, the code calculate the distance as:
distance = - mu * r + (ct - nu_r * nu_r * sqrt(ct * ct - (1 + r * r * (1 - mu * mu) * (1 + pow(nu_r, -2)) ))) / (1 + nu_r * nu_r)
This is problematic because there is a unit error in the place marked in bold. It's obviously not allowed to add 1 (scalar) with r^2 (cm^2). I tried to rederive the distance for getting the packet to nu_line and I think it could be significantly simpler under the reasonable assumption that "gamma" is constant in each cell.This seems to me like a reasonable assumption because its a second order effect and the code anyway assumes constant density and temperature for each cell, so why not also gamma.
Anyway, in this case the derivation should be similar to what was done for the non relativistic case.
The result I got were similar to the one for the non-relativistic case up to a factor of gamma for nu:
nu_diff = comov_nu - nu_line
distance = (nu_diff / (nu*gamma) ) * C_SPEED_OF_LIGHT * time_explosion
where "comov_nu" is the frequency of nu after being doppler shifted to its cell point of reference.
In case we would like to get a full derivation without the "gamma" approximation the result is the positive value here (where mu is written as m).
Beta Was this translation helpful? Give feedback.
All reactions