jjtobin / auto_selfcal

MIT License
17 stars 8 forks source link

Fix theoretical sensitivity #10

Closed psheehan closed 1 year ago

psheehan commented 1 year ago

This PR fixes the get_sensitivity function to properly calculate the theoretical sensitivity on a per-source, all-EB basis by defining an image over all of the EBs at once and running just one sensitivity estimate. (As a note, it was previously averaging the per-EB sensitivities rather than doing something like sensitivity / N**0.5, but this was typically balanced by the fact that the # of EBs ~ # of targets, and it was calculating the sensitivity over all targets).

@jjtobin, one note: on line 1056, the im.defineimage call takes a list of SPWs. As this is now being done for all EBs at once, we might need to invoke your fixes for maxspwvis so that cases where there are slightly different numbers of spws across different EBs get handled properly. I don't know if you have time to test that out... but I'll look into adding that fix this afternoon, so it may be worth holding off merging this until then.

psheehan commented 1 year ago

Ok, I've now added in the little bit of code to calculate maxspwvis and use that with im.defineimage so we should be all set.