bmorris3 / kelp

Photometric phase curves of exoplanets
https://kelp.readthedocs.io/en/latest/
7 stars 2 forks source link

Suggested feature: easy way to derive phase curve features of interest #25

Closed mhooton closed 3 years ago

mhooton commented 3 years ago

Right now it's quite easy to determine features of interest for the generated phase curves such as:

bmorris3 commented 3 years ago

Hi @mhooton!

min/max flux/amplitude

This operation can be accomplished with the following syntax:

Model(...).thermal_phase_curve(...).flux.max()  # or .min()

conversion of hotspot offset to more traditional definition (more useful when omega_drag is <=3)

This can be done with

xi[Model(...).thermal_phase_curve(xi, ...).flux.argmax()]  # radians

integrated dayside flux (i.e. eclipse depth)/nightside flux

This one is a bit subtle since it might refer to either the reflected or thermal components, or both together. I think it might be cleaner to provide convenience functions like Model.albedo_redist as implemented in #33, and/or to ask the user to run something like:

flux_dayside = Model(...).thermal_phase_curve(xi=0,...).flux
flux_nightside = Model(...).thermal_phase_curve(xi=np.pi,...).flux

Are these suggestions ok by you? I realize it's convenient for me to suggest making no changes to the code, but I think it's clearer if the user actually asks explicitly for what they want from the code.

mhooton commented 3 years ago

That looks fine