Text this: Retrieval of Parameters for Three-Layer Media with Nonsmooth Interfaces for Subsurface Remote Sensing