Skip to content

Commit

Permalink
Merge branch 'master' into HeaderRefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCSmith committed Mar 10, 2023
2 parents d0e1e38 + 37d9a1d commit 6630f6b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 72 deletions.
99 changes: 28 additions & 71 deletions DeepSkyStacker/FITSUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,103 +62,60 @@ inline double AdjustColor(const double fColor)

/* ------------------------------------------------------------------- */

bool IsFITSRaw()
bool IsFITSRaw()
{
Workspace workspace;

return workspace.value("FitsDDP/FITSisRAW", false).toBool();
};

/* ------------------------------------------------------------------- */
return Workspace{}.value("FitsDDP/FITSisRAW", false).toBool();
}

CFATYPE GetFITSCFATYPE()
{
Workspace workspace;

bool isFitsRaw = workspace.value("FitsDDP/FITSisRAW", false).toBool();
CFATYPE pattern = (CFATYPE)workspace.value("FitsDDP/BayerPattern", (uint)CFATYPE_NONE).toUInt();

Workspace workspace{};

const bool isFitsRaw = workspace.value("FitsDDP/FITSisRAW", false).toBool();
const CFATYPE pattern = static_cast<CFATYPE>(workspace.value("FitsDDP/BayerPattern", (uint)CFATYPE_NONE).toUInt());
return isFitsRaw ? pattern : CFATYPE_NONE;
};

/* ------------------------------------------------------------------- */
}

bool IsFITSRawBayer()
bool IsFITSRawBayer()
{
Workspace workspace;
QString interpolation;

interpolation = workspace.value("FitsDDP/Interpolation").toString();

const QString interpolation = Workspace{}.value("FitsDDP/Interpolation").toString();
return (0 == interpolation.compare("RawBayer", Qt::CaseInsensitive));
};

/* ------------------------------------------------------------------- */
}

bool IsFITSSuperPixels()
bool IsFITSSuperPixels()
{
Workspace workspace;
QString interpolation;

workspace.value("FitsDDP/Interpolation").toString();

const QString interpolation = Workspace{}.value("FitsDDP/Interpolation").toString();
return (0 == interpolation.compare("SuperPixels", Qt::CaseInsensitive));
};

/* ------------------------------------------------------------------- */
}

bool IsFITSBilinear()
bool IsFITSBilinear()
{
Workspace workspace;
QString interpolation;

workspace.value("FitsDDP/Interpolation").toString();

const QString interpolation = Workspace{}.value("FitsDDP/Interpolation").toString();
return (0 == interpolation.compare("Bilinear", Qt::CaseInsensitive));
};

/* ------------------------------------------------------------------- */
}

bool IsFITSAHD()
bool IsFITSAHD()
{
Workspace workspace;
QString interpolation;

workspace.value("FitsDDP/Interpolation").toString();

const QString interpolation = Workspace{}.value("FitsDDP/Interpolation").toString();
return (0 == interpolation.compare("AHD", Qt::CaseInsensitive));
};

/* ------------------------------------------------------------------- */
}

double GetFITSBrightnessRatio()
double GetFITSBrightnessRatio()
{
Workspace workspace;

return workspace.value("FitsDDP/Brightness", 1.0).toDouble();
};

/* ------------------------------------------------------------------- */
return Workspace{}.value("FitsDDP/Brightness", 1.0).toDouble();
}

void GetFITSRatio(double & fRed, double & fGreen, double & fBlue)
void GetFITSRatio(double& fRed, double& fGreen, double& fBlue)
{
Workspace workspace;
Workspace workspace{};

fGreen = workspace.value("FitsDDP/Brightness", 1.0).toDouble();
fRed = fGreen * workspace.value("FitsDDP/RedScale", 1.0).toDouble();
fBlue = fGreen * workspace.value("FitsDDP/BlueScale", 1.0).toDouble();
}

fRed = workspace.value("FitsDDP/RedScale", 1.0).toDouble();
fRed *= fGreen;

fBlue = workspace.value("FitsDDP/BlueScale", 1.0).toDouble();
fBlue *= fGreen;
};

/* ------------------------------------------------------------------- */

/* ------------------------------------------------------------------- */

bool CFITSReader::ReadKey(LPCSTR szKey, double & fValue, CString & strComment)
bool CFITSReader::ReadKey(LPCSTR szKey, double& fValue, CString& strComment)
{
bool bResult = false;
int nStatus = 0;
Expand Down
18 changes: 17 additions & 1 deletion Installers/README.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
Welcome to DeepSkyStacker 5.1.0
Welcome to DeepSkyStacker 5.1.1 Beta 1
======================================

Only 64 bit versions of Windows 10 and later are supported in this release.

Changes since 5.1.0

1. Bug fix - active tab jumped back to Main Group after drop of files when another group was active.

2. Possible bug fix - DeepSkyStacker terminated at startup when running on ARM version of Windows 11 in x64 emulation mode. Unable to test.

3. Bug fix - A corrupt info.txt file caused an infinite loop.

4. Diagnostic added - Report processor architecture in trace file and to stderr at startup.

4. Bug fix - Stacked FITS images in SuperPixel mode were displayed only in the top left corner.

Welcome to DeepSkyStacker 5.1.0
===============================

This release is the start of the process of converting the code to Qt so that it can be ported to platforms other than Windows.

Here are the main changes that were made for DeepSkyStacker 5.1.0:
Expand Down

0 comments on commit 6630f6b

Please sign in to comment.