Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
Fix bug in LEMONdB._add_cmp_star() — standard deviation and weight
Browse files Browse the repository at this point in the history
The last two values in the INSERT INTO statement were in the wrong
order, and therefore the standard deviation of each comparison star
was stored as its weight in the artificial comparison star, and vice
versa. It is a bit surprising that nobody seems to have noticed this
in all this time.
  • Loading branch information
Víctor Terrón committed May 7, 2015
1 parent 10ffe02 commit 87e114e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database.py
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ def _add_cmp_star(self, star_id, pfilter, cstar_id, cweight, cstdev):
# Error binding parameter - probably unsupported type"
cweight = float(cweight)
cstdev = float(cstdev)
t = (None, star_id, hash(pfilter), cstar_id, cweight, cstdev)
t = (None, star_id, hash(pfilter), cstar_id, cstdev, cweight)
self._execute("INSERT INTO cmp_stars "
"VALUES (?, ?, ?, ?, ?, ?)", t)
self._release(mark)
Expand Down

0 comments on commit 87e114e

Please sign in to comment.