You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
The text was updated successfully, but these errors were encountered:
Currently in our
main
we are using theracs_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 upThe text was updated successfully, but these errors were encountered: