Skip to content

Commit 557da04

Browse files
minor fix to python3 compatibility
1 parent a7238f8 commit 557da04

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/SimSET/scripts/make_hv_from_Simset_params.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ zMax=`find_param $params_file zMin|tail -n 1`
7171
DimSize1=`find_param $params_file num_X_bins`
7272
DimSize2=`find_param $params_file num_Y_bins`
7373
DimSize3=$(( `find_param $params_file slice_number|tail -n 1` + 1 ))
74-
ElementSpacing1=`python -c "print ($xMax - $xMin)*10/$DimSize1"`
75-
ElementSpacing2=`python -c "print ($yMax - $yMin)*10/$DimSize2"`
76-
ElementSpacing3=`python -c "print ($zMax - $zMin)*10/($DimSize3 - 1)"`
77-
Offset1=`python -c "print $xMin*10 + $ElementSpacing1/2"`
78-
Offset2=`python -c "print $yMin*10 + $ElementSpacing2/2"`
79-
Offset3=`python -c "print $zMin*10"`
74+
ElementSpacing1=`python -c "print(($xMax - $xMin)*10/$DimSize1)"`
75+
ElementSpacing2=`python -c "print(($yMax - $yMin)*10/$DimSize2)"`
76+
ElementSpacing3=`python -c "print(($zMax - $zMin)*10/($DimSize3 - 1))"`
77+
Offset1=`python -c "print($xMin*10 + $ElementSpacing1/2)"`
78+
Offset2=`python -c "print($yMin*10 + $ElementSpacing2/2)"`
79+
Offset3=`python -c "print($zMin*10)"`
8080

8181
number_format="float"; bytes_per_pixel=4;
82-
byte_order=`python -c 'import sys; print sys.byteorder'`endian
82+
byte_order=`python -c 'import sys; print(sys.byteorder)'`endian
8383
HeaderSize=0
8484

8585
cat > $output_file_hv <<EOF

0 commit comments

Comments
 (0)