Merged in python3 (pull request #5)

Port to python3, large code cleanup

* Fixed command line for cosmotool

* Fix path

* Dump command line is log file

* Fix important typo

* Modify paths for example

* Fix path again

* Use an explicit constructor

* Change file to open (python 2->3)

* python3 fix for xrange in periodic_kdtree.py

* Fixed index for Np, numPart, numZones, numZonesTot, partID, zoneID in catalogUtil.py
This commit is contained in:
Guilhem Lavaux 2020-12-29 08:56:33 +00:00
parent 8249256508
commit affb56ff48
392 changed files with 4092 additions and 260938 deletions

View file

@ -37,3 +37,5 @@ target_link_libraries(pruneVoids ${ZOB_LIBS})
#add_genopt(makeAHFOutput_SRCS makeAHFOutput.ggo makeAHFOutput_conf STRUCTNAME makeAHFOutput_info)
#add_executable(makeAHFOutput ${makeAHFOutput_SRCS})
#target_link_libraries(makeAHFOutput ${ZOB_LIBS})
install(TARGETS pruneVoids DESTINATION ${VIDE_BIN})

View file

@ -37,7 +37,7 @@
#include "stdlib.h"
#include <math.h>
#include <stdio.h>
#include <netcdfcpp.h>
#include <netcdf>
#include "pruneVoids_conf.h"
#include <vector>
#include "assert.h"
@ -243,13 +243,13 @@ int main(int argc, char **argv) {
// load box size
printf("\n Getting info...\n");
NcFile f_info(args.extraInfo_arg);
ranges[0][0] = f_info.get_att("range_x_min")->as_double(0);
ranges[0][1] = f_info.get_att("range_x_max")->as_double(0);
ranges[1][0] = f_info.get_att("range_y_min")->as_double(0);
ranges[1][1] = f_info.get_att("range_y_max")->as_double(0);
ranges[2][0] = f_info.get_att("range_z_min")->as_double(0);
ranges[2][1] = f_info.get_att("range_z_max")->as_double(0);
netCDF::NcFile f_info(args.extraInfo_arg, netCDF::NcFile::read);
f_info.getAtt("range_x_min").getValues(&ranges[0][0]);
f_info.getAtt("range_x_max").getValues(&ranges[0][1]);
f_info.getAtt("range_y_min").getValues(&ranges[1][0]);
f_info.getAtt("range_y_max").getValues(&ranges[1][1]);
f_info.getAtt("range_z_min").getValues(&ranges[2][0]);
f_info.getAtt("range_z_max").getValues(&ranges[2][1]);
printf(" Range xmin %e\n", ranges[0][0]);
printf(" Range xmax %e\n", ranges[0][1]);