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

Issue with importing pysm #484

Open
Ankurdev-astro opened this issue Sep 24, 2021 · 1 comment
Open

Issue with importing pysm #484

Ankurdev-astro opened this issue Sep 24, 2021 · 1 comment

Comments

@Ankurdev-astro
Copy link

Hi,
I am running toast_ground_sim.py with [--pysm-model ] and [--pysm-apply-beam] parameters on toast v2.3.12 . I have pysm3 v3.3.2.dev46+g5c339f0 installed.
The pipeline throws an error : RuntimeError: PySM not available .

Should I have pysm installed, instead of pysm3 ?

! toast_ground_sim.py @toast_ground_sim.par
<toast.Environment
  Source code version = 8dbc082
  Logging level = INFO
  Handling enabled for 0 signals:
  Max threads = 128
>

...

TOAST INFO: Pointing generation:  20.44 seconds (1 calls)
Traceback (most recent call last):
  File "/users/adev/anaconda3/envs/toast-test/bin/toast_ground_sim.py", line 631, in <module>
    main()
  File "/users/adev/anaconda3/envs/toast-test/bin/toast_ground_sim.py", line 470, in main
    signalname = pipeline_tools.simulate_sky_signal(
  File "/users/adev/anaconda3/envs/toast-test/lib/python3.8/site-packages/toast/timing.py", line 43, in df
    return f(*args, **kwargs)
  File "/users/adev/anaconda3/envs/toast-test/lib/python3.8/site-packages/toast/pipeline_tools/sky_signal.py", line 404, in simulate_sky_signal
    op_sim_pysm = OpSimPySM(
  File "/users/adev/anaconda3/envs/toast-test/lib/python3.8/site-packages/toast/timing.py", line 43, in df
    return f(*args, **kwargs)
  File "/users/adev/anaconda3/envs/toast-test/lib/python3.8/site-packages/toast/todmap/sim_det_pysm.py", line 121, in __init__
    raise RuntimeError("PySM not available")
RuntimeError: PySM not available

toast_pysm_issue

In addition:
https://github.com/hpc4cmb/toast/blob/e24107daa99797a314d0e579a6351ee1f3b04aa0/src/toast/todmap/pysm.py

The pysm.py file imports

try:
    import pysm
    import pysm.units as u

But class PySMSky(object): documents " Requires PySM 3 "

Should pysm.py import pysm3 instead?

@zonca
Copy link
Member

zonca commented Sep 24, 2021

Yes, correct, you should change the import statement. We haven't used this functionality in a while so I'm not sure if it is still working properly. Please double check the outputs.

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

No branches or pull requests

2 participants