Aim: Get the number of pixels making E2 for all patterns, return mask itself if required. CAL must be initialised beforehand.
The routine declaration is:
subroutine getpixelInE2(pixelInE2, patabove, npatterns)
! pixelInE2: number of pixels in E2 for each pattern
! patabove : mask of E2 for each pattern
! npatterns: number of patterns
integer(kind=int16), dimension(0:edu_npat-1), intent(out) :: pixelInE2
integer(kind=int16), dimension(-1:1,-1:1,0:edu_npat-1), &
intent(out), optional :: patabove
integer, intent(out), optional :: npatterns