{ "cells": [ { "cell_type": "markdown", "id": "e578297a-d2dc-4cb4-b016-1181649d227b", "metadata": {}, "source": [ "## Example of Wind inversion" ] }, { "cell_type": "markdown", "id": "fa19ad8e-ebaa-430e-bd91-c21d517e7e88", "metadata": {}, "source": [ "### define a product GRD Sentinel-1" ] }, { "cell_type": "code", "execution_count": null, "id": "ef483f15-4690-460b-b688-fa966bab8cd8", "metadata": {}, "outputs": [], "source": [ "import xsar" ] }, { "cell_type": "code", "execution_count": null, "id": "e04fa1b0-eb49-4e45-af0f-0be798e26f95", "metadata": {}, "outputs": [], "source": [ "# test on an dummy GRD IW product\n", "input_file = xsar.get_test_file('S1A_IW_GRDH_1SDV_20170907T103020_20170907T103045_018268_01EB76_Z010.SAFE')\n" ] }, { "cell_type": "markdown", "id": "f4886386-b19a-4c43-a790-192f4866a692", "metadata": {}, "source": [ "### perform wind inversion" ] }, { "cell_type": "code", "execution_count": null, "id": "d3fda3a2-2ee6-4401-be8f-c0fab8344a49", "metadata": {}, "outputs": [], "source": [ "from grdwindinversion.inversion import makeL2 \n", "\n" ] }, { "cell_type": "markdown", "id": "c8924754-34f5-4a27-a598-492022b3b3f5", "metadata": {}, "source": [ "### define config file" ] }, { "cell_type": "code", "execution_count": null, "id": "f95ee426-0b46-4d39-ae90-241e8bbaa332", "metadata": {}, "outputs": [], "source": [ "import grdwindinversion\n", "import os\n", "config_file_s1 = os.path.join(os.path.dirname(grdwindinversion.__file__),'config_S1.yaml')\n", "grdwindinversion.__file__\n", "print(os.path.exists(config_file_s1))" ] }, { "cell_type": "code", "execution_count": null, "id": "3cbe649d-44d7-4a7f-9041-137092a61e07", "metadata": {}, "outputs": [], "source": [ "out_folder = '/tmp/test_windinversion'" ] }, { "cell_type": "code", "execution_count": null, "id": "27bc671b-d78c-4d70-b898-eac4093253e0", "metadata": {}, "outputs": [], "source": [ "makeL2?" ] }, { "cell_type": "code", "execution_count": null, "id": "b90c78bb-8643-4d64-a463-28fcb68d9b38", "metadata": {}, "outputs": [], "source": [ "out_file,outds = makeL2(input_file,out_folder, config_path=config_file_s1,overwrite=True)\n", "outds" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.15" } }, "nbformat": 4, "nbformat_minor": 5 }