RadioAstronomySoftwareGroup / pyuvsim

A ultra-high precision package for simulating radio interferometers in python on compute clusters.
https://pyuvsim.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
43 stars 7 forks source link

`initialize_uvdata_from_params` always returns a UVData with `integration_time=1` if `Ntimes=1` #427

Closed piyanatk closed 6 months ago

piyanatk commented 1 year ago

As in the title, initialize_uvdata_from_params always returns a UVData with integration_time=1 if Ntimes=1. pyuvsim version used is 1.2.5

bhazelton commented 1 year ago

Why does this matter? What are you trying to encode with integration_time if you only have one time?

I ask this because I think there's a bit of a problem with how integration_time is conceptualized throughout pyuvsim. It is intrinsically tied to the spacing between times, it cannot be different from that. Of course, if there's only one time then the spacing concept doesn't matter and we could try to allow it to be set to something different, but I think we should actually think a little more holistically about this if we are imputing meaning beyond time spacing to the integration_time. To make it more consistent with UVData, it should maybe be allowed to be an array rather than a float. Of course, UVData allows for it to change per baseline-time and we might only want it to change per time.

bhazelton commented 10 months ago

@steven-murray @piyanatk Is this still something you're unhappy with? I'm concerned that it's not well-defined, see my earlier comment. Should we just update the docs?

steven-murray commented 10 months ago

I think possibly the use case here is that we might want to simulate a single snapshot of eg. HERA data, but in the final product we want the integration_time array to contain the correct ~9.6 sec so aid in calculating thermal noise etc. So I suppose you should be able to independently set the integration time and the snapshot time-stamps... maybe there should be a check that fails if integration_time > (time[1] - time[0]) if there's more than one time. But it seems OK if integration_time < time[1] - time[0] to me.