ChileanVirtualObservatory / acalib

Advanced Computing for Astronomy Library
http://acalib.readthedocs.io/en/latest/
GNU General Public License v3.0
7 stars 13 forks source link

ACALib does not save correctly the meta in the FITS #80

Open maray opened 6 years ago

maray commented 6 years ago

The meta saved on modified/new FITS in ACALib are created using the old/original meta, which is different to the modified WCS. This is a problem, because we want to maintain almost all the meta (PI, beam size, etc.), but overwrite the WCS variables. Up to now, we need to do little hacks to use the generated fits like...

# Bugix (we save correctly the wcs, but not the meta... and the wcs is created from meta!)
# Therefore, we need to remove the stokes axis by hand 
syn=acalib.Data(syn.data,wcs=syn.wcs.dropaxis(3),meta=syn.meta,unit=syn.unit,mask=syn.mask)
res=acalib.Data(res.data,wcs=res.wcs.dropaxis(3),meta=res.meta,unit=res.unit,mask=res.mask)