EoRImaging / FHD

Fast Holographic Deconvolution
BSD 2-Clause "Simplified" License
18 stars 10 forks source link

Redundant code to a single file #274

Closed nicholebarry closed 2 years ago

nicholebarry commented 2 years ago

There was a lot of redundant code between visibility_grid,visibility_degrid, and vis_count. I've condensed the majority of the redundant code to a new file, baseline_grid_locations. This file returns information regarding the locations of the unflagged visibilities in units of pixels in a variety of different forms.

Each of the three original files accounted for flagging in a slightly different way, and I've recreated each of those. The only exception being that unsetting fill_model_visibilities during the model making process will emulate the flagging done for gridding with this new file -- arguably what we want to do anyways. In any case, fill_model_visibilities is currently hard set on anyways.

The power spectra for a typical run are the same between the old branch and the new branch. The images, however, are different on extremely low levels (i.e. 10^-20), which makes me think I haven't fully replicated some float/double behaviour during image making. I will continue to investigate this, but I'd like to get this branch reviewed as fast as possible so that it can be ported to python via Joel in the next 2 weeks.

nicholebarry commented 2 years ago

I've added your suggestions, and the power spectrum differences are still zero. Good to go!