Skip to content

Commit

Permalink
don't ever model to less than interptimes[1]
Browse files Browse the repository at this point in the history
  • Loading branch information
a2ray committed Sep 9, 2024
1 parent 78bee0d commit 7fc96ae
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/AEM_VMD_HMD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,13 @@ function convramp!(F::HFieldDHT, splz::CubicSpline, splr::CubicSpline, splaz::Cu
end

ta = F.times[itime]-rta
if ta <= F.minresptime
break # since ta must always be greater than minresptime
if ta < F.interptimes[1]
break # since ta must always be greater than min response time modeled
end
tb = max(F.times[itime]-rtb, F.interptimes[1]) # rtb > rta, so make sure this is not zero because integ is in log10...
if tb >= ta # I don't actually expect to get here
break # because int is from ta to tb and ta=t-rta tb=t-rtb and we must have ta>tb
end
tb = max(F.times[itime]-rtb, F.minresptime)# rtb > rta, so make sure this is not zero because integ is in log10...
a, b = log10(ta), log10(tb)
x, w = F.quadnodes, F.quadweights
F.dBzdt[itime] += (b-a)/2*dot(getrampresponse((b-a)/2*x .+ (a+b)/2, splz), w)*dIdt
Expand Down

0 comments on commit 7fc96ae

Please sign in to comment.