dshean / demcoreg

Utilities for DEM and point cloud co-registration
MIT License
114 stars 45 forks source link

converting tilt coefficients to list #9

Closed ShashankBice closed 5 years ago

ShashankBice commented 5 years ago

The polyfit coefficients are still ndarrays, for which json complains "TypeError: Object of type 'ndarray' is not JSON serializable"

dshean commented 5 years ago

Thanks. I hadn't tested latest json output with tiltcorr option.

We should add an option for user-specified polynomial order, rather than forcing to 1. I started working on a check to ensure good spatial distribution of valid difference values before fitting higher order, but got sidetracked.

The polynomial fits in malib should also be migrated to the more recent numpy.polynomial.polynomial.polyvander2d functionality.

ShashankBice commented 5 years ago

I missed your comment, github is still routing these to my old email id. Giving an option of user defined polynomial order is a good idea and I can look into it. But, I have a question at the top of my head, should this just be left to the user or should the user be provided with a plot of trend values over static area to decide the order of polynomial from?