Skip to content

Commit

Permalink
minor fix to python3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Feb 24, 2025
1 parent a7238f8 commit 557da04
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/SimSET/scripts/make_hv_from_Simset_params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ zMax=`find_param $params_file zMin|tail -n 1`
DimSize1=`find_param $params_file num_X_bins`
DimSize2=`find_param $params_file num_Y_bins`
DimSize3=$(( `find_param $params_file slice_number|tail -n 1` + 1 ))
ElementSpacing1=`python -c "print ($xMax - $xMin)*10/$DimSize1"`
ElementSpacing2=`python -c "print ($yMax - $yMin)*10/$DimSize2"`
ElementSpacing3=`python -c "print ($zMax - $zMin)*10/($DimSize3 - 1)"`
Offset1=`python -c "print $xMin*10 + $ElementSpacing1/2"`
Offset2=`python -c "print $yMin*10 + $ElementSpacing2/2"`
Offset3=`python -c "print $zMin*10"`
ElementSpacing1=`python -c "print(($xMax - $xMin)*10/$DimSize1)"`
ElementSpacing2=`python -c "print(($yMax - $yMin)*10/$DimSize2)"`
ElementSpacing3=`python -c "print(($zMax - $zMin)*10/($DimSize3 - 1))"`
Offset1=`python -c "print($xMin*10 + $ElementSpacing1/2)"`
Offset2=`python -c "print($yMin*10 + $ElementSpacing2/2)"`
Offset3=`python -c "print($zMin*10)"`

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

cat > $output_file_hv <<EOF
Expand Down

0 comments on commit 557da04

Please sign in to comment.