Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-8750 cleanup jointcal compiler warnings #43

Merged
merged 10 commits into from Jun 8, 2017
Merged

Conversation

parejkoj
Copy link
Collaborator

@parejkoj parejkoj commented Jun 7, 2017

Searched for warnings with both clang-800.0.38 on macOS and gcc 5.4.0-6ubuntu1~16.04.4 on Linux.

@parejkoj parejkoj force-pushed the tickets/DM-8750 branch 3 times, most recently from d3dc5e9 to f4b37e9 Compare June 7, 2017 20:29
Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good, except for some Doxygen errors and one variable substitution (behind #ifdef FUTURE) that I don't understand. Can you explain what's going on there?

* computed as:
* @f[
* <chi2> + nSigmaCut + rms(chi2)
* @f]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this display ok? It's technically correct, but not very TeXy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it looks decent. I copied it from AstrometryFit.cc and wrapped it in the @f[ to get rid of the doxygen errors about the <.

* @param[in] nSigmaCut Number of sigma to select on.
* @param mSOutliers list of MeasuredStar outliers to populate
* @param fSOutliers list of FittedStar outliers to populate
* @param[in] measOrRef Which outliers to remove. One of "Meas", "Ref" or "Meas Ref".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing [out] tags for mSOutliers and fSOutliers.

@@ -1,6 +1,5 @@
// -*- LSST-C++ -*-

/// \file gtransfo.h
/// \brief Geometrical transformations (of 2D points)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't leave this a Doxygen comment; it will attach to the wrong thing (likely namespace pexExcept or namespace lsst).

*
* @return Total number of outliers that were removed.
*/
unsigned findOutliers(double nSigmaCut, MeasuredStarList &mSOutliers, FittedStarList &fSOutliers,
const std::string &measOrRef = "Meas Ref") const;

//! Just removes outliers from the fit. No Refit done.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The //! style should be replaced with /// (and yes, Doxygen may handle them differently, so this matters a bit more than most style choices). Is there already a ticket for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is now! DM-10867

@@ -191,6 +191,8 @@ std::shared_ptr<TanSipPix2RaDec> ConstrainedPolyModel::produceSipWcs(const CcdIm

GtransfoPoly pix2Tp;
const GtransfoPoly &t1 = dynamic_cast<const GtransfoPoly &>(mapping->getTransfo1());
// TODO: This line produces a warning on clang (t1 is always valid, unless the dynamic_cast raises
// bad_cast), but I'll deal with it as part of DM-10524 (hopefully removing the necessity of the casts).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t1 is always valid, period.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've clarified the comment.

@@ -131,7 +131,7 @@ void SparseHisto4d::binLimits(const double x[4], const int iDim, double &xMin, d
int code = code_value(x);
double xCenter[4];
inverse_code(code, xCenter);
xMin, xCenter[iDim] - 0.5 / _scale[iDim];
xMin = xCenter[iDim] - 0.5 / _scale[iDim];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How the heck did this ever compile???

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure what was going on there.

@@ -68,7 +67,7 @@ void PhotometryFit::LSDerivatives(const CcdImage &ccdImage, TripletList &triplet
// tweak the measurement errors
double sigma = measuredStar.eflux;
#ifdef FUTURE
TweakPhotomMeasurementErrors(inPos, measuredStar, _posError);
TweakPhotomMeasurementErrors(inPos, measuredStar, _fluxError);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I understand this change. Where did it come from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no _posError in PhotometryFit, but there probably will be _fluxError in the future (it is currently unused, thus removed). I'm only removing the preprocessor blocks when I'm sure I won't need to reference them, and cleaning them up as I would other code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok. It seemed odd that you were adding a reference to _fluxError here when you were removing it everywhere else.

@parejkoj parejkoj merged commit a19544f into master Jun 8, 2017
@ktlim ktlim deleted the tickets/DM-8750 branch August 25, 2018 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants