Hello, I have searched so I hope this is not repeating anything. I code in C++, not JS, so I would like to propose a fix for the issue that files made in SGP do not have the header tag "EXPTIME" which is the only one searched for in the CCD parameters. This fix seems to work for me so far, but not sure if anyone else has looked for a fix or cared to do it since it isn't that big of a deal in the first place and wouldn't be considered an issue in the first place. I just added another else if statement but perhaps it isn't in a great way for JS specialists. Let me know.
// trying to read ISO and exposure time from FITS Header
var isoSpeed = null;
var expTime = null;
for ( var i = 0; i < view.window.keywords.length; i++ ) {
var key = view.window.keywords;
if ( key.name == "EXPTIME" ) {
expTime = parseFloat( key.value );
}
else if ( key.name == "EXPOSURE" ) {
expTime = parseFloat( key.value );
}
else if ( key.name == "ISOSPEED" ) {
isoSpeed = parseInt( key.value );
}
}
Thanks,
Josh