Closed o-smirnov closed 3 years ago
Did you pass in the psf_pars manually? Its looking for these keywords
nchan = freqs.size
psf_pars = {}
for i in range(1,nchan+1):
key = 'BMAJ' + str(i)
if key in hdr.keys():
emaj = hdr[key]
emin = hdr['BMIN' + str(i)]
pa = hdr['BPA' + str(i)]
psf_pars[i] = (emaj, emin, pa)
If they are in there it is probably a bug. Are these images from wsclean? If so how did you make the cube?
Ah I see the bug. It's a single MFS image not a cube, so the beam keywords do not have numbers.
But the rest of the functionality is as I assume, correct? If it does find the beam size keywords, it will convolve by the required amount to inflate the PSF to 15"?
Yep, correct. Note you can only ever lower the resolution
Well yes, it would be pretty magical otherwise...
@o-smirnov what about this one? It should be fixed but haven't tested it myself. Were you trying to convolve a single image to a resolution specified by psf_pars?
Yep. And that seemed to work fine.
I'm trying to reconvolve a restored image to a lower resolution (15"). I hope I'm doing this correctly:
I'm confused why it says there are no PSF parameters in the FITS file -- they're in there.
I guess it just takes a 15"x15" Gaussian and convolves with that in this case? But then the resulting resolution will be lower than 15", since the original image already had a characteristic resolution in it.
What I'd really like it to do is to work out a Gausaain kernel needed to down the resolution to 15" (based on the current PSF paremetrs), and apply that.