<jupyter_start><jupyter_text>asf_search - Basic Overview`asf_search` provides several helpful classes and functions to simplify working with the ASF catalog. This notebook briefly describes how to get started with `asf_search`.*** Before You Start  The steps outlined in this notebook assume `asf_search` is available on your system. `asf_search` is available through [PyPi](https://pypi.org/project/asf-search/), [Conda](https://anaconda.org/conda-forge/asf_search), and [Github](https://github.com/asfadmin/Discovery-asf_search). Additionally, full documentation for `asf_search` and many other services offered by ASF is available at [https://docs.asf.alaska.edu/](https://docs.asf.alaska.edu/)  For this demonstration, we have already installed `asf_search` within a virtual environment through PyPi via the command:    ```pip install asf_search```  `asf_search` requires Python 3.6 or higher. *** UsageOnce installed, simply import `asf_search` as you would any other Python module:<jupyter_code>import asf_search as asf<jupyter_output><empty_output><jupyter_text>`asf_search` version numbers are based on [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html):<jupyter_code>asf.__version__<jupyter_output><empty_output><jupyter_text>*** Performing a Basic Search[View this search in Vertex](https://search.asf.alaska.edu//?resultsLoaded=true&dataset=SENTINEL-1)For this basic example, we will specify two search parameters: a platform, and how many results we want to retrieve:- Sentinel-1- 5 results max    - (results are retrieved newest-first, so this will be the 5 newest products).<jupyter_code>results = asf.search(platform=asf.PLATFORM.SENTINEL1, maxResults=5)<jupyter_output><empty_output><jupyter_text>Alternatively, it may be useful to handle your search arguments as a dictionary:<jupyter_code>opts = {
    'platform': asf.PLATFORM.SENTINEL1,
    'maxResults': 5
}
results = asf.search(**opts)<jupyter_output><empty_output><jupyter_text>Note the use of `asf_search`-provided constants, as many editors support use of these through autocompletion. Categories of constants include:- `BEAMMODE`- `FLIGHT_DIRECTION`- `INSTRUMENT`- `PLATFORM`- `POLARIZATION`- `PRODUCT_TYPE`   *** Working With Results `ASFSearchResults`Search results are returned as an `ASFSearchResults` object, a subclass of `UserList`, containing a list of `ASFProduct` objects, each of these classes providing some additional functionality to aid in working with the results and individual products:<jupyter_code>results<jupyter_output><empty_output><jupyter_text>`ASFProduct``ASFProduct` provides a number of metadata fields, such as:- Geographic coordinates    - Latitude/Longitude    - Shape type- Scene and product metadata    - Path, frame    - Platform, beam, polarization    - File name, size, URL    - and many others  Geographic coordinates are stored in the `geometry` attribute:<jupyter_code>results[0].geometry<jupyter_output><empty_output><jupyter_text>Other metadata is available through the `properties` attribute:<jupyter_code>results[0].properties<jupyter_output><empty_output><jupyter_text>OutputThe layout of the above data structure mirrors the geojson output format provided by ASF's SearchAPI, for a smooth transition to `asf_search`.  In fact, the `ASFSearchResults.__str__()` method serializes results to geojson _identical_ to that of ASF's SearchAPI, allowing for a drop-in replacement for users of the SearchAPI, simply by explicitly or implicitly casting search results to a string:<jupyter_code>print(results)<jupyter_output><empty_output><jupyter_text>Additionally, individual `ASFProduct` objects provides geojson-based serialization, in the form of a geojson `Feature` snippet:<jupyter_code>print(results[0])<jupyter_output><empty_output><jupyter_text>SummaryA complete example, showing how simple use of `asf_search` can be:<jupyter_code>import asf_search as asf

print(asf.search(platform='S1', maxResults=5))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09377363246785984, 'fraction_numerical': 0.005293672800604991, 'mean_word_length': 6.645472061657033, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '318177', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1169, 'n_words': 371, 'path': 'examples/1-Basic_Overview.ipynb', 'repo_name': 'dfsanchezvi/Discovery-asf_search', 'size': '3967'}