mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 07:11:12 +00:00
more ramses fixes
This commit is contained in:
parent
3be25104c9
commit
5b7e94c4b1
2 changed files with 4 additions and 7 deletions
|
@ -95,12 +95,9 @@ public:
|
|||
if (id >= _num_files)
|
||||
return 0;
|
||||
|
||||
|
||||
d = loadRamsesSimu("/home/ben/phd/software/VIDE/vide_public/output_00091/", baseid, id, double_precision, load_flags);
|
||||
d = loadRamsesSimu(snapshot_name.c_str(), baseid, id, double_precision, load_flags);
|
||||
assert(d != 0);
|
||||
|
||||
cout << " Id " << id << "\n";
|
||||
|
||||
if (d->Id != 0)
|
||||
{
|
||||
long *uniqueID = new long[d->NumPart];
|
||||
|
|
|
@ -170,7 +170,8 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
|||
elif sample.dataFormat == "sdf":
|
||||
dataFileLine = "sdf " + datafile
|
||||
elif sample.dataFormat == "ramses":
|
||||
dataFileLine = "ramses " + os.path.split(datafile)[0] + '/' # just want the output directory
|
||||
ramsesId = int(os.path.split(datafile)[1][-5:len(datafile)]) # picks out the particle file (should be the output_NNNNN, then extracts the output id "NNNNN" as an integer)
|
||||
dataFileLine = "ramses " + datafile + "/"
|
||||
else:
|
||||
raise ValueError("unknown dataFormat '%s'" % sample.dataFormat)
|
||||
|
||||
|
@ -186,8 +187,7 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
|||
if not sample.shiftSimZ: reshiftFlag = "preReShift"
|
||||
|
||||
if sample.dataFormat == "ramses":
|
||||
ramsesId = int((os.path.split(datafile)[1])[5:10]) # picks out the particle file (should be the part_NNNNN.outXXXXX, then extracts the output id "NNNNN" as an integer)
|
||||
ramsesIdLine = "ramsesId " + ramsesId
|
||||
ramsesIdLine = "ramsesId " + str(ramsesId)
|
||||
else:
|
||||
ramsesIdLine = ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue