#$ #$=head1 NAME #$ #$helicon - convolution using helix filters #$ #$=head1 SYNOPSIS #$ #$Initializer - C #$ #$Operator - C #$ #$=head1 PARAMETERS #$ #$=over 4 #$ #$=item aa - type(filter) #$ #$ helix filter to perform convolution with #$ #$=item adj,add,xx,yy - #$ #$ standard operators parameters #$ #$=back #$ #$=head1 DESCRIPTION #$ #$ Convolution, inverse to deconvolution. #$ Requires the filter be causal with an implicit "1." at the onset. #$ #$ #$=head1 SEE ALSO #$ #$L #$ #$=head1 LIBRARY #$ #$B #$ #$=cut #$ module helicon { # Convolution, inverse to deconvolution. # Requires the filter be causal with an implicit "1." at the onset. use helix type( filter) :: aa #% _init( aa) #% _lop ( xx, yy) integer iy, ix, ia if( adj) # zero lag xx += yy else yy += xx do ia = 1, size( aa%lag) { do iy = 1 + aa%lag( ia), size( yy) { if( associated( aa%mis)) { if( aa%mis( iy)) cycle} ix = iy - aa%lag( ia) if( adj) xx(ix) += yy(iy) * aa%flt(ia) else yy(iy) += xx(ix) * aa%flt(ia) } } }