Skip to content

Commit

Permalink
Calculated v mags now NAN if phase>160 degrees
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlend committed Oct 18, 2024
1 parent 1f5af85 commit 7f396c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/kete/rust/flux/reflected.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub fn hg_apparent_flux_py(
///
/// The HG IAU model is not technically defined above 120 degrees phase, however this
/// will continue to return values fit to the model until 160 degrees. Phases larger
/// than 160 degrees will return an apparent magnitude of infinity.
/// than 160 degrees will return nan.
///
/// Parameters
/// ----------
Expand Down
4 changes: 2 additions & 2 deletions src/kete_core/src/flux/reflected.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl HGParams {
///
/// The IAU model is not technically defined above 120 degrees phase, however this will
/// continue to return values fit to the model until 160 degrees. Phases larger than
/// 160 degrees will return an apparent magnitude of infinity.
/// 160 degrees will return nan.
///
/// Note that this typically assumes that H/G have been fit in the V band, thus this
/// will return a V band apparent magnitude.
Expand All @@ -232,7 +232,7 @@ impl HGParams {

// 2.7925... == 160 degrees in radians
if phase > 2.792526803190927 {
return f64::INFINITY;
return f64::NAN;
}

let correction = hg_phase_curve_correction(self.g_param, phase).log10();
Expand Down
1 change: 1 addition & 0 deletions src/kete_core/src/frames/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub enum Frame {
/// - isize value represents the frame identifier.
/// - array of 6 floats represent the euler angles and their derivatives to move to
/// this frame from the ecliptic frame.
///
/// Rotation is done with a ZXZ set of chained rotations.
EclipticNonInertial(isize, [f64; 6]),
// Other non inertial frames will require multi-step conversions
Expand Down

0 comments on commit 7f396c6

Please sign in to comment.