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

Manual pip install for racs-tools #175

Closed
tjgalvin opened this issue Oct 6, 2024 · 1 comment
Closed

Manual pip install for racs-tools #175

tjgalvin opened this issue Oct 6, 2024 · 1 comment

Comments

@tjgalvin
Copy link
Owner

tjgalvin commented Oct 6, 2024

Currently in our main we are using the racs_tools.beamcon_3D.smooth_fits_cube to smooth fits cube to a set resolution. We are relying on a yet to be merged racs-tools features that allows a list of beam shapes to be provided.

Only raising this as I spent ~2 hours thinking the problem was related to a recent change in astropy units and the handling of scale=0 in related quantities.

pip install git+https://github.com/AlecThomson/RACS-tools.git@8e5d919e9938eda19fc7b8a915f855e8b8e0e514 should fix things if an error like the below pops up

File "/scratch3/gal16b/packages/flint_main/flint/flint/convol.py", line 148, in convolve_cubes
    cube_data_list, _ = beamcon_3D.smooth_fits_cube(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/datasets/work/jones-storage/work/miniconda/miniforge3/envs/flint_main/lib/python3.11/site-packages/racs_tools/beamcon_3D.py", line 1004, in smooth_fits_cube
    target_beam = Beam(bmaj * u.arcsec, bmin * u.arcsec, bpa * u.deg)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/datasets/work/jones-storage/work/miniconda/miniforge3/envs/flint_main/lib/python3.11/site-packages/radio_beam/beam.py", line 75, in __new__
    if u.deg.is_equivalent(major):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/datasets/work/jones-storage/work/miniconda/miniforge3/envs/flint_main/lib/python3.11/site-packages/astropy/units/core.py", line 1010, in is_equivalent
    other = Unit(other, parse_strict="silent")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/datasets/work/jones-storage/work/miniconda/miniforge3/envs/flint_main/lib/python3.11/site-packages/astropy/units/core.py", line 2097, in __call__
    if is_effectively_unity(s.value):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/datasets/work/jones-storage/work/miniconda/miniforge3/envs/flint_main/lib/python3.11/site-packages/astropy/units/utils.py", line 167, in is_effectively_unity
    return _JUST_BELOW_UNITY <= value <= _JUST_ABOVE_UNITY
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
@tjgalvin
Copy link
Owner Author

tjgalvin commented Oct 7, 2024

Added a specific commit install to the pyproject toml in #176 , which will remain until upstream racs-tools pulls in some changes

@tjgalvin tjgalvin closed this as completed Oct 7, 2024
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

1 participant