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-9135 bulk rename of non-conforming jointcal variables/methods #42

Merged
merged 1 commit into from Jun 6, 2017

Conversation

parejkoj
Copy link
Collaborator

@parejkoj parejkoj commented Jun 2, 2017

No description provided.

@parejkoj parejkoj force-pushed the tickets/DM-9135 branch 2 times, most recently from 566b17c to 0ae5ebd Compare June 2, 2017 22:57

virtual ~BaseStar(){};

double getFlux() const { return _flux; }
double &getFlux() { return _flux; }
Copy link

Choose a reason for hiding this comment

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

I assume this is required?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes: PhotometryFit has fs.getFlux() += delta(index);

@@ -51,9 +51,8 @@ class CcdImage {
VisitIdType _visit;

lsst::afw::coord::IcrsCoord boresightRaDec;
double airMass; // airmass value.
double fluxCoeff; // coefficient to convert ADUs to ADUs/sec at airmass 1
Copy link

Choose a reason for hiding this comment

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

This was not needed?

Copy link
Collaborator Author

@parejkoj parejkoj Jun 6, 2017

Choose a reason for hiding this comment

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

It wasn't used anywhere. Flux conversions are really the job of PhotoCalib, and I'll use that for such things in the future.

@@ -146,34 +145,31 @@ class CcdImage {
lsst::afw::coord::IcrsCoord getBoresightRaDec() { return boresightRaDec; }

//!
double HourAngle() const { return hourAngle; }
double getHourAngle() const { return hourAngle; }
Copy link

Choose a reason for hiding this comment

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

No underscores (here and below)? These are private members?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch: I've underscored all the private members in ccdImage.h.

//!
int& MeasurementCount() { return measurementCount; }
int getMeasurementCount() const { return _measurementCount; }
int& getMeasurementCount() { return _measurementCount; }
Copy link

Choose a reason for hiding this comment

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

Really required?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it's used to increment and decrement measurementCount when constructing and cleaning the star lists.


//! same as above
bool InFrame(const Point &pt) const { return InFrame(pt.x, pt.y); }
bool inFrame(const Point &pt) const { return inFrame(pt.x, pt.y); }
Copy link

Choose a reason for hiding this comment

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

point


//! distance to closest boundary.
double MinDistToEdges(const Point &P) const;
double minDistToEdges(const Point &P) const;
Copy link

Choose a reason for hiding this comment

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

point

fs->MeasurementCount()--; // could be put in SetValid
auto fs = std::const_pointer_cast<FittedStar>(ms.getFittedStar());
ms.setValid(false);
fs->getMeasurementCount()--; // could be put in setValid
Copy link

Choose a reason for hiding this comment

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

Why not do that then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because I'm not sure I believe the comment, but I'm also not sure I don't (which is why I haven't deleted it).

src/Gtransfo.cc Outdated
double GtransfoPoly::do_the_fit(const StarMatchList &List, const Gtransfo &ShiftToCenter,
const bool UseErrors) {
Eigen::MatrixXd A(2 * nterms, 2 * nterms);
double GtransfoPoly::do_the_fit(const StarMatchList &starMatchList, const Gtransfo &shiftToCenter,
Copy link

Choose a reason for hiding this comment

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

computeFit?

Copy link

Choose a reason for hiding this comment

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

Please also check for other snake_case_functions and variables.

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 just went through with a regex, and I think I got them all. Thanks.

src/ListMatch.cc Outdated
deltaSizeRatio = 0.1 * sizeRatio;
minMatchRatio = 1. / 3.;
printLevel = 0;
algorithm = 2;
Copy link

Choose a reason for hiding this comment

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

These should really go in the intializer list, but again another ticket (cleaning up constructors).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just moved it into the initializer list, and put it in the header instead. Was easy enough to do.

src/ListMatch.cc Outdated
++it;
}
}
// double dx=0, dy=0;
// histo.MaxBin(dx,dy);
// histo.maxBin(dx,dy);
// return new GtransfoLinShift(dx,dy);
Copy link

Choose a reason for hiding this comment

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

code commented out...

src/ListMatch.cc Outdated
// BaseStar *neighbour = finder.FindClosest(p2,MaxDist);
const Point p2 = guess->apply(*p1);
const BaseStar *neighbour = list2.findClosest(p2);
// BaseStar *neighbour = finder.findClosest(p2,maxDist);
Copy link

Choose a reason for hiding this comment

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

remove line

Cleanup getters per discussion on ticket

Cleanup silly compiler warning squashing

post-renaming clang-format pass
@parejkoj
Copy link
Collaborator Author

parejkoj commented Jun 6, 2017

Thanks for the review. I've responded to, or taken care of all your comments, and have rebase-squashed all the changes into one.

@parejkoj parejkoj merged commit eed4cf3 into master Jun 6, 2017
@ktlim ktlim deleted the tickets/DM-9135 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