ldcpy icon indicating copy to clipboard operation
ldcpy copied to clipboard

Functional interface for error metrics

Open treigerm opened this issue 8 months ago • 2 comments

Thank you for developing this useful package!

I installed ldcpy to calculate the data-SSIM (ssim_value_fp_fast). However, on my own dataset, I could not initialise a Diffcalcs instance because it does not come from one of the supported data_types.

The code for ssim_value_fp_fast (and many of the other metrics) seems mostly agnostic to the supplied data type though. I was wondering whether it would be possible to expose an some of the error metrics as simple functions which take in two xr.DataArrays (or some other acceptable array type) and return a floating point number? Such functionality would make it a lot easier to incorporate ldcpy into external projects!

treigerm avatar Apr 08 '25 16:04 treigerm

Great suggestion - we'll look into this for the future.

allibco avatar Apr 16 '25 17:04 allibco

Thanks a lot!

treigerm avatar Apr 17 '25 15:04 treigerm