You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build_LiebLin_catalogue_k_fixed_dsfs_plots.sh 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #! /bin/zsh
  2. # We use zsh here to support floats (not supported in bash)
  3. # This script produces the plots for the runs from `build_LiebLin_catalogue_k_fixed`
  4. # runs which achieved the required sumrule saturation.
  5. if [[ $# -ne 3 ]]; then
  6. echo "Arguments needed: whichDSF, kBT, target_sumrule."
  7. exit 1
  8. fi
  9. if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
  10. echo "Only the d, g and o scanning options are implemented."
  11. exit 1
  12. fi
  13. if [[ $2 -lt 0 ]]; then
  14. echo "Temperature kBT must be > 0."
  15. exit 1
  16. fi
  17. if [[ $3 -lt 0 || $3 -gt 1 ]]; then
  18. echo "Requirement: 0 < target_sumrule < 1."
  19. exit 1
  20. fi
  21. whichDSF=$1
  22. kBT=$2
  23. target_sumrule=$3
  24. width=$4
  25. correlator='rho-rho'
  26. if [[ $whichDSF == 'o' ]]; then
  27. correlator='psidag-psi'
  28. elif [[ $whichDSF == 'g' ]]; then
  29. correlator='psi-psidag'
  30. fi
  31. clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
  32. basedir="$(pwd)"
  33. for c in $clist
  34. do
  35. for nk in {1..16}
  36. do
  37. echo '** Starting plotting of DSFs for c =' $c', k = '$nk' kFo4.'
  38. dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed/c_'$c'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/plots'
  39. mkdir -p $dir
  40. cd $dir
  41. for datadir in ../data/*
  42. do
  43. N=${datadir#"../data/N_"}
  44. mkdir -p 'N_'$N
  45. cd 'N_'$N
  46. # Move all K_, Omega_ and .dsfs files here
  47. mv ../../data/N_$N/K_* .
  48. mv ../../data/N_$N/Omega_* .
  49. mv ../../data/N_$N/*dsfs .
  50. # Find the K and Omega file
  51. for file in *
  52. do
  53. if [[ $file = Omega* ]]; then
  54. omegafile=$file
  55. fi
  56. done
  57. # For each .dsfs file, plot
  58. for file in *.dsfs
  59. do
  60. echo 'Found file ' $file
  61. # invoke the python script
  62. plot_dsf_k_fixed.py $omegafile $file
  63. done
  64. cd ..
  65. done
  66. cd $basedir
  67. echo '** Successfully plotted DSFs for c =' $c', k = '$nk'kFo4.\n'
  68. done
  69. done