pytroll / fogpy

Satellite based fog and low stratus detection and nowcasting
http://fogpy.readthedocs.io/en/latest
GNU General Public License v3.0
20 stars 10 forks source link

Brute force faster than basin hopping?! #21

Open gerritholl opened 5 years ago

gerritholl commented 5 years ago

It seems that the brute force method is much faster than the basin hopping method:

>>> t1=time.time(); print([self.lwc.optimize_cbh(1000., method='brute') for _ in range(10)]); t2=time.time(); print(t2-t1)
[417.0, 417.0, 417.0, 417.0, 417.0, 417.0, 417.0, 417.0, 417.0, 417.0]
30.48786234855652
>>> t1=time.time(); print([self.lwc.optimize_cbh(1000., method='basin') for _ in range(10)]); t2=time.time(); print(t2-t1)
[417.1936300818184, 417.19363008207864, 417.19363008230766, 417.1936300820221, 417.19363008157075, 417.1936300821362, 417.1936300825845, 417.1936300816707, 417.1936300828528, 417.19363008183757]
111.41780018806458

Here I have omitted the numerous warnings (see #9).

This issue is probably related to #11, and perhaps to #9 too.