Opened 16 years ago

Closed 16 years ago

#158 closed enhancement (fixed)

Abel routine variable names

Reported by: Huw Lewis Owned by: Huw Lewis
Priority: normal Milestone: 3.0
Component: ROPP (all) Version: 2.0beta
Keywords: Abel transform Cc:

Description

Feedback from Sean:

I have some problems with Christian's variable names, which I think
leads to confusion.

I tend to use the following

Christian     Sean

impact_obs(:) =   a(:) not really important but notation used in papers.
impact(:)     =   nr(:) because these are *not* impact parameter values!


I think using impact and impact_obs is confusing. For example in the
linear abel code you have


!    5.3 Asymptotic correction
!    -------------------------

      if(present(scale))then

         t_upper = sqrt((impact(i_top)-impact(i_bot))/scale)
         zt = 1.0_wp / (1.0_wp + 0.47047_wp * t_upper)
         erf_up = 1.0_wp - (a-(b-c*zt)*zt) * zt * EXP(-(t_upper*t_upper))

         alpha(l) = alpha(l) + &
              dlndx(i_top)*exp((impact(i_top)-impact(i_bot))/scale)*    &
              sqrt(pi)*(1.0_wp-erf_up)/  &
              sqrt((impact(i_top)+impact(i_bot))/scale)

      endif


But I think all the impact(i_bot)'s used here should be impact_obs(l).

And

      alpha(l)  = -2.0_wp * impact(l) * alpha(l)

Again, I would have thought this should be using impact_obs(l) rather 
than impact(l).

I suspect the code works because impact(:) = impact_obs(:) for the cases
you've tested, but this won't be the case generally.

I think the line alpha(l) = -2.0_wp * impact(l) * alpha(l) should be in terms of impact_obs(l) as suggested. The first code line is correct though.

This ticket is aimed to make us look again at all the Abel transform routines (LIN, EXP, Abel, Invert) and re-think variable names and code logic as Sean suggests. Using more distinctive variable names will help.

Also, we need to include the possibility to output LIN solutions on a different set of output levels (e.g. interpolation after performing the calculation?).

Change history (1)

comment:1 by Huw Lewis, 16 years ago

Resolution: fixed
Status: newclosed

See updates in development branch for ropp_fm routines [2047] and ropp_pp routines [2043]. All tested and working ok.

Ticket closed as fixed.

Note: See TracTickets for help on using tickets.