uafgeotools / lts_array

Least trimmed squares array processing for infrasound and seismic data
MIT License
12 stars 6 forks source link

Error when using data from 3 element array #19

Closed olamb245 closed 1 year ago

olamb245 commented 3 years ago

I get the following error message when I use data from a 3-element array: Bad assumption, n ! > 2p

The error message seems to come from line 79 in 'fast_lts_array'. I'm currently running 'ltsva' with Alpha=1, so it's running with ordinary least squares, not least-trimmed squares. I would understand needing the above error message if you're running least-trimmed with only 3 stations, but I'm not sure why it's needed for ordinary least squares when 3 stations should theoretically work (as far as I understand)?

davidfee5 commented 2 years ago

I just encountered this as well. We'll make sure it is fixed in an upcoming release. Assuming you worked around this already but you can just modify that line to be if n <= 2*p and alpha<1.0:

olamb245 commented 2 years ago

Yes, I think I came up with a fix very similar to this. Thanks.

jwbishop commented 1 year ago

Fixed by #23