If all the node epochs of x (halo's scaled variables) are within the range of the
splined ephemeris (2 periods before the reference epoch to 2 periods after the last rev,
see initialize_the_mission), less a margin of half a period. A trial point of the
optimization can be far off.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(eclipse_opt_data), | intent(in) | :: | d | |||
| real(kind=wp), | intent(in), | dimension(:) | :: | x |
function epochs_in_range(d, x) result(ok) type(eclipse_opt_data),intent(in) :: d real(wp),dimension(:),intent(in) :: x logical :: ok real(wp) :: lo, hi, t integer :: i lo = -1.5_wp * d%mission%period hi = (d%mission%n_revs + 1.5_wp) * d%mission%period ok = .true. do i = 1, size(x) if (.not. d%mission%x_is_epoch(i)) cycle t = x(i)*d%mission%xscale(i) + d%mission%xoffset(i) ! [days from the reference epoch] if (t < lo .or. t > hi .or. t /= t) then ok = .false. return end if end do end function epochs_in_range