radio-astro-tools / radio-beam

A simple toolkit for reading and manipulating beams from astrophysical radio spectral data cubes.
https://radio-beam.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

Beam info not updated properly in headers #19

Closed e-koch closed 9 years ago

e-koch commented 9 years ago

From @jpinedaf in spectral_cube #237.

There is a bug in the write function. Now that SpectralCube handles the beam size (#236), it should write it out as well. In the current implementation it makes BMIN=BMAJ.

In [39]: from spectral_cube import SpectralCube
In [40]: cube=SpectralCube.read('L1451mm/L1451MM-11_cvel_clean_rob05.fits')
In [41]: cube.beam
Out[41]: Beam: BMAJ=3.08794236183 arcsec BMIN=2.61326932907 arcsec BPA=-19.7857666016 deg
In [42]: cube.write('test.fits')
In [44]: cube2=SpectralCube.read('test.fits')

In [45]: cube2.beam
Out[45]: Beam: BMAJ=3.08794236183 arcsec BMIN=3.08794236183 arcsec BPA=-19.7857666016 deg