#$ #$=head1 NAME #$ #$createmshelix - create a multi-scale helix filter #$ #$ #$=head1 SYNOPSIS #$ #$C #$ #$=head1 INPUT PARAMETERS #$ #$=over 4 #$ #$=item nd - C #$ #$ size of data #$ #$=item center - C #$ #$ location of the 1 of the filter within na box #$ #$=item jump - C #$ #$ stretches #$ #$=item gap - C #$ #$ distance along each axis before filter coef #$ #$=item na - C #$ #$ size of box arround filter #$ #$=back #$ #$=head1 RETURN VALUE #$ #$=over 4 #$ #$=item aa - C #$ #$ Helix filter #$ #$=back #$ #$=head1 DESCRIPTION #$ #$Create a multi-scale helix filter #$ #$=head1 SEE ALSO #$ #$L,L,L,L #$ #$=head1 LIBRARY #$ #$B #$ #$=cut #$ #$ module createmshelixmod { # Create multiscale helix filter lags and mis use mshelix use createhelixmod use bound contains function createmshelix( nd, center, gap, jump, na) result( msaa) { type( msfilter) :: msaa # needed by mshelicon. integer, dimension(:), intent(in) :: nd, na # data and filter axes integer, dimension(:), intent(in) :: center # normally (na1/2,na2/2,...,1) integer, dimension(:), intent(in) :: gap # normally ( 0, 0, 0,...,0) integer, dimension(:), intent(in) :: jump # jump(ns) stretch scales type( filter) :: aa integer :: is, ns, nh, n123 aa = createhelix( nd, center, gap, na) ns = size( jump); nh = size( aa%lag); n123 = product( nd) call msallocate( msaa, nh, ns) do is = 1, ns msaa%lag(:,is) = aa%lag(:)*jump(is) # set lags for expanded scale call deallocatehelix( aa) allocate( msaa%mis( n123, ns)) do is = 1, ns { # for all scales aa = onescale( is, msaa); nullify( aa%mis) # extract a filter call boundn( nd, nd, na*jump(is), aa) # set up its boundaries msaa%mis( :, is) = aa%mis; deallocate( aa%mis) # save them } } }