print_fval_pop_hist Subroutine

public subroutine print_fval_pop_hist(PopBinsNum, FValBinsNum)

Uses

Wrapper function to create a 2d-histogram of the shift scale factors over population @param[in] PopBinsNum resolution of the population axis (number of bins) @param[in] FValBinsNum resolution of the factor axis (number of bins)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: PopBinsNum
integer, intent(in) :: FValBinsNum

Contents

Source Code


Source Code

    subroutine print_fval_pop_hist(PopBinsNum, FValBinsNum)
      use CalcData, only: tAutoAdaptiveShift
      implicit none
      integer, intent(in) :: PopBinsNum, FValBinsNum ! number of points in the histogram's axes
      integer, allocatable :: hist(:,:), allHist(:,:)
      real(dp), allocatable :: PopBins(:), FValBins(:)

      if(tAutoAdaptiveShift) then
         ! allocate the buffers
         allocate(PopBins(PopBinsNum+1))
         allocate(FValBins(FValBinsNum+1))
         allocate(hist(PopBinsNum,FValBinsNum))
         allocate(allHist(PopBinsNum, FValBinsNum))
         ! generate the histogram

         call generate_fval_pop_hist(hist, PopBins, FvalBins, PopBinsNum, &
              FvalBinsNum ,allHist)

         call print_2d_hist("FValsPopHist", "Population", "FVal", allHist, PopBins, FValBins)

         ! deallocate the buffers
         if(allocated(allHist)) deallocate(allHist)
         if(allocated(hist)) deallocate(hist)
         if(allocated(PopBins)) deallocate(PopBins)
         if(allocated(FValBins)) deallocate(FValBins)
      end if
    end subroutine print_fval_pop_hist