Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check UVData.future_array_shapes when caching ModelData.freqs #211

Open
piyanatk opened this issue Feb 4, 2022 · 2 comments
Open

Check UVData.future_array_shapes when caching ModelData.freqs #211

piyanatk opened this issue Feb 4, 2022 · 2 comments
Assignees
Milestone

Comments

@piyanatk
Copy link
Contributor

piyanatk commented Feb 4, 2022

As in the title.

@cached_property
def freqs(self) -> np.ndarray:
"""Frequnecies at which data is defined."""
return self.uvdata.freq_array[0]

These lines assume that current_array_shapes is being used. If the UVData uses future_array_shape, it will break SkyModel evaluation (and maybe at other places.)
self.sky_model.at_frequencies(self.freqs * units.Hz)

@r-pascua
Copy link
Contributor

r-pascua commented Feb 4, 2022

Thanks for making an issue about this. I don't necessarily know if I'd classify this as a bug, but this is something that has been in the back of my mind for a few months now. I chatted with Paul and was informed that the community would receive sufficient notice about when the future array shapes will become the new API, so I decided to put off dealing with it. There are also at least a few places in the Simulator class that need to be updated to accommodate using the future array shape.

I think I might want to make this a milestone for version 3, which I'm envisioning will implement the merger of the Simulator class and the VisibilitySimulation class. Curious to hear thoughts from @steven-murray.

@piyanatk
Copy link
Contributor Author

piyanatk commented Feb 4, 2022

It looks like initialize_uvdata_from_params is default to use future array shape from pyuvdata=>2.2.6. I do not see this mentioned in the pyuvdata changelogs though. Maybe @bhazelton can verify this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants