diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..30158153 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,57 @@ +# +# Appveyor CI configuration file +# +# ICRAR - International Centre for Radio Astronomy Research +# (c) UWA - The University of Western Australia, 2018 +# Copyright by UWA (in the framework of the ICRAR) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +version: '1.0.{build}' + +image: Visual Studio 2017 + +platform: + - x64 + +cache: c:\tools\vcpkg\installed\ + +configuration: + - Release + +install: + - cmd: git submodule update --init --recursive + - cmd: git clone https://github.com/CxxTest/cxxtest + - cmd: cd c:\tools\vcpkg + - cmd: git pull + - cmd: vcpkg update + - cmd: vcpkg integrate install + - cmd: vcpkg install boost-filesystem:x64-windows + - cmd: vcpkg install boost-log:x64-windows + - cmd: vcpkg install boost-program-options:x64-windows + - cmd: vcpkg install boost-system:x64-windows + - cmd: vcpkg install gsl:x64-windows + - cmd: vcpkg install hdf5[cpp]:x64-windows + - cmd: cd "%APPVEYOR_BUILD_FOLDER%" + +before_build: + - cmd: cmake -G "Visual Studio 15 2017 Win64" . -DSHARK_TEST=ON -DCMAKE_INCLUDE_PATH='%APPVEYOR_BUILD_FOLDER%\cxxtest' -DCMAKE_PROGRAM_PATH="%APPVEYOR_BUILD_FOLDER%\cxxtest\bin" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DSHARK_HDF5_USE_CONFIG=ON + +build: + project: $(APPVEYOR_BUILD_FOLDER)\$(APPVEYOR_PROJECT_NAME).sln + +test_script: + - cmd: set "PATH=%APPVEYOR_BUILD_FOLDER%\Release;%PATH%" + - cmd: ctest --output-on-failure -V diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c78e353..162258ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,13 @@ endmacro() # which is a hard requirement -- if it's not there we fail misserably # macro(find_hdf5) - find_package(HDF5 REQUIRED COMPONENTS CXX) + + # The CONFIG mode is needed at least when using vcpkg's hdf5 + if (SHARK_HDF5_USE_CONFIG) + find_package(HDF5 REQUIRED COMPONENTS CXX CONFIG) + else() + find_package(HDF5 REQUIRED COMPONENTS CXX) + endif() # # HDF5_VERSION is defined only in cmake 3.3+ @@ -143,15 +149,22 @@ macro(find_hdf5) # We need to pass down the information about the HDF5 version to shark message("-- Using HDF5 version ${HDF5_VERSION}") + message("-- HDF5 libraries / C++ libraries: ${HDF5_LIBRARIES} / ${HDF5_CXX_LIBRARIES}") string(REPLACE "." ";" VERSION_LIST ${HDF5_VERSION}) list(GET VERSION_LIST 0 HDF5_VERSION_MAJOR) list(GET VERSION_LIST 1 HDF5_VERSION_MINOR) list(GET VERSION_LIST 2 HDF5_VERSION_PATCH) - set(SHARK_LIBS ${SHARK_LIBS} ${HDF5_CXX_LIBRARIES}) include_directories(${HDF5_INCLUDE_DIRS}) + add_definitions(${HDF5_DEFINITIONS}) add_definitions("-DHDF5_VERSION_MAJOR=${HDF5_VERSION_MAJOR}" "-DHDF5_VERSION_MINOR=${HDF5_VERSION_MINOR}" "-DHDF5_VERSION_PATCH=${HDF5_VERSION_PATCH}") + + if (SHARK_HDF5_USE_CONFIG) + set(SHARK_LIBS ${SHARK_LIBS} hdf5::hdf5_cpp-shared) + else() + set(SHARK_LIBS ${SHARK_LIBS} ${HDF5_CXX_LIBRARIES}) + endif() endmacro() # @@ -171,8 +184,33 @@ endmacro() macro(find_openmp) find_package(OpenMP) if (OPENMP_FOUND) + + # We require at least OpenMP 2.0, so let's double check + # we have that at least + set(OPENMP_VERSION_CHECK_SOURCE " +#include +int main(int argc, char *argv[]) { +#if _OPENMP >= 200203 + return 0; +#else + fail to compile please +#endif +}") + set(WORK_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMPVersionCheck) + set(SRC_FILE ${WORK_DIR}/ompver.cpp) + file(WRITE ${SRC_FILE} "${OPENMP_VERSION_CHECK_SOURCE}") + try_compile(COMPILE_RESULT ${CMAKE_BINARY_DIR} ${SRC_FILE} + COMPILE_DEFINITIONS ${OpenMP_CXX_FLAGS}) + + if (COMPILE_RESULT) + set(SHARK_OPENMP ON) + else() + message("-- OpenMP found, but is <= 2.0. Compiling without OpenMP support") + endif() + endif() + + if (SHARK_OPENMP) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - set(SHARK_OPENMP ON) endif() endmacro() @@ -187,6 +225,11 @@ if (NOT SHARK_NO_OPENMP) find_openmp() endif() +# Windows builds need to link to ws2_32 (due to usage of gethostname) +if (WIN32) + set(SHARK_LIBS ${SHARK_LIBS} ws2_32) +endif() + # # Save all compile-time options here # @@ -254,9 +297,17 @@ set(SHARKLIB_SRCS src/hdf5/traits.cpp src/hdf5/writer.cpp ) -add_library(sharklib SHARED ${SHARKLIB_SRCS}) + +if (WIN32) + set(SHARLIB_MODE STATIC) +else() + set(SHARLIB_MODE SHARED) +endif() +add_library(sharklib ${SHARLIB_MODE} ${SHARKLIB_SRCS}) target_link_libraries(sharklib ${SHARK_LIBS}) -set_target_properties(sharklib PROPERTIES LIBRARY_OUTPUT_NAME shark) +set_target_properties(sharklib PROPERTIES + LIBRARY_OUTPUT_NAME shark + RUNTIME_OUTPUT_NAME shark) # The shark-importer executable set(SHARK_IMPORTER_SRCS @@ -278,7 +329,8 @@ target_link_libraries(shark sharklib) # Installing stuff: programs, scripts, static data install(TARGETS sharklib shark shark-importer RUNTIME DESTINATION bin - LIBRARY DESTINATION lib) + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) install(PROGRAMS hpc/shark-run hpc/shark-submit DESTINATION bin) install(DIRECTORY data diff --git a/README.md b/README.md index 1ede7fdf..42b3767b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # shark [![Build Status](https://travis-ci.org/ICRAR/shark.svg?branch=master)](https://travis-ci.org/ICRAR/shark) +[![Build Status](https://ci.appveyor.com/api/projects/status/4vy02t8q4h4xpr7k/branch/master?svg=true)](https://ci.appveyor.com/project/rtobar/shark/branch/master) [![Documentation Status](https://readthedocs.org/projects/shark-sam/badge/?version=latest)](https://shark-sam.readthedocs.io/en/latest/?badge=latest) shark is a new, flexible semi-analytic model of galaxy formation. diff --git a/data/Models/SharkVariations/AngularMomentum.dat b/data/Models/SharkVariations/AngularMomentum.dat index 15c77f2a..b32cdc80 100644 --- a/data/Models/SharkVariations/AngularMomentum.dat +++ b/data/Models/SharkVariations/AngularMomentum.dat @@ -1,189 +1,189 @@ #angular momentum in the Shark-Lagos18 model. #disk-dominated galaxies B/T_stars < 0.5. #jstar jmol jatom (median) jbar --1.11615741253 -1.01115059853 -1.01112270355 -1.12564909458 --1.0683606863 -0.94015955925 -0.940219402313 -1.0721360445 --1.01832509041 -0.876877129078 -0.876925110817 -1.01596879959 --0.977722764015 -0.824522435665 -0.824903905392 -0.95962446928 --0.937840461731 -0.777561783791 -0.777759313583 -0.905026674271 --0.890906095505 -0.723262786865 -0.723568022251 -0.862818837166 --0.839973926544 -0.671039938927 -0.670320153236 -0.851731777191 --0.786784172058 -0.617027938366 -0.614627242088 -0.842892289162 --0.732046842575 -0.562300145626 -0.558540701866 -0.79562073946 --0.675320744514 -0.509023368359 -0.50408244133 -0.730201244354 --0.618310809135 -0.448987305164 -0.442424654961 -0.666600346565 --0.559557318687 -0.396318167448 -0.387903809547 -0.596111893654 --0.502810001373 -0.338917434216 -0.330707967281 -0.527579665184 --0.445821434259 -0.275500118732 -0.270140111446 -0.458903551102 --0.385313391685 -0.217318743467 -0.210135415196 -0.391642570496 --0.327900141478 -0.155336156487 -0.149543851614 -0.326200664043 --0.26953291893 -0.0970512032509 -0.0868491977453 -0.261630117893 --0.210596397519 -0.0305007696152 -0.023193217814 -0.195835188031 --0.153562709689 0.0421782210469 0.040116995573 -0.133603557944 --0.0948078632355 0.107183493674 0.105383649468 -0.0666336864233 --0.0319104269147 0.175779670477 0.156736314297 0.00415223836899 -0.0300896018744 0.215720057487 0.200616210699 0.0745842680335 -0.10751722753 0.262653887272 0.228469580412 0.148232504725 -0.184483677149 0.344276309013 0.319834053516 0.202548533678 -0.277406513691 0.0961022898555 0.358895838261 0.273774504662 -0.642575323582 0.0 0.8835324049 0.601612448692 -0.0 0.0 0.0 0.765594363213 -0.0 0.0 0.0 0.0 -0.0 0.0 0.0 0.0 +-1.18435180187 0.0 0.0 0.0 +-1.14135980606 0.0 0.0 0.0 +-1.09436249733 0.0 0.0 0.0 +-1.05724906921 0.0 0.0 0.0 +-1.0162730217 0.0 0.0 0.0 +-0.963719844818 -0.816515922546 -0.804660081863 -1.24646854401 +-0.902636706829 -0.792200267315 -0.773719251156 -1.14325284958 +-0.845909237862 -0.75437939167 -0.724529743195 -1.19009661674 +-0.787139475346 -0.709524512291 -0.673418998718 -1.0364921093 +-0.728808999062 -0.666310787201 -0.616715490818 -0.890094518661 +-0.669869065285 -0.617158532143 -0.560056090355 -0.758027374744 +-0.613335490227 -0.566641867161 -0.505476653576 -0.64796769619 +-0.557723164558 -0.521878242493 -0.451560735703 -0.55503821373 +-0.501669883728 -0.461264789104 -0.390032529831 -0.476234734058 +-0.443069279194 -0.39176440239 -0.325490415096 -0.405292481184 +-0.373959064484 -0.318077921867 -0.258199453354 -0.336830198765 +-0.300758421421 -0.237480655313 -0.17914506793 -0.275683969259 +-0.206098392606 -0.1168692559 -0.0774290263653 -0.195778489113 +-0.114499166608 0.00886842608452 0.0232919156551 -0.109954223037 +-0.0252428203821 0.172472655773 0.11681368947 -0.0352016687393 +0.0651084855199 0.227827578783 0.205848187208 0.0734919458628 +0.18366612494 0.333072632551 0.284299314022 0.20222145319 +0.26690363884 0.39239770174 0.379260361195 0.326842010021 +0.319258719683 0.470101952553 0.29381659627 0.466310441494 +0.548445880413 0.416408330202 0.530488967896 0.497381716967 +0.895102381706 0.900221824646 0.900221824646 0.796613454819 +0.0 0.0 0.0 1.13693463802 +0.0 0.0 0.0 1.00711131096 +1.55196678638 1.73712444305 1.73712444305 0.0 0.0 0.0 0.0 0.0 #16th percentile -0.103565812111 0.266978502274 0.267006397247 0.0986639261246 -0.0985946655273 0.257227182388 0.257244467735 0.0999579429626 -0.0886768102646 0.246999204159 0.247151255608 0.104048013687 -0.0789020061493 0.235412418842 0.235465943813 0.113245785236 -0.0788357257843 0.232661128044 0.232456088066 0.123633623123 -0.0785591602325 0.232967019081 0.231962382793 0.144796729088 -0.0791605710983 0.233089447021 0.232159733772 0.179286599159 -0.0794134140015 0.235487997532 0.232586622238 0.167478561401 -0.0811008810997 0.232944488525 0.230427265167 0.153817117214 -0.0794005393982 0.226633548737 0.221529006958 0.150455594063 -0.0789022445679 0.220049202442 0.214539051056 0.14716899395 -0.0799637436867 0.213481456041 0.207740545273 0.141274213791 -0.0790255069733 0.202936351299 0.190442383289 0.133227944374 -0.0768586099148 0.189110815525 0.180104792118 0.123557507992 -0.0732074379921 0.174732595682 0.163482293487 0.113325357437 -0.0749929249287 0.168581232429 0.149490267038 0.104134500027 -0.0719619393349 0.148148223758 0.13905826211 0.0981103181839 -0.0696465820074 0.133003249764 0.124161161482 0.089660987258 -0.0686804652214 0.113447152078 0.115776658058 0.0854178369045 -0.0733053833246 0.106426678598 0.120754256845 0.0789363384247 -0.0777480080724 0.147982761264 0.141197800636 0.0776988267899 -0.0886824429035 0.113497950137 0.156811788678 0.0889909490943 -0.079223677516 0.134342461824 0.183815583587 0.0972786918283 -0.06988106668 0.102009445429 0.200177825987 0.0908159762621 -0.0824173092842 0.0542173162103 0.317010864615 0.0762053728104 -0.0245960354805 0.0 0.0774701833725 0.303479731083 +0.313702106476 0.0 0.0 0.0 +0.313695549965 0.0 0.0 0.0 +0.309907078743 0.0 0.0 0.0 +0.303677201271 0.0 0.0 0.0 +0.303755521774 0.0 0.0 0.0 +0.298617720604 0.300151228905 0.305032730103 0.222261071205 +0.300269067287 0.307095944881 0.310520708561 0.334079623222 +0.299365282059 0.308859944344 0.3140655756 0.206546425819 +0.297659695148 0.313073992729 0.312977910042 0.205650568008 +0.295832037926 0.313909769058 0.316672980785 0.220167160034 +0.294295430183 0.317943930626 0.316814184189 0.235247075558 +0.299781799316 0.327722132206 0.322982251644 0.25330221653 +0.299346446991 0.329695105553 0.315949618816 0.270462632179 +0.298833966255 0.335723042488 0.322663187981 0.277035415173 +0.282197535038 0.312091708183 0.29981648922 0.290602356195 +0.266897559166 0.29488492012 0.281922578812 0.287976682186 +0.243100464344 0.254806026816 0.253994017839 0.2734554708 +0.21707598865 0.239795938134 0.228419095278 0.252698421478 +0.190058454871 0.219910338521 0.20345287025 0.224818781018 +0.181739479303 0.227134808898 0.208064571023 0.186462596059 +0.163847438991 0.200050771236 0.219810828567 0.183414191008 +0.213806346059 0.208055794239 0.236130483449 0.191391244531 +0.193476460874 0.245208993554 0.260888233781 0.222874440253 +0.186673462391 0.557517752051 0.234215274453 0.257518604398 +0.16298109293 0.0 0.363205686212 0.175449728966 +0.0 0.0 0.0 0.185942292213 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 #84th percentile -0.141715884209 0.25665050745 0.256622612476 0.115036845207 -0.125445246696 0.244905233383 0.245018720627 0.124063968658 -0.104079842567 0.225601553917 0.225749731064 0.139580488205 -0.0910336971283 0.210311830044 0.210408985615 0.156419932842 -0.0850963592529 0.20709592104 0.20721668005 0.172197759151 -0.0800967812538 0.200599968433 0.200059711933 0.184459745884 -0.0764507651329 0.199061393738 0.198070168495 0.196552276611 -0.0772349834442 0.192124247551 0.190744638443 0.191526770592 -0.07602840662 0.185344159603 0.181826710701 0.174260437489 -0.0753737092018 0.182039141655 0.17802375555 0.159546911716 -0.0749614834785 0.168684601784 0.165265619755 0.153948545456 -0.072823703289 0.162966802716 0.161528632045 0.146229028702 -0.0709908604622 0.156383290887 0.15246988833 0.132821083069 -0.071963518858 0.145786896348 0.141631796956 0.123959600925 -0.0690051317215 0.135634824634 0.134242832661 0.11391800642 -0.0698344409466 0.120907336473 0.12434604764 0.105647578835 -0.0673742741346 0.116249650717 0.115242108703 0.0967286080122 -0.0672814249992 0.112084634602 0.112219274044 0.0890120267868 -0.0649963915348 0.102914430201 0.104323104024 0.082683712244 -0.0702140778303 0.0981751307845 0.102593496442 0.0785305351019 -0.0785910785198 0.104812294245 0.115569114685 0.0735663771629 -0.0881440639496 0.0725309252739 0.125883609056 0.0815324261785 -0.0723829567432 0.198777377605 0.140169501305 0.0880735367537 -0.0813459455967 0.116606354713 0.128197848797 0.0940327644348 -0.0886049866676 0.0542173162103 0.161550045013 0.103047728539 -0.0245960354805 0.0 0.0774702429771 0.286799132824 +0.319863200188 0.0 0.0 0.0 +0.3143004179 0.0 0.0 0.0 +0.30968362093 0.0 0.0 0.0 +0.302749633789 0.0 0.0 0.0 +0.296099126339 0.0 0.0 0.0 +0.297684311867 0.305547893047 0.302347302437 0.220802426338 +0.295225441456 0.309181153774 0.304603397846 0.279504418373 +0.296497285366 0.315183877945 0.308430850506 0.237417936325 +0.292503893375 0.319806098938 0.310724854469 0.167082190514 +0.293265998363 0.325830757618 0.309173047543 0.167267084122 +0.292276859283 0.332749307156 0.311818882823 0.172491252422 +0.290987610817 0.34142793715 0.309066131711 0.181225717068 +0.290946483612 0.351590290666 0.314170494676 0.197255134583 +0.293902561069 0.347721889615 0.307669833302 0.213080346584 +0.290621444583 0.339722245932 0.301659956574 0.229625359178 +0.274632230401 0.325483307242 0.292552575469 0.236676260829 +0.255964949727 0.304902382195 0.272124402225 0.255303010345 +0.235212922096 0.293441519141 0.248485639691 0.246233224869 +0.215117782354 0.267012804747 0.217012822628 0.231523960829 +0.201471671462 0.217134535313 0.201904982328 0.215933859348 +0.204844348133 0.213358193636 0.207427710295 0.219838276505 +0.219069048762 0.219177812338 0.263609051704 0.194618463516 +0.196794271469 0.176519751549 0.218333125114 0.189125835896 +0.132665544748 0.331871211529 0.282642632723 0.191382586956 +0.0927608013153 0.0 0.202518105507 0.239087432623 +0.0 0.0 0.0 0.055596113205 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 #all galaxies sample #jstar jmol jatom (median) jbar --1.11828780174 -1.00986278057 -1.00970077515 -1.12670755386 --1.07082974911 -0.939576208591 -0.939462304115 -1.07388114929 --1.02071034908 -0.877148151398 -0.877028226852 -1.01907968521 --0.980266332626 -0.825425863266 -0.825711667538 -0.964344501495 --0.94068723917 -0.779252231121 -0.779311716557 -0.911805868149 --0.894339442253 -0.725404679775 -0.725266456604 -0.869855642319 --0.843931436539 -0.673952758312 -0.672765433788 -0.855687260628 --0.790733218193 -0.620302438736 -0.617477059364 -0.844129323959 --0.73581391573 -0.564801037312 -0.560875892639 -0.795881032944 --0.678779423237 -0.511944413185 -0.505473077297 -0.730657756329 --0.621709108353 -0.451181173325 -0.444179058075 -0.66771531105 --0.562646508217 -0.398220777512 -0.389339148998 -0.597781300545 --0.505663275719 -0.341211527586 -0.331355988979 -0.52996134758 --0.448216974735 -0.276897370815 -0.270558834076 -0.461427718401 --0.387553215027 -0.219091787934 -0.210703149438 -0.394139945507 --0.330499947071 -0.157133832574 -0.150475308299 -0.328411012888 --0.271866232157 -0.0981509536505 -0.08735704422 -0.263504743576 --0.211641892791 -0.0331783443689 -0.0259119644761 -0.197480991483 --0.150758817792 0.0386741310358 0.0296817868948 -0.135257139802 --0.0779041796923 0.0983149707317 0.0666016712785 -0.066738396883 -0.00934235751629 0.126770317554 0.0357678979635 0.0102246031165 -0.0988797917962 0.168691307306 -0.146182045341 0.0936434417963 -0.190768167377 0.180007606745 -0.395951867104 0.184668377042 -0.306005269289 0.264754831791 -0.490027934313 0.290412008762 -0.432853162289 0.150319606066 -0.478398025036 0.416952520609 -0.553407907486 0.233392477036 -0.436808139086 0.5375623703 -0.68614757061 0.0 -0.323074787855 0.668307542801 -0.801660358906 0.0 -0.294211834669 0.795525431633 -0.893814206123 0.0 -0.1879440099 0.891752004623 -1.10293030739 0.0 -0.281866937876 1.10153031349 +-1.18098759651 0.0 0.0 0.0 +-1.13800930977 0.0 0.0 0.0 +-1.09195363522 0.0 0.0 0.0 +-1.05518484116 0.0 0.0 0.0 +-1.01429963112 0.0 0.0 0.0 +-0.962506592274 -0.823681592941 -0.809667229652 -1.27840447426 +-0.902233302593 -0.798227787018 -0.778110027313 -1.17774403095 +-0.845701694489 -0.761297285557 -0.729740262032 -1.19445419312 +-0.787731528282 -0.717719376087 -0.679234027863 -1.03981006145 +-0.72926068306 -0.674357056618 -0.621750295162 -0.894297122955 +-0.669965445995 -0.624336957932 -0.563164830208 -0.762979388237 +-0.611849665642 -0.573187232018 -0.508179545403 -0.653841555119 +-0.55506592989 -0.528639435768 -0.452457070351 -0.560151159763 +-0.498952507973 -0.469754070044 -0.392054706812 -0.481852412224 +-0.442689239979 -0.407021522522 -0.329795956612 -0.412871032953 +-0.384246438742 -0.334986269474 -0.275702893734 -0.346699655056 +-0.331731200218 -0.260902881622 -0.216504767537 -0.293193042278 +-0.265426486731 -0.138442620635 -0.152274921536 -0.231060758233 +-0.199995800853 -0.00707459449768 -0.112637579441 -0.17420271039 +-0.153734013438 0.103934288025 -0.108641460538 -0.128260478377 +-0.13469094038 0.117493644357 -0.121081739664 -0.0340406447649 +-0.216671720147 0.129825770855 -0.247424200177 0.0743636190891 +-0.372099041939 0.0548462867737 -0.419925689697 0.179707914591 +-0.532130479813 0.0642009750009 -0.511056125164 0.285112440586 +-0.489054501057 0.241144657135 -0.485476016998 0.401277661324 +-0.477714002132 -0.134038046002 -0.463486909866 0.537428438663 +-0.463324517012 0.0 -0.365834712982 0.665732502937 +-0.405205607414 0.0 -0.398030817509 0.768828511238 +-0.142678931355 1.73712444305 -0.139283806086 0.895043313503 +-0.329958438873 0.0 -0.236869141459 1.03255939484 #16th percentiles -0.106823205948 0.267906069756 0.267979741096 0.100511312485 -0.102008938789 0.258878409863 0.2589635849 0.102228760719 -0.0930607318878 0.248265743256 0.248619318008 0.107321619987 -0.083304643631 0.237363219261 0.237769186497 0.118084073067 -0.0845677256584 0.235042870045 0.235334336758 0.129028916359 -0.0862952470779 0.235697209835 0.235669493675 0.153119087219 -0.088127374649 0.236718118191 0.23637598753 0.183437108994 -0.0880588293076 0.239209294319 0.236770510674 0.170148491859 -0.0896477103233 0.238125562668 0.235661923885 0.15605700016 -0.0879638195038 0.23191088438 0.226306736469 0.152892887592 -0.0864611268044 0.225997209549 0.21835565567 0.149602174759 -0.0872581601143 0.219162225723 0.213431537151 0.145804822445 -0.0851594209671 0.207705110312 0.194512069225 0.137576460838 -0.0833587050438 0.193792402744 0.182640314102 0.127871900797 -0.0801084637642 0.180313274264 0.169082924724 0.117345750332 -0.0805220603943 0.177612051368 0.156588986516 0.108316868544 -0.0784278810024 0.152648046613 0.144449666142 0.101537466049 -0.0755269676447 0.141537845135 0.134341992438 0.0935322493315 -0.0751758217812 0.12430652976 0.149850636721 0.0911828279495 -0.0867223441601 0.15117546916 0.263130180538 0.0881519466639 -0.0986284911633 0.176664948463 0.652915284038 0.0900718644261 -0.114937074482 0.224881097674 0.67823047936 0.101783439517 -0.12175578624 0.193926095963 0.460400462151 0.115776509047 -0.115172162652 0.31005525589 0.370547741652 0.114412799478 -0.104311555624 0.882712513208 0.395409762859 0.112159222364 -0.097798705101 0.145341895521 0.405918806791 0.101847171783 -0.0938141942024 0.0 0.475117951632 0.0842143297195 -0.0618909597397 0.0 0.49774107337 0.0600956082344 -0.0389767289162 0.0 0.394250079989 0.042955160141 -0.133425176144 0.0 0.207332581282 0.133447051048 +0.315531373024 0.0 0.0 0.0 +0.315869212151 0.0 0.0 0.0 +0.311196565628 0.0 0.0 0.0 +0.30542576313 0.0 0.0 0.0 +0.304865837097 0.0 0.0 0.0 +0.299619853497 0.302638888359 0.305814862251 0.267425298691 +0.301429092884 0.308474421501 0.312874913216 0.331092357635 +0.299809813499 0.310280144215 0.316244244576 0.210185289383 +0.297826647758 0.314536273479 0.314669966698 0.2113956213 +0.296286702156 0.316117286682 0.318406403065 0.225002646446 +0.295662462711 0.320239067078 0.321278572083 0.238821864128 +0.301270484924 0.330964922905 0.324303627014 0.255835235119 +0.302236974239 0.33421766758 0.320007503033 0.272798001766 +0.304054915905 0.341365009546 0.327599972486 0.279795527458 +0.296437323093 0.327686190605 0.317082703114 0.293311566114 +0.296614915133 0.317238152027 0.316663324833 0.295615017414 +0.28069716692 0.281610488892 0.315018579364 0.297360956669 +0.257519036531 0.26596082747 0.32163874805 0.286630854011 +0.258831754327 0.281364917755 0.328762471676 0.260546833277 +0.304803922772 0.311633065343 0.355503425002 0.208812609315 +0.492975890636 0.397553697228 0.532358974218 0.174605488777 +0.61709831655 0.500744462013 0.551724120975 0.163465961814 +0.495859026909 0.497485935688 0.417637825012 0.164881199598 +0.323175907135 0.650861717761 0.335022270679 0.141917586327 +0.37267011404 0.481502071023 0.360499620438 0.128208726645 +0.394020855427 0.168329998851 0.384467840195 0.114987313747 +0.327358335257 0.0 0.404166102409 0.121854782104 +0.375537574291 0.0 0.372357964516 0.0613858699799 +0.239272639155 0.0 0.202984064817 0.0616199970245 +0.229019284248 0.0 0.371109798551 0.0357887148857 #84th percentiles -0.142520189285 0.25779658556 0.257859826088 0.115509033203 -0.126416802406 0.245784580708 0.246143937111 0.124587416649 -0.105141878128 0.22640311718 0.226683199406 0.140730857849 -0.0922515392303 0.211198151112 0.211743474007 0.157112956047 -0.0864052176476 0.208177030087 0.208509027958 0.173658490181 -0.0818837285042 0.201324999332 0.201241314411 0.185410141945 -0.0785022377968 0.200663149357 0.199777603149 0.196410655975 -0.079113483429 0.194259643555 0.193076848984 0.192176401615 -0.0783076882362 0.18701082468 0.184116661549 0.175212264061 -0.0772665143013 0.183703422546 0.179836332798 0.160724699497 -0.0770303010941 0.169987559319 0.167528092861 0.155725955963 -0.0746316313744 0.164216592908 0.163432106376 0.147693037987 -0.0730156302452 0.157263234258 0.15440748632 0.134701430798 -0.073706805706 0.146843537688 0.143310204148 0.125939041376 -0.0711166262627 0.13662275672 0.136034265161 0.115902483463 -0.0724342465401 0.121816143394 0.128456294537 0.10738261044 -0.0710430592299 0.116752445698 0.118476003408 0.0985297709703 -0.0725125968456 0.112361766398 0.116242550313 0.0911773145199 -0.0744754374027 0.10827229917 0.115678265691 0.0861525982618 -0.0888183861971 0.106797024608 0.133406065404 0.0868269652128 -0.112454593182 0.141694843769 0.209244355559 0.0895403325558 -0.122144900262 0.153294533491 0.402614817023 0.106707885861 -0.117303982377 0.162496328354 0.616343051195 0.112092778087 -0.113886207342 0.176645636559 0.656409069896 0.11733520031 -0.112082540989 0.677818924189 0.536183185875 0.113010853529 -0.100696802139 0.145341902971 0.499519795179 0.113956511021 -0.0966890454292 0.0 0.446989536285 0.102415204048 -0.0760651826859 0.0 0.55502769351 0.077236533165 -0.12176656723 0.0 0.277276828885 0.129963159561 -0.0267947912216 0.0 0.121510758996 0.0257742404938 +0.321520447731 0.0 0.0 0.0 +0.3162342906 0.0 0.0 0.0 +0.311422348022 0.0 0.0 0.0 +0.303857803345 0.0 0.0 0.0 +0.298149466515 0.0 0.0 0.0 +0.298754036427 0.306695580482 0.30507427454 0.242092847824 +0.295867145061 0.310128927231 0.306316375732 0.294084191322 +0.297184109688 0.317018270493 0.309821486473 0.238986253738 +0.294135928154 0.322021186352 0.312650382519 0.168892383575 +0.295186281204 0.329643368721 0.311848819256 0.169941306114 +0.294094622135 0.33427041769 0.313237026334 0.17522251606 +0.292589187622 0.342748329043 0.311625018716 0.184372127056 +0.295008122921 0.35463924706 0.317508086562 0.199076116085 +0.297475770116 0.351470515132 0.313665315509 0.215348303318 +0.297968432307 0.350003302097 0.30955837667 0.233350113034 +0.288300260901 0.335876226425 0.307915747166 0.241684570909 +0.284742414951 0.320722691715 0.297921292484 0.264722794294 +0.277825623751 0.30503860116 0.297256335616 0.267219528556 +0.243748649955 0.27679502964 0.281215310097 0.260241121054 +0.236530035734 0.238535583019 0.291316494346 0.234244503081 +0.286905914545 0.279430374503 0.347804278135 0.212165534496 +0.389836385846 0.344521284103 0.463923811913 0.200723230839 +0.559075325727 0.362476587296 0.587233200669 0.189844459295 +0.668148398399 0.403979621828 0.595828548074 0.181198000908 +0.702079474926 0.198991239071 0.60367384553 0.146800637245 +0.563133105636 1.11969275773 0.572013646364 0.105722427368 +0.507939487696 0.0 0.437996216118 0.117994487286 +0.511082947254 0.0 0.571006223559 0.116727948189 +0.268330797553 0.0 0.249740220606 0.191212594509 +0.245693460107 0.0 0.45528934896 0.0516428947449 diff --git a/data/Models/SharkVariations/Global_OtherModels.dat b/data/Models/SharkVariations/Global_OtherModels.dat index c87f75d5..c502376b 100644 --- a/data/Models/SharkVariations/Global_OtherModels.dat +++ b/data/Models/SharkVariations/Global_OtherModels.dat @@ -1,547 +1,547 @@ #boost_burst=3 #redsshift OmegaHI H2_Density SFR_density SM_density -17.0902 -11.3479214003 1.05484045537 -8.10433143062 -1.63988272097 -16.7999 -11.1125468218 1.32721829373 -7.64336383938 -1.04199283443 -16.514299 -10.9666064196 1.49732327084 -7.43606524692 -0.692845594476 -16.233299 -10.8703668645 1.59837457536 -7.30601772908 -0.446458183713 -15.9568 -10.7657529581 1.70901948261 -7.1997626452 -0.251509797319 -15.6847 -10.5914534316 1.86354466691 -7.06394942137 -0.0734981925735 -15.417 -10.4245094336 2.04265081637 -6.89403972094 0.105313678269 -15.1536 -10.0858163664 2.27118442124 -6.40485508815 0.420557686545 -14.8944 -9.84920932604 2.48341957131 -6.29834439544 0.644780618889 -14.6394 -9.5369051752 2.69284232203 -6.15721668624 0.841156634043 -14.3885 -9.39252064762 2.89519721336 -5.99830011641 1.02792354156 -14.1416 -9.20609888567 3.08262834851 -5.82700929099 1.21298349816 -13.8986 -9.019280796 3.24441984848 -5.59758603164 1.41792711921 -13.6596 -8.8453389821 3.39915876759 -5.44523672386 1.60745606349 -13.4243 -8.70926351752 3.54989486096 -5.3228390431 1.777881352 -13.1929 -8.56986115976 3.70335830197 -5.18926817345 1.93986350833 -12.9652 -8.40481269402 3.84899489487 -5.05178441354 2.09755139134 -12.7411 -8.24250834203 3.99505946391 -4.87564448411 2.26430280483 -12.5206 -8.11920909206 4.13027729985 -4.73161446251 2.42720159471 -12.3037 -7.98672165535 4.26180626952 -4.61239300983 2.57996438164 -12.0902 -7.84819958641 4.38957980253 -4.45997600799 2.73582064877 -11.8802 -7.72762899057 4.51255781501 -4.33947704715 2.88429351131 -11.6735 -7.58533916119 4.63278165699 -4.2251555191 3.02609743143 -11.4702 -7.47002202808 4.74841634445 -4.096679642 3.16707296107 -11.2701 -7.34611505861 4.85470103822 -3.97450833286 3.3058058004 -11.0732 -7.23585674015 4.9611832301 -3.86981193651 3.43824138436 -10.8795 -7.13191230242 5.06180325137 -3.77190606314 3.56447199177 -10.6889 -7.02367303684 5.16020475954 -3.66897863158 3.68751861078 -10.5013 -6.9195348354 5.25398139243 -3.57467416663 3.80617326042 -10.3168 -6.82498077927 5.34369299164 -3.48109245296 3.92134413851 -10.1352 -6.72712049554 5.42904004981 -3.38432642988 4.03472425572 -9.9565496 -6.63574812339 5.51103194855 -3.29634917744 4.14471002326 -9.7807503 -6.54586280703 5.58907385959 -3.21224784365 4.25131383144 -9.6077805 -6.45324895761 5.66436184156 -3.13342368059 4.35421366568 -9.4375696 -6.36745132637 5.73643615531 -3.05795330205 4.45360820332 -9.2700996 -6.2833019201 5.80553733135 -2.98520969201 4.54974620279 -9.10532 -6.20355457497 5.87197266062 -2.91687385231 4.64250414273 -8.9431696 -6.12462054382 5.93567961636 -2.85106252196 4.73215697866 -8.7836304 -6.04862721454 5.99604233125 -2.78562226657 4.8192833837 -8.6266499 -5.97489657199 6.05413290624 -2.72440645746 4.90365088418 -8.4721899 -5.90320330142 6.11016356818 -2.66429764788 4.98562198184 -8.3202105 -5.83444681108 6.16362253992 -2.60792776796 5.06503374904 -8.1706696 -5.76456007185 6.21484475246 -2.55383355879 5.14200476717 -8.0235205 -5.69824832845 6.26321643514 -2.5009458211 5.21680400128 -7.8787398 -5.63402382192 6.30959514363 -2.45260447746 5.28911381213 -7.73628 -5.5716652546 6.35423428006 -2.40498031897 5.35927960014 -7.5960999 -5.50943434496 6.39661354341 -2.36092705577 5.42715472285 -7.45818 -5.45238947666 6.43742715226 -2.31578149075 5.49327669425 -7.3224602 -5.39433145402 6.47628610462 -2.27351142318 5.5575433977 -7.18893 -5.3375629841 6.51382899627 -2.2359637409 5.61960916892 -7.0575399 -5.28373501029 6.5501843607 -2.19798208997 5.67989049041 -6.9282498 -5.24239691338 6.57575629871 -2.17136233187 5.73724129967 -6.8010402 -5.1867165356 6.60951092201 -2.11917406139 5.79525261418 -6.6758699 -5.13182482457 6.64257536352 -2.08998910931 5.85101332481 -6.5527101 -5.08107573684 6.67491085944 -2.06106157701 5.90483599385 -6.43153 -5.03261003951 6.70588628178 -2.03119797361 5.95710802749 -6.3122902 -4.98469048193 6.73486835167 -1.99981140479 6.00821386633 -6.1949601 -4.93911262157 6.76267727939 -1.96795424734 6.05835621905 -6.0795202 -4.89445000456 6.78874915383 -1.94134202317 6.10709097605 -5.96593 -4.85245002754 6.81439641296 -1.91540459387 6.15453470878 -5.8541598 -4.81028400729 6.83867351835 -1.88943604635 6.20085344648 -5.7441802 -4.77028798631 6.86187674462 -1.86250246358 6.24627957046 -5.6359701 -4.73051291636 6.88421736012 -1.83829719262 6.29064714947 -5.5295 -4.69239193348 6.90579477828 -1.81534946865 6.33395990253 -5.4247298 -4.65486107459 6.92649086273 -1.79185998733 6.37639564371 -5.32164 -4.61836888541 6.94676414912 -1.77090333995 6.41781725612 -5.2202101 -4.5826651041 6.96620936914 -1.74841782764 6.45847083776 -5.12041 -4.54828466406 6.98525635395 -1.72799058142 6.49825804385 -5.0222001 -4.51432943792 7.00349940629 -1.70906662896 6.53714664624 -4.92558 -4.48187548078 7.0211200958 -1.68876690496 6.57533698018 -4.8305001 -4.45023110671 7.0382576828 -1.67099870867 6.61269869594 -4.7369499 -4.41979088643 7.05468513096 -1.65395686997 6.64925142927 -4.6448998 -4.3901930046 7.07016045864 -1.6372679071 6.68504930578 -4.5543299 -4.36139966058 7.08534791198 -1.62118303645 6.72011793902 -4.46521 -4.33385224305 7.09983751629 -1.60325745857 6.75466793957 -4.3775201 -4.30651357149 7.11391975015 -1.59035419188 6.78836816176 -4.2912302 -4.28016780288 7.1277358607 -1.57541257426 6.82145071225 -4.2063298 -4.25403080144 7.14108998002 -1.56201273602 6.85385653332 -4.1227999 -4.2290265248 7.1540025791 -1.54673005095 6.88577789692 -4.0405998 -4.20443170518 7.16661894301 -1.53138383306 6.91726654528 -3.9597199 -4.18065122099 7.17902412005 -1.51883681233 6.9481598454 -3.8801501 -4.1608966604 7.18729299492 -1.51186512417 6.97812975178 -3.8018401 -4.1429300001 7.19549288037 -1.49460830602 7.00794802921 -3.7248001 -4.12446414808 7.20325756177 -1.47938190673 7.03748060999 -3.6489899 -4.10762097315 7.20817932973 -1.4705602386 7.06633994932 -3.5743899 -4.10101538859 7.20331800295 -1.47391024153 7.093825435 -3.5009999 -4.08975473859 7.2025741477 -1.47005163215 7.12050086017 -3.4287801 -4.07401753248 7.2072533731 -1.46660285691 7.14641898775 -3.3577199 -4.05397605931 7.21411998443 -1.45973035067 7.17183278446 -3.2878001 -4.03638193478 7.21655623409 -1.46589896218 7.19606321534 -3.2190001 -4.01907640246 7.22103844971 -1.46137041639 7.21978582792 -3.1513 -3.99733600286 7.22960695607 -1.45145002868 7.24332062412 -3.0847001 -3.97458471049 7.2372331662 -1.45183861765 7.26614066609 -3.01916 -3.9538005571 7.24511825443 -1.45092094947 7.28836964267 -2.95467 -3.93478618052 7.25222818639 -1.44642031299 7.31022836777 -2.8912201 -3.91658948643 7.25940734366 -1.43974068493 7.33184070901 -2.8287799 -3.89849988286 7.26554221489 -1.43614560967 7.35307732433 -2.76735 -3.88126745505 7.27186659039 -1.43106452567 7.3740254577 -2.7068999 -3.86485799114 7.27869588597 -1.42405940025 7.39479684337 -2.6474199 -3.84875488171 7.28424503278 -1.418793424 7.41531719803 -2.5889001 -3.83265114576 7.2899537422 -1.41373642836 7.43558744721 -2.5313101 -3.81735367407 7.29436913919 -1.40847205369 7.45563788985 -2.4746499 -3.80265059998 7.29902514691 -1.40554283807 7.47536856537 -2.4189 -3.78758574222 7.30269129152 -1.40233724946 7.49481150955 -2.3640499 -3.77368470796 7.30719103592 -1.3983495755 7.51401363046 -2.31007 -3.76026743701 7.31035274858 -1.39452061331 7.53298659337 -2.2569599 -3.74702790177 7.31311268892 -1.39376328271 7.55160874295 -2.2047 -3.73427083827 7.31705020779 -1.39126167128 7.56997042046 -2.15328 -3.7210179622 7.3192466714 -1.39062632408 7.58801087042 -2.10269 -3.70818799228 7.32104525077 -1.38952409852 7.60576224756 -2.0529001 -3.69603049142 7.32355211712 -1.38753731384 7.62328102614 -2.0039201 -3.68407620123 7.32594597953 -1.38913192857 7.64043044875 -1.9557199 -3.67268813355 7.32915844194 -1.386148388 7.65741209825 -1.90829 -3.66163623824 7.33072176018 -1.38210924751 7.67427103057 -1.86163 -3.65100661272 7.33093000216 -1.38471128084 7.69075769361 -1.81572 -3.64087208059 7.33109136341 -1.3868559045 7.70691173204 -1.77054 -3.63061501336 7.33113933844 -1.38766029199 7.72280151179 -1.7260799 -3.62046145216 7.33014159583 -1.39119515555 7.73834231805 -1.68234 -3.61036870825 7.33083835209 -1.39290405469 7.75360968371 -1.6393 -3.6011009337 7.33101166098 -1.39185961129 7.76871460853 -1.5969599 -3.59195510944 7.32889967131 -1.39458343779 7.78352933794 -1.55529 -3.58311323067 7.33009492244 -1.39735199103 7.79807484636 -1.51429 -3.57499119634 7.33042259598 -1.39860482218 7.81240757636 -1.47395 -3.5663914133 7.32728242272 -1.4022485588 7.82645862079 -1.43425 -3.55786292328 7.32640195568 -1.40566367057 7.84025155277 -1.39519 -3.54989887385 7.32411430554 -1.40913335332 7.85379285576 -1.35676 -3.5425155473 7.32278796836 -1.41124768436 7.86713152903 -1.3189501 -3.53459762198 7.32056240652 -1.41495493983 7.88022855712 -1.28174 -3.52726710534 7.31802173411 -1.4174443287 7.8931321161 -1.2451299 -3.52022048685 7.31442167843 -1.42305673148 7.9057566004 -1.20911 -3.51310743259 7.31157970209 -1.43176390254 7.91802659656 -1.17366 -3.50640949309 7.30966689447 -1.43717471093 7.9300521412 -1.13878 -3.49927574322 7.30750499423 -1.43950923502 7.94192381281 -1.10447 -3.49280744292 7.30286509501 -1.44692838511 7.95350704678 -1.0707 -3.48807496219 7.29668712882 -1.45510950122 7.96480152105 -1.03747 -3.48344354372 7.29269224113 -1.46242311962 7.97584090773 -1.0047801 -3.47806603313 7.28866903695 -1.46757904755 7.98668272536 -0.97261602 -3.47434311266 7.28554890465 -1.47353455983 7.99731563564 -0.940965 -3.47042246328 7.28024113336 -1.47890922176 8.00776275526 -0.90982199 -3.46678082301 7.27464820735 -1.48778036379 8.01794596635 -0.879179 -3.46210801611 7.26985807006 -1.49552842706 8.02790103998 -0.84902698 -3.45842008055 7.26328009687 -1.5006704962 8.03769458312 -0.819359 -3.45506973236 7.25701920163 -1.50583962835 8.0473295875 -0.79016799 -3.45218565971 7.24994539273 -1.51385737811 8.05674959173 -0.76144397 -3.44820622889 7.2439959223 -1.5223565837 8.06595055657 -0.733181 -3.44513349528 7.23664538073 -1.5324723529 8.07490761083 -0.70537198 -3.44240505731 7.23061680925 -1.54053364077 8.08366946289 -0.67800897 -3.43935580237 7.22453169021 -1.54698025448 8.09227527096 -0.65108502 -3.43633910196 7.21974581577 -1.5505749953 8.10078338792 -0.62459397 -3.43396957598 7.21338954536 -1.55433135636 8.10919102715 -0.59852701 -3.43160773458 7.20779099384 -1.56226062362 8.11742062114 -0.572878 -3.42983654444 7.20015108577 -1.5705003032 8.1254713977 -0.54764098 -3.42703664055 7.19277065245 -1.58067681458 8.13331441589 -0.52280903 -3.42491652393 7.18651458373 -1.58845760714 8.1409971939 -0.498375 -3.42226085898 7.1800410326 -1.59482214933 8.14854899012 -0.474334 -3.41982263444 7.17258665134 -1.60558258419 8.15589768479 -0.45067799 -3.41750098603 7.16774274994 -1.61236325681 8.16311496711 -0.42740101 -3.41539909899 7.160528764 -1.6178311312 8.1702243753 -0.40449899 -3.41359738641 7.1548862632 -1.62540665271 8.17719527977 -0.38196301 -3.41190323228 7.1487422367 -1.63277835646 8.18403167188 -0.35978901 -3.41050801197 7.14270070444 -1.63695101843 8.19078702007 -0.337971 -3.40862885246 7.13595619514 -1.64405426409 8.19741526128 -0.31650299 -3.4070033252 7.12906968313 -1.65394602467 8.20387862278 -0.29538 -3.40503065968 7.12313761727 -1.6588853092 8.21025362371 -0.27459499 -3.40378467787 7.11780969699 -1.66662619 8.21650071673 -0.25414401 -3.40217647096 7.11178249149 -1.67206027037 8.22265397265 -0.23402099 -3.40069213281 7.10517370085 -1.67928731053 8.22869127754 -0.214221 -3.39904793289 7.09897139467 -1.68722387483 8.23460285937 -0.194739 -3.39815114854 7.09429757674 -1.69524590878 8.2403916958 -0.175569 -3.39642764878 7.08986795536 -1.69988492807 8.24610457106 -0.156707 -3.39495415154 7.08519610147 -1.70300219505 8.25175924939 -0.13814799 -3.39454193569 7.07965053672 -1.70429941591 8.25738116963 -0.119886 -3.3929936243 7.07508940846 -1.71309176626 8.26287386957 -0.101917 -3.39183837339 7.07051547426 -1.71893477701 8.26827527363 -0.084236696 -3.39079287249 7.06801251031 -1.71687168789 8.27368560216 -0.06684 -3.3898173491 7.06179453931 -1.7240851747 8.27898829187 -0.0497224 -3.38874479357 7.05531770755 -1.73194347345 8.28417776184 -0.032879502 -3.38699954181 7.04946436437 -1.73748700178 8.28928320944 -0.016306801 -3.38630834569 7.04475186241 -1.74300605129 8.29430669085 -1.72e-08 -3.3849466311 7.03788363988 -1.74806518398 8.29925406783 +17.0902 -11.8218301661 0.570430482988 -8.58991879581 -2.12545504057 +16.7999 -11.5738111531 0.842089361317 -8.12763661689 -1.52678821871 +16.514299 -11.2820769341 1.1251962666 -7.85114703754 -1.13778557802 +16.233299 -10.9960477771 1.41429008584 -7.56324599623 -0.800048378294 +15.9568 -10.4769950192 1.7326001644 -7.25572722927 -0.472885254869 +15.6847 -10.3136490485 1.97805930951 -6.98464418169 -0.169099432206 +15.417 -10.1735817283 2.16420821376 -6.77480743901 0.0945755888622 +15.1536 -9.83689842754 2.38652819471 -6.56962100212 0.337280324646 +14.8944 -9.67094834315 2.5968336137 -6.35401966708 0.572749897412 +14.6394 -9.45532395836 2.77476848194 -6.11330851879 0.814989306217 +14.3885 -9.32096309056 2.95408196209 -5.95391330552 1.02781720962 +14.1416 -9.12767975571 3.13539898228 -5.78324541362 1.22851040287 +13.8986 -8.96909308614 3.30265279512 -5.5961693005 1.42817226759 +13.6596 -8.81696851193 3.45732735718 -5.44110422232 1.6156487515 +13.4243 -8.66070458644 3.60397609335 -5.29165998802 1.79356805819 +13.1929 -8.51110988314 3.75221792277 -5.13140606472 1.96921264104 +12.9652 -8.3769583175 3.8977027546 -4.98445738157 2.13884416607 +12.7411 -8.21827760524 4.0405722487 -4.8359938123 2.30497659725 +12.5206 -8.08458677618 4.17257413681 -4.68857457761 2.4686352337 +12.3037 -7.95481073513 4.30421825268 -4.56022128381 2.62462695523 +12.0902 -7.81861436436 4.42861841054 -4.42756177081 2.77682947139 +11.8802 -7.69961813422 4.54816914866 -4.30153913617 2.92446386086 +11.6735 -7.57458423467 4.66277506621 -4.18280794549 3.06685113059 +11.4702 -7.44764660126 4.77344404378 -4.06203400464 3.20610747868 +11.2701 -7.33739776994 4.87837566606 -3.951149633 3.34063155594 +11.0732 -7.22378223913 4.97997211534 -3.84074686695 3.47154738086 +10.8795 -7.11684584983 5.07834472804 -3.74038428667 3.59736551348 +10.6889 -7.01335163263 5.17318708035 -3.64425866784 3.71836189052 +10.5013 -6.90992438357 5.26447783702 -3.54930378279 3.83568144617 +10.3168 -6.8151426624 5.35237996514 -3.45889714641 3.94919413981 +10.1352 -6.71553284298 5.43690379956 -3.36987513197 4.05952509709 +9.9565496 -6.62033346985 5.51843500694 -3.28630291316 4.16629814661 +9.7807503 -6.53300330049 5.59694953234 -3.2061515471 4.2695571813 +9.6077805 -6.44641543838 5.67212831643 -3.12585086874 4.37019746801 +9.4375696 -6.36250638369 5.74398484073 -3.05160030679 4.46767842513 +9.2700996 -6.27927806883 5.8126104192 -2.97918443053 4.56221467603 +9.10532 -6.20031261793 5.8783934186 -2.91033724047 4.65385166113 +8.9431696 -6.12131091299 5.94150458758 -2.84374000241 4.74276817283 +8.7836304 -6.04451253654 6.00207044154 -2.77904368902 4.82916421741 +8.6266499 -5.97158231007 6.06018965794 -2.71699172534 4.91306333006 +8.4721899 -5.89964523462 6.1158728055 -2.65846613857 4.99442448091 +8.3202105 -5.8298131177 6.16889237193 -2.60201703084 5.07337461012 +8.1706696 -5.76065006393 6.21971255319 -2.54744207025 5.15000689931 +8.0235205 -5.69423940141 6.26825407736 -2.49578362348 5.22434970699 +7.8787398 -5.6305795036 6.31475289563 -2.44668530725 5.29644359119 +7.73628 -5.5678892328 6.35933043731 -2.40016134397 5.36621490742 +7.5960999 -5.50736987418 6.40187969778 -2.35346219581 5.43417905774 +7.45818 -5.44811502987 6.44252027321 -2.30920698775 5.50024030799 +7.3224602 -5.38947865184 6.48154120721 -2.26858298488 5.56422641816 +7.18893 -5.33394405624 6.51886417783 -2.22987780541 5.62620395391 +7.0575399 -5.27911378218 6.55445994805 -2.19082352689 5.68655048142 +6.9282498 -5.2259832972 6.58896210461 -2.15434736649 5.74519899549 +6.8010402 -5.1733493166 6.62184173196 -2.12000414471 5.80212638613 +6.6758699 -5.12313969563 6.65363408518 -2.08525537826 5.85762086706 +6.5527101 -5.07380437783 6.68401089282 -2.05231006503 5.91170805391 +6.43153 -5.02578578529 6.71328623505 -2.02011880088 5.9644593032 +6.3122902 -4.9795322068 6.74139365566 -1.99004028222 6.01582859201 +6.1949601 -4.9340674748 6.76819673482 -1.96072221222 6.06592699641 +6.0795202 -4.89003258388 6.79397767255 -1.93348072124 6.11470605146 +5.96593 -4.84752245098 6.81884996134 -1.90673477164 6.16225274639 +5.8541598 -4.80582170749 6.8428129999 -1.88068315051 6.20867715133 +5.7441802 -4.76530899989 6.86551065514 -1.85643756631 6.25392524054 +5.6359701 -4.72586388339 6.88782524644 -1.83263048501 6.2981029686 +5.5295 -4.68769898933 6.90927813054 -1.80944851266 6.34126527931 +5.4247298 -4.65085496131 6.93023672192 -1.7869210149 6.38348972724 +5.32164 -4.614428302 6.9501523227 -1.76436522992 6.42485693511 +5.2202101 -4.57954363838 6.96959677499 -1.74395370857 6.4652738826 +5.12041 -4.54532468809 6.98842742028 -1.72322244017 6.50489059904 +5.0222001 -4.51194919958 7.00665388953 -1.70419531134 6.54362146455 +4.92558 -4.47949865218 7.02417016558 -1.68540254502 6.58155656868 +4.8305001 -4.4479479507 7.04108871459 -1.66728644653 6.61871218062 +4.7369499 -4.41714450241 7.0570609907 -1.64965086837 6.65513009746 +4.6448998 -4.38734326789 7.07311627413 -1.63306687048 6.6907907516 +4.5543299 -4.35835041737 7.08842176983 -1.61659424677 6.72577316217 +4.46521 -4.33021896078 7.10288555212 -1.60022797155 6.76012461777 +4.3775201 -4.3028601773 7.11699801239 -1.58538205017 6.79378054332 +4.2912302 -4.2761965481 7.13081489709 -1.57096412008 6.82679657856 +4.2063298 -4.25004747433 7.14417241022 -1.55648225857 6.85921647186 +4.1227999 -4.22453702905 7.15677257229 -1.54242021515 6.89106477875 +4.0405998 -4.20001237595 7.16897421074 -1.53030333141 6.92225742203 +3.9597199 -4.17601190434 7.1806147247 -1.51707825052 6.95292750177 +3.8801501 -4.15293432735 7.19139853376 -1.50568615211 6.98299699904 +3.8018401 -4.13043586832 7.20173985494 -1.49496372819 7.01246454029 +3.7248001 -4.10867548849 7.2115348609 -1.48436260399 7.04138157745 +3.6489899 -4.08710412774 7.22073544139 -1.4753467189 7.06969308824 +3.5743899 -4.0663055052 7.22950810407 -1.46730912475 7.09737183721 +3.5009999 -4.04559676484 7.23817521765 -1.45918236681 7.12449115823 +3.4287801 -4.02605760705 7.24646395572 -1.45087789515 7.15109765241 +3.3577199 -4.00716314448 7.25434078334 -1.44088978961 7.17732892791 +3.2878001 -3.98869921773 7.26172942614 -1.43184667978 7.20315782285 +3.2190001 -3.97056083253 7.26909607543 -1.42276779076 7.22861279202 +3.1513 -3.950594125 7.27623787877 -1.42114899513 7.25330522458 +3.0847001 -3.93263495975 7.28281424963 -1.41496299638 7.27754427069 +3.01916 -3.91526476354 7.28910948046 -1.40810616257 7.30139542691 +2.95467 -3.89813616521 7.29483478001 -1.40279329401 7.32481101285 +2.8912201 -3.88124377566 7.30044398583 -1.39847773114 7.3477556671 +2.8287799 -3.8653286585 7.30628916737 -1.39261782976 7.37035064464 +2.76735 -3.84944126856 7.31150096948 -1.38666313469 7.39261607816 +2.7068999 -3.83418087378 7.31635802421 -1.38163862802 7.4145271265 +2.6474199 -3.81940833288 7.32068956392 -1.37828845454 7.43602753941 +2.5889001 -3.80485401353 7.32469032786 -1.37484685427 7.45714668792 +2.5313101 -3.79071746136 7.32870214583 -1.37119385953 7.47791695274 +2.4746499 -3.77676959581 7.33205657427 -1.3680065697 7.49833737828 +2.4189 -3.76342254272 7.33504572622 -1.36510264992 7.51841504962 +2.3640499 -3.7503168007 7.33781803375 -1.3626922914 7.53814574056 +2.31007 -3.73754038141 7.34007365805 -1.36103092121 7.55752449383 +2.2569599 -3.72507033059 7.34181944159 -1.35998164488 7.57653616103 +2.2047 -3.71298853842 7.34384115304 -1.35906210292 7.59520267911 +2.15328 -3.70113787977 7.34495202514 -1.35852518791 7.61352242759 +2.10269 -3.68922222826 7.34638195166 -1.35901638998 7.63147574546 +2.0529001 -3.67784144703 7.34699298321 -1.3591819573 7.64909819492 +2.0039201 -3.66704745984 7.34786444721 -1.36046568308 7.66636178459 +1.9557199 -3.65653171789 7.34839243412 -1.35998712482 7.68334943347 +1.90829 -3.6459306808 7.34849808297 -1.36135001057 7.70001066797 +1.86163 -3.63582694689 7.34789165835 -1.36437932102 7.71629902474 +1.81572 -3.62579919101 7.34764003502 -1.36690202636 7.73225344337 +1.77054 -3.61626146278 7.34728612863 -1.36922807051 7.74789539415 +1.7260799 -3.60686104565 7.34658895298 -1.3715352981 7.7632431766 +1.68234 -3.59768512345 7.3459110325 -1.37149297856 7.7783886651 +1.6393 -3.58860665372 7.34467369269 -1.37516426871 7.79322009968 +1.5969599 -3.58017547635 7.3441690211 -1.37657410487 7.80782113133 +1.55529 -3.57166169992 7.34316033035 -1.38029784867 7.82212890823 +1.51429 -3.56343916596 7.34140601659 -1.38404969097 7.83615751002 +1.47395 -3.55547479679 7.33980933912 -1.38619637694 7.84996730484 +1.43425 -3.54770376819 7.33658040778 -1.39097850422 7.86348447141 +1.39519 -3.54018341841 7.33398171402 -1.39509300169 7.8767452271 +1.35676 -3.5329178956 7.33244179739 -1.39974128166 7.88974282149 +1.3189501 -3.52565932573 7.32960975001 -1.40347718448 7.90251479758 +1.28174 -3.51872116064 7.32587226385 -1.40928534458 7.91501113551 +1.2451299 -3.51194304421 7.32213377643 -1.41703603455 7.92718900677 +1.20911 -3.50518416331 7.31887915191 -1.4236657819 7.93909362439 +1.17366 -3.49860575597 7.31630031566 -1.42758759535 7.95080913181 +1.13878 -3.49234973483 7.31186900194 -1.43402374592 7.96227471178 +1.10447 -3.48626899046 7.30816211458 -1.44146889954 7.97347395923 +1.0707 -3.48159998626 7.30401796447 -1.44725761835 7.98446168799 +1.03747 -3.47728886235 7.29958951893 -1.45219154667 7.99526469039 +1.0047801 -3.47200823976 7.29568872575 -1.45780013104 8.00587025187 +0.97261602 -3.46803775953 7.28993037961 -1.46526813755 8.01624276015 +0.940965 -3.46433020985 7.28428656719 -1.47250453577 8.02639712683 +0.90982199 -3.46078316291 7.27960344634 -1.48022312193 8.03632618028 +0.879179 -3.45624491674 7.27487857526 -1.48449126199 8.04611574168 +0.84902698 -3.45304560065 7.26825141209 -1.49117060445 8.05571689054 +0.819359 -3.45020856395 7.26240011576 -1.49829360851 8.06512490376 +0.79016799 -3.44703060829 7.25520117083 -1.50657697666 8.07432197242 +0.76144397 -3.44308094096 7.24957959456 -1.51626137017 8.08328460086 +0.733181 -3.44037293271 7.24368424507 -1.52223625841 8.09209756467 +0.70537198 -3.43778116197 7.23597992108 -1.527681299 8.10077320412 +0.67800897 -3.43526302362 7.23012455581 -1.53481470549 8.10928206025 +0.65108502 -3.43264752308 7.22363085299 -1.54181708062 8.11763169258 +0.62459397 -3.43015600902 7.21711839853 -1.55032388047 8.12579741823 +0.59852701 -3.42793825825 7.21062871719 -1.55839432338 8.13379069615 +0.572878 -3.42574525133 7.20431030038 -1.56628844297 8.14162173716 +0.54764098 -3.42352357718 7.19699087606 -1.57362481492 8.14930431645 +0.52280903 -3.42151253575 7.19046287618 -1.58114046523 8.15683649057 +0.498375 -3.41912569096 7.18339125323 -1.58947673039 8.16421001958 +0.474334 -3.41716672246 7.17704811331 -1.59799585269 8.17142411603 +0.45067799 -3.41487619602 7.16984306974 -1.60506673008 8.1785064808 +0.42740101 -3.41297271882 7.16241344045 -1.61247690759 8.1854558668 +0.40449899 -3.411656939 7.15726221804 -1.6185113439 8.19229430688 +0.38196301 -3.40990605145 7.1514557113 -1.6239979591 8.19903274603 +0.35978901 -3.40879238949 7.14505980572 -1.63026101407 8.20566063041 +0.337971 -3.40756620843 7.13883830496 -1.63872967474 8.21214612171 +0.31650299 -3.40609333843 7.13164943164 -1.64565936529 8.21851543772 +0.29538 -3.40477109032 7.12548189609 -1.6534029663 8.22475809342 +0.27459499 -3.40336246708 7.11805508997 -1.66059036512 8.2308856758 +0.25414401 -3.40220089183 7.10972632321 -1.67115964408 8.23685214453 +0.23402099 -3.40092229331 7.10347098937 -1.681017483 8.24267325114 +0.214221 -3.39977175571 7.09734532282 -1.68985965592 8.24836515657 +0.194739 -3.3981833354 7.09142713389 -1.69589364721 8.25396613017 +0.175569 -3.3966009635 7.08568883144 -1.70265320156 8.25946871356 +0.156707 -3.39510583614 7.07944006873 -1.71157842972 8.26484701928 +0.13814799 -3.39425837042 7.07383713318 -1.7157479739 8.27016221976 +0.119886 -3.3930738648 7.0694678059 -1.72172266179 8.27539135703 +0.101917 -3.39172388153 7.06351464099 -1.72665398361 8.28054905956 +0.084236696 -3.39046055543 7.0589087653 -1.7327191509 8.28562189097 +0.06684 -3.38909439096 7.05262499697 -1.73897587919 8.29060882545 +0.0497224 -3.38801865088 7.04812757329 -1.74239455475 8.295542492 +0.032879502 -3.38680587992 7.04286227128 -1.74909010888 8.30038677072 +0.016306801 -3.38611329715 7.03649805687 -1.75255602913 8.30517800257 +0.0 -3.38467579148 7.03072411704 -1.75880618035 8.30988629689 #nu_sf=0.5 -17.0902 -11.402628872 1.06472131206 -8.39321155402 -1.92876284626 -16.7999 -11.1273952521 1.34286741717 -7.9317753132 -1.3305225513 -16.514299 -10.939021814 1.51635912652 -7.71922944839 -0.978402997612 -16.233299 -10.7914850636 1.62192913894 -7.58445150062 -0.728916980059 -15.9568 -10.6970218365 1.73497201977 -7.4758690587 -0.531660428955 -15.6847 -10.5684354488 1.89057001592 -7.33860121944 -0.351791924176 -15.417 -10.3564891527 2.06867673203 -7.17005991752 -0.172211398972 -15.1536 -10.0198018161 2.31439459007 -6.95048110929 0.0251453920979 -14.8944 -9.78124079029 2.53045967249 -6.72060359871 0.238740593051 -14.6394 -9.52514154876 2.74316320479 -6.50971976704 0.455362871567 -14.3885 -9.33003701693 2.94073891791 -6.30615748533 0.670987088639 -14.1416 -9.18593770726 3.13010799007 -6.11350017319 0.881803696711 -13.8986 -8.98505704699 3.28367308775 -5.57933502312 1.25255064983 -13.6596 -8.84264695322 3.43861770917 -5.49757472472 1.48549555492 -13.4243 -8.70664598502 3.58810552246 -5.37723710378 1.67902245005 -13.1929 -8.52645116874 3.73996246898 -5.27212364798 1.8460503009 -12.9652 -8.37488915291 3.88863036318 -5.16475088536 1.99799539992 -12.7411 -8.22905029597 4.04003243467 -5.01558589178 2.15227344016 -12.5206 -8.08232430812 4.17669658123 -4.86061132049 2.30993614535 -12.3037 -7.94863005139 4.31095405052 -4.74245185333 2.45894430892 -12.0902 -7.82559698638 4.44030948261 -4.53295609128 2.62985400541 -11.8802 -7.69111313467 4.5639326958 -4.41876489185 2.78622205043 -11.6735 -7.56909286695 4.68754401896 -4.31471933688 2.93041265924 -11.4702 -7.44050836572 4.80350987492 -4.14435590286 3.08523590172 -11.2701 -7.32946744564 4.91258606859 -4.01363515872 3.23607108989 -11.0732 -7.21051498619 5.02087891702 -3.916625795 3.37464930442 -10.8795 -7.10011598299 5.12368652315 -3.81448299571 3.5062771039 -10.6889 -6.99189648521 5.22501552172 -3.71936864629 3.63126251619 -10.5013 -6.88679164051 5.32126612713 -3.61734843825 3.75320299759 -10.3168 -6.7878505638 5.41396025516 -3.52940151617 3.86946412523 -10.1352 -6.69254698845 5.50235879886 -3.41626206357 3.98750859451 -9.9565496 -6.60504457789 5.58804732155 -3.32956389472 4.1006661707 -9.7807503 -6.51051688735 5.66866654064 -3.23707038506 4.21152669574 -9.6077805 -6.4225326625 5.74746818135 -3.15395568282 4.31856025664 -9.4375696 -6.33513918762 5.822802055 -3.07484675565 4.42185889722 -9.2700996 -6.25248097062 5.89524481041 -2.99961114659 4.52149725183 -9.10532 -6.16981287145 5.96434041244 -2.92195728504 4.61880736988 -8.9431696 -6.09295415587 6.03146161384 -2.85740657667 4.71174980109 -8.7836304 -6.01756095089 6.09512334468 -2.78800789437 4.80220818769 -8.6266499 -5.94363367547 6.1567338491 -2.7284184915 4.88891085136 -8.4721899 -5.87172596329 6.21594009832 -2.66044006462 4.97413803635 -8.3202105 -5.80299183593 6.27227749595 -2.5986304058 5.05709233628 -8.1706696 -5.73617102864 6.32666582677 -2.54078350317 5.13754256588 -8.0235205 -5.67035554244 6.37804800756 -2.48285716187 5.21598836808 -7.8787398 -5.60519846024 6.42710361926 -2.43333901585 5.29143911288 -7.73628 -5.54218293272 6.47448964201 -2.38603712505 5.36412493064 -7.5960999 -5.48253904611 6.51983001436 -2.33827887829 5.43462141661 -7.45818 -5.42561045034 6.5631240347 -2.29214405842 5.50306419966 -7.3224602 -5.36693936577 6.60403054028 -2.24336408978 5.57018847511 -7.18893 -5.3107640431 6.64391126608 -2.20492053833 5.63474981942 -7.0575399 -5.25564551042 6.68200643889 -2.16181390923 5.69781438487 -6.9282498 -5.21146667256 6.71198630575 -2.14380485333 5.75636858693 -6.8010402 -5.15711725393 6.74328438415 -2.05590985524 5.8201504809 -6.6758699 -5.10239819119 6.77683245845 -2.04075391299 5.87891692238 -6.5527101 -5.05136619375 6.81035498536 -2.01852036903 5.93447164784 -6.43153 -5.00186202942 6.84243647096 -1.99125315268 5.98792469516 -6.3122902 -4.95389924118 6.87224743062 -1.95665744761 6.0404174867 -6.1949601 -4.90815411872 6.90022360006 -1.92162447196 6.09212301391 -6.0795202 -4.8630286545 6.92638944343 -1.89651917468 6.14204491636 -5.96593 -4.8197565967 6.95153157012 -1.86791941627 6.1908026947 -5.8541598 -4.77647037387 6.9753447483 -1.8427207551 6.23818974005 -5.7441802 -4.73622669636 6.99788493708 -1.81364971643 6.28477316959 -5.6359701 -4.69616620718 7.01970173957 -1.78991241303 6.33011088485 -5.5295 -4.65702359072 7.04029242096 -1.76391846523 6.3745744813 -5.4247298 -4.61854728535 7.05982028397 -1.74093740904 6.41798033265 -5.32164 -4.58061428483 7.07868105743 -1.72048452618 6.46021262781 -5.2202101 -4.54475063946 7.09689603892 -1.70041102128 6.50137055923 -5.12041 -4.50970303843 7.11460799373 -1.68142115019 6.54147995103 -5.0222001 -4.4755836908 7.13152200963 -1.66114544439 6.58077306648 -4.92558 -4.44219895255 7.14754798124 -1.64263287257 6.61917622398 -4.8305001 -4.4100043324 7.163391306 -1.6245575907 6.65675204146 -4.7369499 -4.37838189347 7.17838993976 -1.60806155927 6.69345403495 -4.6448998 -4.34807448881 7.19260181532 -1.59220614706 6.72932015488 -4.5543299 -4.31835856969 7.20644272971 -1.57511734318 6.76452726374 -4.46521 -4.28982645875 7.21956295566 -1.55850422584 6.79910383678 -4.3775201 -4.26160623943 7.232529422 -1.54880124788 6.83258885539 -4.2912302 -4.23453587864 7.24534214374 -1.53430288433 6.86544530603 -4.2063298 -4.20759185343 7.25775704849 -1.52267731663 6.89751842586 -4.1227999 -4.18254416994 7.27014498158 -1.50762247321 6.92911876593 -4.0405998 -4.15751732988 7.28176442783 -1.4931129618 6.9602545461 -3.9597199 -4.13314856888 7.29317911299 -1.47983004412 6.99087565758 -3.8801501 -4.11191969486 7.30178386273 -1.47747453091 7.02029536978 -3.8018401 -4.09431443251 7.30810138225 -1.44778526632 7.05042451101 -3.7248001 -4.07558316494 7.31346561152 -1.42801049583 7.08054663658 -3.6489899 -4.05885083188 7.31687961982 -1.41673229013 7.11010511683 -3.5743899 -4.05068028875 7.3130648569 -1.4321737893 7.13746635197 -3.5009999 -4.03975642659 7.31118482539 -1.42768364507 7.16406456522 -3.4287801 -4.02316165259 7.31483371128 -1.42304840541 7.18998204077 -3.3577199 -4.00265889651 7.32207465286 -1.4179907575 7.21529270913 -3.2878001 -3.98336722248 7.32732284046 -1.43740599549 7.23872287359 -3.2190001 -3.96531123189 7.33267751539 -1.431342241 7.26178417516 -3.1513 -3.94377677693 7.34110782681 -1.41543369772 7.28500475022 -3.0847001 -3.92035454866 7.35087503514 -1.42902584728 7.30687782167 -3.01916 -3.89824570236 7.3603812458 -1.4323169969 7.32803007915 -2.95467 -3.8784044729 7.36941561762 -1.43009288735 7.34877221009 -2.8912201 -3.85975904472 7.37770189279 -1.42010419342 7.36948494591 -2.8287799 -3.8413130151 7.38499034743 -1.41658232599 7.38987559426 -2.76735 -3.82401014921 7.39253041849 -1.41070114573 7.4100641795 -2.7068999 -3.80729191362 7.40005976026 -1.40109102532 7.43023296885 -2.6474199 -3.7908655741 7.40624532604 -1.39430372754 7.4502537033 -2.5889001 -3.77507739629 7.41277125049 -1.38933577165 7.47005025548 -2.5313101 -3.75969426164 7.41772169016 -1.38239206537 7.48972505067 -2.4746499 -3.74483476772 7.42294627577 -1.38200421689 7.50899209387 -2.4189 -3.72955985538 7.42710078696 -1.37569421494 7.5281314717 -2.3640499 -3.71482465501 7.43154921432 -1.37316561179 7.54698511879 -2.31007 -3.70133035246 7.43587086595 -1.37022753811 7.56559036206 -2.2569599 -3.6879158244 7.43974571688 -1.37073643611 7.58381396135 -2.2047 -3.67464344586 7.44414029484 -1.37184134383 7.60165518657 -2.15328 -3.66136336159 7.44731159552 -1.37195651192 7.61917213698 -2.10269 -3.6489161176 7.45087786527 -1.37117437622 7.63641784237 -2.0529001 -3.63638996772 7.45463605758 -1.36768712595 7.65351439905 -2.0039201 -3.62398832596 7.45712158171 -1.36520207731 7.67042231216 -1.9557199 -3.61221969686 7.46033387285 -1.36831767705 7.68694405318 -1.90829 -3.60053378005 7.46229296066 -1.36540854961 7.70332058952 -1.86163 -3.58906011102 7.46353508912 -1.3705527711 7.71926149382 -1.81572 -3.578407087 7.46513325986 -1.37231582223 7.73491353932 -1.77054 -3.56788212013 7.46690929841 -1.37304636165 7.75032898335 -1.7260799 -3.55746283858 7.46738591711 -1.37539334706 7.76546225187 -1.68234 -3.54736791508 7.46946883623 -1.38020976098 7.78023870977 -1.6393 -3.53831104252 7.47077684556 -1.37459932989 7.7950255086 -1.5969599 -3.52919948639 7.47025175701 -1.37935654005 7.80947471492 -1.55529 -3.52018295582 7.47259353408 -1.38677332316 7.82352217021 -1.51429 -3.51105836807 7.47293811666 -1.38767796931 7.83739019884 -1.47395 -3.50254103324 7.47285979973 -1.39216443852 7.85097511095 -1.43425 -3.49380911976 7.4736020437 -1.39473671793 7.86435054561 -1.39519 -3.48564292113 7.47233752673 -1.39318459973 7.87764384892 -1.35676 -3.47715946348 7.47152741219 -1.39852607001 7.89065057488 -1.3189501 -3.46951698633 7.47186617489 -1.40470414428 7.9033594839 -1.28174 -3.46174315611 7.47015569766 -1.40607798287 7.91592335988 -1.2451299 -3.45460116978 7.46789423685 -1.41246903295 7.92820262823 -1.20911 -3.44771398847 7.46624952084 -1.42016416433 7.94017460545 -1.17366 -3.44049636586 7.46516940348 -1.42894393203 7.95182550295 -1.13878 -3.43319562342 7.46420833869 -1.43307330776 7.96328983886 -1.10447 -3.42657143822 7.46193332757 -1.44114228197 7.97446934613 -1.0707 -3.42160051314 7.45871968998 -1.45292792843 7.98529285226 -1.03747 -3.41643092326 7.45582405987 -1.4598830779 7.99589053438 -1.0047801 -3.41050274984 7.45296222021 -1.46385602216 8.00633631507 -0.97261602 -3.40604658614 7.4506296462 -1.47090929184 8.01656451578 -0.940965 -3.4016513198 7.44793506033 -1.48147750776 8.026505359 -0.90982199 -3.39748253201 7.44426851822 -1.48759364895 8.03626704847 -0.879179 -3.39248446578 7.44140268572 -1.49360692041 8.0458577655 -0.84902698 -3.38850311009 7.4379293186 -1.49742627536 8.05532822042 -0.819359 -3.38480077651 7.43387193714 -1.50002752534 8.06470677439 -0.79016799 -3.38100204698 7.42862244642 -1.51029553007 8.07383506652 -0.76144397 -3.37647385758 7.42434802165 -1.51963483794 8.0827395258 -0.733181 -3.37296505753 7.41961227585 -1.52714204251 8.09146496701 -0.70537198 -3.36958832853 7.41462875907 -1.53640228984 8.09998329297 -0.67800897 -3.36567526152 7.40968239245 -1.54824404917 8.10825102487 -0.65108502 -3.36224140189 7.40715035208 -1.55278604538 8.11641320812 -0.62459397 -3.35939404978 7.40176863156 -1.54923034979 8.12462074557 -0.59852701 -3.35653031228 7.39709479055 -1.56011443298 8.13260537891 -0.572878 -3.35354115835 7.39189929821 -1.57348700233 8.1403300837 -0.54764098 -3.35064856096 7.38745703279 -1.57575205179 8.14799729239 -0.52280903 -3.34793906222 7.3830550563 -1.58759918091 8.15544148676 -0.498375 -3.34405565227 7.37805802232 -1.59611332951 8.16272718536 -0.474334 -3.341706743 7.37362551502 -1.60261316678 8.16988949377 -0.45067799 -3.33914114541 7.36952733649 -1.61011873846 8.17691588013 -0.42740101 -3.33648409313 7.36308184664 -1.61489499508 8.18385229591 -0.40449899 -3.33397944578 7.35767542869 -1.62413668541 8.1906279306 -0.38196301 -3.33156507941 7.35309621461 -1.63137290225 8.19727923124 -0.35978901 -3.32962968524 7.34856346747 -1.6386189443 8.20380822342 -0.337971 -3.32728473628 7.34255942355 -1.64233336119 8.21026703477 -0.31650299 -3.32516260736 7.33723877364 -1.65469140627 8.21653327696 -0.29538 -3.32297131494 7.33142449473 -1.65719433207 8.22275029494 -0.27459499 -3.32088417756 7.32692342674 -1.66880421792 8.22879068724 -0.25414401 -3.31879252475 7.32237969487 -1.67607445473 8.23471956821 -0.23402099 -3.31682664873 7.31786941063 -1.67857867296 8.24060194197 -0.214221 -3.31464476734 7.31317904978 -1.68696588768 8.24635855067 -0.194739 -3.31317748546 7.30928927638 -1.69200110202 8.25203549871 -0.175569 -3.31106296456 7.3056510531 -1.69998062845 8.25759656317 -0.156707 -3.3089900916 7.29956699478 -1.70284038518 8.2631071342 -0.13814799 -3.30755011858 7.29401136284 -1.71227695858 8.26848525016 -0.119886 -3.30576079581 7.29108870155 -1.71748857371 8.27378662932 -0.101917 -3.30428315601 7.28809643334 -1.71877028108 8.27905739347 -0.084236696 -3.30259575966 7.28420320282 -1.72262909714 8.28426578929 -0.06684 -3.30089157389 7.27889459736 -1.7321666626 8.28934712953 -0.0497224 -3.29911281008 7.27396229891 -1.73685006173 8.2943586498 -0.032879502 -3.29724133169 7.27051680688 -1.74432030927 8.29926870261 -0.016306801 -3.29635445566 7.26579192119 -1.74007789304 8.30421171355 -1.72e-08 -3.29457513917 7.26065724685 -1.74706968132 8.30905902764 +17.0902 -11.4437757028 0.546957166047 -8.93927254546 -2.47480879899 +16.7999 -11.3603973127 0.844902419634 -8.43681536957 -1.84574467464 +16.514299 -10.8676415151 1.11037884238 -8.17185350949 -1.45777664691 +16.233299 -10.7580687465 1.42122650789 -7.87866458743 -1.11756193716 +15.9568 -10.4271975875 1.75026597939 -7.54664241366 -0.776120320139 +15.6847 -10.3024630464 2.00017162666 -7.26632260288 -0.461354273782 +15.417 -10.0173249298 2.18054471959 -7.06038485092 -0.194627684123 +15.1536 -9.86332973282 2.41727845049 -6.84639807382 0.0534406920707 +14.8944 -9.62231488563 2.61809368726 -6.40336028915 0.402731426477 +14.6394 -9.44738518222 2.80255905388 -6.31079343041 0.633440293253 +14.3885 -9.29885467666 2.97903168818 -6.02280668799 0.893438257456 +14.1416 -9.12515897269 3.16346444586 -5.94518800288 1.08413429091 +13.8986 -8.92545933439 3.330811625 -5.74156043039 1.28342235296 +13.6596 -8.78483405726 3.48941188497 -5.5434065264 1.48625699398 +13.4243 -8.64609277163 3.64214217934 -5.45927224444 1.6517007255 +13.1929 -8.48525668783 3.79320913017 -5.27907376772 1.82542439431 +12.9652 -8.3373313345 3.94000314338 -5.10931389395 2.00126811653 +12.7411 -8.18453303789 4.08447804045 -4.94853227789 2.17551679864 +12.5206 -8.05464677901 4.21757264886 -4.76126749308 2.35781040569 +12.3037 -7.91806335617 4.34990960904 -4.64548780886 2.52167414211 +12.0902 -7.78962608221 4.47581542211 -4.48327341823 2.68838561721 +11.8802 -7.66467993383 4.59633583797 -4.35447213899 2.84655502357 +11.6735 -7.54060847995 4.71275364216 -4.23129271837 2.9973700657 +11.4702 -7.41485724677 4.82568516674 -4.10538490989 3.14395241202 +11.2701 -7.30317925418 4.93298443901 -3.99046982767 3.2846773086 +11.0732 -7.19418964971 5.03773062524 -3.8819590363 3.41947823862 +10.8795 -7.08623245281 5.13903763943 -3.78465044161 3.54727217448 +10.6889 -6.98285388973 5.23690524315 -3.68242621314 3.67119872913 +10.5013 -6.88078141013 5.33091555402 -3.58126067843 3.79216641041 +10.3168 -6.78033205325 5.42120626194 -3.48386977243 3.91001463375 +10.1352 -6.68491948342 5.50900520104 -3.39676973909 4.02313203357 +9.9565496 -6.58753513847 5.59361338162 -3.31143579856 4.13238437285 +9.7807503 -6.49898565359 5.67533923815 -3.22891197358 4.23802764485 +9.6077805 -6.41129811253 5.75368462322 -3.14183496085 4.34192932696 +9.4375696 -6.32673911798 5.82891591616 -3.06887936208 4.44164204234 +9.2700996 -6.24519113861 5.90089035168 -2.99045533241 4.5391064762 +9.10532 -6.16661998208 5.97012853767 -2.92065422746 4.63320591173 +8.9431696 -6.08940994941 6.03672732013 -2.84993127531 4.7248350173 +8.7836304 -6.01246139049 6.10042586033 -2.78029564336 4.81428807418 +8.6266499 -5.939521782 6.16165058594 -2.71552548274 4.90110295911 +8.4721899 -5.86786293131 6.22045672458 -2.65408353624 4.98529998561 +8.3202105 -5.79824484135 6.27664458275 -2.59415890198 5.06711944016 +8.1706696 -5.72995455598 6.33050684839 -2.53465662262 5.14688892348 +8.0235205 -5.66512869057 6.38219095922 -2.47886053979 5.22444682686 +7.8787398 -5.59966158786 6.43148644367 -2.42891402772 5.29929119653 +7.73628 -5.53779652791 6.4789744136 -2.38082249589 5.3715498346 +7.5960999 -5.47734998524 6.52410439922 -2.32837188089 5.44243212709 +7.45818 -5.41834461401 6.56728067389 -2.28210853168 5.51120257546 +7.3224602 -5.35981666254 6.60852114918 -2.23895947032 5.57779332283 +7.18893 -5.3039200928 6.64797836382 -2.19775222672 5.64228495413 +7.0575399 -5.24936515922 6.68553143567 -2.15650768731 5.70504081526 +6.9282498 -5.19584672994 6.72149128394 -2.11712940956 5.76610004214 +6.8010402 -5.14373629999 6.75589963491 -2.08126174288 5.82525934626 +6.6758699 -5.09323625559 6.78874860068 -2.04289057747 5.88310625076 +6.5527101 -5.04355839725 6.81990740329 -2.00650523015 5.93962233807 +6.43153 -4.99570842358 6.84969114603 -1.97235042476 5.99469097798 +6.3122902 -4.94871916582 6.87801156916 -1.94251187706 6.04802435037 +6.1949601 -4.90270740478 6.90489415569 -1.90982666445 6.10019950066 +6.0795202 -4.85812100935 6.93055442393 -1.88265552072 6.1507675419 +5.96593 -4.81476149559 6.95491139903 -1.855543613 6.19990792374 +5.8541598 -4.77218809003 6.97821170655 -1.8290909377 6.24776609536 +5.7441802 -4.73144296622 7.00032165435 -1.80518173399 6.29423314935 +5.6359701 -4.69172609059 7.02185639495 -1.77997121341 6.33962096116 +5.5295 -4.65267547131 7.04241905431 -1.75907864079 6.38362839941 +5.4247298 -4.61453634859 7.06204212753 -1.73579946192 6.42667183254 +5.32164 -4.5775068074 7.08084571351 -1.71456176544 6.46864481483 +5.2202101 -4.54191306964 7.09892073848 -1.69379861295 6.50963120749 +5.12041 -4.50685591495 7.11626860161 -1.67318048044 6.54974692056 +5.0222001 -4.47250748221 7.1330513374 -1.65561004128 6.58879705854 +4.92558 -4.43934381631 7.14923806856 -1.63831142207 6.62689283447 +4.8305001 -4.40719385866 7.16486588203 -1.62031798547 6.66418218021 +4.7369499 -4.37569930431 7.17969477887 -1.60461209357 6.7005654579 +4.6448998 -4.34515272028 7.19451587029 -1.58802829289 6.73619465973 +4.5543299 -4.31546307425 7.20875580068 -1.57305547173 6.7710331595 +4.46521 -4.28629879573 7.22206873574 -1.55802460106 6.80515301255 +4.3775201 -4.2583448316 7.23513301002 -1.54325017159 6.83859365458 +4.2912302 -4.23074315946 7.24781018198 -1.53024219625 6.87131167212 +4.2063298 -4.20416465381 7.26043926542 -1.51768945861 6.9033231285 +4.1227999 -4.1783560898 7.27231932494 -1.5022280995 6.93489630421 +4.0405998 -4.15292550781 7.28367451101 -1.49024672822 6.96582797826 +3.9597199 -4.12851139845 7.29479748929 -1.47925718986 6.99610892506 +3.8801501 -4.10495212072 7.30531550861 -1.46939970389 7.02572026794 +3.8018401 -4.0817178179 7.3153516467 -1.46070994071 7.05463717079 +3.7248001 -4.05898879783 7.324945302 -1.45035560773 7.08303221961 +3.6489899 -4.03690890534 7.33410569327 -1.44097861626 7.11088689708 +3.5743899 -4.01534927441 7.34275768866 -1.43516678349 7.13801163699 +3.5009999 -3.99447393025 7.35168184306 -1.42902006362 7.16450322658 +3.4287801 -3.97423686563 7.35984094483 -1.4200040812 7.19057173196 +3.3577199 -3.95516633054 7.36748719004 -1.40708294349 7.21647267569 +3.2878001 -3.93648317883 7.37453141575 -1.39632738739 7.24209279768 +3.2190001 -3.91831012372 7.38125893558 -1.38575829393 7.2674383134 +3.1513 -3.89731286373 7.38976387418 -1.39364155348 7.29151240436 +3.0847001 -3.87866698 7.39710776989 -1.38647358068 7.31522965271 +3.01916 -3.86070948429 7.40387406945 -1.37895888933 7.3386293905 +2.95467 -3.84344568591 7.41033779576 -1.3737437839 7.36161858587 +2.8912201 -3.82633628288 7.41630840297 -1.36939222655 7.38416984584 +2.8287799 -3.81016570274 7.42253313481 -1.36369194341 7.40638778469 +2.76735 -3.7939453484 7.42810764085 -1.35831235441 7.42827300514 +2.7068999 -3.77826544477 7.43330102155 -1.3547534371 7.44975560674 +2.6474199 -3.7628108439 7.437822087 -1.35282767221 7.47078944139 +2.5889001 -3.74811257553 7.44263032828 -1.34904107025 7.49148762745 +2.5313101 -3.73351200055 7.44703936388 -1.3461318312 7.5118291251 +2.4746499 -3.71920731782 7.45112239591 -1.34267547417 7.53185890272 +2.4189 -3.70550093984 7.45479821151 -1.341051264 7.55151234311 +2.3640499 -3.69232698059 7.45856313331 -1.33833213689 7.57085894205 +2.31007 -3.67909388453 7.46138827843 -1.33942892935 7.58975847613 +2.2569599 -3.66644246192 7.46428157438 -1.34102615913 7.60820921769 +2.2047 -3.65387833553 7.46717351718 -1.34101965478 7.62631085303 +2.15328 -3.64199456814 7.46941271664 -1.34002176793 7.64411780793 +2.10269 -3.63004613993 7.4719732505 -1.34089958245 7.66157269433 +2.0529001 -3.61849824034 7.47380455239 -1.34082372111 7.67873383627 +2.0039201 -3.60720360626 7.47564606182 -1.34402029935 7.69549054969 +1.9557199 -3.59640491657 7.47709917416 -1.34163127215 7.71207026053 +1.90829 -3.58558870367 7.47857600759 -1.34677044791 7.72820685392 +1.86163 -3.57516865279 7.47943337187 -1.3491150512 7.74402531706 +1.81572 -3.56500372316 7.48048418346 -1.35180834214 7.75953036046 +1.77054 -3.55506908495 7.48123448896 -1.35486392844 7.77472168035 +1.7260799 -3.54520472387 7.48196116527 -1.35758926327 7.78962851186 +1.68234 -3.53587506917 7.48283161045 -1.35692927407 7.80437436458 +1.6393 -3.52664493824 7.48282609393 -1.35974543571 7.81885450593 +1.5969599 -3.51802375059 7.48331236475 -1.36231631994 7.83308437111 +1.55529 -3.50902314281 7.48336293145 -1.36705530214 7.84700779165 +1.51429 -3.50037170254 7.48293916332 -1.37269875065 7.8606130051 +1.47395 -3.49211936783 7.48269133196 -1.37269727322 7.87408462001 +1.43425 -3.48431529908 7.48125292543 -1.37645538924 7.88731075938 +1.39519 -3.47621905286 7.47991969301 -1.38247731988 7.90023859095 +1.35676 -3.46837336132 7.47875704578 -1.38857612224 7.91287829028 +1.3189501 -3.46083565894 7.47711222593 -1.39507629694 7.92522982852 +1.28174 -3.45365555429 7.4750711964 -1.40229045317 7.937287862 +1.2451299 -3.44642941599 7.47330678088 -1.41223539813 7.948992138 +1.20911 -3.43923775024 7.47212021262 -1.42029097485 7.96040875969 +1.17366 -3.43242344536 7.47121724638 -1.424845287 7.97164039961 +1.13878 -3.42554602942 7.46842296799 -1.4304435353 7.98266425631 +1.10447 -3.41914812926 7.46655974758 -1.43592707652 7.99349147319 +1.0707 -3.41419179264 7.46379220673 -1.44119627485 8.00413547816 +1.03747 -3.40933951245 7.46073042237 -1.45019694513 8.01451231725 +1.0047801 -3.40364085057 7.45855481237 -1.45492767716 8.02473000817 +0.97261602 -3.39909209467 7.45462728922 -1.46336341609 8.03471007134 +0.940965 -3.39498496973 7.45167969464 -1.47266215979 8.04444177344 +0.90982199 -3.39106510739 7.44830151466 -1.47748238076 8.05403074402 +0.879179 -3.38596102169 7.44522130319 -1.4819147327 8.06348858536 +0.84902698 -3.38187293195 7.4409729425 -1.48772958409 8.07278972079 +0.819359 -3.37840277274 7.43679730142 -1.49515240431 8.08190376405 +0.79016799 -3.37470118519 7.4317552167 -1.50562870355 8.09077421909 +0.76144397 -3.37011714975 7.4277742801 -1.51564058268 8.099419854 +0.733181 -3.36671139629 7.42439637787 -1.52378346834 8.10788457552 +0.70537198 -3.36357943025 7.41914370578 -1.52354198638 8.11633265242 +0.67800897 -3.36046738129 7.41536923799 -1.53115177105 8.12461413057 +0.65108502 -3.35724809105 7.41030923189 -1.53472292087 8.13280851353 +0.62459397 -3.35431929077 7.4046976495 -1.54586305828 8.14077689883 +0.59852701 -3.35156458783 7.39969661544 -1.55635460955 8.14853878319 +0.572878 -3.34878822817 7.39475207503 -1.56404964849 8.15614962986 +0.54764098 -3.34637831369 7.39017210923 -1.57350498329 8.16358325215 +0.52280903 -3.34364514876 7.3851861589 -1.58123795601 8.17087245738 +0.498375 -3.34045655189 7.37981659532 -1.58880792416 8.17802467353 +0.474334 -3.33773224553 7.37445695745 -1.59730301661 8.1850259422 +0.45067799 -3.33506903829 7.36892837536 -1.60532791083 8.19188774954 +0.42740101 -3.33271801039 7.36340581479 -1.61136420663 8.19864473276 +0.40449899 -3.33057426252 7.35916432091 -1.61598295966 8.20531904541 +0.38196301 -3.32838822942 7.35441877959 -1.62215835352 8.2118874672 +0.35978901 -3.32663990397 7.34839700877 -1.62660624477 8.21837755889 +0.337971 -3.32482600298 7.34292618056 -1.63635913713 8.22471157805 +0.31650299 -3.32274402433 7.33643944105 -1.64364963099 8.2309290305 +0.29538 -3.32097985318 7.33128168163 -1.65506991998 8.23697391167 +0.27459499 -3.31925731137 7.3259867186 -1.66582559199 8.24286223181 +0.25414401 -3.3175590724 7.32016584185 -1.67382454319 8.24863181177 +0.23402099 -3.3155635138 7.31485492276 -1.68362022131 8.25426419131 +0.214221 -3.31369867093 7.31003344626 -1.69286038108 8.25976875867 +0.194739 -3.31163440905 7.30565945882 -1.69999726863 8.26517492519 +0.175569 -3.30968637859 7.30134671442 -1.7048149817 8.2705113642 +0.156707 -3.30796745566 7.29615252027 -1.71022778473 8.27577197745 +0.13814799 -3.30674962021 7.29075462147 -1.71484586947 8.28096651053 +0.119886 -3.30511923586 7.28663619045 -1.72288296764 8.28605477655 +0.101917 -3.30337418214 7.2820168951 -1.72727004805 8.29108119599 +0.084236696 -3.30155824161 7.27733098675 -1.73199412563 8.29604135168 +0.06684 -3.30003530452 7.27254840886 -1.73683091197 8.30093430618 +0.0497224 -3.29853218643 7.26865026855 -1.74270504629 8.30574935214 +0.032879502 -3.29693581995 7.26351691971 -1.75124159311 8.31045825385 +0.016306801 -3.2956799525 7.25855933428 -1.75695477982 8.3150935426 +0.0 -3.2943249681 7.25380556983 -1.75922888414 8.31969119598 #boost_burst =20 -17.0902 -11.3079022375 1.05286556051 -8.10877411438 -1.64432542317 -16.7999 -11.0909119163 1.32631948904 -7.64441623857 -1.0438984938 -16.514299 -10.9539251103 1.49687245842 -7.43665053078 -0.694021323979 -16.233299 -10.8599865255 1.59802533911 -7.30634942885 -0.447268320426 -15.9568 -10.755416786 1.70865774384 -7.20001212633 -0.252117079384 -15.6847 -10.5698302244 1.86253467802 -7.06340728349 -0.0737186479211 -15.417 -10.2554999408 2.03410850688 -6.90113687654 0.102784521513 -15.1536 -9.9725223537 2.28188915988 -6.68379692184 0.297124334798 -14.8944 -9.76313148529 2.49718826253 -6.45390583306 0.508675477271 -14.6394 -9.58505909316 2.71197693798 -6.23759311538 0.72615985962 -14.3885 -9.34595124586 2.90354702585 -6.03762635249 0.940898770213 -14.1416 -9.1271298968 3.08611734243 -5.85335874436 1.14798406283 -13.8986 -8.98687243255 3.23787259065 -5.30369183338 1.52418931428 -13.6596 -8.87669566368 3.39578514157 -5.33757669701 1.71421312161 -13.4243 -8.71090103858 3.54585836464 -5.28860350518 1.86240005964 -13.1929 -8.59204581512 3.70188593395 -5.18689424497 2.00043359746 -12.9652 -8.42972405629 3.84144940085 -4.93025861079 2.17760307634 -12.7411 -8.2884634963 3.98780127328 -4.69708682782 2.37825148709 -12.5206 -8.13582569185 4.11817155574 -4.57599694744 2.55461780355 -12.3037 -8.00113370683 4.24621352066 -4.43448357264 2.72297583714 -12.0902 -7.86328750715 4.3681404486 -4.22985873838 2.90698449833 -11.8802 -7.72001822218 4.4907477716 -4.22138068213 3.04074651623 -11.6735 -7.587708772 4.61510630822 -4.16059858721 3.15884274668 -11.4702 -7.47520507942 4.72827084839 -3.94652389622 3.30471458821 -11.2701 -7.35859669992 4.83135382752 -3.7995637549 3.45397019071 -11.0732 -7.24448246941 4.93658637431 -3.7141514133 3.58838861662 -10.8795 -7.14330638015 5.0378176785 -3.65744461993 3.70589102358 -10.6889 -7.03754405461 5.1351965183 -3.54358916473 3.82503741795 -10.5013 -6.93635459659 5.22819179722 -3.46112547772 3.93808066756 -10.3168 -6.84026311974 5.31593389315 -3.34840100112 4.05343428912 -10.1352 -6.74120557673 5.39806338253 -3.23487725062 4.17086488486 -9.9565496 -6.65166400852 5.47711515387 -3.14328981613 4.28469347939 -9.7807503 -6.55887906605 5.55359047219 -3.07835656181 4.38997849136 -9.6077805 -6.46763899689 5.62740430312 -2.99595162691 4.49262708316 -9.4375696 -6.38282337559 5.69779736187 -2.92652645673 4.59060158946 -9.2700996 -6.29883296903 5.76537553975 -2.85264539944 4.68586353971 -9.10532 -6.2195366132 5.83107372011 -2.79168917899 4.77654022708 -8.9431696 -6.14476402955 5.89382598676 -2.73324464317 4.86321375563 -8.7836304 -6.07103719918 5.95286815009 -2.6663468587 4.94822212768 -8.6266499 -5.99678271404 6.0106369297 -2.61328409195 5.02949667292 -8.4721899 -5.92483887397 6.06533420035 -2.54943239196 5.10959876302 -8.3202105 -5.85450199331 6.11778334167 -2.50052055253 5.18628508161 -8.1706696 -5.7867625164 6.16799113759 -2.44122938915 5.26186357017 -8.0235205 -5.72058181055 6.21436830397 -2.37943773001 5.33692396993 -7.8787398 -5.65717092283 6.25899260705 -2.32939563179 5.40970906422 -7.73628 -5.59484399319 6.30272745029 -2.29807026025 5.4778603036 -7.5960999 -5.53383323847 6.34409196986 -2.25117754974 5.544468703 -7.45818 -5.4750550021 6.38394529374 -2.20962609457 5.60903218021 -7.3224602 -5.41891561569 6.42167116676 -2.16445269363 5.67238364136 -7.18893 -5.36301439253 6.45887772316 -2.13281527711 5.732910582 -7.0575399 -5.30829802272 6.49448798848 -2.09103416883 5.79237377084 -6.9282498 -5.26604058728 6.52107809907 -2.0916852633 5.84579822389 -6.8010402 -5.21243115467 6.54621078559 -1.96697201832 5.90951277854 -6.6758699 -5.15681128931 6.58080557274 -1.98240822136 5.9644739736 -6.5527101 -5.10505569557 6.61439971506 -1.96345644549 6.01647819142 -6.43153 -5.05580177267 6.64654128166 -1.93603105498 6.06691270932 -6.3122902 -5.00830768081 6.67543760414 -1.89604979315 6.1173519777 -6.1949601 -4.96251471468 6.70260241534 -1.8694933244 6.16634276885 -6.0795202 -4.91776256203 6.72874233725 -1.84471767775 6.21388555464 -5.96593 -4.8735419565 6.75404750417 -1.81494145344 6.26067828258 -5.8541598 -4.83073612087 6.77890575379 -1.79735846559 6.3055946782 -5.7441802 -4.79087416065 6.80230292139 -1.76334743019 6.35046901681 -5.6359701 -4.75127531668 6.82506584815 -1.73364137031 6.39488173823 -5.5295 -4.71260985795 6.84671619512 -1.70668274448 6.43861770457 -5.4247298 -4.67517263317 6.86753801597 -1.67761322686 6.481955278 -5.32164 -4.63808369726 6.88793708991 -1.65641862124 6.52419561658 -5.2202101 -4.60212836128 6.90812841041 -1.63888618559 6.56513173939 -5.12041 -4.56688526244 6.92722591732 -1.60842779725 6.60606418782 -5.0222001 -4.53307345966 6.94628088391 -1.59482282203 6.64550767339 -4.92558 -4.49996160437 6.96416835208 -1.57123263679 6.68447777408 -4.8305001 -4.46733323217 6.98228267163 -1.55407093534 6.72248730842 -4.7369499 -4.43529190321 6.99983350027 -1.53649796868 6.7596641213 -4.6448998 -4.40458776561 7.01633775018 -1.5189418689 6.79609376502 -4.5543299 -4.37519861297 7.03277107952 -1.49659643115 6.83222759058 -4.46521 -4.34680583934 7.04810161421 -1.46888956187 6.86852008078 -4.3775201 -4.31782625284 7.06345039555 -1.46543694464 6.90305605671 -4.2912302 -4.29024981203 7.07912871324 -1.4534854713 6.93667390101 -4.2063298 -4.26312058473 7.09439238633 -1.43610231686 6.96985757691 -4.1227999 -4.23760339364 7.10859323417 -1.41118093199 7.00319371017 -4.0405998 -4.21238618337 7.12255176149 -1.39171813792 7.03627587861 -3.9597199 -4.18682065019 7.13576158818 -1.37458353066 7.0689496315 -3.8801501 -4.16482729105 7.14599614213 -1.37354825447 7.10011080584 -3.8018401 -4.14582310387 7.1520064556 -1.32650607535 7.13314537218 -3.7248001 -4.12570871664 7.15759154071 -1.3054882996 7.16605198775 -3.6489899 -4.10689606713 7.16234682319 -1.30883380129 7.19711982457 -3.5743899 -4.09721055543 7.16122209617 -1.33297054312 7.22523589852 -3.5009999 -4.08398469224 7.1618666457 -1.31629367832 7.25327436142 -3.4287801 -4.06567766634 7.16872022491 -1.30186053771 7.28110924563 -3.3577199 -4.04302529812 7.17797151031 -1.29357793656 7.3083738927 -3.2878001 -4.02128580287 7.18753250786 -1.33212558829 7.33245441622 -3.2190001 -4.00148765905 7.19650399187 -1.3231383846 7.35627469907 -3.1513 -3.97911261494 7.2072533258 -1.28470701187 7.3814599512 -3.0847001 -3.95407751498 7.22079215995 -1.30967644114 7.4044849893 -3.01916 -3.930823858 7.23518173105 -1.31449017705 7.42662056009 -2.95467 -3.90965798514 7.24619987266 -1.28904169147 7.44943777699 -2.8912201 -3.88977979897 7.25623981021 -1.27628598533 7.4722578507 -2.8287799 -3.87038861238 7.26586650061 -1.27560778002 7.49447606416 -2.76735 -3.85203810355 7.2749191207 -1.25941553641 7.51689734815 -2.7068999 -3.83391190839 7.28394962061 -1.25413586624 7.53896944513 -2.6474199 -3.8163956492 7.29154582004 -1.24073485136 7.56111339558 -2.5889001 -3.79889674205 7.30032756799 -1.24026725589 7.58268503792 -2.5313101 -3.78284082079 7.30700700779 -1.22670751082 7.60436011643 -2.4746499 -3.76681177631 7.31370494146 -1.22194653085 7.62569985598 -2.4189 -3.751288892 7.32037176926 -1.21849168797 7.64666544404 -2.3640499 -3.7365930525 7.32592767471 -1.20322067141 7.66783183534 -2.31007 -3.72247816234 7.33151990636 -1.20426706424 7.68842624255 -2.2569599 -3.70851429135 7.33688472411 -1.20399766281 7.70854257699 -2.2047 -3.69442413306 7.34123277249 -1.19878431694 7.72843573295 -2.15328 -3.68059187062 7.34545336626 -1.19764258024 7.7479343165 -2.10269 -3.66640892092 7.34910275793 -1.20398431493 7.7667410399 -2.0529001 -3.65276378514 7.35402312099 -1.20723681132 7.78503900278 -2.0039201 -3.64000939301 7.35872440417 -1.19950084436 7.80330094016 -1.9557199 -3.62738744983 7.3630186767 -1.19912620463 7.82123219007 -1.90829 -3.614692299 7.3649577528 -1.19347382461 7.83906148718 -1.86163 -3.60231912159 7.36815361049 -1.20163726087 7.85624268926 -1.81572 -3.59073979649 7.37090162744 -1.1992667216 7.87322363041 -1.77054 -3.58026409649 7.37383559114 -1.19031131169 7.89026740885 -1.7260799 -3.56999973799 7.37483253359 -1.18818642073 7.90710677461 -1.68234 -3.55945276334 7.37753207353 -1.19973342214 7.92324076385 -1.6393 -3.54960868234 7.37941930111 -1.19889129877 7.93916397859 -1.5969599 -3.53964426275 7.38029793995 -1.20772382787 7.95454097447 -1.55529 -3.5302323933 7.3844194778 -1.21928966351 7.96932033319 -1.51429 -3.52092357152 7.38471885385 -1.21217648155 7.98415492247 -1.47395 -3.51178381017 7.38484402747 -1.21734127941 7.998631296 -1.43425 -3.50263762386 7.3855137569 -1.22237416326 8.01277656295 -1.39519 -3.49437987433 7.38507556317 -1.22114488344 8.02679929268 -1.35676 -3.48561036766 7.38486212656 -1.22663311678 8.04049378133 -1.3189501 -3.47812923942 7.38500865727 -1.22971645514 8.05394674537 -1.28174 -3.4710265225 7.38332645241 -1.2225456759 8.06748523848 -1.2451299 -3.46469594689 7.37984429192 -1.22533312913 8.08079551608 -1.20911 -3.45722160027 7.37782141388 -1.2513416224 8.09321405701 -1.17366 -3.44960894309 7.37612309415 -1.26022958349 8.10528661361 -1.13878 -3.44267391301 7.37542002526 -1.26371517414 8.1171706369 -1.10447 -3.43578174038 7.37322873944 -1.27701416096 8.1286125506 -1.0707 -3.43090016193 7.37018613913 -1.28046639336 8.13989356731 -1.03747 -3.42535196368 7.36624753903 -1.28783314169 8.15091807509 -1.0047801 -3.4191682312 7.36392297752 -1.29775112243 8.16162951441 -0.97261602 -3.41535024711 7.36173001011 -1.30047259229 8.17221517208 -0.940965 -3.41142549507 7.35808913116 -1.30765211705 8.18257455185 -0.90982199 -3.40782120399 7.35452482271 -1.3157844434 8.19269250512 -0.879179 -3.40324982599 7.35144240873 -1.32718965369 8.2025033314 -0.84902698 -3.39984099559 7.34541195278 -1.3196281604 8.21244156984 -0.819359 -3.39618865059 7.34089994561 -1.33346805551 8.22202547463 -0.79016799 -3.3926237304 7.33460586706 -1.33358171884 8.23156607262 -0.76144397 -3.38854256847 7.32980222386 -1.3486463129 8.2407452674 -0.733181 -3.38513358794 7.32433695993 -1.36396416469 8.24957528622 -0.70537198 -3.38227650713 7.3189760518 -1.37002587895 8.25825566433 -0.67800897 -3.37919247945 7.31316319846 -1.36895502478 8.26693077311 -0.65108502 -3.37622649608 7.30888957724 -1.37888961106 8.27538239711 -0.62459397 -3.37410880175 7.30209517463 -1.37633711712 8.28385588343 -0.59852701 -3.37155449828 7.29644256681 -1.3987544426 8.29187970108 -0.572878 -3.37011097506 7.28922311122 -1.39115389383 8.30002211552 -0.54764098 -3.36693720277 7.28279568161 -1.41777966761 8.30765969761 -0.52280903 -3.3644164261 7.27760421464 -1.43059904656 8.31505924051 -0.498375 -3.36157694884 7.27183158379 -1.43642147263 8.32234583205 -0.474334 -3.35951097733 7.2659615808 -1.437564251 8.3295974354 -0.45067799 -3.35751042591 7.26189412433 -1.44476083844 8.33671506665 -0.42740101 -3.35488290757 7.25588974187 -1.46056154345 8.34356440064 -0.40449899 -3.35346286537 7.24938995908 -1.45757727176 8.35044651572 -0.38196301 -3.35161216251 7.24442913876 -1.47025216746 8.35711709271 -0.35978901 -3.35003466413 7.2387173902 -1.47142391075 8.36375677226 -0.337971 -3.34784838907 7.23100427335 -1.48040412876 8.37024504923 -0.31650299 -3.34626719472 7.2254825968 -1.49531560653 8.37650171629 -0.29538 -3.34450533557 7.22037074178 -1.5016863416 8.38265546323 -0.27459499 -3.34277539884 7.21497770497 -1.51019739156 8.38867830347 -0.25414401 -3.34086546456 7.20906091571 -1.51332855953 8.39464517644 -0.23402099 -3.33975398032 7.20379819251 -1.51542921452 8.40057055905 -0.214221 -3.33831856552 7.19821667836 -1.53564073477 8.40621324036 -0.194739 -3.33746895918 7.19321345613 -1.52640205599 8.41196425728 -0.175569 -3.33563295051 7.18908896868 -1.5424075374 8.41749460989 -0.156707 -3.33409283113 7.18081737479 -1.53725885052 8.42307628128 -0.13814799 -3.33364389928 7.17656330798 -1.54425617144 8.42855486441 -0.119886 -3.3321715474 7.17276704937 -1.55888486216 8.43383703813 -0.101917 -3.33115583822 7.16910806674 -1.55698350872 8.43912851732 -0.084236696 -3.32984025696 7.16312107441 -1.55969122463 8.44437086923 -0.06684 -3.32895124252 7.15643652311 -1.56452017022 8.44953978406 -0.0497224 -3.32805643143 7.15071202779 -1.5775567767 8.45453984157 -0.032879502 -3.32636848439 7.14579273972 -1.58976489515 8.45938756819 -0.016306801 -3.32587268136 7.14099509091 -1.58396371915 8.46428492597 -1.72e-08 -3.32504827501 7.13457494489 -1.5926003813 8.46906990873 +17.0902 -11.8835358953 0.573161205675 -8.58252665972 -2.11806288006 +16.7999 -11.5359883986 0.8399260967 -8.12624836614 -1.52387941088 +16.514299 -11.3334210041 1.12734769648 -7.84946440198 -1.13560185108 +16.233299 -11.0446188017 1.4162385106 -7.56064096464 -0.797636869666 +15.9568 -10.5838092054 1.7393372686 -7.25032184132 -0.468886823736 +15.6847 -10.4434801269 1.98467968714 -6.97887261262 -0.164207931828 +15.417 -10.1908840976 2.14427809314 -6.37501576386 0.323403845883 +15.1536 -9.91585173437 2.36124137146 -6.31055446872 0.57931312754 +14.8944 -9.74441899766 2.58044790102 -6.28815900361 0.749502994195 +14.6394 -9.57325434654 2.7692918932 -6.14230946295 0.915336977441 +14.3885 -9.38110610193 2.94943482712 -5.9768517176 1.08445630562 +14.1416 -9.17950921758 3.1249089317 -5.62046764028 1.32750711236 +13.8986 -8.98580910527 3.28351086043 -5.36407313304 1.58108119345 +13.6596 -8.81812923265 3.44054241006 -5.36268401531 1.74387147984 +13.4243 -8.67928308094 3.5907518062 -5.22951009995 1.9006837316 +13.1929 -8.51739932049 3.7399962365 -5.05807785439 2.06537817594 +12.9652 -8.36986608277 3.88120544584 -4.82693121722 2.2558139358 +12.7411 -8.22180578735 4.02246766233 -4.65876808934 2.44202103983 +12.5206 -8.09133755302 4.15341518393 -4.53162961816 2.61202666731 +12.3037 -7.95496073521 4.28426472963 -4.41375784293 2.76894766091 +12.0902 -7.82650683522 4.40907736766 -4.28889704141 2.9194857291 +11.8802 -7.70099290581 4.52769265199 -4.18107261728 3.06084075147 +11.6735 -7.57713833556 4.64082096033 -4.05313509323 3.20136441391 +11.4702 -7.45810549171 4.75013688164 -3.91341528847 3.34453601063 +11.2701 -7.3475800512 4.85220491055 -3.78121068336 3.48767949807 +11.0732 -7.23430097874 4.95109951353 -3.6734082261 3.62396793057 +10.8795 -7.12903971397 5.048084872 -3.58354625539 3.7509013335 +10.6889 -7.02501037666 5.14189084529 -3.5002595613 3.86959803085 +10.5013 -6.92477213709 5.23302438804 -3.41178755575 3.98370864851 +10.3168 -6.82842453538 5.32056695942 -3.32321096368 4.09441372756 +10.1352 -6.73227776764 5.40401157402 -3.23178430011 4.20315554702 +9.9565496 -6.6389137709 5.48422842189 -3.15528543265 4.30721047971 +9.7807503 -6.54912886198 5.56184849428 -3.08185591003 4.40700592073 +9.6077805 -6.46375510917 5.63546675777 -2.99441618884 4.50640900964 +9.4375696 -6.3779934859 5.70605628256 -2.93344824622 4.60031888227 +9.2700996 -6.29618738411 5.77302934749 -2.85598578674 4.69302426492 +9.10532 -6.21804482079 5.83811188137 -2.79302980503 4.78212490164 +8.9431696 -6.13968488061 5.89990473576 -2.72111970453 4.87000035735 +8.7836304 -6.06432246955 5.95975117334 -2.65657678336 4.95554063974 +8.6266499 -5.99157374992 6.01645348544 -2.59432153847 5.03879095406 +8.4721899 -5.91899896857 6.07051081448 -2.53748490153 5.1193449144 +8.3202105 -5.8495040502 6.12217388351 -2.48539578097 5.1969264471 +8.1706696 -5.78022564106 6.17161714586 -2.43182761951 5.27228456174 +8.0235205 -5.71531125699 6.21864668406 -2.37766711409 5.34597534143 +7.8787398 -5.65076690867 6.26365925249 -2.33368188956 5.41676153801 +7.73628 -5.58923744517 6.30752713594 -2.29413943263 5.48444054177 +7.5960999 -5.52841246117 6.34871756505 -2.23995972177 5.55172373619 +7.45818 -5.47042464014 6.38850030602 -2.1971391071 5.61701630247 +7.3224602 -5.41231894847 6.42651303071 -2.16225842128 5.67958555478 +7.18893 -5.35705627703 6.46314495197 -2.12592528016 5.74006309615 +7.0575399 -5.30183176336 6.49793602803 -2.08605306574 5.79924118215 +6.9282498 -5.24897898765 6.53175950984 -2.0522655957 5.85656389149 +6.8010402 -5.19715527052 6.5645830622 -2.01863418972 5.91227552644 +6.6758699 -5.14715797053 6.59555767656 -1.97669976515 5.96757929416 +6.5527101 -5.0978880499 6.62518649268 -1.94513557498 6.02134140438 +6.43153 -5.05066461196 6.6539933497 -1.91190338469 6.07393064353 +6.3122902 -5.00411926908 6.68140234501 -1.88096489654 6.12525591592 +6.1949601 -4.95881177227 6.70760586917 -1.85095875317 6.17539061472 +6.0795202 -4.91442934966 6.73328079223 -1.82900077749 6.22364300174 +5.96593 -4.87152614267 6.75798680204 -1.79967565836 6.27099534256 +5.8541598 -4.82930310404 6.78169928671 -1.77196849289 6.31741703568 +5.7441802 -4.78869741167 6.80447698353 -1.74799303002 6.36263614059 +5.6359701 -4.74922537879 6.82688284622 -1.71895102877 6.40729650493 +5.5295 -4.71029009871 6.84887652691 -1.70276914143 6.45022181698 +5.4247298 -4.67231345769 6.86998886877 -1.67676830094 6.49255716917 +5.32164 -4.63533539766 6.89033799596 -1.65236943011 6.53419111867 +5.2202101 -4.59976605927 6.91002523519 -1.62636367145 6.57534804773 +5.12041 -4.56461390512 6.92902842752 -1.60398100642 6.61577188728 +5.0222001 -4.53001418596 6.94780297126 -1.58950712644 6.65482871472 +4.92558 -4.49677395696 6.96619975266 -1.56990746394 6.69312423416 +4.8305001 -4.46442684092 6.98417171756 -1.54988909472 6.73076061397 +4.7369499 -4.43296751057 7.00150496792 -1.53132555468 6.76768687394 +4.6448998 -4.40200468474 7.01856047461 -1.50946219975 6.80422878401 +4.5543299 -4.37193202857 7.03498228815 -1.49061865833 6.8401947626 +4.46521 -4.34263642809 7.05038852541 -1.4697375431 6.87578914542 +4.3775201 -4.31440682907 7.06574891836 -1.45414272229 6.9106254925 +4.2912302 -4.28615691552 7.08074745727 -1.43949804761 6.94472892339 +4.2063298 -4.25876167718 7.09552263744 -1.42414370398 6.97820114386 +4.1227999 -4.23216104727 7.10986104885 -1.40674767471 7.01125107904 +4.0405998 -4.20604603748 7.12328225964 -1.39273700033 7.04367061656 +3.9597199 -4.18058023412 7.13655535584 -1.38028095355 7.07540693818 +3.8801501 -4.15597510035 7.14918629016 -1.36874536547 7.10645858764 +3.8018401 -4.1315536511 7.16184475865 -1.36072120362 7.13664155035 +3.7248001 -4.10805401919 7.17372163458 -1.34472303946 7.16657038336 +3.6489899 -4.08484144807 7.18524880902 -1.33543191017 7.19582535903 +3.5743899 -4.06200089457 7.19636147301 -1.32966925901 7.22422305874 +3.5009999 -4.03983109063 7.20753603532 -1.31388332714 7.25248118141 +3.4287801 -4.01826742368 7.21784849229 -1.30512551533 7.2801636211 +3.3577199 -3.99791637516 7.22752628117 -1.28742800489 7.30786288857 +3.2878001 -3.97789098104 7.23647972655 -1.27174234964 7.33545473316 +3.2190001 -3.95833234675 7.24530583495 -1.25748464203 7.36285688238 +3.1513 -3.93595354574 7.25675769086 -1.26882207039 7.38856848428 +3.0847001 -3.91589954606 7.26627322287 -1.25802189396 7.4140123047 +3.01916 -3.896842786 7.27566954531 -1.24618708684 7.43926274984 +2.95467 -3.87800442812 7.28384132598 -1.2362855848 7.4642290505 +2.8912201 -3.85942953146 7.29229081384 -1.23456647508 7.48846833253 +2.8287799 -3.8416643552 7.30029425597 -1.21921425152 7.51278088019 +2.76735 -3.82418700859 7.30801269838 -1.21205232635 7.53671290033 +2.7068999 -3.80705188512 7.31511572445 -1.20641460894 7.5602071613 +2.6474199 -3.79022462043 7.32154312943 -1.20128638752 7.58327355985 +2.5889001 -3.77407390429 7.3282772753 -1.19621869313 7.60593464872 +2.5313101 -3.75818853075 7.33436983746 -1.18961097003 7.62829276738 +2.4746499 -3.74276743766 7.34024124269 -1.18579958455 7.6502274303 +2.4189 -3.7275015139 7.34543523624 -1.18101316172 7.67181199573 +2.3640499 -3.71294278863 7.35025701397 -1.17681927093 7.69303821049 +2.31007 -3.69881480346 7.35488910887 -1.17584872069 7.71378356672 +2.2569599 -3.68518041299 7.35965269581 -1.1787498025 7.73389425312 +2.2047 -3.67166184802 7.36411058727 -1.17521574965 7.75370713872 +2.15328 -3.65845988451 7.367559361 -1.17393523799 7.77313546913 +2.10269 -3.64556270311 7.37168509557 -1.17193780059 7.7922339786 +2.0529001 -3.63320494394 7.37428950806 -1.16766095039 7.81112094047 +2.0039201 -3.62138127301 7.37728924508 -1.16647944499 7.82967414174 +1.9557199 -3.60985087557 7.37951664638 -1.16655693463 7.84785556007 +1.90829 -3.59822115665 7.38199966176 -1.17228434 7.86546580226 +1.86163 -3.58728918893 7.38388102993 -1.17501078348 7.88265726863 +1.81572 -3.57676229835 7.38621915474 -1.17678863525 7.89949148201 +1.77054 -3.56610691665 7.38763637961 -1.17796469806 7.91600574961 +1.7260799 -3.55587677859 7.38955756294 -1.18391068811 7.93204688164 +1.68234 -3.54588864888 7.39065441139 -1.18030727901 7.9479791952 +1.6393 -3.5361502754 7.39164551088 -1.19065499666 7.96332016404 +1.5969599 -3.52689013289 7.39319697069 -1.19362463151 7.97835208353 +1.55529 -3.5177384411 7.39459348844 -1.19692201002 7.99308314139 +1.51429 -3.50872211562 7.3949022088 -1.19990436654 8.00753734773 +1.47395 -3.49990646574 7.3948118192 -1.20365043103 8.02170086236 +1.43425 -3.4918832317 7.39372969008 -1.2058264995 8.03563579364 +1.39519 -3.48383226713 7.39299450524 -1.21038244379 8.04927850974 +1.35676 -3.47633442253 7.3920830929 -1.21131211673 8.06275178023 +1.3189501 -3.46888304433 7.39057844576 -1.22233803647 8.07575989372 +1.28174 -3.46183836342 7.3882365444 -1.22379516742 8.08860673932 +1.2451299 -3.45495677205 7.38694680248 -1.23628105398 8.10098326497 +1.20911 -3.44803104638 7.38522378914 -1.24197845569 8.11310106542 +1.17366 -3.44126775464 7.38386508211 -1.24553147042 8.12503034012 +1.13878 -3.43471886001 7.38060780397 -1.25285406095 8.13667629792 +1.10447 -3.42871923434 7.37842419455 -1.26195651269 8.14800471475 +1.0707 -3.42379542334 7.37534127181 -1.26657298942 8.15914560504 +1.03747 -3.41921040197 7.37213020272 -1.27557978422 8.1699941556 +1.0047801 -3.41373615061 7.36946975461 -1.2811486492 8.18064540561 +0.97261602 -3.40946053525 7.36465554758 -1.28768436785 8.19108381327 +0.940965 -3.40515145107 7.36073676944 -1.30213668642 8.20113397493 +0.90982199 -3.4008616165 7.35722253798 -1.30886764002 8.21098660367 +0.879179 -3.39611159739 7.35313166787 -1.30847210543 8.22080703068 +0.84902698 -3.39248673546 7.34819840282 -1.31862482304 8.23036166648 +0.819359 -3.38892392405 7.3436333477 -1.32986483742 8.23963816023 +0.79016799 -3.38534298549 7.33910223001 -1.34243496261 8.2486211131 +0.76144397 -3.38110969903 7.33390760941 -1.34641434067 8.25749457358 +0.733181 -3.37820031294 7.32896891707 -1.35045083984 8.26625954505 +0.70537198 -3.37519177359 7.32236539213 -1.35626900963 8.27488227974 +0.67800897 -3.37271709274 7.31680108453 -1.35757030404 8.28345371194 +0.65108502 -3.37021726617 7.31069750534 -1.36855567723 8.29178673177 +0.62459397 -3.36736941835 7.30345937527 -1.38316638704 8.29982440316 +0.59852701 -3.36485558329 7.2981223134 -1.39234535072 8.30767484726 +0.572878 -3.36244921077 7.29229071135 -1.39818148444 8.31540367895 +0.54764098 -3.36023813208 7.28625803326 -1.40836513672 8.32293791434 +0.52280903 -3.35798301974 7.28069729195 -1.41773979824 8.33029596673 +0.498375 -3.35538071067 7.27466702732 -1.4280153394 8.33747040432 +0.474334 -3.35281445253 7.26877646796 -1.43950951997 8.3444450084 +0.45067799 -3.35088552631 7.26253308595 -1.43393387014 8.35149671855 +0.42740101 -3.34907071904 7.25512505038 -1.44549571235 8.35835046811 +0.40449899 -3.34796241168 7.24947925217 -1.44238563855 8.36523903522 +0.38196301 -3.34653017906 7.24402648008 -1.45925976761 8.37185164998 +0.35978901 -3.34566584841 7.23711605922 -1.46766985309 8.37832588036 +0.337971 -3.34423158621 7.23039070533 -1.47697017937 8.38465098311 +0.31650299 -3.34306510848 7.22424625588 -1.48051637676 8.39091329218 +0.29538 -3.34158054278 7.21780739035 -1.49376848549 8.39697629323 +0.27459499 -3.34020769614 7.21136994804 -1.50004689887 8.402941518 +0.25414401 -3.33892355756 7.20356374782 -1.51465353761 8.40869924956 +0.23402099 -3.33724893563 7.19771903212 -1.5275790691 8.41427980478 +0.214221 -3.33568290428 7.19317090031 -1.54031666728 8.41969010355 +0.194739 -3.33454500084 7.18873723343 -1.53744185748 8.42512795918 +0.175569 -3.33328484759 7.18342384285 -1.54330974644 8.43048351161 +0.156707 -3.33211785885 7.17801098386 -1.55516689982 8.43568445485 +0.13814799 -3.33138485195 7.1720169598 -1.55717485546 8.44085166047 +0.119886 -3.33048197426 7.1675855601 -1.56572452658 8.44590749241 +0.101917 -3.32935122564 7.1619214537 -1.56709554701 8.45093699368 +0.084236696 -3.3284034041 7.15763511076 -1.57818693012 8.45582843224 +0.06684 -3.32712298367 7.1515592294 -1.58684083541 8.46061256819 +0.0497224 -3.32619771667 7.14672846749 -1.58271638404 8.46543080034 +0.032879502 -3.32525395047 7.14025277324 -1.58847385187 8.47017259514 +0.016306801 -3.32478995451 7.13381191379 -1.59582911801 8.47482236781 +0.0 -3.32366483955 7.12771632375 -1.60427346064 8.47937021555 #boost_burst = 30 17.0902 -11.3291033347 1.0539371292 -8.1064250848 -1.64197640223 16.7999 -10.9427424113 1.31751109254 -7.64383971268 -1.0428765153 diff --git a/doc/building.rst b/doc/building.rst index b47b2047..f9ce7aa6 100644 --- a/doc/building.rst +++ b/doc/building.rst @@ -23,7 +23,7 @@ Requirements Optional requirements are: -* An `OpenMP `_-enabled compiler +* An `OpenMP `_-enabled compiler (with OpenMP >= 2.0) * `CxxTest `_, required only to compile the unit tests These libraries are usually available as packages diff --git a/hpc/shark-run b/hpc/shark-run index 60336fd8..1caed035 100755 --- a/hpc/shark-run +++ b/hpc/shark-run @@ -63,6 +63,74 @@ _slurm_quantity_as_list() { echo "${_all_vals## }" } +# Returns a list with the number of CPUs that each task will use +# +# CPUs is given explicitly (via -c in shark-submit); otherwise we +# take what we are given on each node +_slurm_cpus_per_task() { + cpus_per_node=(`_slurm_quantity_as_list $SLURM_JOB_CPUS_PER_NODE`) + info "CPUs per node: ${cpus_per_node[*]}" >&2 + cpus_per_task="" + for i in `eval echo {1..${#cpus_per_node[*]}}` + do + let "i = i - 1" + c=${cpus_per_node[i]} + t=${tasks_per_node[i]} + div=$(( $c / $t )) + rem=$(( $c % $t )) + + # Distribute CPUs within a node in round-robin fashion + if [ $rem = 0 ] + then + cpus_per_task="$cpus_per_task `repeat $div $t`" + else + cpus_per_task="$cpus_per_task `repeat $div $(($t - $rem))` `repeat $(( $div + 1 )) $rem`" + fi + done + echo "${cpus_per_task}" +} + +# Returns a list with the amount of memory that each task will use +# +# Memory is given either per CPU or per node +# In the former case, mem/task = mem/cpu * cpus/task +# In the latter, mem/task = (mem/node) / (task/node) +_slurm_mem_per_task() { + if [ -z "$SLURM_MEM_PER_CPU" ] + then + if [ -z "$SLURM_MEM_PER_NODE" ] + then + error "Neither SLURM_MEM_PER_CPU nor SLURM_MEM_PER_NODE could be found, cannot calculate memory per shark instance" + exit 1 + fi + + mem_per_node=(`_slurm_quantity_as_list $SLURM_MEM_PER_NODE`) + if [ ${#mem_per_node[*]} = 1 ] + then + mem_per_node=(`repeat $mem_per_node $SLURM_JOB_NUM_NODES`) + fi + info "Memory per node: ${mem_per_node[*]}" >&2 + + for i in `eval echo {1..${#mem_per_node[*]}}` + do + let "i = i - 1" + t=${tasks_per_node[i]} + m=${mem_per_node[i]} + mem_per_task="$mem_per_task `repeat $(($m / $t)) $t`" + done + else + mem_per_cpu=(`repeat $SLURM_MEM_PER_CPU ${#shark_subvolumes[*]}`) + for i in `eval echo {1..${#mem_per_cpu[*]}}` + do + let "i = i - 1" + m=${mem_per_cpu[i]} + c=${cpus_per_task[i]} + mem_per_task="$mem_per_task $(($m * $c))" + done + fi + echo "${mem_per_task}" +} + print_usage() { echo echo "$0: Runs shark under a queueing environment" @@ -211,7 +279,7 @@ config_file=${@:$OPTIND:1} # Which shark binary should be used shark_binary=${shark_binary:-shark} -# Make sure the configuration file exists before submitting +# Make sure the configuration file exists before running if [ ! -f ${config_file} ] then error "File ${config_file} is not an existing (or accessible) file" @@ -230,59 +298,16 @@ then done fi -cpus_per_node=(`_slurm_quantity_as_list $SLURM_JOB_CPUS_PER_NODE`) +# Calculate which tasks run where, and how many CPUs and how much memory +# of each them can consume based on the requested resources +# +# Because mem_per_task might depend on cpus_per_task we need to +# get the latter first, then the former. tasks_per_node=(`_slurm_quantity_as_list $SLURM_TASKS_PER_NODE`) -info "CPUs per node: ${cpus_per_node[*]}" info "Tasks per node: ${tasks_per_node[*]}" - -mem_per_task=${SLURM_MEM_PER_CPU:-} -if [ -z "$mem_per_task" ] -then - if [ -z "$SLURM_MEM_PER_NODE" ] - then - error "Neither SLURM_MEM_PER_CPU nor SLURM_MEM_PER_NODE could be found, cannot calculate memory per shark instance" - exit 1 - fi - - mem_per_node=(`_slurm_quantity_as_list $SLURM_MEM_PER_NODE`) - if [ ${#mem_per_node[*]} = 1 ] - then - mem_per_node=(`repeat $mem_per_node $SLURM_JOB_NUM_NODES`) - fi - info "Memory per node: ${mem_per_node[*]}" - - mem_per_task="" - for i in `eval echo {1..${#mem_per_node[*]}}` - do - let "i = i - 1" - t=${tasks_per_node[i]} - m=${mem_per_node[i]} - mem_per_task="$mem_per_task `repeat $(($m / $t)) $t`" - done - mem_per_task=($mem_per_task) -else - mem_per_task=(`repeat $mem_per_task ${#shark_subvolumes[*]}`) -fi - -cpus_per_task="" -for i in `eval echo {1..${#cpus_per_node[*]}}` -do - let "i = i - 1" - c=${cpus_per_node[i]} - t=${tasks_per_node[i]} - div=$(( $c / $t )) - rem=$(( $c % $t )) - - # Distribute CPUs within a node in round-robin fashion - if [ $rem = 0 ] - then - cpus_per_task="$cpus_per_task `repeat $div $t`" - else - cpus_per_task="$cpus_per_task `repeat $div $(($t - $rem))` `repeat $(( $div + 1 )) $rem`" - fi -done -cpus_per_task=($cpus_per_task) +cpus_per_task=(`_slurm_cpus_per_task`) info "CPUs per task: ${cpus_per_task[*]}" +mem_per_task=(`_slurm_mem_per_task`) info "Memory per task: ${mem_per_task[*]}" # Calculate the command to run @@ -312,10 +337,11 @@ for i in `eval echo {1..${#shark_subvolumes[*]}}` do let "i = i - 1" s=${shark_subvolumes[i]} - t=${cpus_per_task[i]} + c=${cpus_per_task[i]} m=${mem_per_task[i]} - info "Spawning shark run for subvolume $s with $t threads and $m MB of memory" - $cmd -c $t --mem-per-cpu $(($m/$t)) $post_cmd -o "execution.simulation_batches=$s" -t $t &> "shark_subvol_${s}.log" & + _cmd="$cmd -c $c --mem-per-cpu $(($m/$c)) $post_cmd -o \"execution.simulation_batches=$s\" -t $c" + info "Spawning shark run for subvolume $s with $c threads and $m MB of memory: $_cmd" + eval $_cmd &> "shark_subvol_${s}.log" & pids+=($!) done diff --git a/hpc/shark-submit b/hpc/shark-submit index d75f90fc..5fe5d8e2 100755 --- a/hpc/shark-submit +++ b/hpc/shark-submit @@ -238,7 +238,12 @@ submit_slurm() { if [ -n "$mem_per_task" ] then - cmd="$cmd --mem-per-cpu $(($mem_per_task / 1024 / 1024))M" + # Scale memory-per-task to memory-per-CPU + mem=$(($mem_per_task / 1024 / 1024)) + if [ -n "$cpus_per_task" ]; then + mem=$((mem / $cpus_per_task)) + fi + cmd="$cmd --mem-per-cpu ${mem}M" fi if [ -n "$cpus_per_task" ] diff --git a/include/components.h b/include/components.h index a3a35272..25651276 100644 --- a/include/components.h +++ b/include/components.h @@ -48,6 +48,8 @@ typedef std::shared_ptr SubhaloPtr; typedef std::shared_ptr HaloPtr; typedef std::shared_ptr MergerTreePtr; +/// Type used by galaxy_count() methods +typedef typename std::vector::size_type galaxies_size_type; /** * The common base for all baryon component types. @@ -593,7 +595,7 @@ class Subhalo : public Identifiable, public Spatial { void remove_galaxies(const std::vector &to_remove); /// Returns the number of galaxies contained in this Halo - unsigned long galaxy_count() const + galaxies_size_type galaxy_count() const { return galaxies.size(); } @@ -737,7 +739,7 @@ class Halo : public Identifiable, public Spatial { /// /// Returns the number of galaxies contained in this Halo /// - unsigned long galaxy_count() const; + galaxies_size_type galaxy_count() const; /** * @return The total baryon mass contained in this Halo diff --git a/include/dark_matter_halos.h b/include/dark_matter_halos.h index 58fe3f72..667ac402 100644 --- a/include/dark_matter_halos.h +++ b/include/dark_matter_halos.h @@ -117,8 +117,10 @@ class DarkMatterHalos { SimulationParameters sim_params; std::default_random_engine generator; std::lognormal_distribution distribution; - std::uniform_real_distribution flat_distribution; + std::uniform_real_distribution flat_distribution; +private: + xyz random_point_in_sphere(float r); }; /// Type used by users to keep track o diff --git a/include/hdf5/iobase.h b/include/hdf5/iobase.h index 2b854487..c9822c36 100644 --- a/include/hdf5/iobase.h +++ b/include/hdf5/iobase.h @@ -26,6 +26,7 @@ #ifndef INCLUDE_HDF5_IOBASE_H_ #define INCLUDE_HDF5_IOBASE_H_ +#include #include #include diff --git a/include/mixins.h b/include/mixins.h index 2826cc57..cf365e22 100644 --- a/include/mixins.h +++ b/include/mixins.h @@ -41,6 +41,13 @@ class xyz { public: + xyz() : x(0), y(0), z(0) {}; + + xyz(T x, T y, T z) : x(x), y(y), z(z) {}; + + template + xyz(xyz other) : x(other.x), y(other.y), z(other.z) {}; + /** * The value in the X coordinate */ @@ -56,11 +63,78 @@ class xyz { */ T z; - T norm() + xyz &operator+=(T scalar) + { + x += scalar; + y += scalar; + z += scalar; + return *this; + } + + xyz operator+(T scalar) const + { + xyz sum(*this); + sum += scalar; + return sum; + } + + template + xyz &operator+=(const xyz &lhs) + { + x += lhs.x; + y += lhs.y; + z += lhs.z; + return *this; + } + + template + xyz operator+(const xyz &lhs) const + { + xyz sum(*this); + sum += lhs; + return sum; + } + + xyz &operator*=(T scalar) + { + x *= scalar; + y *= scalar; + z *= scalar; + return *this; + } + + xyz operator*(T scalar) const + { + xyz multiplied(*this); + multiplied *= scalar; + return multiplied; + } + + xyz &operator/=(T scalar) + { + x /= scalar; + y /= scalar; + z /= scalar; + return *this; + } + + xyz operator/(T scalar) const + { + xyz divided(*this); + divided /= scalar; + return divided; + } + + T norm() const { return std::sqrt(x * x + y * y + z * z); } + xyz unit() const + { + return *this / norm(); + } + }; /** diff --git a/include/numerical_constants.h b/include/numerical_constants.h index d64e8401..24f27e7a 100644 --- a/include/numerical_constants.h +++ b/include/numerical_constants.h @@ -29,11 +29,10 @@ namespace shark { /** - * A collection of numerical constants used throughout SHArk + * A collection of numerical constants used throughout shark */ namespace constants { - // Templated constexpr pow function to define constant powers with positive // integral exponents in our constants // Defined inside the constants namespace to avoid polluting the parennt shark @@ -48,114 +47,157 @@ namespace constants { return base; }; - constexpr float SQRT2=1.4142135624; - - /** Euler's constant */ - constexpr float Eulers_Constant = 0.5772156649015328606; - - /* PI and friends */ - constexpr float PI = 3.1415926536; - constexpr float PIO2 = PI / 2.0; - constexpr float PIO4 = PI / 4.0; - constexpr float SPI = 4.0 / 3.0 * PI; - constexpr float PI4 = 4.0 * PI; - constexpr float PI2 = 2.0 * PI; - constexpr float PISQ = pow<2>(PI); - constexpr float SQRTPI = 1.7724538509; - - /*Standard multipliers.*/ - constexpr float MILLI=1.0e-3, logMILLI=-3.0; - constexpr float DECA =1.0e+1, logDECA =+1.0; - constexpr float HECTO=1.0e+2, logHECTO=+2.0; - constexpr float KILO =1.0e+3, logKILO =+3.0; - constexpr float MEGA =1.0e+6, logMEGA =+6.0; - constexpr float GIGA =1.0e+9, logGIGA =+9.0; - - /* Small numbers (for tolerances usually).*/ - constexpr double EPS3=1.0e-3; - constexpr double EPS4=1.0e-4; - constexpr double EPS6=1.0e-6; - - /*Unit conversions.*/ - constexpr float J2ERG=1.0e7, logJ2ERG=7.0; /*Number of ergs in a Joule.*/ - constexpr float GYR2S=3.15576e16; /*The number of seconds in a Gyr (based on the Julian year - of exactly 365.25 days - Allen's Astrophysical Quantities, page 15)*/ - constexpr float YR2S=GYR2S/GIGA; /*The number of seconds in a year.*/ - constexpr float MPC2M=3.0856775807e22, sqrtMPC2M=1.75660968365e11; /*The number of metres in a Mpc (Particle Data Book 2002, - page 6).*/ - constexpr float KPC2M=MPC2M/KILO; /*The number of metres in a kpc (Particle Data Book 2002, page 6).*/ - constexpr float PC2M=3.0856775807e16; /*The number of metres in a pc (Particle Data Book 2002, page 6).*/ - constexpr float MPC2CM=MPC2M*HECTO; /*The number of centimetres in a Mpc (Particle Data Book 2002, page 6).*/ - constexpr float PC2CM=PC2M*HECTO; /*The number of centimetres in a pc (Particle Data Book 2002, page 6).*/ - constexpr float KMS2MPCGYR=KILO*GYR2S/MPC2M; /*Convert velocity in km/s to Mpc/Gyr.*/ - constexpr float M2CM=100.0; /*Number of cm in a m.*/ - constexpr float KM2CM = M2CM*KILO; /*Number of cm in a km.*/ - constexpr float eV2ERG=1.60217733e-12, logeV2ERG=-11.7952894176; /*Convert electron volts to ergs.*/ - constexpr float eV2J=1.60217733e-19; /*Convert electron volts to Joules.*/ - constexpr float ERG2J=1.0e-7; /*Number of Joules in an erg.*/ - constexpr float MPCKM2GYR=MPC2M/GYR2S/KILO; /*Convert units of Mpc/(km/s) to Gyr.*/ - - /*Properties of the Sun.*/ - /*The mass of the Sun in kg (Allen's Astrophysical Quantities, page 12).*/ - constexpr float MSOLAR=1.9891e30, MSOLAR_1030kg=MSOLAR/1.0e30, sqrtMSOLAR=1.4103545653e15, MSOLAR_g=MSOLAR*KILO, logMSOLAR = 30.298656617391146; - constexpr float LSUN=3.845e26, logLSUN=26.5848963; /*Bolometric luminosity of the Sun in W (Allen's Astrophysical Quantities, page 340).*/ - constexpr float LSUN_ERG=LSUN*J2ERG; /*Bolometric luminosity of the Sun in erg/s (Allen's Astrophysical Quantities, page 340).*/ - constexpr float LOG_LSUN_ERG=logLSUN+logJ2ERG; /*Bolometric luminosity of the Sun in erg/s (Allen's Astrophysical Quantities, page 340).*/ - constexpr float X_Hydrogen_Solar=0.707; /*Mass fraction of hydrogen in Solar plasma (Allen's Atrophysical Quantities, page 28).*/ - constexpr float Y_Helium_Solar=0.274; /*Mass fraction of helium in Solar plasma (Allen's Atrophysical Quantities, page 28).*/ - constexpr float Z_Metals_Solar=0.0189; /*Mass fraction of metals in Solar plasma (Allen's Atrophysical Quantities, page 28).*/ - constexpr float MACCRETION_cgs_simu = 1/MSOLAR_g*GYR2S; /*Conversion of accretion rate from gr/s to Msun/Gyr.*/ - - /* Physical constants.*/ - constexpr float G_SI=6.67259e-11, sqrtG_SI=8.16859228998e-6; /*The gravitational constant in units of m^3/kg/s^2 (Allen's Astrophysical Quantities, page 8).*/ - constexpr float G=G_SI*MSOLAR/MPC2M/pow<2>(KILO), sqrtG=sqrtG_SI*sqrtMSOLAR/sqrtMPC2M/KILO; /*The gravitational constant in units of (km/s)^2 Mpc/Msun.*/ - constexpr float G_cgs = 6.67259e-8; /*Gravitational constant in units of cm/gr/s^2.*/ - constexpr float G_MPCGYR=G_SI*MSOLAR*(GYR2S/MPC2M)/KILO/MPC2M; /*The gravitational constant in units of km/s Mpc^2 Msun^-1 Gyr^-1*/ - constexpr float G_MPCGYR2=G_SI*MSOLAR*pow<2>(GYR2S/MPC2M)/MPC2M; /*The gravitational constant in units of Mpc^3 Msun^-1 Gyr^-2*/ - constexpr float k_Boltzmann=1.3806503e-23; /*Boltzmann's constant in J/K (Particle Data Book 2002, page 5).*/ - constexpr float k_Boltzmann_erg=k_Boltzmann*J2ERG, logk_Boltzmann=-22.859916308; - constexpr float c_light=2.99792458e8, logc_light=8.47682070; /*Speed of light in m/s (Allen's Astrophysical Quantities, page 8).*/ - constexpr float c_light_cm=c_light*M2CM; /*Speed of light in cm/s (Allen's Astrophysical Quantities, page 8).*/ - constexpr float sigma_Thomson=6.65245854e-29; /*Thomson cross section for zero energy photons in m^2 (Particle Data Book 2002, page 5).*/ - constexpr float M_Atomic=1.66053873e-27, sqrtM_Atomic=4.07497083425e-14; /*Mass of unit atomic weight in kg (12C=12 scale);*/ - constexpr float M_Atomic_g=M_Atomic*KILO; /*Mass of unit atomic weight in g (12C=12 scale).*/ - constexpr float Atomic_Mass_Hydrogen=1.00794; /*Mass of hydrogen in units of M_Atomic (Particle Data Book 2002, page 283).*/ - constexpr float Atomic_Mass_Helium=4.002602; /*Mass of helium in units of M_Atomic (Particle Data Book 2002, page 283).*/ + /** @name Numerical constants */ + // @{ + /** Square root of 2 */ + constexpr double SQRT2 = 1.4142135623730951; + + /** pi */ + constexpr double PI = 3.14159265358979323846; + + /** pi over 2 */ + constexpr double PIO2 = PI / 2.0; + + constexpr double SPI = 4.0 / 3.0 * PI; + + /** pi times 2 */ + constexpr double PI2 = 2.0 * PI; + + /** pi times 4 */ + constexpr double PI4 = 4.0 * PI; + // @} + + /** @name Standard multipliers */ + // @{ + constexpr double HECTO = 1.0e+2; + constexpr double KILO = 1.0e+3; + constexpr double MEGA = 1.0e+6; + constexpr double GIGA = 1.0e+9; + constexpr double EPS3 = 1.0e-3; + constexpr double EPS6 = 1.0e-6; + // @} + + /** @name Unit conversions */ + // @{ + /** Number of ergs in a Joule */ + constexpr double J2ERG = 1.0e7; + + /** Number of seconds in a Gyr (based on the Julian year of exactly 365.25 days - Allen's Astrophysical Quantities, page 15) */ + constexpr double GYR2S = 3.15576e16; + + /** Number of metres in a Mpc (Particle Data Book 2002, page 6) */ + constexpr double MPC2M = 3.0856775807e22; + + /** Number of centimetres in a Mpc (Particle Data Book 2002, page 6) */ + constexpr double MPC2CM = MPC2M * HECTO; + + /** Number of cm in a km */ + constexpr double KM2CM = 1e5; + + /** Number of Joules in an erg */ + constexpr double ERG2J = 1.0e-7; + + /** Convert units of Mpc/(km/s) to Gyr */ + constexpr double MPCKM2GYR = MPC2M / GYR2S / KILO; + // @} + + + /** @name Properties of the Sun */ + // @{ + /** The mass of the Sun in kg */ + constexpr double MSOLAR = 1.9891e30; + + /** The mass of the Sun in g */ + constexpr double MSOLAR_g = MSOLAR * KILO; + + /** Conversion of accretion rate from gr/s to Msun/Gyr */ + constexpr double MACCRETION_cgs_simu = 1 / MSOLAR_g * GYR2S; + // @} + + /** @name Physical constants */ + // @{ + /** The gravitational constant in units of m^3/kg/s^2 */ + constexpr double G_SI = 6.67259e-11; + + /** The gravitational constant in units of (km/s)^2 Mpc/Msun */ + constexpr double G = G_SI * MSOLAR / MPC2M / pow<2>(KILO); + + /** Gravitational constant in units of cm/gr/s^2 */ + constexpr double G_cgs = 6.67259e-8; + + /** Boltzmann's constant in J/K (Particle Data Book 2002, page 5) */ + constexpr double k_Boltzmann = 1.3806503e-23; + + constexpr double k_Boltzmann_erg = k_Boltzmann * J2ERG; + + /** Speed of light in m/s (Allen's Astrophysical Quantities, page 8) */ + constexpr double c_light = 2.99792458e8; + + /** Speed of light in cm/s (Allen's Astrophysical Quantities, page 8) */ + constexpr double c_light_cm = c_light * 100; + + /** Thomson cross section for zero energy photons in m^2 (Particle Data Book 2002, page 5) */ + constexpr double sigma_Thomson = 6.65245854e-29; + + /** Mass of unit atomic weight in kg (12C=12 scale) */ + constexpr double M_Atomic = 1.66053873e-27; + + /** Mass of unit atomic weight in g (12C=12 scale) */ + constexpr double M_Atomic_g = M_Atomic * KILO; + + /** Mass of hydrogen in units of M_Atomic (Particle Data Book 2002, page 283) */ + constexpr double Atomic_Mass_Hydrogen = 1.00794; + + /** Mass of helium in units of M_Atomic (Particle Data Book 2002, page 283) */ + constexpr double Atomic_Mass_Helium = 4.002602; constexpr double Pressure_Conv = PIO2 * G * MSOLAR_g / pow<3>(MPC2CM) * pow<2>(HECTO * KILO)/ k_Boltzmann_erg; + // @} + + /** @name Cosmological constants */ + // @{ + /** The Hubble constant in units of h km/s/Mpc */ + constexpr double H0100 = 100.0; - /*Cosmological constants.*/ - constexpr float H0100=100.0; /*The Hubble constant in units of h km/s/Mpc.*/ - constexpr float H0100PGYR=H0100*KILO*GYR2S/MPC2M; /*The Hubble constant in units of h/Gyr.*/ - constexpr float RHOCRIT=3.0*pow<2>(H0100)/8.0/PI/G, sqrtRHOCRIT=0.61237243570*H0100/SQRTPI/sqrtG; /*Critical density of the Universe (3*H0^2/8*PI*G) in h^2 Msun/Mpc^3.*/ + /** The Hubble constant in units of h/Gyr */ + constexpr double H0100PGYR = H0100 * KILO * GYR2S / MPC2M; - constexpr float X_Hydrogen=0.778; /*Mass fraction of hydrogen in primordial plasma.*/ - constexpr float Y_Helium =0.222; /*Mass fraction of helium in primordial plasma.*/ - constexpr float Z_Metals =5.36e-10; /*Mass fraction of metals in primordial plasma.*/ - constexpr float mu_Primordial=1.0/(2.0*X_Hydrogen/Atomic_Mass_Hydrogen+3.0*Y_Helium/Atomic_Mass_Helium); /*Mean atomic weight for fully ionized plasma of primordial composition.*/ + /** Mass fraction of hydrogen in primordial plasma */ + constexpr double X_Hydrogen = 0.778; - /*Dark matter halo parameters.*/ - constexpr float v_Halo_to_T_Virial=0.5e6*M_Atomic/k_Boltzmann; /*Conversion factor from virial velocity (km/s) to virial temperature (K).*/ - constexpr float fx_peak_NFW=0.2162165956; /*The peak value of the function [ln(1+x)-x/(1+x)]/x as appears in the rotation curve of the NFW halo.*/ + /** Mass fraction of helium in primordial plasma */ + constexpr double Y_Helium = 0.222; - /*Galaxy structural constants.*/ - constexpr float RDISK_HALF_SCALE = 1.678346990; /*The half-mass radius of an exponential disk in units of the disk scale-length.*/ + /** Mean atomic weight for fully ionized plasma of primordial composition */ + constexpr double mu_Primordial = 1.0 / (2.0 * X_Hydrogen / Atomic_Mass_Hydrogen + 3.0 * Y_Helium / Atomic_Mass_Helium); + // @} - /*gas content.*/ - constexpr float corr_factor_He = 1.35; /*correction factor to account for helium when only hydrogen is given: H=Mcold/corr_factor_He.*/ - constexpr float PressureConst = 4.33e-12; /*Constant converting the gravity and Boltzmann constants from the MKS system to the units necessary to obtain the pressure in units of K*cm^-3 (cgs).*/ - constexpr double Eddngtn_Lmnsty_Scale_Factor=4.0*PI*c_light*G_SI*MSOLAR*1.0e-20*M_Atomic*Atomic_Mass_Hydrogen/(sigma_Thomson*1.0e20), Eddngtn_Mdot_Constant = 0.1; + /** @name Galaxy structural constants */ + // @{ + /** The half-mass radius of an exponential disk in units of the disk scale-length */ + constexpr double RDISK_HALF_SCALE = 1.678346990; + // @} + + /** @name Gas content constants */ + // @{ + constexpr double Eddngtn_Lmnsty_Scale_Factor = 4.0 * PI * c_light * G_SI * MSOLAR * 1.0e-20 * M_Atomic * Atomic_Mass_Hydrogen / (sigma_Thomson * 1.0e20); constexpr double sigma_gas_mw = 2.5 * pow<2>(MEGA); - constexpr double lcool_conversion_factor = 1.0e-6 * pow<2>(1.0e-20 * MSOLAR / MPC2M / Atomic_Mass_Hydrogen / M_Atomic) / MPC2M; // Convert M_sun^2 kg^-2 ergs s^-1 cm^3 Mpc^-3 to 10^40 erg s^-1; + // @} + + /** @name Miscellaneous */ + // @{ + /** Convert M_sun^2 kg^-2 ergs s^-1 cm^3 Mpc^-3 to 10^40 erg s^-1 */ + constexpr double lcool_conversion_factor = 1.0e-6 * pow<2>(1.0e-20 * MSOLAR / MPC2M / Atomic_Mass_Hydrogen / M_Atomic) / MPC2M; - /*define a tolerance for evaluating negative mass*/ - constexpr float tolerance = 1e-10; + /** Maximum cooling luminosity in units of 10^40erg/s */ + constexpr double MAXLUM = 1e30; - /* define a maximum cooling luminosity in units of 10^40erg/s.*/ - constexpr float MAXLUM = 1e30; + /** Define a tolerance for evaluating negative mass */ + constexpr double tolerance = 1e-10; - /* Conversion between j/v and the half-mass radius from EAGLE*/ - constexpr float EAGLEJconv = 0.67714285714; + /** Conversion between j/v and the half-mass radius from EAGLE */ + constexpr double EAGLEJconv = 0.67714285714; + // @} }; diff --git a/include/omp_utils.h b/include/omp_utils.h new file mode 100644 index 00000000..1423ec88 --- /dev/null +++ b/include/omp_utils.h @@ -0,0 +1,156 @@ +// +// ICRAR - International Centre for Radio Astronomy Research +// (c) UWA - The University of Western Australia, 2018 +// Copyright by UWA (in the framework of the ICRAR) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// + +/** + * @file + * + * OpenMP-related utilities. These allow users to easily write "parallel for" + * constructs without having to deal with the OpenMP pragmas themselves, and + * ensuring they don't break compatibility with the minimum supported version + * of OpenMP we ensure with shark. + * + * At the moment, we offer compatibility with OpenMP 2.0. This is a pretty low + * version (5.0 is about to come out as of this writing), but on the one hand + * we don't really need more at the moment, and it also means we can hit more + * compilers. + */ + +#ifndef SHARK_OMP_UTILS_H_ +#define SHARK_OMP_UTILS_H_ + +#include + +#include "config.h" + +#ifdef SHARK_OPENMP +#include +#endif // SHARK_OPENMP + +namespace shark { + +namespace detail { + +inline int thread_index() +{ +#ifdef SHARK_OPENMP + return omp_get_thread_num(); +#else + return 0; +#endif // SHARK_OPENMP +} + +} // namespace detail + +/** + * Utility function to call a function over individual members of a container + * using an OpenMP parallel for with static scheduling. Using this function is + * simpler than having to repeat this code, and less error prone. If OpenMP + * support is not present then no parallelization takes place. + * + * @param first The first number of the range + * @param last The last (exclusive) number of the range + * @param num_threads The number of threads to use for parallelization + * @param f A callable that takes a single number from the range @p [first,last) + * and the thread index under which it is being executed + */ +template +void omp_static_for(Integer first, Integer last, int num_threads, Callable &&f) +{ + typedef typename std::make_signed::type omp_iterator_t; + omp_iterator_t __first = first; + omp_iterator_t __last = last; +#ifdef SHARK_OPENMP + #pragma omp parallel for num_threads(num_threads) schedule(static) +#endif // SHARK_OPENMP + for (omp_iterator_t it = __first; it < __last; it++) { + f(it, detail::thread_index()); + } +} + +/** + * Like omp_static_for(Integer, Integer, int, Callable), + * but takes a container reference instead of two integers, and iterates over + * the elements of the container. The container's iterator needs to be a random + * iterator. + * + * @param container A container of elements (set, vector, etc.) + * @param num_threads The number of threads to use for parallelization + * @param f A callable that takes a single item from the container and the + * thread index under which it is being executed + */ +template +void omp_static_for(Container &&container, int num_threads, Callable &&f) +{ + auto size = container.size(); + typedef typename std::make_signed::type signed_t; + omp_static_for(std::size_t(0), container.size(), num_threads, [&](signed_t i, int thread_num){ + f(container[i], thread_num); + }); +} + +/** + * Like omp_static_for(Integer, Integer, int, Callable), + * but using dynamic scheduling with a given chunk size. + * + * @param first The first number of the range + * @param last The last (exclusive) number of the range + * @param num_threads The number of threads to use for parallelization + * @param chunk The chunk size for the dynamic scheduling + * @param f A callable that takes a single number from the range @p [first,last) + * and the thread index under which it is being executed + */ +template +void omp_dynamic_for(Integer first, Integer last, int num_threads, int chunk, Callable &&f) +{ + typedef typename std::make_signed::type omp_iterator_t; + omp_iterator_t __first = first; + omp_iterator_t __last = last; +#ifdef SHARK_OPENMP + #pragma omp parallel for num_threads(num_threads) schedule(dynamic, chunk) +#endif // SHARK_OPENMP + for (omp_iterator_t it = __first; it < __last; it++) { + f(it, detail::thread_index()); + } +} + +/** + * Like omp_dynamic_for(Integer, Integer, int, int, Callable), + * but takes a container reference instead of two integers, and iterates over + * the elements of the container. The container's iterator needs to be a random + * iterator. + * + * @param container A container of elements (set, vector, etc.) + * @param num_threads The number of threads to use for parallelization + * @param chunk The chunk size for the dynamic scheduling + * @param f A callable that takes a single item from the container and the + * thread index under which it is being executed + */ +template +void omp_dynamic_for(Container &&container, int num_threads, int chunk, Callable &&f) +{ + auto size = container.size(); + typedef typename std::make_signed::type signed_t; + omp_dynamic_for(std::size_t(0), container.size(), num_threads, chunk, [&](signed_t i, int thread_num){ + f(container[i], thread_num); + }); +} + +} // namespace shark + +#endif /* SHARK_OMP_UTILS_H_ */ \ No newline at end of file diff --git a/include/options.h b/include/options.h index aa11331a..ac7a6073 100644 --- a/include/options.h +++ b/include/options.h @@ -87,7 +87,7 @@ class Options { check_valid_name(name); - if ( mandatory or options.find(name) != options.end() ) { + if ( mandatory || options.find(name) != options.end() ) { // Check that it's there and read it using the specialized // get template diff --git a/include/timer.h b/include/timer.h index bf5420e4..95e32196 100644 --- a/include/timer.h +++ b/include/timer.h @@ -41,6 +41,8 @@ class Timer { public: + typedef typename std::chrono::milliseconds::rep duration; + /** * Creates the timer and starts measuring time */ @@ -54,7 +56,7 @@ class Timer { * @return The time elapsed since the creation of the timer, in [ms] */ inline - unsigned long get() const { + duration get() const { return std::chrono::duration_cast(std::chrono::steady_clock::now() - t0).count(); } @@ -73,7 +75,7 @@ std::basic_ostream &operator<<(std::basic_ostream &os, const Timer &t) { return os; } - float ftime = time / 1000.; + float ftime = time / 1000.f; const char *prefix = " [s]"; if (ftime > 60) { ftime /= 60; diff --git a/include/utils.h b/include/utils.h index 504899fd..bce6fbf3 100644 --- a/include/utils.h +++ b/include/utils.h @@ -213,6 +213,9 @@ detail::_memory_amount memory_amount(std::size_t amount) { return {amount}; } +/// Returns the name of the computer executing this program +std::string gethostname(); + } // namespace shark #endif // SHARK_UTILS \ No newline at end of file diff --git a/scripts/runtime_stats.sh b/scripts/runtime_stats.sh new file mode 100755 index 00000000..5e853050 --- /dev/null +++ b/scripts/runtime_stats.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# +# Read one or more files containing the output logs from shark execution +# and spits out CSV content with high-level stats about the execution +# +# ICRAR - International Centre for Radio Astronomy Research +# (c) UWA - The University of Western Australia, 2018 +# Copyright by UWA (in the framework of the ICRAR) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +if [ $# -lt 1 ]; then + echo "Usage: $0 ..." + exit 1 +fi + +_total_secs() { + read -d '' -r _sed_cmd < parameters.mhalo_seed) { auto central = halo.central_subhalo->central_galaxy(); - if (central and central->smbh.mass == 0) { + if (central && central->smbh.mass == 0) { central->smbh.mass = parameters.mseed; central->smbh.mass_metals = 0; } diff --git a/src/components.cpp b/src/components.cpp index 5d2d8eb6..4417eb1e 100644 --- a/src/components.cpp +++ b/src/components.cpp @@ -203,7 +203,9 @@ void Subhalo::remove_galaxies(const std::vector &to_remove) LOG(warning) << "Trying to remove galaxy " << galaxy << " which is not in subhalo " << *this << ", ignoring"; continue; } - LOG(debug) << "Removing galaxy " << galaxy << " from subhalo " << *this; + if (LOG_ENABLED(debug)) { + LOG(debug) << "Removing galaxy " << galaxy << " from subhalo " << *this; + } galaxies.erase(it); } } @@ -282,9 +284,9 @@ double Halo::total_baryon_mass() const return mass; } -unsigned long Halo::galaxy_count() const +galaxies_size_type Halo::galaxy_count() const { - unsigned long count = 0; + galaxies_size_type count = 0; if (central_subhalo) { count = central_subhalo->galaxy_count(); } diff --git a/src/dark_matter_halos.cpp b/src/dark_matter_halos.cpp index 5b38641f..fd501d29 100644 --- a/src/dark_matter_halos.cpp +++ b/src/dark_matter_halos.cpp @@ -279,7 +279,7 @@ void DarkMatterHalos::disk_sAM(Subhalo &subhalo, Galaxy &galaxy){ galaxy.disk_gas.sAM = 2.0 * rdisk / constants::RDISK_HALF_SCALE * std::sqrt(v2tot_d); - if (std::isnan(galaxy.disk_gas.sAM) or std::isnan(galaxy.disk_gas.rscale)) { + if (std::isnan(galaxy.disk_gas.sAM) || std::isnan(galaxy.disk_gas.rscale)) { throw invalid_argument("rgas or sAM are NaN, cannot continue at disk_sAM in dark_matter_halos"); } @@ -399,57 +399,51 @@ struct lambert_w0 } }; +xyz DarkMatterHalos::random_point_in_sphere(float r) +{ + // We distribute cos_theta flatly instead of theta itself to end up with a + // more uniform distribution of points in the sphere + float cos_theta = flat_distribution(generator) * 2.0 - 1; //flat between -1 and 1. + float theta = std::acos(cos_theta); + float sin_theta = std::sin(theta); + float phi = flat_distribution(generator) * constants::PI2; //flat between 0 and 2PI. + return { + sin_theta * std::cos(phi) * r, + sin_theta * std::sin(phi) * r, + cos_theta * r + }; +} + void DarkMatterHalos::generate_random_orbits(xyz &pos, xyz &v, xyz &L, double total_am, const HaloPtr &halo){ double c = halo->concentration; - auto subhalo = halo->central_subhalo; + auto &subhalo = halo->central_subhalo; double rvir = halo_virial_radius(*subhalo); - auto pos_halo = subhalo->position; - // Assign positions based on an NFW halo of concentration c. nfw_distribution r(c); double rproj = r(generator); - double theta = std::acos(flat_distribution(generator)*2.0 - 1); //flat between -1 and 1. - double phi = flat_distribution(generator)*constants::PI2; //flat between 0 and 2PI. - - pos.x = rproj * std::cos(theta) * std::cos(phi) * rvir + pos_halo.x; - pos.y = rproj * std::cos(theta) * std::sin(phi) * rvir + pos_halo.y; - pos.z = rproj * std::sin(theta) * rvir + pos_halo.z; + pos = subhalo->position + random_point_in_sphere(rvir * rproj); // Assign velocities using NFW velocity dispersion and assuming isotropy. // f_c equation from Manera et al. (2013; eq. 23). + // Negative values happen if c <<~ 2.6, and thus we set the minimum value to f_c evaluated in c = 2.6. double f_c = c * (0.5 * c / (c + 1) - std::log(1 + c) / (1 + c))/ std::pow(std::log(1 + c) - c / (1 + c), 2.0); - - if(f_c < 0){ - //Negative values happen if c <<~ 2.6, and thus we set the minimum value to f_c evaluated in c = 2.6. + if (f_c < 0) { f_c = 0.04411218227; } // 1D velocity dispersion. - double sigma = std::pow(0.333 * constants::G * halo->Mvir / rvir * f_c, 0.5); - - std::normal_distribution normal_distribution(0,sigma); - - v.x = normal_distribution(generator) + halo->velocity.x; - v.y = normal_distribution(generator) + halo->velocity.y; - v.z = normal_distribution(generator) + halo->velocity.z; + double sigma = std::sqrt(0.333 * constants::G * halo->Mvir / rvir * f_c); + std::normal_distribution normal_distribution(0, sigma); + xyz delta_v {normal_distribution(generator), normal_distribution(generator), normal_distribution(generator)}; + v = halo->velocity + delta_v; // Assign angular momentum based on random angles, - // drawn random angles again - theta = std::acos(flat_distribution(generator)*2.0 - 1); //flat between -1 and 1. - phi = flat_distribution(generator)*constants::PI2; //flat between 0 and 2PI. - L.x = total_am * std::sin(theta) * std::cos(phi); - L.y = total_am * std::sin(theta) * std::sin(phi); - L.z = total_am * std::cos(theta); - + L = random_point_in_sphere(total_am); } - - - - } // namespace shark diff --git a/src/disk_instability.cpp b/src/disk_instability.cpp index 7b40eae7..1d8f4cc0 100644 --- a/src/disk_instability.cpp +++ b/src/disk_instability.cpp @@ -118,7 +118,7 @@ double DiskInstability::toomre_parameter(GalaxyPtr &galaxy){ //double rd = galaxy->disk_gas.rscale; double rd = galaxy->disk_size(); - if(md <= 0 or rd <= 0){ + if(md <= 0 || rd <= 0){ return 100; } @@ -144,7 +144,7 @@ double DiskInstability::bulge_size(GalaxyPtr &galaxy){ double c = merger_params.cgal; double bc = 0; - if(mb > 0 and rb > 0){ + if(mb > 0 && rb > 0){ bc = c * std::pow(mb,2.0)/rb; } @@ -155,7 +155,7 @@ double DiskInstability::bulge_size(GalaxyPtr &galaxy){ double rnew = c * std::pow((md + mb),2.0) / (bc + dc + combined_c); - if(std::isnan(rnew) or rnew <= 0 or rnew > 3){ + if(std::isnan(rnew) || rnew <= 0 || rnew > 3){ std::ostringstream os; os << galaxy << " has a bulge size not well defined in disk instabilities."; throw invalid_data(os.str()); @@ -200,7 +200,7 @@ void DiskInstability::create_starburst(SubhaloPtr &subhalo, GalaxyPtr &galaxy, d physicalmodel->evolve_galaxy_starburst(*subhalo, *galaxy, z, delta_t, false); // Check for small gas reservoirs left in the bulge. - if(galaxy->bulge_gas.mass > 0 and galaxy->bulge_gas.mass < merger_params.mass_min){ + if(galaxy->bulge_gas.mass > 0 && galaxy->bulge_gas.mass < merger_params.mass_min){ galaxy->disk_gas += galaxy->bulge_gas; @@ -208,7 +208,7 @@ void DiskInstability::create_starburst(SubhaloPtr &subhalo, GalaxyPtr &galaxy, d galaxy->disk_gas.rscale = galaxy->bulge_gas.rscale; galaxy->disk_gas.sAM = galaxy->bulge_gas.sAM; - if (std::isnan(galaxy->disk_gas.sAM) or std::isnan(galaxy->disk_gas.rscale)) { + if (std::isnan(galaxy->disk_gas.sAM) || std::isnan(galaxy->disk_gas.rscale)) { throw invalid_argument("rgas or sAM are NaN, cannot continue at disk_instabilities"); } } diff --git a/src/environment.cpp b/src/environment.cpp index 2ee681da..18670685 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -47,7 +47,7 @@ void Environment::process_satellite_subhalo_environment(Subhalo &satellite_subha //TODO } else{ - if(satellite_subhalo.hot_halo_gas.mass > 0 or satellite_subhalo.ejected_galaxy_gas.mass > 0 or satellite_subhalo.cold_halo_gas.mass > 0){ + if(satellite_subhalo.hot_halo_gas.mass > 0 || satellite_subhalo.ejected_galaxy_gas.mass > 0 || satellite_subhalo.cold_halo_gas.mass > 0){ central_subhalo.hot_halo_gas += satellite_subhalo.hot_halo_gas; central_subhalo.hot_halo_gas += satellite_subhalo.cold_halo_gas; diff --git a/src/evolve_halos.cpp b/src/evolve_halos.cpp index 14e53dc3..7b6e3eaa 100644 --- a/src/evolve_halos.cpp +++ b/src/evolve_halos.cpp @@ -24,11 +24,6 @@ #include #include -#include "config.h" -#ifdef SHARK_OPENMP -#include -#endif // SHARK_OPENMP - #include "components.h" #include "evolve_halos.h" #include "logging.h" @@ -101,7 +96,7 @@ void transfer_galaxies_to_next_snapshot(const std::vector &halos, int s // Check if this is a satellite subhalo, and whether this is the last snapshot in which it is identified. // In that case, the transfer of galaxies has already been done in merging_subhalos. // In any other case, we need to do the transfer. - if(subhalo->subhalo_type == Subhalo::SATELLITE and subhalo->last_snapshot_identified == subhalo->snapshot) { + if(subhalo->subhalo_type == Subhalo::SATELLITE && subhalo->last_snapshot_identified == subhalo->snapshot) { continue; } diff --git a/src/galaxy_creator.cpp b/src/galaxy_creator.cpp index 668e49f8..9ef069a0 100644 --- a/src/galaxy_creator.cpp +++ b/src/galaxy_creator.cpp @@ -91,7 +91,9 @@ bool GalaxyCreator::create_galaxies(const HaloPtr &halo, double z, Galaxy::id_t galaxy->galaxy_type = Galaxy::CENTRAL; central_subhalo->galaxies.push_back(galaxy); - LOG(debug) << "Added a central galaxy for subhalo " << central_subhalo; + if (LOG_ENABLED(debug)) { + LOG(debug) << "Added a central galaxy for subhalo " << central_subhalo; + } central_subhalo->hot_halo_gas.mass = halo->Mvir * cosmology->universal_baryon_fraction(); diff --git a/src/galaxy_mergers.cpp b/src/galaxy_mergers.cpp index d65c5c66..225f8e00 100644 --- a/src/galaxy_mergers.cpp +++ b/src/galaxy_mergers.cpp @@ -182,9 +182,11 @@ void GalaxyMergers::merging_subhalos(HaloPtr &halo, double z) //Identify which subhalos will disappear in the next snapshot if (satellite_subhalo->last_snapshot_identified == satellite_subhalo->snapshot) { - LOG(debug) << "Merging satellite subhalo " << satellite_subhalo - << " into central subhalo " << central_subhalo - << " because this is its last snapshot"; + if (LOG_ENABLED(debug)) { + LOG(debug) << "Merging satellite subhalo " << satellite_subhalo + << " into central subhalo " << central_subhalo + << " because this is its last snapshot"; + } //Calculate dynamical friction timescale for all galaxies in satellite_subhalo. merging_timescale(central_subhalo, satellite_subhalo, z, false); @@ -223,9 +225,11 @@ void GalaxyMergers::merging_subhalos(HaloPtr &halo, double z) // the galaxies should be transferred to (rather than the descendant subhalo, which by chance could be a satellite subhalo). auto desc_subhalo = central_subhalo->descendant->host_halo->central_subhalo; - LOG(debug) << "Merging central subhalo " << central_subhalo - << " into " << desc_subhalo << " (the central subhalo of its descendant halo)" - << " because this is its last snapshot"; + if (LOG_ENABLED(debug)) { + LOG(debug) << "Merging central subhalo " << central_subhalo + << " into " << desc_subhalo << " (the central subhalo of its descendant halo)" + << " because this is its last snapshot"; + } // Find main progenitor subhalo of the descendant subhalo and use that to calculate merging timescales. auto primary_subhalo = desc_subhalo->main(); @@ -344,7 +348,7 @@ void GalaxyMergers::create_merger(GalaxyPtr ¢ral, GalaxyPtr &satellite, Halo double mbar_satellite = satellite->baryon_mass(); //Create merger only if the galaxies have a baryon_mass > 0. - if(mbar_central <= 0 and mbar_satellite <=0 ){ + if(mbar_central <= 0 && mbar_satellite <=0 ){ return; } @@ -441,7 +445,7 @@ void GalaxyMergers::create_merger(GalaxyPtr ¢ral, GalaxyPtr &satellite, Halo central->disk_gas.sAM = new_disk_sAM; central->disk_gas.rscale = central->disk_gas.sAM / (2.0 * central->vmax) * constants::RDISK_HALF_SCALE; - if (std::isnan(central->disk_gas.sAM) or std::isnan(central->disk_gas.rscale)) { + if (std::isnan(central->disk_gas.sAM) || std::isnan(central->disk_gas.rscale)) { throw invalid_argument("rgas or sAM are NaN, cannot continue at galaxy mergers - in create_merger gas-rich minor merger"); } } @@ -450,7 +454,7 @@ void GalaxyMergers::create_merger(GalaxyPtr ¢ral, GalaxyPtr &satellite, Halo central->disk_gas.mass += satellite->gas_mass(); central->disk_gas.mass_metals += satellite->gas_mass_metals(); - if(mass_ratio >= parameters.minor_merger_burst_ratio and mgas_ratio > parameters.gas_fraction_burst_ratio){ + if(mass_ratio >= parameters.minor_merger_burst_ratio && mgas_ratio > parameters.gas_fraction_burst_ratio){ central->bulge_gas += central->disk_gas; @@ -459,12 +463,12 @@ void GalaxyMergers::create_merger(GalaxyPtr ¢ral, GalaxyPtr &satellite, Halo } else{ //Check cases where there is no disk in the central but the satellite is bringing gas. - if(satellite->gas_mass() > 0 and mgas_old_central <= 0){ + if(satellite->gas_mass() > 0 && mgas_old_central <= 0){ double tot_am = satellite->disk_gas.angular_momentum() + satellite->bulge_gas.angular_momentum(); central->disk_gas.sAM = tot_am / satellite->gas_mass(); central->disk_gas.rscale = central->disk_gas.sAM / (2.0 * central->vmax) * constants::RDISK_HALF_SCALE; - if (std::isnan(central->disk_gas.sAM) or std::isnan(central->disk_gas.rscale)) { + if (std::isnan(central->disk_gas.sAM) || std::isnan(central->disk_gas.rscale)) { throw invalid_argument("rgas or sAM are NaN, cannot continue at galaxy mergers - in create_merger gas-poor minor merger"); } } @@ -521,7 +525,7 @@ void GalaxyMergers::create_starbursts(HaloPtr &halo, double z, double delta_t){ physicalmodel->evolve_galaxy_starburst(*subhalo, *galaxy, z, delta_t, true); // Check for small gas reservoirs left in the bulge, in case mass is small, transfer to disk. - if(galaxy->bulge_gas.mass > 0 and galaxy->bulge_gas.mass < parameters.mass_min){ + if(galaxy->bulge_gas.mass > 0 && galaxy->bulge_gas.mass < parameters.mass_min){ transfer_bulge_gas(subhalo, galaxy, z); } } @@ -572,7 +576,7 @@ double GalaxyMergers::bulge_size_merger(double mass_ratio, double mgas_ratio, Ga else{ // In this case use the same equations as in major mergers, but changing the total mass of the central that will end up in the // bulge and an effective size (as in Lacey+16). - if(mass_ratio >= parameters.minor_merger_burst_ratio and mgas_ratio > parameters.gas_fraction_burst_ratio){ + if(mass_ratio >= parameters.minor_merger_burst_ratio && mgas_ratio > parameters.gas_fraction_burst_ratio){ mtotal_central = central->bulge_mass() + central->disk_gas.mass; rcentral = (central->bulge_size() * central->bulge_mass() + central->disk_gas.mass * central->disk_gas.rscale) / mtotal_central; @@ -587,7 +591,7 @@ double GalaxyMergers::bulge_size_merger(double mass_ratio, double mgas_ratio, Ga double r = r_remnant(mtotal_central, mbar_satellite, rcentral, rsatellite); - if((std::isnan(r) or r <= 0 or r > 3) and (mtotal_central > 0 or mbar_satellite > 0)){ + if((std::isnan(r) || r <= 0 || r > 3) && (mtotal_central > 0 || mbar_satellite > 0)){ std::ostringstream os; os << central << " has a bulge size not well defined in galaxy mergers."; throw invalid_data(os.str()); @@ -595,13 +599,13 @@ double GalaxyMergers::bulge_size_merger(double mass_ratio, double mgas_ratio, Ga /**Shrink the sizes depending on the gas fraction of the merger as in Hopkins et al. (2009) and above some mass ratio set by the user.**/ - if(parameters.fgas_dissipation > 0 and mass_ratio > parameters.merger_ratio_dissipation){ + if(parameters.fgas_dissipation > 0 && mass_ratio > parameters.merger_ratio_dissipation){ double mstars = central->stellar_mass() + satellite->stellar_mass(); double mgas = central->gas_mass() + satellite->gas_mass(); double rnew = r; - if(mgas > 0 and mstars > 0){ + if(mgas > 0 && mstars > 0){ double rgas_gal = mgas / mstars; double denom = (1.0 + rgas_gal/parameters.fgas_dissipation); if(denom > 3){ @@ -609,7 +613,7 @@ double GalaxyMergers::bulge_size_merger(double mass_ratio, double mgas_ratio, Ga } rnew = r / denom; } - else if (mstars == 0 and mgas > 0){ + else if (mstars == 0 && mgas > 0){ //allow a maximum change of a factor of 10. rnew = r / 3.0; } @@ -647,18 +651,18 @@ double GalaxyMergers::r_remnant(double mc, double ms, double rc, double rs){ double factor1 = 0; - if(rc > 0 and mc >0){ + if(rc > 0 && mc >0){ factor1 = std::pow(mc,2.0)/rc; } double factor2 = 0; - if(rs > 0 and ms > 0){ + if(rs > 0 && ms > 0){ factor2 = std::pow(ms,2.0)/rs; } double factor3 = 0; - if(rc > 0 or rs > 0){ + if(rc > 0 || rs > 0){ factor3 = parameters.f_orbit/parameters.cgal * mc * ms / (rc + rs); } @@ -694,7 +698,7 @@ void GalaxyMergers::transfer_bulge_gas(SubhaloPtr &subhalo, GalaxyPtr &galaxy, d galaxy->disk_gas.rscale = galaxy->bulge_gas.rscale; galaxy->disk_gas.sAM = galaxy->bulge_gas.sAM; - if (std::isnan(galaxy->disk_gas.sAM) or std::isnan(galaxy->disk_gas.rscale)) { + if (std::isnan(galaxy->disk_gas.sAM) || std::isnan(galaxy->disk_gas.rscale)) { throw invalid_argument("rgas or sAM are NaN, cannot continue at galaxy mergers - transfer_bulge_gas"); } } @@ -726,13 +730,13 @@ void GalaxyMergers::transfer_history_satellite_to_bulge(GalaxyPtr ¢ral, Gala 3) that the central didn't exist but the satellite did. In this create a new entry for the history of the central with the data of the satellite. 4) none of the galaxies existed. In this case do nothing. **/ - if (it_sat == satellite->history.end() and it_cen == central->history.end()){ //neither satellite or central existed. + if (it_sat == satellite->history.end() && it_cen == central->history.end()){ //neither satellite or central existed. //no-opt. } - else if (it_sat == satellite->history.end() and it_cen != central->history.end()){ // satellite didn't exist but central did. + else if (it_sat == satellite->history.end() && it_cen != central->history.end()){ // satellite didn't exist but central did. //no-opt. } - else if (it_sat != satellite->history.end() and it_cen == central->history.end()){ // central didn't exist but satellite did. + else if (it_sat != satellite->history.end() && it_cen == central->history.end()){ // central didn't exist but satellite did. auto hist_item = *it_sat; //transfer all data to the bulge formed via mergers, which is where all of this mass ends up being at. diff --git a/src/galaxy_writer.cpp b/src/galaxy_writer.cpp index d1dcd23e..e38f2c12 100644 --- a/src/galaxy_writer.cpp +++ b/src/galaxy_writer.cpp @@ -296,8 +296,6 @@ void HDF5GalaxyWriter::write_galaxies(hdf5::Writer &file, int snapshot, const st auto msubhalo = subhalo->Mvir; auto cnfw = subhalo->concentration; auto lambda = subhalo->lambda; - auto subhalo_position = subhalo->position; - auto subhalo_velocity = subhalo->velocity; // Assign baryon properties of subhalo auto hot_subhalo = subhalo->hot_halo_gas; @@ -409,11 +407,9 @@ void HDF5GalaxyWriter::write_galaxies(hdf5::Writer &file, int snapshot, const st mvir_gal = msubhalo; c_sub = cnfw; l_sub = lambda; - pos = subhalo_position; - vel = subhalo_velocity; - L.x = (subhalo->L.x/subhalo->L.norm()) * galaxy->angular_momentum(); - L.y = (subhalo->L.y/subhalo->L.norm()) * galaxy->angular_momentum(); - L.z = (subhalo->L.z/subhalo->L.norm()) * galaxy->angular_momentum(); + pos = subhalo->position; + vel = subhalo->velocity; + L = subhalo->L.unit() * galaxy->angular_momentum(); mvir_subhalo.push_back(mvir_gal); cnfw_subhalo.push_back(c_sub); vvir_hosthalo.push_back(vhalo); @@ -439,7 +435,7 @@ void HDF5GalaxyWriter::write_galaxies(hdf5::Writer &file, int snapshot, const st //Check whether this type 2 galaxy will merge on the next snapshot. this is done by //checking if their descendant_id has been defined (which would happen in galaxy_mergers //if this galaxy merges on the next snapshot. - if(galaxy->descendant_id < 0 and snapshot < sim_params.max_snapshot){ + if(galaxy->descendant_id < 0 && snapshot < sim_params.max_snapshot){ galaxy->descendant_id = galaxy->id; } } diff --git a/src/gas_cooling.cpp b/src/gas_cooling.cpp index bc32665f..2a929e7c 100644 --- a/src/gas_cooling.cpp +++ b/src/gas_cooling.cpp @@ -339,7 +339,7 @@ double GasCooling::cooling_rate(Subhalo &subhalo, Galaxy &galaxy, double z, doub } // Check for undefined cases. - if(mhot < 0 or mhot >1e17 or std::isnan(mhot)){ + if(mhot < 0 || mhot >1e17 || std::isnan(mhot)){ std::ostringstream os; os << halo << " has hot halo gas mass not well defined"; throw invalid_data(os.str()); @@ -536,14 +536,14 @@ double GasCooling::cooling_rate(Subhalo &subhalo, Galaxy &galaxy, double z, doub } // check for undefined values. - if(subhalo.cold_halo_gas.mass < 0 or subhalo.cold_halo_gas.mass >1e17 or std::isnan(subhalo.cold_halo_gas.mass)){ + if(subhalo.cold_halo_gas.mass < 0 || subhalo.cold_halo_gas.mass >1e17 || std::isnan(subhalo.cold_halo_gas.mass)){ std::ostringstream os; os << halo << " has cold halo gas mass not well defined"; throw invalid_data(os.str()); } // check for undefined values. - if(subhalo.hot_halo_gas.mass < 0 or subhalo.hot_halo_gas.mass >1e17 or std::isnan(subhalo.hot_halo_gas.mass)){ + if(subhalo.hot_halo_gas.mass < 0 || subhalo.hot_halo_gas.mass >1e17 || std::isnan(subhalo.hot_halo_gas.mass)){ std::ostringstream os; os << halo << " has hot halo gas mass not well defined"; throw invalid_data(os.str()); diff --git a/src/hdf5/iobase.cpp b/src/hdf5/iobase.cpp index 4a231c1e..9c69606f 100644 --- a/src/hdf5/iobase.cpp +++ b/src/hdf5/iobase.cpp @@ -58,7 +58,7 @@ IOBase::~IOBase() void IOBase::close() { - if (not opened) { + if (!opened) { return; } diff --git a/src/importer/descendants.cpp b/src/importer/descendants.cpp index 8f78bfe5..da3e9f8c 100644 --- a/src/importer/descendants.cpp +++ b/src/importer/descendants.cpp @@ -124,10 +124,10 @@ vector HDF5DescendantReader::read_whole() descendants.reserve(size); for(unsigned int i=0; i!=size; i++) { descendants_data_t desc = { - .halo_id = halo_ids[i], - .halo_snapshot = halo_snaps[i], - .descendant_id = desc_ids[i], - .descendant_snapshot = desc_snaps[i] + halo_ids[i], + halo_snaps[i], + desc_ids[i], + desc_snaps[i] }; descendants.push_back(move(desc)); } diff --git a/src/main.cpp b/src/main.cpp index 2b7a883a..85ecf8e8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -96,9 +96,7 @@ void install_gsl_error_handler() { void log_startup_information(int argc, char **argv) { - char the_hostname[100]; - gethostname(the_hostname, 100); - LOG(info) << "shark is starting in " << the_hostname; + LOG(info) << "shark is starting in " << gethostname(); LOG(info) << "shark version: " << SHARK_VERSION; LOG(info) << "shark git version: " << git_sha1(); LOG(info) << "shark has local changes: " << std::boolalpha << git_has_local_changes() << std::noboolalpha; diff --git a/src/merger_tree_reader.cpp b/src/merger_tree_reader.cpp index fd8195f2..4ed88c06 100644 --- a/src/merger_tree_reader.cpp +++ b/src/merger_tree_reader.cpp @@ -31,20 +31,16 @@ #include #include -#include "config.h" #include "dark_matter_halos.h" #include "exceptions.h" #include "logging.h" #include "merger_tree_reader.h" +#include "omp_utils.h" #include "simulation.h" #include "timer.h" #include "utils.h" #include "hdf5/reader.h" -#ifdef SHARK_OPENMP -#include -#endif - using namespace std; @@ -128,7 +124,7 @@ const std::vector SURFSReader::read_subhalos(unsigned int batch) vector IsCentre = batch_file.read_dataset_v("haloTrees/isDHaloCentre"); vector IsInterpolated = batch_file.read_dataset_v("haloTrees/isInterpolated"); - auto n_subhalos = Mvir.size(); + unsigned long n_subhalos = Mvir.size(); LOG(info) << "Read raw data of " << n_subhalos << " subhalos from " << fname << " in " << t; if ( !n_subhalos ) { return {}; @@ -145,13 +141,10 @@ const std::vector SURFSReader::read_subhalos(unsigned int batch) subhalos.reserve(n_subhalos / threads); } -#ifdef SHARK_OPENMP - #pragma omp parallel for num_threads(threads) schedule(static) -#endif - for(unsigned int i=0; i < n_subhalos; i++) { + omp_static_for(0ul, n_subhalos, threads, [&](unsigned long i, int thread_idx) { if (snap[i] < simulation_params.min_snapshot) { - continue; + return; } auto subhalo = std::make_shared(nodeIndex[i], snap[i]); @@ -216,13 +209,8 @@ const std::vector SURFSReader::read_subhalos(unsigned int batch) subhalo->Vvir = dark_matter_halos->halo_virial_velocity(subhalo->Mvir, z); // Done, save it now -#ifdef SHARK_OPENMP - auto idx = omp_get_thread_num(); -#else - auto idx = 0; -#endif // SHARK_OPENMP - t_subhalos[idx].emplace_back(std::move(subhalo)); - } + t_subhalos[thread_idx].emplace_back(std::move(subhalo)); + }); vector subhalos; if (threads == 0) { @@ -282,15 +270,11 @@ const std::vector SURFSReader::read_halos(unsigned int batch) // Calculate halos' vvir and concentration t = Timer(); -#ifdef SHARK_OPENMP - #pragma omp parallel for num_threads(threads) schedule(dynamic, 10000) -#endif - for(auto it = halos.begin(); it < halos.end(); it++) { - const auto &halo = *it; + omp_dynamic_for(halos, threads, 10000, [&](const HaloPtr &halo, int thread_idx) { auto z = simulation_params.redshifts[halo->snapshot]; halo->Vvir = dark_matter_halos->halo_virial_velocity(halo->Mvir, z); halo->concentration = dark_matter_halos->nfw_concentration(halo->Mvir,z); - } + }); LOG(info) << "Calculated Vvir and concentration for new Halos in " << t; return halos; diff --git a/src/options.cpp b/src/options.cpp index d0fdc476..0292002c 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -224,7 +224,7 @@ _read_ranges(const std::string &name, const std::string &value, const std::strin // a dash found neither at the beginning, nor at the end // means that we have a range specification auto pos = value_or_range.find_last_of('-'); - if (pos != 0 and pos != value_or_range.size() and pos != std::string::npos) { + if (pos != 0 && pos != value_or_range.size() && pos != std::string::npos) { auto first_s = value_or_range.substr(0, pos); auto last_s = value_or_range.substr(pos + 1); diff --git a/src/physical_model.cpp b/src/physical_model.cpp index bcdbc95a..deb0bfb6 100644 --- a/src/physical_model.cpp +++ b/src/physical_model.cpp @@ -226,7 +226,7 @@ void BasicPhysicalModel::to_galaxy(const std::vector &y, Subhalo &subhal // Equations of angular momentum exchange. Input total angular momentum. // Redefine angular momentum ONLY if the new value is > 0. - if(y[12] > 0 and y[13] > 0){ + if(y[12] > 0 && y[13] > 0){ // Assign new specific angular momenta. galaxy.disk_stars.sAM = y[12] / galaxy.disk_stars.mass; @@ -240,13 +240,13 @@ void BasicPhysicalModel::to_galaxy(const std::vector &y, Subhalo &subhal galaxy.disk_gas.rscale = galaxy.disk_gas.sAM / galaxy.vmax * constants::EAGLEJconv; // check for unrealistic cases. - if(galaxy.disk_stars.rscale <= constants::tolerance and galaxy.disk_stars.mass > 0){ + if(galaxy.disk_stars.rscale <= constants::tolerance && galaxy.disk_stars.mass > 0){ std::ostringstream os; os << "Galaxy with extremely small size, rdisk_stars < 1e-10, in physical model"; throw invalid_argument(os.str()); } - if (std::isnan(galaxy.disk_gas.sAM) or std::isnan(galaxy.disk_gas.rscale)) { + if (std::isnan(galaxy.disk_gas.sAM) || std::isnan(galaxy.disk_gas.rscale)) { throw invalid_argument("rgas or sAM are NaN, cannot continue at physical model"); } diff --git a/src/shark_runner.cpp b/src/shark_runner.cpp index 65c6917f..69e1006f 100644 --- a/src/shark_runner.cpp +++ b/src/shark_runner.cpp @@ -28,11 +28,6 @@ #include #include -#include "config.h" -#ifdef SHARK_OPENMP -#include -#endif // SHARK_OPENMP - #include "components.h" #include "evolve_halos.h" #include "execution.h" @@ -43,6 +38,7 @@ #include "galaxy_writer.h" #include "logging.h" #include "merger_tree_reader.h" +#include "omp_utils.h" #include "options.h" #include "physical_model.h" #include "shark_runner.h" @@ -113,7 +109,7 @@ class SharkRunner::impl { void create_per_thread_objects(); std::vector import_trees(); void evolve_merger_trees(const std::vector &merger_trees, int snapshot); - void evolve_merger_tree(const MergerTreePtr &tree, int snapshot, double z, double delta_t); + void evolve_merger_tree(const MergerTreePtr &tree, int thread_idx, int snapshot, double z, double delta_t); molgas_per_galaxy get_molecular_gas(const std::vector &halos, double x, bool calc_j); }; @@ -139,7 +135,7 @@ struct SnapshotStatistics { unsigned long n_halos; unsigned long n_subhalos; unsigned long n_galaxies; - unsigned long duration_millis; + Timer::duration duration_millis; double galaxy_ode_evaluations_per_galaxy() const { if (n_galaxies == 0) { @@ -232,19 +228,9 @@ molgas_per_galaxy SharkRunner::impl::get_molecular_gas(const std::vector star_formations(threads, star_formation); std::vector local_molgas(threads); -#ifdef SHARK_OPENMP - #pragma omp parallel for num_threads(threads) schedule(static) -#endif // SHARK_OPENMP - for (auto it = halos.begin(); it < halos.end(); it++) { - -#ifdef SHARK_OPENMP - auto idx = omp_get_thread_num(); -#else - auto idx = 0; -#endif // SHARK_OPENMP - - _get_molecular_gas(*it, local_molgas[idx], star_formations[idx], z, calc_j); - } + omp_static_for(halos, threads, [&](const HaloPtr &halo, int idx){ + _get_molecular_gas(halo, local_molgas[idx], star_formations[idx], z, calc_j); + }); if (threads == 1) { return local_molgas[0]; @@ -257,16 +243,11 @@ molgas_per_galaxy SharkRunner::impl::get_molecular_gas(const std::vector &me auto delta_t = tf - ti; Timer evolution_t; -#ifdef SHARK_OPENMP - #pragma omp parallel for num_threads(threads) schedule(static) -#endif // SHARK_OPENMP - for (auto it = merger_trees.begin(); it < merger_trees.end(); it++) { - evolve_merger_tree(*it, snapshot, simulation_params.redshifts[snapshot], delta_t); - } + omp_static_for(merger_trees, threads, [&](const MergerTreePtr &merger_tree, int thread_idx) { + evolve_merger_tree(merger_tree, thread_idx, snapshot, simulation_params.redshifts[snapshot], delta_t); + }); LOG(info) << "Evolved galaxies in " << evolution_t; std::vector all_halos_this_snapshot; diff --git a/src/star_formation.cpp b/src/star_formation.cpp index 1d8ea7a7..fafe5654 100644 --- a/src/star_formation.cpp +++ b/src/star_formation.cpp @@ -100,13 +100,13 @@ double StarFormation::star_formation_rate(double mcold, double mstar, double rga throw invalid_argument("rgas is NaN, cannot calculate star formation rate"); } - if (mcold <= constants::EPS3 or rgas <= constants::tolerance) { - if(mcold > constants::EPS3 and rgas <= 0){ + if (mcold <= constants::EPS3 || rgas <= constants::tolerance) { + if(mcold > constants::EPS3 && rgas <= 0){ std::ostringstream os; os << "Galaxy mcold > 0 and rgas <0"; throw invalid_argument(os.str()); } - if(mcold > constants::EPS3 and rgas <= constants::tolerance){ + if(mcold > constants::EPS3 && rgas <= constants::tolerance){ std::ostringstream os; os << "Galaxy with extremely small size, rgas < 1e-10"; //throw invalid_argument(os.str()); @@ -124,7 +124,7 @@ double StarFormation::star_formation_rate(double mcold, double mstar, double rga double Sigma_gas = cosmology->comoving_to_physical_mass(mcold) / constants::PI2 / (re * re); double Sigma_star = 0; - if(mstar > 0 and rstar > 0){ + if(mstar > 0 && rstar > 0){ Sigma_star = cosmology->comoving_to_physical_mass(mstar) / constants::PI2 / (rse * rse) ; } @@ -219,7 +219,7 @@ double StarFormation::star_formation_rate(double mcold, double mstar, double rga double effecj = jrate / result; //Assign maximum value to be jgas. - if(effecj > jgas and jgas > 0){ + if(effecj > jgas && jgas > 0){ jrate = result * jgas; } } @@ -260,7 +260,7 @@ double StarFormation::star_formation_rate_surface_density(double r, void * param double Sigma_stars = 0; // Define Sigma_stars only if stellar mass and radius are positive. - if(props->rse > 0 and props->sigma_star0 > 0){ + if(props->rse > 0 && props->sigma_star0 > 0){ Sigma_stars = props->sigma_star0 * std::exp(-r / props->rse); } @@ -268,10 +268,10 @@ double StarFormation::star_formation_rate_surface_density(double r, void * param double sfr_density = 0; - if(parameters.model == StarFormationParameters::BR06 or parameters.model == StarFormationParameters::GD14){ + if(parameters.model == StarFormationParameters::BR06 || parameters.model == StarFormationParameters::GD14){ sfr_density = PI2 * parameters.nu_sf * fracmol * Sigma_gas * r; //Add the 2PI*r to Sigma_SFR to make integration. } - else if (parameters.model == StarFormationParameters::KMT09 or parameters.model == StarFormationParameters::K13){ + else if (parameters.model == StarFormationParameters::KMT09 || parameters.model == StarFormationParameters::K13){ double sfr_ff = 0; if(Sigma_gas < parameters.sigma_crit_KMT09){ @@ -289,7 +289,7 @@ double StarFormation::star_formation_rate_surface_density(double r, void * param sfr_density = sfr_density * parameters.boost_starburst; } - if((props->sigma_gas0 > 0 and fracmol > 0) and sfr_density <= 0){ + if((props->sigma_gas0 > 0 && fracmol > 0) && sfr_density <= 0){ std::ostringstream os; os << "Galaxy with SFR surface density =0, cold gas surface density " << props->sigma_gas0 << " and fmol > 0"; throw invalid_argument(os.str()); @@ -365,7 +365,7 @@ double StarFormation::fmol(double Sigma_gas, double Sigma_stars, double zgas, do if(fmol > 1){ return 1; } - else if(fmol > 0 and fmol < 1){ + else if(fmol > 0 && fmol < 1){ return fmol; } else{ @@ -386,7 +386,7 @@ double StarFormation::midplane_pressure(double Sigma_gas, double Sigma_stars, do double star_comp = 0; - if (Sigma_stars > 0 and veldisp_star > 0) { + if (Sigma_stars > 0 && veldisp_star > 0) { star_comp = (parameters.gas_velocity_dispersion / veldisp_star) * Sigma_stars; } @@ -444,7 +444,7 @@ double StarFormation::k13_fmol(double zgas, double sigma_gas){ double StarFormation::molecular_hydrogen(double mcold, double mstar, double rgas, double rstar, double zgas, double z, double &jmol, double jgas, double vgal, bool bulge, bool jcalc) { - if (mcold <= 0 or rgas <= 0) { + if (mcold <= 0 || rgas <= 0) { return 0; } @@ -458,7 +458,7 @@ double StarFormation::molecular_hydrogen(double mcold, double mstar, double rgas double Sigma_gas = cosmology->comoving_to_physical_mass(mcold) / constants::PI2 / (re * re); double Sigma_star = 0; - if(mstar > 0 and rstar > 0){ + if(mstar > 0 && rstar > 0){ Sigma_star = cosmology->comoving_to_physical_mass(mstar) / constants::PI2 / (rse * rse) ; } @@ -511,7 +511,7 @@ double StarFormation::molecular_hydrogen(double mcold, double mstar, double rgas result = cosmology->physical_to_comoving_mass(result); //Avoid AM calculation in the case of starbursts. - if(!bulge and jcalc){ + if(!bulge && jcalc){ // Check whether user wishes to calculate angular momentum transfer from gas to stars. if(parameters.angular_momentum_transfer){ @@ -553,7 +553,7 @@ double StarFormation::molecular_hydrogen(double mcold, double mstar, double rgas jmol = jmol / result; //Assign maximum value to be jgas. - if(jmol > jgas and jgas > 0){ + if(jmol > jgas && jgas > 0){ jmol = jgas; } } diff --git a/src/stellar_feedback.cpp b/src/stellar_feedback.cpp index b280bfd2..78464b61 100644 --- a/src/stellar_feedback.cpp +++ b/src/stellar_feedback.cpp @@ -95,7 +95,7 @@ void StellarFeedback::outflow_rate(double sfr, double vsubh, double vgal, double double v = vsubh; - if(parameters.galaxy_scaling and vgal > 0){ + if(parameters.galaxy_scaling && vgal > 0){ v = vgal; } diff --git a/src/tree_builder.cpp b/src/tree_builder.cpp index f0d3dd66..b0d495ec 100644 --- a/src/tree_builder.cpp +++ b/src/tree_builder.cpp @@ -28,10 +28,10 @@ #include #include -#include "config.h" #include "cosmology.h" #include "exceptions.h" #include "logging.h" +#include "omp_utils.h" #include "timer.h" #include "tree_builder.h" @@ -56,11 +56,7 @@ ExecutionParameters &TreeBuilder::get_exec_params() void TreeBuilder::ensure_trees_are_self_contained(const std::vector &trees) const { -#ifdef SHARK_OPENMP - #pragma omp parallel for num_threads(threads) schedule(static) -#endif - for (auto it = trees.begin(); it < trees.cend(); it++) { - const auto &tree = *it; + omp_static_for(trees, threads, [&](const MergerTreePtr &tree, int thread_idx) { for (auto &snapshot_and_halos: tree->halos) { for (auto &halo: snapshot_and_halos.second) { if (halo->merger_tree != tree) { @@ -70,7 +66,7 @@ void TreeBuilder::ensure_trees_are_self_contained(const std::vector TreeBuilder::build_trees(const std::vector &halos, SimulationParameters sim_params, GasCoolingParameters gas_cooling_params, const CosmologyPtr &cosmology, TotalBaryon &AllBaryons) @@ -85,7 +81,9 @@ std::vector TreeBuilder::build_trees(const std::vector & for(const auto &halo: halos) { if (halo->snapshot == last_snapshot_to_consider) { auto tree = std::make_shared(tree_counter++); - LOG(debug) << "Creating MergerTree at " << halo; + if (LOG_ENABLED(debug)) { + LOG(debug) << "Creating MergerTree at " << halo; + } halo->merger_tree = tree; halo->merger_tree->add_halo(halo); trees.emplace_back(std::move(tree)); @@ -162,7 +160,7 @@ void TreeBuilder::link(const SubhaloPtr &parent_shalo, const SubhaloPtr &desc_su auto halos_linked = std::get<1>(result); // Fail if a halo has more than one descendant - if (parent_halo->descendant and parent_halo->descendant->id != desc_halo->id) { + if (parent_halo->descendant && parent_halo->descendant->id != desc_halo->id) { std::ostringstream os; os << parent_halo << " already has a descendant " << parent_halo->descendant; os << " but " << desc_halo << " is claiming to be its descendant as well"; @@ -214,117 +212,106 @@ void TreeBuilder::define_central_subhalos(const std::vector &tree //This function loops over merger trees and halos to define central galaxies in a self-consistent way. The loop starts at z=0. //Loop over trees. -#ifdef SHARK_OPENMP - #pragma omp parallel for num_threads(threads) schedule(static) -#endif - for (auto it = trees.begin(); it < trees.cend(); it++) { - const auto &tree = *it; + omp_static_for(trees, threads, [&](const MergerTreePtr &tree, int thread_idx) { + for (int snapshot=sim_params.max_snapshot; snapshot >= sim_params.min_snapshot; snapshot--) { - for(int snapshot=sim_params.max_snapshot; snapshot >= sim_params.min_snapshot; snapshot--) { + for (auto &halo: tree->halos[snapshot]) { - for(auto &halo: tree->halos[snapshot]){ + // First check in halo has a central subhalo, if yes, then continue with loop. + if (halo->central_subhalo) { + continue; + } - //First check in halo has a central subhalo, if yes, then continue with loop. - if(halo->central_subhalo){ - continue; + auto central_subhalo = halo->all_subhalos()[0]; + auto subhalo = define_central_subhalo(halo, central_subhalo); + + // save value of lambda to make sure that all main progenitors of this subhalo have the same lambda value. This is done for consistency + // throughout time. + auto lambda = subhalo->lambda; + + // Now walk backwards through the main progenitor branch until subhalo has no more progenitors. This is done only in the case the ascendant + // halo does not have a central already. + + // Loop going backwards through history: + // * Find the main progenitor of this subhalo and its host Halo. + // * Define that main progenitor as the central subhalo for the Halo (if none defined). + // * Define last_snapshot_identified for non-central ascendants. + // * Repeat + auto ascendants = subhalo->ascendants; + + while (!ascendants.empty()) { + + // Check that there is a main progenitor first + // If none is formally defined, we declare the most massive + // ascendant to be the main progenitor + auto main_prog = subhalo->main(); + if (!main_prog) { + auto it = std::max_element(ascendants.begin(), ascendants.end(), [](const SubhaloPtr &s1, const SubhaloPtr &s2) { + return s1->Mvir < s2->Mvir; + }); + main_prog = *it; + main_prog->main_progenitor = true; + LOG(warning) << "No main progenitor defined for " << subhalo << ", defined " + << main_prog << " based on its Mvir"; } - auto central_subhalo = halo->all_subhalos()[0]; - auto subhalo = define_central_subhalo(halo, central_subhalo); - - // Now walk backwards through the main progenitor branch until subhalo has no more progenitors. This is done only in the case the ascendant - // halo does not have a central already. - - // Loop going backwards through history: - // * Find the main progenitor of this subhalo and its host Halo. - // * Define that main progenitor as the central subhalo for the Halo (if none defined). - // * Define last_snapshot_identified for non-central ascendants. - // * Repeat - auto ascendants = subhalo->ascendants; - - while(not ascendants.empty()){ - - // Check that there is a main progenitor first - // If none is formally defined, we declare the most massive - // ascendant to be the main progenitor - auto main_prog = subhalo->main(); - if (not main_prog) { - auto it = std::max_element(ascendants.begin(), ascendants.end(), [](const SubhaloPtr &s1, const SubhaloPtr &s2) { - return s1->Mvir < s2->Mvir; - }); - main_prog = *it; - main_prog->main_progenitor = true; - LOG(warning) << "No main progenitor defined for " << subhalo << ", defined " - << main_prog << " based on its Mvir"; - } - - auto ascendant_halo = main_prog->host_halo; + auto ascendant_halo = main_prog->host_halo; - // If a central subhalo has been defined, then its whole branch - // has been processed, so there's no point on continuing. - if (ascendant_halo->central_subhalo) { - break; - } + // If a central subhalo has been defined, then its whole branch + // has been processed, so there's no point on continuing. + if (ascendant_halo->central_subhalo) { + break; + } - subhalo = define_central_subhalo(ascendant_halo, main_prog); + // Redefine lambda of main progenitor to have the same one as its descendant. + main_prog->lambda = lambda; + subhalo = define_central_subhalo(ascendant_halo, main_prog); - // Define property last_identified_snapshot for all the ascendants that are not the main progenitor of the subhalo. - for (auto &sub: ascendants){ - if(!sub->main_progenitor){ - sub->last_snapshot_identified = sub->snapshot; - } + // Define property last_identified_snapshot for all the ascendants that are not the main progenitor of the subhalo. + for (auto &sub: ascendants) { + if(!sub->main_progenitor){ + sub->last_snapshot_identified = sub->snapshot; } + } - // Now move to the ascendants of the main progenitor subhalo and repeat process. - ascendants = subhalo->ascendants; + // Now move to the ascendants of the main progenitor subhalo and repeat process. + ascendants = subhalo->ascendants; - } } } } - - //Make sure each halo has only one central subhalo and that the rest are satellites. -#ifdef SHARK_OPENMP - #pragma omp parallel for num_threads(threads) schedule(static) -#endif - for (auto it = trees.begin(); it < trees.cend(); it++) { - const auto &tree = *it; - - for(int snapshot=sim_params.min_snapshot; snapshot >= sim_params.max_snapshot; snapshot++) { - - for(auto &halo: tree->halos[snapshot]){ - int i = 0; - for (auto &subhalo: halo->all_subhalos()){ - if(subhalo->subhalo_type == Subhalo::CENTRAL){ - i++; - if(i > 1){ - std::ostringstream os; - os << "Halo " << halo << " has more than 1 central subhalo at snapshot " << snapshot; - throw invalid_argument(os.str()); - } + }); + + // Make sure each halo has only one central subhalo and that the rest are satellites. + omp_static_for(trees, threads, [&](const MergerTreePtr &tree, int thread_idx) { + for (int snapshot=sim_params.min_snapshot; snapshot >= sim_params.max_snapshot; snapshot++) { + + for (auto &halo: tree->halos[snapshot]) { + int i = 0; + for (auto &subhalo: halo->all_subhalos()) { + if(subhalo->subhalo_type == Subhalo::CENTRAL){ + i++; + if (i > 1) { + std::ostringstream os; + os << "Halo " << halo << " has more than 1 central subhalo at snapshot " << snapshot; + throw invalid_argument(os.str()); } } - if(i == 0){ - std::ostringstream os; - os << "Halo " << halo << " has no central subhalo at snapshot " << snapshot; - throw invalid_argument(os.str()); - } + } + if (i == 0) { + std::ostringstream os; + os << "Halo " << halo << " has no central subhalo at snapshot " << snapshot; + throw invalid_argument(os.str()); } } } + }); } void TreeBuilder::ensure_halo_mass_growth(const std::vector &trees, SimulationParameters &sim_params){ //This function loops over merger trees and halos to make sure that descendant halos are at least as massive as their progenitors. - - //Loop over trees. -#ifdef SHARK_OPENMP - #pragma omp parallel for num_threads(threads) schedule(static) -#endif - for (auto it = trees.begin(); it < trees.cend(); it++) { - const auto &tree = *it; - + omp_static_for(trees, threads, [&](const MergerTreePtr &tree, int thread_idx) { for(int snapshot=sim_params.min_snapshot; snapshot < sim_params.max_snapshot; snapshot++) { for(auto &halo: tree->halos[snapshot]){ @@ -334,7 +321,7 @@ void TreeBuilder::ensure_halo_mass_growth(const std::vector &tree } } } - } + }); } void TreeBuilder::spin_interpolated_halos(const std::vector &trees, SimulationParameters &sim_params){ @@ -343,34 +330,29 @@ void TreeBuilder::spin_interpolated_halos(const std::vector &tree // This has to be done starting from the first snapshot forward so that the angular momentum and concentration are propagated correctly if subhalo is interpolated over many snapshots. //Loop over trees. -#ifdef SHARK_OPENMP - #pragma omp parallel for num_threads(threads) schedule(static) -#endif - for (auto it = trees.begin(); it < trees.cend(); it++) { - const auto &tree = *it; + omp_static_for(trees, threads, [&](const MergerTreePtr &tree, int thread_idx) { + for (int snapshot=sim_params.max_snapshot; snapshot >=sim_params.min_snapshot; snapshot--) { - for(int snapshot=sim_params.max_snapshot; snapshot >=sim_params.min_snapshot; snapshot--) { + for (auto &halo: tree->halos[snapshot]) { - for(auto &halo: tree->halos[snapshot]){ + for (auto &subhalo: halo->all_subhalos()) { + //Check if subhalo is there because of interpolation. If so, redefine its angular momentum and concentration to that of its progenitor. + if (subhalo->IsInterpolated) { + auto main_progenitor = subhalo->main(); + subhalo->L = main_progenitor->L; + subhalo->concentration = main_progenitor->concentration; + subhalo->host_halo->concentration = main_progenitor->concentration; - for (auto &subhalo: halo->all_subhalos()){ - //Check if subhalo is there because of interpolation. If so, redefine its angular momentum and concentration to that of its progenitor. - if(subhalo->IsInterpolated){ - auto main_progenitor = subhalo->main(); - subhalo->L = main_progenitor->L; - subhalo->concentration = main_progenitor->concentration; - subhalo->host_halo->concentration = main_progenitor->concentration; - - if(subhalo->concentration <= 0){ - std::ostringstream os; - os << "subhalo " << subhalo << " has concentration =0"; - throw invalid_argument(os.str()); - } + if (subhalo->concentration <= 0) { + std::ostringstream os; + os << "subhalo " << subhalo << " has concentration =0"; + throw invalid_argument(os.str()); } } } } } + }); } diff --git a/src/utils.cpp b/src/utils.cpp index bec2cf7e..1315013f 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -33,6 +33,13 @@ #include #include +// gethostname +#ifdef _WIN32 +# include +#else +# include +#endif // _WIN32 + #include "utils.h" using namespace std; @@ -101,7 +108,16 @@ ifstream open_file(const string &name) } bool empty_or_comment(const std::string &s) { - return s.size() == 0 or s[0] == '#'; + return s.size() == 0 || s[0] == '#'; } +std::string gethostname() +{ + /* is wrong to fix this to 100, but who cares (for now...) */ + char the_hostname[100]; + ::gethostname(the_hostname, 100); + return std::string(the_hostname); +} + + } // namespace shark diff --git a/standard_plots/angularmomentum.py b/standard_plots/angularmomentum.py index 0386163d..43d4a1f1 100644 --- a/standard_plots/angularmomentum.py +++ b/standard_plots/angularmomentum.py @@ -60,13 +60,13 @@ def prepare_data(hdf5_data, index, sam_stars_disk, sam_gas_disk_atom, sam_gas_disk_mol, sam_halo, sam_ratio_halo_disk, sam_ratio_halo_gal, sam_ratio_halo_disk_gas, disk_size_sat, disk_size_cen, bulge_size, sam_vs_sam_halo_disk, sam_vs_sam_halo_gal, - sam_vs_sam_halo_disk_gas, sam_bar): + sam_vs_sam_halo_disk_gas, sam_bar, sam_stars): (h0, _, mdisk, mbulge, mburst_mergers, mburst_diskins, mstars_bulge_mergers_assembly, mstars_bulge_diskins_assembly, mBH, rdisk, rbulge, typeg, specific_angular_momentum_disk_star, specific_angular_momentum_bulge_star, specific_angular_momentum_disk_gas, specific_angular_momentum_bulge_gas, specific_angular_momentum_disk_gas_atom, specific_angular_momentum_disk_gas_mol, lambda_sub, mvir_s, mvir, matom_disk, mmol_disk, mgas_disk, - matom_bulge, mmol_bulge, mgas_bulge) = hdf5_data + matom_bulge, mmol_bulge, mgas_bulge, sfr_disk, sfr_bulge) = hdf5_data mbulge_mergers = mburst_mergers + mstars_bulge_mergers_assembly zero_bulge = np.where(rbulge <= 0) @@ -83,73 +83,83 @@ def prepare_data(hdf5_data, index, sam_stars_disk, sam_gas_disk_atom, sam_gas_di sam_subhalo = 1.41421356237 * G**0.66 * lambda_sub * mvir_s**0.66 / (h0*100.0)**0.33 sam_hhalo = 1.41421356237 * G**0.66 * lambda_sub * mvir**0.66 / (h0*100.0)**0.33 + #calculate effective specific angular momentum by mass-weighting the contributions from the disk and bulge + jstars = (specific_angular_momentum_disk_star * mdisk + specific_angular_momentum_bulge_star * mbulge) / (mdisk+mbulge) + jbar = (specific_angular_momentum_disk_star * mdisk + specific_angular_momentum_disk_gas * mgas_disk + + specific_angular_momentum_bulge_star * mbulge + specific_angular_momentum_bulge_gas * mgas_bulge) / (mdisk + mbulge + mgas_disk + mgas_bulge) + mbar = (mdisk + mbulge + mgas_disk + mgas_bulge) + + vdisk = specific_angular_momentum_disk_star / rdisk / 2.0 #in km/s + vbulge = specific_angular_momentum_bulge_star / rbulge / 2.0 #in km/s + specific_angular_momentum_disk = (specific_angular_momentum_disk_star * mdisk + specific_angular_momentum_disk_gas * mgas_disk) / (mdisk + mgas_disk) vr_halo = G**0.66 * mvir**0.66 / (h0*100.0)**0.33 lh = lambda_sub - lj = np.zeros(shape = (3, len(mdisk))) - lm = np.zeros(shape = (3, len(mdisk))) - + lj = np.zeros(shape = (4, len(mdisk))) + lm = np.zeros(shape = (4, len(mdisk))) + lj[0,:] = specific_angular_momentum_disk / 1.41421356237 / vr_halo lj[1,:] = specific_angular_momentum_disk_star / 1.41421356237 / vr_halo lj[2,:] = specific_angular_momentum_disk_gas / 1.41421356237 / vr_halo + lj[3,:] = jstars / 1.41421356237 / vr_halo lm[0,:] = specific_angular_momentum_disk / 1.41421356237 / G**0.66 * (h0*100.0)**0.33 / (mdisk + mgas_disk)**0.66 lm[1,:] = specific_angular_momentum_disk_star / 1.41421356237 / G**0.66 * (h0*100.0)**0.33 / (mdisk)**0.66 lm[2,:] = specific_angular_momentum_disk_gas / 1.41421356237 / G**0.66 * (h0*100.0)**0.33 / (mgas_disk)**0.66 + lm[3,:] = jstars / 1.41421356237 / G**0.66 * (h0*100.0)**0.33 / (mdisk + mbulge)**0.66 bt = np.zeros(shape = (len(mdisk))) ms = np.zeros(shape = (len(mdisk))) + ssfr = np.zeros(shape = (len(mdisk))) ind = np.where(mdisk+mbulge > 0) bt[ind] = mbulge[ind] / (mdisk[ind] + mbulge[ind]) ms[ind] = np.log10(mdisk[ind] + mbulge[ind]) - - #calculate effective specific angular momentum by mass-weighting the contributions from the disk and bulge - jstars = (specific_angular_momentum_disk_star * mdisk + specific_angular_momentum_bulge_star * mbulge) / (mdisk+mbulge) - jbar = (specific_angular_momentum_disk_star * mdisk + specific_angular_momentum_disk_gas * mgas_disk + - specific_angular_momentum_bulge_star * mbulge + specific_angular_momentum_bulge_gas * mgas_bulge) / (mdisk + mbulge + mgas_disk + mgas_bulge) - mbar = (mdisk + mbulge + mgas_disk + mgas_bulge) - - vdisk = specific_angular_momentum_disk_star / rdisk / 2.0 #in km/s - vbulge = specific_angular_momentum_bulge_star / rbulge / 2.0 #in km/s - + ind = np.where((mdisk+mbulge > 0) & (sfr_disk + sfr_bulge > 0)) + ssfr[ind] = np.log10((sfr_disk[ind] + sfr_bulge[ind])) - ms[ind] #in Gyr + thresh = [0, 0.5] + mass_cut = 7.5 for c in range(0,2): - ind = np.where((jstars > 0) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) - sam_stars_disk[index,:,:,c] = bin_it(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)), + ind = np.where((jstars > 0) & (ms > mass_cut) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) + sam_stars[index,:,:,c] = bin_it(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)), y=np.log10(jstars[ind]) - np.log10(float(h0))) #specific_angular_momentum_disk_star[ind]) - np.log10(float(h0))) - - ind = np.where((jbar > 0) & (mbar > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) + + ind = np.where((specific_angular_momentum_disk_star > 0) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) + sam_stars_disk[index,:,:,c] = bin_it(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)), + y=np.log10(specific_angular_momentum_disk_star[ind]) - np.log10(float(h0))) #specific_angular_momentum_disk_star[ind]) - np.log10(float(h0))) + + ind = np.where((jbar > 0) & (ms > mass_cut) & (mbar > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) sam_bar[index,:,:,c] = bin_it(x=np.log10(mbar[ind]) - np.log10(float(h0)), y=np.log10(jbar[ind]) - np.log10(float(h0))) #specific_angular_momentum_disk_star[ind]) - np.log10(float(h0))) - ind = np.where((jstars > 0) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) + ind = np.where((jstars > 0) & (ms > mass_cut) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) sam_ratio_halo_gal[index,:,:,c] = bin_it_halo(x=np.log10(mvir_s[ind]) - np.log10(float(h0)), y=np.log10(jstars[ind]/sam_subhalo[ind])) sam_vs_sam_halo_gal[index,:,:,c] = bin_it_j(x=np.log10(sam_hhalo[ind]) - np.log10(float(h0)), y=np.log10(jstars[ind]) - np.log10(float(h0))) - ind = np.where((specific_angular_momentum_disk_star > 0) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) + ind = np.where((specific_angular_momentum_disk_star > 0) & (ms > mass_cut) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) sam_ratio_halo_disk[index,:,:,c] = bin_it_halo(x=np.log10(mvir_s[ind]) - np.log10(float(h0)), y=np.log10(specific_angular_momentum_disk_star[ind]/sam_subhalo[ind])) sam_vs_sam_halo_disk[index,:,:,c] = bin_it_j(x=np.log10(sam_hhalo[ind]) - np.log10(float(h0)), y=np.log10(specific_angular_momentum_disk_star[ind]) - np.log10(float(h0))) - ind = np.where((specific_angular_momentum_disk_gas > 0) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) + ind = np.where((specific_angular_momentum_disk_gas > 0) & (ms > mass_cut) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) sam_ratio_halo_disk_gas[index,:,:,c] = bin_it_halo(x=np.log10(mvir_s[ind]) - np.log10(float(h0)), y=np.log10(specific_angular_momentum_disk_gas[ind]/sam_subhalo[ind])) sam_vs_sam_halo_disk_gas[index,:,:,c] = bin_it_j(x=np.log10(sam_hhalo[ind]) - np.log10(float(h0)), y=np.log10(specific_angular_momentum_disk_gas[ind]) - np.log10(float(h0))) - ind = np.where((specific_angular_momentum_disk_gas_atom > 0) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) + ind = np.where((specific_angular_momentum_disk_gas_atom > 0) & (ms > mass_cut) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) sam_gas_disk_atom[index,:,:,c] = bin_it(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)), y=np.log10(specific_angular_momentum_disk_gas_atom[ind]) - np.log10(float(h0))) - ind = np.where((specific_angular_momentum_disk_gas_mol > 0) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) + ind = np.where((specific_angular_momentum_disk_gas_mol > 0) & (ms > mass_cut) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) sam_gas_disk_mol[index,:,:,c] = bin_it(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)), y=np.log10(specific_angular_momentum_disk_gas_mol[ind]) - np.log10(float(h0))) - ind = np.where((sam_subhalo > 0) & (mdisk+mbulge > 0) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) + ind = np.where((sam_subhalo > 0) & (mdisk+mbulge > 0) & (ms > mass_cut) & (typeg == 0) & (mdisk/(mdisk+mbulge) >= thresh[c])) sam_halo[index,:,:,c] = bin_it(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)), y=np.log10(sam_subhalo[ind]) - np.log10(float(h0))) @@ -166,7 +176,7 @@ def prepare_data(hdf5_data, index, sam_stars_disk, sam_gas_disk_atom, sam_gas_di bulge_size[index,:] = bin_it(x=np.log10(mbulge[ind]) - np.log10(float(h0)), y=np.log10(rbulge[ind]*MpcToKpc) - np.log10(float(h0))) - return (lh, lj, lm, bt, ms) + return (lh, lj, lm, bt, ms, ssfr) def plot_sizes(plt, outdir, obsdir, disk_size_cen, disk_size_sat, bulge_size): @@ -294,7 +304,7 @@ def plot_sizes(plt, outdir, obsdir, disk_size_cen, disk_size_sat, bulge_size): common.savefig(outdir, fig, 'sizes_angular_momentum_model.pdf') -def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam_gas_disk_mol, sam_halo, sam_bar): +def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam_gas_disk_mol, sam_halo, sam_bar, sam_stars): fig = plt.figure(figsize=(9.5,9.5)) xtit = "$\\rm log_{10} (\\rm M_{\\star}/M_{\odot})$" @@ -325,11 +335,11 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='k', alpha=0.2,interpolate=True) #Predicted sAM-mass for disks in disk=dominated galaxies - ind = np.where(sam_stars_disk[s,0,:,selec] != 0) + ind = np.where(sam_stars[s,0,:,selec] != 0) xplot = xmf[ind] - yplot = sam_stars_disk[s,0,ind,selec]+ 3.0 - errdn = sam_stars_disk[s,1,ind,selec] - errup = sam_stars_disk[s,2,ind,selec] + yplot = sam_stars[s,0,ind,selec]+ 3.0 + errdn = sam_stars[s,1,ind,selec] + errup = sam_stars[s,2,ind,selec] ax.plot(xplot,yplot[0],color='r',label="stars") ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='r', alpha=0.5,interpolate=True) ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='r', alpha=0.5,interpolate=True) @@ -364,7 +374,7 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam s = 0 #plot stars xtit = "$\\rm log_{10} (\\rm M_{\\star}/M_{\odot})$" - ytit = "$\\rm log_{10} (\\rm j_{\\star, disk}/kpc\\, km s^{-1})$" + ytit = "$\\rm log_{10} (\\rm j_{\\star}/kpc\\, km s^{-1})$" xmin, xmax, ymin, ymax = 8, 11.5, 1.5, 4 xleg = xmax - 0.2 * (xmax - xmin) yleg = ymax - 0.1 * (ymax - ymin) @@ -390,14 +400,21 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam i = i +1 #Predicted sAM-mass for disks in disk=dominated galaxies + ind = np.where(sam_stars[s,0,:,selec] != 0) + xplot = xmf[ind] + yplot = sam_stars[s,0,ind,selec]+ 3.0 + errdn = sam_stars[s,1,ind,selec] + errup = sam_stars[s,2,ind,selec] + ax.plot(xplot,yplot[0],color='r') + ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='r', alpha=0.35,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='r', alpha=0.35,interpolate=True) + ind = np.where(sam_stars_disk[s,0,:,selec] != 0) xplot = xmf[ind] yplot = sam_stars_disk[s,0,ind,selec]+ 3.0 errdn = sam_stars_disk[s,1,ind,selec] errup = sam_stars_disk[s,2,ind,selec] - ax.plot(xplot,yplot[0],color='r') - ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='r', alpha=0.5,interpolate=True) - ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='r', alpha=0.5,interpolate=True) + ax.plot(xplot,yplot[0],color='r', linestyle='dotted') ind = np.where(jsL18[0,:] != 0) xplot = xmf[ind] @@ -405,8 +422,8 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam errdn = jsL18[1,ind] errup = jsL18[2,ind] ax.plot(xplot,yplot[0],color='r',linestyle='dashed') - ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='r', linestyle='dashed', alpha=0.3,interpolate=True) - ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='r', linestyle='dashed', alpha=0.3,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='r', linestyle='dashed', alpha=0.2,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='r', linestyle='dashed', alpha=0.2,interpolate=True) #Read observational data. ms, js = common.load_observation(obsdir, 'SizesAndAM/Posti18.dat', [0,1]) @@ -446,8 +463,8 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam errdn = sam_gas_disk_mol[s,1,ind,selec] errup = sam_gas_disk_mol[s,2,ind,selec] ax.plot(xplot,yplot[0],color='g', label="ISM/stars AM transfer") - ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='g', alpha=0.5,interpolate=True) - ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='g', alpha=0.5,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='g', alpha=0.35,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='g', alpha=0.35,interpolate=True) ind = np.where(jmolL18[0,:] != 0) xplot = xmf[ind] @@ -455,8 +472,8 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam errdn = jmolL18[1,ind] errup = jmolL18[2,ind] ax.plot(xplot,yplot[0],color='g',linestyle='dashed', label="Lagos+18") - ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='g', linestyle='dashed', alpha=0.3,interpolate=True) - ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='g', linestyle='dashed', alpha=0.3,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='g', linestyle='dashed', alpha=0.2,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='g', linestyle='dashed', alpha=0.2,interpolate=True) ax.plot(msO14, jmolO14, 'go',fillstyle='none') common.prepare_legend(ax, ['k'], loc=2) @@ -474,8 +491,8 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam errdn = sam_gas_disk_atom[s,1,ind,selec] errup = sam_gas_disk_atom[s,2,ind,selec] ax.plot(xplot,yplot[0],color='b') - ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='b', alpha=0.5,interpolate=True) - ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='b', alpha=0.5,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='b', alpha=0.35,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='b', alpha=0.35,interpolate=True) ind = np.where(jatomL18[0,:] != 0) xplot = xmf[ind] @@ -483,8 +500,8 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam errdn = jatomL18[1,ind] errup = jatomL18[2,ind] ax.plot(xplot,yplot[0],color='b',linestyle='dashed') - ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='b', linestyle='dashed', alpha=0.3,interpolate=True) - ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='b', linestyle='dashed', alpha=0.3,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='b', linestyle='dashed', alpha=0.2,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='b', linestyle='dashed', alpha=0.2,interpolate=True) ax.errorbar(msB17, jgB17, yerr=[errjgB17,errjgB17], xerr=[errmsB17,errmsB17,],ls='None', mfc='None', ecolor = 'b', mec='b',marker='s') ax.plot(msO14, jgO14, 'bo',fillstyle='none') @@ -504,8 +521,8 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam errdn = sam_bar[s,1,ind,selec] errup = sam_bar[s,2,ind,selec] ax.plot(xplot,yplot[0],color='k') - ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='k', alpha=0.3,interpolate=True) - ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='k', alpha=0.3,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='k', alpha=0.25,interpolate=True) + ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='k', alpha=0.25,interpolate=True) ind = np.where(jbarL18[0,:] != 0) xplot = xmf[ind] @@ -526,7 +543,9 @@ def plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam common.savefig(outdir, fig, 'specific_am_z0_components.pdf') #for c in range (0,2): + # print 'will change selection' # for i in range (0,3): + # print 'will change within the same sample' # for x,y,z,a in zip(sam_stars_disk[s,i,:,c],sam_gas_disk_mol[s,i,:,c],sam_gas_disk_atom[s,i,:,c],sam_bar[s,i,:,c]): # print x,y,z,a @@ -588,10 +607,10 @@ def plot_specific_am_ratio(plt, outdir, obsdir, sam_ratio_halo_disk, sam_ratio_h selec = 0 #disk-dominated galaxies #plot specific AM vs. specific AM - fig = plt.figure(figsize=(9.5,9.5)) + fig = plt.figure(figsize=(9,8)) xtit = "$\\rm log_{10} (\\rm j_{\\rm halo}/kpc\,km\,s^{-1})$" ytit = "$\\rm log_{10} (\\rm j_{\\star},j_{\\star,disk},j_{\\rm gas,disk}/kpc\,km\,s^{-1}$)" - xmin, xmax, ymin, ymax = 0,6,0,6 + xmin, xmax, ymin, ymax = 1,6,1,6 xleg = xmax - 0.2 * (xmax - xmin) yleg = ymax - 0.1 * (ymax - ymin) @@ -603,7 +622,9 @@ def plot_specific_am_ratio(plt, outdir, obsdir, sam_ratio_halo_disk, sam_ratio_h for z,s,p in zip(zinplot, indz, subplots): ax = fig.add_subplot(p) common.prepare_ax(ax, xmin, xmax, ymin, ymax, xtit, ytit, locators=(0.1, 1, 0.1, 1)) - ax.text(xleg, yleg, 'z=%s' % str(z)) + ax.text(xleg, yleg, 'z=%s' % str(z), fontsize=10) + #if(s == 0): + # ax.text(5.5,6.4,'Lagos+18',fontsize=14) ind = np.where(sam_vs_sam_halo_gal[s,0,:,selec] != 0) xplot = xlf[ind]+3 @@ -632,25 +653,27 @@ def plot_specific_am_ratio(plt, outdir, obsdir, sam_ratio_halo_disk, sam_ratio_h ax.fill_between(xplot,yplot[0],yplot[0]-errdn[0], facecolor='b', alpha=0.2,interpolate=True) ax.fill_between(xplot,yplot[0],yplot[0]+errup[0], facecolor='b', alpha=0.2,interpolate=True) - xplot = [0,5] + xplot = [1,5] ax.plot(xplot,xplot,color='grey',linestyle='dotted') - common.prepare_legend(ax, ['k'], loc=2) + if(s == 0): + common.prepare_legend(ax, ['k','g','b'], loc=2) common.savefig(outdir, fig, 'specific_am_halo_vs_galaxy.pdf') -def plot_lambda(plt, outdir, obsdir, lambdaH, lambda_jiang, lambda_mass, bt, ms): +def plot_lambda(plt, outdir, obsdir, lambdaH, lambda_jiang, lambda_mass, bt, ms, ssfr_z0): - + lambda_allstar = lambda_jiang[3,:] lambda_disk= lambda_jiang[0,:] lambda_star= lambda_jiang[1,:] lambda_gas = lambda_jiang[2,:] fig = plt.figure(figsize=(5,12)) xtit = "" - ytit = "$\\rm log_{10}(\\lambda_{\\rm disk})$" - xmin, xmax, ymin, ymax = -3, 0, -3, -1 - xleg = xmax - 0.5 * (xmax - xmin) + ytit = "$\\rm log_{10}(\\lambda_{\\star})$" + xmin, xmax, ymin, ymax = -3, 0, -4, 0 + xleg = xmin + 0.02 * (xmax - xmin) yleg = ymax - 0.1 * (ymax - ymin) + cutms = 7.5 med = np.zeros(shape = (3, len(xlf))) @@ -658,36 +681,50 @@ def plot_lambda(plt, outdir, obsdir, lambdaH, lambda_jiang, lambda_mass, bt, ms common.prepare_ax(ax, xmin, xmax, ymin, ymax, xtit, ytit, locators=(0.1, 1, 0.1, 1)) ax.text(xleg, yleg, 'all galaxies, stars+gas') - ind = np.where((lambdaH > 0) & (lambda_disk > 0) & (lambda_disk < 10) & (ms > 9)) + ind = np.where((lambdaH > 0) & (lambda_allstar > 0) & (lambda_allstar < 10) & (ms > cutms)) xdata = np.log10(lambdaH[ind]) - ydata = np.log10(lambda_disk[ind]) + ydata = np.log10(lambda_allstar[ind]) us.density_contour(ax, xdata, ydata, 30, 30) #, **contour_kwargs) - coeff = np.corrcoef(np.log10(lambdaH[ind]),np.log10(lambda_disk[ind])) - ax.text(xmin + 0.02 * (xmax - xmin), ymin + 0.1 * (ymax - ymin), 'R=%s' % str(np.around(coeff[0,1], decimals=3))) + coeff = np.corrcoef(np.log10(lambdaH[ind]),np.log10(lambda_allstar[ind])) + ax.text(xmin + 0.02 * (xmax - xmin), ymax - 0.25 * (ymax - ymin), 'R=%s' % str(np.around(coeff[0,1], decimals=3))) - med[:] = us.wmedians(x=np.log10(lambdaH[ind]), y=np.log10(lambda_disk[ind]), xbins = xlf, low_numbers=True) - ind = np.where(med[0,:] != 0) + med[:] = us.wmedians(x=np.log10(lambdaH[ind]), y=np.log10(lambda_allstar[ind]), xbins = xlf, low_numbers=True) + ind = np.where((med[0,:] != 0) & (med[0,:] > -5)) xobs = xlf[ind] yobs = med[0,ind] yerrdn = med[1,ind] yerrup = med[2,ind] ax.errorbar(xobs, yobs[0], yerr=[yerrdn[0],yerrup[0]], ls='None', mfc='None', ecolor = 'grey', mec='grey',linestyle='solid', color='k') + #ind = np.where((lambdaH > 0) & (lambda_allstar > 0) & (lambda_allstar < 10) & (ms > 10)) + #med[:] = us.wmedians(x=np.log10(lambdaH[ind]), y=np.log10(lambda_allstar[ind]), xbins = xlf, low_numbers=True) + #ind = np.where((med[0,:] != 0) & (med[0,:] > -5)) + #xobs = xlf[ind] + #yobs = med[0,ind] + #ax.plot(xobs, yobs[0], color='k',linestyle='dotted', label='$\\rm log_{10}(M_{\\star}/M_{\\odot}) > 10$') + + #ind = np.where((lambdaH > 0) & (lambda_allstar > 0) & (lambda_allstar < 10) & (ms > 7.5) & (ms < 9)) + #med[:] = us.wmedians(x=np.log10(lambdaH[ind]), y=np.log10(lambda_allstar[ind]), xbins = xlf, low_numbers=True) + #ind = np.where((med[0,:] != 0) & (med[0,:] > -5)) + #xobs = xlf[ind] + #yobs = med[0,ind] + #ax.plot(xobs, yobs[0], color='k',linestyle='dashed', label='$\\rm 7.5 0) & (lambda_disk > 0) & (bt < 0.5) & (ms > 9)) + ind = np.where((lambdaH > 0) & (lambda_disk > 0) & (bt < 0.5) & (ms > cutms)) xdata = np.log10(lambdaH[ind]) ydata = np.log10(lambda_disk[ind]) us.density_contour(ax, xdata, ydata, 30, 30) #, **contour_kwargs) coeff = np.corrcoef(np.log10(lambdaH[ind]),np.log10(lambda_disk[ind])) - ax.text(xmin + 0.02 * (xmax - xmin), ymin + 0.1 * (ymax - ymin), 'R=%s' % str(np.around(coeff[0,1], decimals=3))) + ax.text(xmin + 0.02 * (xmax - xmin), ymax - 0.25 * (ymax - ymin), 'R=%s' % str(np.around(coeff[0,1], decimals=3))) med[:] = us.wmedians(x=np.log10(lambdaH[ind]), y=np.log10(lambda_disk[ind]), xbins = xlf, low_numbers=True) - ind = np.where(med[0,:] != 0) + ind = np.where((med[0,:] != 0) & (med[0,:] > -5)) xobs = xlf[ind] yobs = med[0,ind] yerrdn = med[1,ind] @@ -695,19 +732,18 @@ def plot_lambda(plt, outdir, obsdir, lambdaH, lambda_jiang, lambda_mass, bt, ms ax.errorbar(xobs, yobs[0], yerr=[yerrdn[0],yerrup[0]], ls='None', mfc='None', ecolor = 'grey', mec='grey',linestyle='solid', color='k') ax = fig.add_subplot(413) - xmin, xmax, ymin, ymax = -3, 0, -3, -1 common.prepare_ax(ax, xmin, xmax, ymin, ymax, xtit, ytit, locators=(0.1, 1, 0.1, 1)) ax.text(xleg, yleg, 'disk-dominated, stars') - ind = np.where((lambdaH > 0) & (lambda_star > 0) & (bt < 0.5) & (ms > 9)) + ind = np.where((lambdaH > 0) & (lambda_star > 0) & (bt < 0.5) & (ms > cutms)) xdata = np.log10(lambdaH[ind]) ydata = np.log10(lambda_star[ind]) us.density_contour(ax, xdata, ydata, 30, 30) #, **contour_kwargs) coeff = np.corrcoef(np.log10(lambdaH[ind]),np.log10(lambda_star[ind])) - ax.text(xmin + 0.02 * (xmax - xmin), ymin + 0.1 * (ymax - ymin), 'R=%s' % str(np.around(coeff[0,1], decimals=3))) + ax.text(xmin + 0.02 * (xmax - xmin), ymax - 0.25 * (ymax - ymin), 'R=%s' % str(np.around(coeff[0,1], decimals=3))) med[:] = us.wmedians(x=np.log10(lambdaH[ind]), y=np.log10(lambda_star[ind]), xbins = xlf, low_numbers=True) - ind = np.where(med[0,:] != 0) + ind = np.where((med[0,:] != 0) & (med[0,:] > -5)) xobs = xlf[ind] yobs = med[0,ind] yerrdn = med[1,ind] @@ -716,19 +752,18 @@ def plot_lambda(plt, outdir, obsdir, lambdaH, lambda_jiang, lambda_mass, bt, ms ax = fig.add_subplot(414) xtit = "$\\rm log_{10}(\\lambda_{\\rm halo})$" - xmin, xmax, ymin, ymax = -3, 0, -3, -1 common.prepare_ax(ax, xmin, xmax, ymin, ymax, xtit, ytit, locators=(0.1, 1, 0.1, 1)) ax.text(xmin + 0.02 * (xmax - xmin), yleg, 'disk-dominated, gas') - ind = np.where((lambdaH > 0) & (lambda_gas > 0) & (bt < 0.5) & (ms > 9)) + ind = np.where((lambdaH > 0) & (lambda_gas > 0) & (bt < 0.5) & (ms > cutms)) xdata = np.log10(lambdaH[ind]) ydata = np.log10(lambda_gas[ind]) us.density_contour(ax, xdata, ydata, 30, 30) #, **contour_kwargs) coeff = np.corrcoef(np.log10(lambdaH[ind]),np.log10(lambda_gas[ind])) - ax.text(xmin + 0.02 * (xmax - xmin), ymin + 0.1 * (ymax - ymin), 'R=%s' % str(np.around(coeff[0,1], decimals=3))) + ax.text(xmin + 0.02 * (xmax - xmin), ymax - 0.25 * (ymax - ymin), 'R=%s' % str(np.around(coeff[0,1], decimals=3))) med[:] = us.wmedians(x=np.log10(lambdaH[ind]), y=np.log10(lambda_gas[ind]), xbins = xlf, low_numbers=True) - ind = np.where(med[0,:] != 0) + ind = np.where((med[0,:] != 0) & (med[0,:] > -5)) xobs = xlf[ind] yobs = med[0,ind] yerrdn = med[1,ind] @@ -747,14 +782,15 @@ def main(modeldir, outdir, subvols, obsdir): 'specific_angular_momentum_disk_gas', 'specific_angular_momentum_bulge_gas', 'specific_angular_momentum_disk_gas_atom', 'specific_angular_momentum_disk_gas_mol', 'lambda_subhalo', 'mvir_subhalo', 'mvir_hosthalo', 'matom_disk', 'mmol_disk', 'mgas_disk', - 'matom_bulge', 'mmol_bulge', 'mgas_bulge')} + 'matom_bulge', 'mmol_bulge', 'mgas_bulge','sfr_disk', 'sfr_burst')} # Loop over redshift and subvolumes sam_stars_disk = np.zeros(shape = (len(zlist), 3, len(xmf),2)) sam_gas_disk_atom = np.zeros(shape = (len(zlist), 3, len(xmf),2)) sam_gas_disk_mol = np.zeros(shape = (len(zlist), 3, len(xmf),2)) sam_bar = np.zeros(shape = (len(zlist), 3, len(xmf),2)) - sam_halo = np.zeros(shape = (len(zlist), 3, len(xmf), 2)) + sam_halo = np.zeros(shape = (len(zlist), 3, len(xmf), 2)) + sam_stars = np.zeros(shape = (len(zlist), 3, len(xmf), 2)) sam_ratio_halo_disk = np.zeros(shape = (len(zlist), 3, len(xmfh), 2)) sam_ratio_halo_gal = np.zeros(shape = (len(zlist), 3, len(xmfh), 2)) @@ -770,20 +806,21 @@ def main(modeldir, outdir, subvols, obsdir): for index in range(0,4): hdf5_data = common.read_data(modeldir, zlist[index], fields, subvols) - (lh, lj, lm, bt, ms) = prepare_data(hdf5_data, index, sam_stars_disk, sam_gas_disk_atom, sam_gas_disk_mol, sam_halo, sam_ratio_halo_disk, + (lh, lj, lm, bt, ms, ssfr) = prepare_data(hdf5_data, index, sam_stars_disk, sam_gas_disk_atom, sam_gas_disk_mol, sam_halo, sam_ratio_halo_disk, sam_ratio_halo_gal, sam_ratio_halo_disk_gas, disk_size_sat, disk_size_cen, bulge_size, sam_vs_sam_halo_disk, sam_vs_sam_halo_gal, - sam_vs_sam_halo_disk_gas, sam_bar) + sam_vs_sam_halo_disk_gas, sam_bar, sam_stars) if(index == 0): lambdaH = lh lambda_jiang = lj lambda_mass = lm BT_ratio = bt stellar_mass = ms + ssfr_z0 = ssfr - plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam_gas_disk_mol, sam_halo, sam_bar) + plot_specific_am(plt, outdir, obsdir, sam_stars_disk, sam_gas_disk_atom, sam_gas_disk_mol, sam_halo, sam_bar, sam_stars) plot_specific_am_ratio(plt, outdir, obsdir, sam_ratio_halo_disk, sam_ratio_halo_gal, sam_ratio_halo_disk_gas, sam_vs_sam_halo_disk, sam_vs_sam_halo_gal, sam_vs_sam_halo_disk_gas) - plot_lambda(plt, outdir, obsdir, lambdaH, lambda_jiang, lambda_mass, BT_ratio, stellar_mass) + plot_lambda(plt, outdir, obsdir, lambdaH, lambda_jiang, lambda_mass, BT_ratio, stellar_mass, ssfr_z0) plot_sizes(plt, outdir, obsdir, disk_size_cen, disk_size_sat, bulge_size) if __name__ == '__main__': diff --git a/standard_plots/smf.py b/standard_plots/smf.py index ddd3e7f4..570a1a0d 100644 --- a/standard_plots/smf.py +++ b/standard_plots/smf.py @@ -229,7 +229,7 @@ def plot_stellarmf_z_molcomp(plt, outdir, obsdir, h0, plotz, hist_smf): #for i,j,p,q,x,y in zip(hist_smf[0,:],hist_smf[1,:],hist_smf[2,:],hist_smf[3,:],hist_smf[4,:],hist_smf[5,:]): # print i,j,p,q,x,y - hist_smf_modelvar = np.zeros(shape = (6, 315)) + hist_smf_modelvar = np.zeros(shape = (6, 360)) hist_smf_modelvar[0,:], hist_smf_modelvar[1,:],hist_smf_modelvar[2,:],hist_smf_modelvar[3,:],hist_smf_modelvar[4,:],hist_smf_modelvar[5,:] = common.load_observation(obsdir, 'Models/SharkVariations/SMF_OtherModels.dat', [0,1,2,3,4,5]) hist_smf_resolution = np.zeros(shape = (6, 135)) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 13410b7c..f53223a2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -26,7 +26,7 @@ include_directories(${CXXTEST_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) set(CXXTEST_TESTGEN_ARGS --error-printer --have-eh) -set(SHARK_TEST_NAMES components hdf5 naming_convention options) +set(SHARK_TEST_NAMES components hdf5 mixins naming_convention options) foreach(test_name ${SHARK_TEST_NAMES}) CXXTEST_ADD_TEST(test_${test_name} test_${test_name}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_${test_name}.h) diff --git a/tests/test_hdf5.h b/tests/test_hdf5.h index 23cb89a7..59a97b55 100644 --- a/tests/test_hdf5.h +++ b/tests/test_hdf5.h @@ -164,6 +164,7 @@ class TestHDF5 : public CxxTest::TestSuite { TS_ASSERT_THROWS(writer.write_attribute(basename + "/my_attribute", 1), invalid_argument); TS_ASSERT_THROWS(writer.write_attribute(repeated + "/my_attribute", 1), invalid_argument); TS_ASSERT_THROWS(writer.write_attribute(tailname + "/my_attribute", 1), invalid_argument); + writer.close(); remove_file(); }); } @@ -175,6 +176,7 @@ class TestHDF5 : public CxxTest::TestSuite { TS_ASSERT_THROWS(writer.write_dataset("/" + name, std::vector{1, 2, 3, 4}), invalid_argument); TS_ASSERT_THROWS(writer.write_dataset("/group/" + name, std::vector{1, 2, 3, 4}), invalid_argument); TS_ASSERT_THROWS(writer.write_dataset("/group1/group2/" + name, std::vector{1, 2, 3, 4}), invalid_argument); + writer.close(); remove_file(); }); } @@ -186,6 +188,7 @@ class TestHDF5 : public CxxTest::TestSuite { writer.write_dataset("/group/integers", std::vector{1, 2, 3, 4}); TS_ASSERT_THROWS(writer.write_attribute(std::string("/group/") + name, 1), invalid_argument); TS_ASSERT_THROWS(writer.write_attribute(std::string("/group/integers") + name, 1), invalid_argument); + writer.close(); remove_file(); }); } diff --git a/tests/test_mixins.h b/tests/test_mixins.h new file mode 100644 index 00000000..1a6ec744 --- /dev/null +++ b/tests/test_mixins.h @@ -0,0 +1,97 @@ +// +// Mixins unit tests +// +// ICRAR - International Centre for Radio Astronomy Research +// (c) UWA - The University of Western Australia, 2018 +// Copyright by UWA (in the framework of the ICRAR) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// + +#include + +#include +#include + +#include "mixins.h" +#include "exceptions.h" + +using namespace shark; + +class TestXYZ : public CxxTest::TestSuite { + +public: + + void test_addition() + { + xyz x1 {1, 2, 3}, x2 {4, 5, 6}; + + auto assert_add_xyz = [](const xyz &x) { + TS_ASSERT_DELTA(x.x, 5., 1e-8); + TS_ASSERT_DELTA(x.y, 7., 1e-8); + TS_ASSERT_DELTA(x.z, 9., 1e-8); + }; + auto assert_add_scalar = [](const xyz &x) { + TS_ASSERT_DELTA(x.x, 7., 1e-8); + TS_ASSERT_DELTA(x.y, 8., 1e-8); + TS_ASSERT_DELTA(x.z, 9., 1e-8); + }; + assert_add_xyz(x1 + x2); + x2 += x1; + assert_add_xyz(x2); + + assert_add_scalar(x1 + 6); + x1 += 6; + assert_add_scalar(x1); + } + + void test_multiplication() + { + xyz x {1, 2, 3}; + + auto assert_mul = [](const xyz &x) { + TS_ASSERT_DELTA(x.x, 3., 1e-8); + TS_ASSERT_DELTA(x.y, 6., 1e-8); + TS_ASSERT_DELTA(x.z, 9., 1e-8); + }; + assert_mul(x * 3); + x *= 3; + assert_mul(x); + } + + void test_division() + { + xyz x {1, 2, 3}; + + auto assert_div = [](const xyz &x) { + TS_ASSERT_DELTA(x.x, 1/3., 1e-5); + TS_ASSERT_DELTA(x.y, 2/3., 1e-5); + TS_ASSERT_DELTA(x.z, 1., 1e-5); + }; + assert_div(x / 3); + x /= 3; + assert_div(x); + } + + void test_unit() + { + std::default_random_engine engine{std::random_device{}()}; + std::uniform_real_distribution unidist(0, 1000); + for(int i = 0; i != 100; i++) { + xyz x {unidist(engine), unidist(engine), unidist(engine)}; + TS_ASSERT_DELTA(x.unit().norm(), 1, 1e-5); + } + } + +}; \ No newline at end of file