Absolute magnitude from apparent magnitude and annual parallax (radians).
double absoluteByParallax(double m, double parallax) { return m + 5 + 5 * math.log(1 / parallax) / math.ln10; }