Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature "kurto_z" RuntimeWarning: invalid value encountered in double_scalars #121

Open
lbogaardt opened this issue Aug 20, 2018 · 2 comments

Comments

@lbogaardt
Copy link
Collaborator

Feature "kurto_z" gives a RuntimeWarning: invalid value encountered in double_scalars for some tiles. I think such warning should be logged somewhere (for example in the comment section of the .ply file).

python /home/ubuntu/feature_scripts/computefea_wtargets_cell.py /data/local/eecolidar/modules/python/laserchicken/ /data/local/eecolidar/rclone/tmp/ahn3_256x256_2km_norm/tile_76_79.LAZ /data/local/eecolidar_webdav/01_Work/ALS/Netherlands/ahn3_targets_100m/tile_76_79_target.laz 50 /home/ubuntu/tile_76_79.ply
------ Import is started ------
Number of points: 59068115
Number of points in target: 400
------ Computing neighborhood is started ------
Cylinder size in Bytes: 13697343969.7
Memory size in Bytes: 33737809920
Start tree creation
Done with env tree creation
Done with target tree creation
build kd-tree: 46.377516 sec
Computed neighborhoods list length at iteration 0 is: 400
------ Feature calculation is started ------
Feature "eigenv_3"
Number of targets: 400, number of features: 3
took 2.74 seconds
Feature "point_density"
Number of targets: 400, number of features: 1
took 0.71 seconds
Feature "pulse_penetration_ratio"
Number of targets: 400, number of features: 2
took 24.42 seconds
Feature "perc_90"
Number of targets: 400, number of features: 10
took 4.30 seconds
Feature "sigma_z"
Number of targets: 400, number of features: 1
took 2.82 seconds
Feature "kurto_z"
Number of targets: 400, number of features: 10
/data/local/eecolidar/modules/python/laserchicken/laserchicken/feature_extractor/height_statistics_feature_extractor.py:30: RuntimeWarning: invalid value encountered in double_scalars
coeff_var_z = np.std(z) / np.mean(z)
took 1.44 seconds
feature calc: 36.425914 sec

@romulogoncalves
Copy link
Collaborator

That could mean mistake no how things are read or corrupted data. Could you share the details on how things were run? Like script, target and src point cloud?

@lbogaardt
Copy link
Collaborator Author

The script and input data is included in my issue above.

I think the problem comes when all 'z' is zero. Then std(z)=0 and mean(z)=0 so the coeff_var_z = np.std(z) / np.mean(z) calculation gives inf. It probably should give back zero. So coeff_var_z = if mean(z) == 0 then 0 else np.std(z) / np.mean(z);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants