-
Notifications
You must be signed in to change notification settings - Fork 8
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
simsetup.SkyModelData strips reference frequency from Healpix maps #411
Comments
Hi @rlbyrne -- I've tried running your example, but I'm not seeing the issue. Is the first block of code supposed to error? |
Sorry I wasn't clear enough. It doesn't error, but the
where I'm using a standard
|
@rlbyrne I ran the first block of code, and it printed out:
Should it have returned (Incidentally, we should fix the typo in that warning message) |
@aelanman That's strange, on my machine it's returning |
@rlbyrne Can you check if |
@aelanman |
@rlbyrne Okay, so I wasn't able to reproduce the error using the code you sent, but when I tried running it with MPI using two processes I found a couple things that might be related:
|
@aelanman Good to know, I'll make those changes. What command are you using to run with MPI? |
Here's the minimum working example (mwe.py) that I made from your example code:
To run with mpi and two processes, I did I forgot to mention that Lines 616 to 622 in 34ffb2d
|
@aelanman Yes, it looks like Jy/sr is definitely not treated properly. What should I expect from the simulation I ran last week with units of Jy/sr? What normalization did it use? |
@rlbyrne This looks to be a bigger issue. Both simsetup.py and pyradiosky use the
By my reading, if the unit equivalence checks fails, then it will leave the stokes array as an astropy unit. This breaks the MPI share, but if you're not using MPI then it should run okay and leave the units alone. I'm a little confused as to why pyradiosky can then successfully convert it to Jy, since it should fail the unit equivalence test there... @bhazelton ? Anyway, I think we can take the following course of action here:
(We don't really need to check for valid units here... just ensure that the units are preserved) |
@aelanman I'm fairly new to using MPI. Can you explain the |
When run in MPI, each process runs the script as a whole. By putting that block in |
Ok, so to run the simulation I would call |
Also, how would I make sure the input uvdata object and the beam are shared appropriately? |
I think this is still an issue, but I used a workaround by converting from Jy/sr to K before passing to |
I am attempting to run a pyuvsim simulation using
run_uvdata_uvsim
function. I am usingsimsetup.SkyModelData
to format a diffuse Healpix map that I can pass to the simulation function, but I've found that the formatting strips thereference_frequency
attribute from the map, which then causes the simulation to fail.Here is some code that identifies the issue. The diffuse map used is available for download here:
Inputting this into the simulation produces the following error:
I found a workaround to this error by adding this line:
The text was updated successfully, but these errors were encountered: