Skip to content

Commit

Permalink
fix CLI call
Browse files Browse the repository at this point in the history
  • Loading branch information
jrob93 committed Mar 19, 2024
1 parent d8db929 commit b2705eb
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/adler/adler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import astropy.units as u

from adler.dataclasses.AdlerPlanetoid import AdlerPlanetoid
from adler.science.PhaseCurve import PhaseCurve
Expand All @@ -10,8 +11,25 @@ def runAdler(args):
planetoid.do_pretend_science()

# now let's do some phase curves!
pc = PhaseCurve(abs_mag=planetoid.SSObject.r_H, phase_param=0.2, model_name="HG")

# get the RSP r filter model
pc = PhaseCurve(
abs_mag=planetoid.SSObject.H[2] * u.mag,
phase_param=planetoid.SSObject.G12[2],
model_name="HG12_Pen16",
)
print(pc)
print(pc.abs_mag, pc.phase_param)

# get the r filter observations
obs_r = planetoid.observations_in_filter("r")
alpha = obs_r.phaseAngle * u.deg
red_mag = obs_r.reduced_mag * u.mag
mag_err = obs_r.magErr * u.mag

# do a simple fit to all data
pc_fit = pc.FitModel(alpha, red_mag, mag_err)
print(pc_fit)


def main():
Expand Down

0 comments on commit b2705eb

Please sign in to comment.