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

Convert SkyModel to "full" spectral type only when needed #190

Open
piyanatk opened this issue Nov 3, 2021 · 0 comments
Open

Convert SkyModel to "full" spectral type only when needed #190

piyanatk opened this issue Nov 3, 2021 · 0 comments

Comments

@piyanatk
Copy link
Contributor

piyanatk commented Nov 3, 2021

Currently in #174 , ModelData converts SkyModel to "full" spectral type at initialization.

self.sky_model = sky_model
self.sky_model.at_frequencies(self.freqs * units.Hz)

If the sky_model attribute is reassigned post-initialization, this line will not be called again, causing an error in the VisCPU call if the re-assinged SkyModel has any other spectral type that is not "full".

I_sky=data_model.sky_model.stokes[0, i].to("Jy").value,

Presumably, pyuvsim supports any SkyModel spectral types, so this should not be an issue in the UVSim wrapper class. I have no idea about healvis.

The best thing to do might be to move the spectral type conversion to VisibilitySimulator instances, requiring the developers/users to make sure that the simulators that they want to wrap can handle whatever spectral in the given SkyModel.

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

2 participants