/*
The ImageWindow.keywords property is an array of FITSKeyword objects:
Array ImageWindow.keywords
The FITSKeyword object has name, value and comment String properties that you can read and write. It also has a constructor that allows you to set all of these properties at once:
new FITSKeyword( String name, String value[, String comment] )
Using the keywords property you can get and set FITS keywords for an image window before saving it. For example:
ImageWindow window = ImageWindow.activeWindow;
if ( !window.isNull )
window.keywords.push( new FITSKeyword( "MYKWD", 123.456, "my private keyword" ) );
*/
I have tried for example this:
var img = ImageWindow.windowById(id);
var kw = new FITSKeyword( "MyKW", "MyValue");
img.keywords.push( kw ) ;
img.saveAs(savePath, false, false, false, false);
img.forceClose();
The FITSKeyword object is correctly constructed. The resulting FITS file does not contain the FITSKeyword and trying to query img.keywords.length gives 0
What is going wrong here?
Best,
Kai