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

Comet object apparent magnitude calculation #964

Open
jurezakrajsek opened this issue May 13, 2024 · 0 comments
Open

Comet object apparent magnitude calculation #964

jurezakrajsek opened this issue May 13, 2024 · 0 comments

Comments

@jurezakrajsek
Copy link

Is there already an available function that would calculate the comet apparent magnitude at a given time?
I could not find it there for I have written my own function, maybe it would be of interest to add it to the SkyField in the future?

def obj_magnitude(self):
    r = self.comet_obj.distance()
    ra, dec, delta = self.observed_comet.radec()
    mag_g = self.row.magnitude_g
    mag_k = self.row.magnitude_k

    if self.num > 1:
        return np.asarray(
            [mag_g + 5 * math.log10(di) + 2.5 * mag_k * math.log10(ri) for ri, di in zip(r.au, delta.au)])
    else:
        return mag_g + 5 * math.log10(delta.au) + 2.5 * mag_k * math.log10(r.au)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant