print_fval_energy_hist Subroutine

public subroutine print_fval_energy_hist(EnergyBinsNum, FValBinsNum)

Uses

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

Arguments

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

Contents


Source Code

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

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

         call generate_fval_energy_hist(hist, EnergyBins, FvalBins, EnergyBinsNum, &
              FvalBinsNum ,allHist)

         call print_2d_hist("FValsEnergyHist", "Energy", "FVal", allHist, EnergyBins, FValBins)

         ! deallocate the buffers
         if(allocated(allHist)) deallocate(allHist)
         if(allocated(hist)) deallocate(hist)
         if(allocated(EnergyBins)) deallocate(EnergyBins)
         if(allocated(FValBins)) deallocate(FValBins)
      end if
    end subroutine print_fval_energy_hist