-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I want there to be 1 function that I can pass my simulated 21cm field from and produce a mock observation.
OR even better to have a couple of intermediate functions to apply sequentially with distinct functionalities.
i.e., I would like something like the following 2 functions:
1st Function
def get_sigma_uv(
redshift,
shape = 200 # dimension of output
telescope, # maybe just choice between AA* and AA4
integration_time,
tracking_time,
total observing_time,
maximum_baseline_length=2km,
minimum_number_of_baselines_in_uv_cell = 15):
...
...
return (sigma_uv)
This function would just return a 2D array with all standard_deviations that I need to add to a Fourier transformed 2D brightness tempereture field of a given redshift. Where we don't have any baselines (or number of baselines below the 'minimum_number_of_baselines_in_uv_cell' or baslines are larger than 'maximum_baseline_length') the sigma_uv would be 0.
2nd Function
def produce_mock_observation(
2D_brightness_temperature_field,
sigma_uv,
apply_inverse_variance_weighting=True
remove_wedge=True):
...
...
return obs
This function would remove the mean and fft (with the proper conventions) the 2D_brightness_temperature_field, then add the gaussian noise with the sigmas from the sigma_uv 2D array. (and making all 0 sigma cells also 0 in this sum)
Then it would remove the wedge, set wedge cells to 0 (if flag is true).
Then, it would transorm back to real space, by applying an inverse-variance weighting (if flag is true), i.e., dividing each uv space cell with the inverse of the variance in that cell and then dividing the whole real space field by the sum of all of the inverse variances to get a better estimate of the real field. https://en.wikipedia.org/wiki/Inverse-variance_weighting