I have a problem with fits header file. In particular, after I read my fits image, maipulate it and so on I woul'd like to save the new image in a new fits file but with the header of the original one. Is it possible to copy the old header in the new image?
Y = fits.openFile('SAT.00022692.fit','readwrite');
Z = fits.openFile('img_corr.fits','readwrite');
info = fitsinfo('SAT.00022692.fit');
header = info.PrimaryData.Keywords;
[r1,c1] = size(header);
for i = 1:r1
I also tried to use the commented part but it doesn't work.
What is worng?