#$=head1 NAME #$ #$mis2 - Fill in missing data #$ #$=head1 SYNOPSIS #$ #$C #$ #$=head1 PARAMETERS #$ #$=over 4 #$ #$=item niter - integer #$ #$ number of iterations #$ #$=item xx -real #$ #$ fitting variable #$ #$=item aa -type(filter) #$ #$ filter to apply #$ #$=item known -C #$ #$ Known data #$ #$=item doprec -logical #$ #$ Whether or not to run preconditioning #$ #$=back #$ #$=head1 DESCRIPTION #$ #$fill in missing data by minimizing power out of a given filter #$ by helix magic works in any number of dimensions #$ #$=head1 SEE ALSO #$ #$L,L,L,L,L #$ #$=head1 LIBRARY #$ #$B #$ #$=cut module mis2 { use mask1 + helicon + polydiv + cgstep_mod + solver_mod contains # fill in missing data by minimizing power out of a given filter. # by helix magic works in any number of dimensions subroutine mis1( niter, xx, aa, known, doprec) { logical, intent( in) :: doprec integer, intent( in) :: niter type( filter), intent( in) :: aa logical, dimension( :), intent( in) :: known real, dimension( :), intent( in out) :: xx # fitting variables real, dimension( :), allocatable :: dd logical, dimension( :), pointer :: kk integer :: nx nx = size( xx) if( doprec) { # preconditioned allocate( kk( nx)); kk = known call mask1_init( kk) call polydiv_init( nx, aa) call solver_prec( mask1_lop, cgstep, niter= niter, x= xx, dat= xx, prec= polydiv_lop, nprec= nx, eps= 0.) call polydiv_close() deallocate( kk) } else { # regularized allocate( dd( nx)); dd = 0. call helicon_init( aa) call solver( helicon_lop, cgstep, niter= niter, x= xx, dat= dd, known = known, x0= xx) deallocate( dd) } call cgstep_close( ) } }