jonghyunharrylee / pyPCGA

pyPCGA: fast and scalable inverse modeling approach
BSD 3-Clause "New" or "Revised" License
23 stars 15 forks source link

model size #16

Closed pavane closed 1 year ago

pavane commented 2 years ago

I have a 2d model which produces 11*11 result, I resize it to 1d. I run and I get the following error

PCGA Inversion
1. Initialize forward and inversion parameters

------------ Inversion Parameters ------------------------- Number of unknowns : 121 Number of observations : 121 Number of principal components (n_pc) : 50 Prior model : def kernel(r): return (prior_std * 2) np.exp(-r)

Prior variance : 4.000000e-02 Prior scale (correlation) parameter : [71. 71.] Posterior cov computation : diag Posterior variance computation : Direct Number of CPU cores (n_core) : 4 Maximum GN iterations : 10 machine precision (delta = sqrt(precision)) : 1.000000e-08 Tol for iterations (norm(sol_diff)/norm(sol)) : 1.000000e-02 Levenberg-Marquardt (LM) : True LM solution range constraints (LM_smin, LM_smax) : None, None Line search : True

2. Construct Prior Covariance Matrix
jonghyunharrylee commented 2 years ago

Hi Pavane,

It seems something wrong in your forward model implementation. In pyPCGA, forward model implementation should follow a class format (see all example folders and forward model classes) in order to work correctly with data in parallel. You can contact me directly (my hawaii.edu email) with your implementation and I can help you to write a forward model class correctly.

By the way, given your covariance spectrum you may need 10-20 PCs to get a reasonable result. Do not need 50 PCs with spectral error 0.0001132 (between 0.001 and 0.05 would be enough in most applications).

Best, Jonghyun Harry Lee