DeltaRCM / DeltaMetrics

measuring deltas
https://deltarcm.org/DeltaMetrics/
MIT License
3 stars 5 forks source link

Return from shaw_opening_angle_method is strange / optimization #48

Closed amoodie closed 2 months ago

amoodie commented 3 years ago

The returned objects from the shaw_opening_angle_method is a flattened array. We know the array shape as an input though, so it probably makes more sense to return the reshaped arrays of sea_angles.

Additionally, there is another array shoreangles created, but I'm not clear on what this does.

There is probably quite a bit more optimization that can be done to this method/implementation though, so it would be a good target for a fun afternoon.

elbeejay commented 2 years ago

Can confirm some optimization is needed. Run into segmentation faults when trying to process larger arrays (e.g., those from remote sensing imagery - example below has shape (4398, 5882) which equates to 25869036 values).

Example using the fly_mask.npy array stored in zip file: fly_mask.zip

fly = np.load('fly_mask.npy')
OAP = dm.plan.OpeningAnglePlanform(fly)
amoodie commented 2 months ago

I am closing this per #144, which greatly improved things. I can also confirm that the Fly River delta data can be processed and return a reasonable result.

image