Program s2fil_localisation_thres

program s2fil_localisation_thres

        ! Uses
    use s2_types_mod
    use s2_vect_mod
    use s2fil_types_mod
    use s2fil_error_mod
    use s2fil_field_mod

        ! Calls
    call parse_options
    call s2_vect_convert
    call s2_vect_free
    call s2fil_error
    call s2fil_field_free
    call s2fil_field_get_scale_val
    call s2fil_field_loc_thres

        ! Variables
    integer, parameter :: MIN_REG_SIZE = 50
    integer, parameter :: S2FIL_RECLASS_SIZ = 1
    integer, parameter :: S2FIL_RECLASS_VAL = 2
    integer, parameter :: S2FIL_RECLASS_HEU = 3
    integer :: reclass_strategy = S2FIL_RECLASS_SIZ
    character (len=S2_STRING_LEN) :: filename_field
    character (len=S2_STRING_LEN) :: filename_filter
    character (len=S2_STRING_LEN) :: filename_out
    character (len=S2_STRING_LEN) :: filename_thres
    character (len=S2_STRING_LEN) :: filename_connected
    logical :: save_thres = .false.
    logical :: save_connected = .false.
    type (s2fil_field) :: field
    real (kind=s2_sp), allocatable, dimension (:,:) :: max_val
    integer, allocatable, dimension (:,:,:) :: max_loc
    integer, allocatable, dimension (:,:) :: max_siz
    integer, allocatable, dimension (:) :: n_regions
    real (kind=s2_sp) :: nsigma = 3.0e0
    integer :: i_reg
    integer :: i_gamma0
    integer :: irp
    integer :: igp
    integer :: fail = 0
    integer :: n_alpha
    integer :: n_beta
    integer :: n_gamma
    logical :: no_gamma_search = .false.
    logical, allocatable, dimension (:,:) :: keep
    real (kind=s2_sp) :: ANG_EXTEND_SIZE = 1.0e0
    real (kind=s2_sp), dimension (1:S2FIL_SCALE_DIM2_SIZE) :: dil
    real (kind=s2_sp) :: alpha
    real (kind=s2_sp) :: beta
    real (kind=s2_sp) :: alpha_p
    real (kind=s2_sp) :: beta_p
    type (s2_vect) :: v
    type (s2_vect) :: vp
    real (kind=s2_sp) :: dist
    real (kind=s2_sp) :: dist_near
    real (kind=s2_sp) :: dot
    integer :: n_keep
    integer :: i_keep
    character, parameter :: COMMENT_CHAR = '#'
    integer :: fileid = 21

        ! Subroutines and functions
    subroutine parse_options ()

end program s2fil_localisation_thres
Find localised regions in filtered field using thresholding strategy. Locations and values found are written to the standard output.

Usage: s2fil_localisation_thres

Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)

Version: 0.1 - April 2005


Description of Variables

MIN_REG_SIZE

integer, parameter :: MIN_REG_SIZE = 50

S2FIL_RECLASS_SIZ

integer, parameter :: S2FIL_RECLASS_SIZ = 1

S2FIL_RECLASS_VAL

integer, parameter :: S2FIL_RECLASS_VAL = 2

S2FIL_RECLASS_HEU

integer, parameter :: S2FIL_RECLASS_HEU = 3

reclass_strategy

integer :: reclass_strategy = S2FIL_RECLASS_SIZ

filename_field

character (len=S2_STRING_LEN) :: filename_field

filename_filter

character (len=S2_STRING_LEN) :: filename_filter

filename_out

character (len=S2_STRING_LEN) :: filename_out

filename_thres

character (len=S2_STRING_LEN) :: filename_thres

filename_connected

character (len=S2_STRING_LEN) :: filename_connected

save_thres

logical :: save_thres = .false.

save_connected

logical :: save_connected = .false.

field

type (s2fil_field) :: field

max_val

real (kind=s2_sp), allocatable, dimension (:,:) :: max_val

max_loc

integer, allocatable, dimension (:,:,:) :: max_loc

max_siz

integer, allocatable, dimension (:,:) :: max_siz

n_regions

integer, allocatable, dimension (:) :: n_regions

nsigma

real (kind=s2_sp) :: nsigma = 3.0e0

i_reg

integer :: i_reg

i_gamma0

integer :: i_gamma0

irp

integer :: irp

igp

integer :: igp

fail

integer :: fail = 0

n_alpha

integer :: n_alpha

n_beta

integer :: n_beta

n_gamma

integer :: n_gamma

no_gamma_search

logical :: no_gamma_search = .false.

keep

logical, allocatable, dimension (:,:) :: keep

ANG_EXTEND_SIZE

real (kind=s2_sp) :: ANG_EXTEND_SIZE = 1.0e0

dil

real (kind=s2_sp), dimension (1:S2FIL_SCALE_DIM2_SIZE) :: dil

alpha

real (kind=s2_sp) :: alpha

beta

real (kind=s2_sp) :: beta

alpha_p

real (kind=s2_sp) :: alpha_p

beta_p

real (kind=s2_sp) :: beta_p

v

type (s2_vect) :: v

vp

type (s2_vect) :: vp

dist

real (kind=s2_sp) :: dist

dist_near

real (kind=s2_sp) :: dist_near

dot

real (kind=s2_sp) :: dot

n_keep

integer :: n_keep

i_keep

integer :: i_keep

COMMENT_CHAR

character, parameter :: COMMENT_CHAR = '#'

fileid

integer :: fileid = 21

Description of Subroutines and Functions

parse_options

subroutine parse_options ()
    ! Calls: getArgument
end subroutine parse_options
Parse the options passed when program called.

Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)

Version: 0.1 - February 2005