Updating FITS header

This commit is contained in:
2024-09-30 21:19:23 +02:00
parent a43f12565d
commit da1aa4c6fc
8 changed files with 92 additions and 26 deletions
+8 -2
View File
@@ -281,6 +281,7 @@ SkyPointScale WCSDataT::getRaDecScale() const
double scaleY = haverSine(ret.point, pointY) * 3600.0;
ret.scaleLow = std::min(scaleX, scaleY);
ret.scaleHigh = std::max(scaleX, scaleY);
ret.scaleValid = true;
return ret;
}
@@ -413,16 +414,21 @@ SkyPointScale ImageInfoData::getCenterRaDec() const
if(!std::isnan(scale))
{
ret.scaleLow = ret.scaleHigh = scale;
ret.scaleValid = true;
}
else if(!(std::isnan(focalLen) || std::isnan(pixSizeX) || std::isnan(pixSizeY)))
{
const double r = 206.2648097656; // (180 * 3600) / (1000 * pi) magic number to convert pixel size to focal length ratio to arcsec.
ret.scaleLow = std::min(pixSizeX * binX / focalLen * r, pixSizeY * binY / focalLen * r);
ret.scaleHigh = std::max(pixSizeX * binX / focalLen * r, pixSizeY * binY / focalLen * r);
ret.scaleValid = true;
}
}
ret.scaleLow *= 0.8;
ret.scaleHigh *= 1.2;
if(ret.scaleValid)
{
ret.scaleLow *= 0.8;
ret.scaleHigh *= 1.2;
}
return ret;
}